@rabbi696/ezrouter 0.6.6 → 0.6.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 (1289) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +21 -19
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/routes-manifest.json +12 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +16 -16
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/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/profile/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +6 -6
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/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/routing-health/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  94. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  105. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  108. package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  109. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  110. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  111. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  112. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  113. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  114. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/changelog/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +6 -6
  142. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  158. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  160. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  166. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
  168. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  170. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  172. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  174. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +3 -3
  176. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  178. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  180. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/convoy/rules/route.js +2 -2
  198. package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  226. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js +2 -2
  238. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js +2 -2
  240. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js +2 -2
  244. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/callback/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  278. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -0
  300. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -0
  301. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route_client-reference-manifest.js +1 -0
  302. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +4 -0
  303. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -0
  304. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route_client-reference-manifest.js +1 -0
  305. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +14 -14
  340. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +14 -14
  342. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +14 -14
  346. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  348. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  350. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  352. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  354. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  356. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  358. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  360. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  362. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/routing-health/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +2 -2
  380. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  386. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  408. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js +3 -3
  416. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  418. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  428. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  430. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +3 -3
  460. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  474. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  475. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  478. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  480. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  484. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  486. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  487. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  488. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  489. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  490. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  491. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  492. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  493. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  494. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  496. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  497. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  498. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  499. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  500. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  501. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  502. package/app/.next-cli-build/server/app/callback.html +1 -1
  503. package/app/.next-cli-build/server/app/callback.rsc +3 -3
  504. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  505. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  506. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  507. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  509. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  512. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  517. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  519. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  522. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  523. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  527. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  529. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  530. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  532. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  537. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  539. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  540. package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/convoy.rsc +5 -5
  542. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
  543. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +5 -5
  547. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +3 -3
  549. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +1 -1
  550. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  552. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  553. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  556. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  557. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  559. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  560. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
  561. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +5 -5
  562. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
  563. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  566. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  567. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +5 -5
  568. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +3 -3
  570. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +1 -1
  571. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
  572. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +5 -5
  573. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
  574. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  576. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  578. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +5 -5
  579. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
  580. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +3 -3
  581. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +1 -1
  582. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
  583. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +5 -5
  584. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
  585. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  586. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  588. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +5 -5
  589. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +3 -3
  591. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +1 -1
  592. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  594. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  595. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  596. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  597. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  598. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  599. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  600. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  601. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  602. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  603. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  604. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  605. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  606. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  607. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  608. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  609. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  610. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  611. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  612. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  613. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  614. package/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  615. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  616. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  618. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  619. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  620. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  622. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  623. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  624. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  625. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  626. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  628. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  629. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  630. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  631. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  632. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  633. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  634. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  635. package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  636. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  637. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  638. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  639. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  640. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  641. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  642. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  643. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  644. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  645. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  646. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  647. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  648. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  649. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  650. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  651. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  652. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  653. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  654. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  655. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  656. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  657. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  658. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  659. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  660. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  661. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  662. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  663. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  664. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  665. package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  666. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  667. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  668. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  669. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  670. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  671. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  672. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  673. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  674. package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
  675. package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +5 -5
  676. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
  677. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
  678. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  679. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  680. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +5 -5
  681. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
  682. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +3 -3
  683. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +1 -1
  684. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  685. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  686. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  687. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  688. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  689. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  690. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  691. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  692. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  693. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  694. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  695. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  696. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  697. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  698. package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  699. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  700. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  701. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  702. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  703. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  704. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  705. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  706. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  707. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  708. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  709. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  710. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  711. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  712. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  713. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  714. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  715. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  716. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  717. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  718. package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  719. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  720. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  721. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  722. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  723. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  724. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  725. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  726. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  727. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  728. package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  729. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  730. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  731. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  732. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  733. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  734. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  735. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  736. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  737. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  738. package/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  739. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  740. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  741. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  742. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  743. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  744. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  745. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  746. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  747. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  748. package/app/.next-cli-build/server/app/index.html +1 -1
  749. package/app/.next-cli-build/server/app/index.rsc +3 -3
  750. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  751. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  752. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  753. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  754. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  755. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  756. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  757. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  758. package/app/.next-cli-build/server/app/landing.html +1 -1
  759. package/app/.next-cli-build/server/app/landing.rsc +3 -3
  760. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  761. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  762. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  763. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  764. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  765. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  766. package/app/.next-cli-build/server/app/login/page.js +2 -2
  767. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  768. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  769. package/app/.next-cli-build/server/app/login.html +1 -1
  770. package/app/.next-cli-build/server/app/login.rsc +4 -4
  771. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  772. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  773. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  774. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  775. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  776. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  777. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  778. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  779. package/app/.next-cli-build/server/app/page.js +2 -2
  780. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  781. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  782. package/app/.next-cli-build/server/app-paths-manifest.json +21 -19
  783. package/app/.next-cli-build/server/chunks/1133.js +1 -1
  784. package/app/.next-cli-build/server/chunks/1273.js +1 -0
  785. package/app/.next-cli-build/server/chunks/1482.js +2 -2
  786. package/app/.next-cli-build/server/chunks/1531.js +1 -1
  787. package/app/.next-cli-build/server/chunks/{7306.js → 1744.js} +18 -18
  788. package/app/.next-cli-build/server/chunks/1847.js +1 -1
  789. package/app/.next-cli-build/server/chunks/2021.js +1 -1
  790. package/app/.next-cli-build/server/chunks/2348.js +1 -1
  791. package/app/.next-cli-build/server/chunks/2892.js +1 -1
  792. package/app/.next-cli-build/server/chunks/2898.js +22 -3
  793. package/app/.next-cli-build/server/chunks/3148.js +1 -1
  794. package/app/.next-cli-build/server/chunks/3245.js +1 -1
  795. package/app/.next-cli-build/server/chunks/3311.js +1 -1
  796. package/app/.next-cli-build/server/chunks/3433.js +4 -4
  797. package/app/.next-cli-build/server/chunks/3547.js +1 -1
  798. package/app/.next-cli-build/server/chunks/3583.js +2 -2
  799. package/app/.next-cli-build/server/chunks/369.js +22 -28
  800. package/app/.next-cli-build/server/chunks/3698.js +1 -1
  801. package/app/.next-cli-build/server/chunks/3886.js +1 -1
  802. package/app/.next-cli-build/server/chunks/3977.js +2 -2
  803. package/app/.next-cli-build/server/chunks/412.js +5 -5
  804. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  805. package/app/.next-cli-build/server/chunks/4152.js +1 -0
  806. package/app/.next-cli-build/server/chunks/4574.js +1 -1
  807. package/app/.next-cli-build/server/chunks/4827.js +1 -1
  808. package/app/.next-cli-build/server/chunks/4878.js +1 -1
  809. package/app/.next-cli-build/server/chunks/4924.js +300 -0
  810. package/app/.next-cli-build/server/chunks/5130.js +1 -0
  811. package/app/.next-cli-build/server/chunks/5224.js +1 -0
  812. package/app/.next-cli-build/server/chunks/5315.js +1 -1
  813. package/app/.next-cli-build/server/chunks/576.js +1 -0
  814. package/app/.next-cli-build/server/chunks/5849.js +1 -1
  815. package/app/.next-cli-build/server/chunks/6000.js +1 -0
  816. package/app/.next-cli-build/server/chunks/6330.js +1 -0
  817. package/app/.next-cli-build/server/chunks/6816.js +4 -4
  818. package/app/.next-cli-build/server/chunks/6875.js +1 -0
  819. package/app/.next-cli-build/server/chunks/6892.js +1 -1
  820. package/app/.next-cli-build/server/chunks/6947.js +1 -1
  821. package/app/.next-cli-build/server/chunks/7239.js +3 -3
  822. package/app/.next-cli-build/server/chunks/7353.js +1 -1
  823. package/app/.next-cli-build/server/chunks/7362.js +1 -1
  824. package/app/.next-cli-build/server/chunks/{6535.js → 7524.js} +3 -3
  825. package/app/.next-cli-build/server/chunks/7603.js +1 -1
  826. package/app/.next-cli-build/server/chunks/7677.js +1 -1
  827. package/app/.next-cli-build/server/chunks/7774.js +8 -8
  828. package/app/.next-cli-build/server/chunks/7775.js +1 -1
  829. package/app/.next-cli-build/server/chunks/8129.js +1 -1
  830. package/app/.next-cli-build/server/chunks/823.js +1 -1
  831. package/app/.next-cli-build/server/chunks/8243.js +7 -7
  832. package/app/.next-cli-build/server/chunks/8299.js +1 -0
  833. package/app/.next-cli-build/server/chunks/8306.js +1 -1
  834. package/app/.next-cli-build/server/chunks/8459.js +1 -1
  835. package/app/.next-cli-build/server/chunks/8586.js +1 -1
  836. package/app/.next-cli-build/server/chunks/8658.js +1 -1
  837. package/app/.next-cli-build/server/chunks/880.js +7 -7
  838. package/app/.next-cli-build/server/chunks/8946.js +1 -1
  839. package/app/.next-cli-build/server/chunks/8976.js +1 -1
  840. package/app/.next-cli-build/server/chunks/9062.js +1 -1
  841. package/app/.next-cli-build/server/chunks/9217.js +1 -1
  842. package/app/.next-cli-build/server/chunks/9303.js +1 -1
  843. package/app/.next-cli-build/server/chunks/9485.js +1 -1
  844. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  845. package/app/.next-cli-build/server/middleware.js +4 -4
  846. package/app/.next-cli-build/server/pages/404.html +1 -1
  847. package/app/.next-cli-build/server/pages/500.html +1 -1
  848. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  849. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  850. package/app/.next-cli-build/static/caISOCVUmfRaqJe0JjnZh/_buildManifest.js +1 -0
  851. package/app/.next-cli-build/static/chunks/{1321-f082c0cd9fbb2097.js → 1321-b8a4f80390cd3ea3.js} +1 -1
  852. package/app/.next-cli-build/static/chunks/2852-c263bdffcaa33c2a.js +95 -0
  853. package/app/.next-cli-build/static/chunks/{316-89ef881941b53b2c.js → 316-54e07b35de6154b5.js} +1 -1
  854. package/app/.next-cli-build/static/chunks/{5497-f328c487bfcc0d0e.js → 5497-a4fcd9746123edae.js} +5 -5
  855. package/app/.next-cli-build/static/chunks/{8010-5892efa7a8d0bb03.js → 8010-4f17bcbf4cac2817.js} +2 -2
  856. package/app/.next-cli-build/static/chunks/8105-914b0eb9e3a50b9d.js +1 -0
  857. package/app/.next-cli-build/static/chunks/9227-0d7e658f80553659.js +3 -0
  858. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-ce0b5b8882899119.js → page-5c9ac89a0fd078b6.js} +1 -1
  859. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-257aaa1374d529b4.js → page-7a5b3f43946719b9.js} +1 -1
  860. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-12452d79eba6c182.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-90a4f789d907db25.js → page-8236097df15d7be9.js} +16 -16
  862. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-e44166090e05cfb3.js → page-694c3b4cef7d111e.js} +1 -1
  863. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-11a1a4053a30913f.js +27 -0
  864. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-679ec0628cd9d54f.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-6f16a27a86240648.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-f744066e8709b6c1.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-100d6d3c6c7256f1.js → layout-fa3153761cc595bb.js} +1 -1
  868. package/app/.next-cli-build/static/chunks/app/_global-error/page-116cfb93931e646f.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-116cfb93931e646f.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-116cfb93931e646f.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-116cfb93931e646f.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-116cfb93931e646f.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-116cfb93931e646f.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-116cfb93931e646f.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-116cfb93931e646f.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-116cfb93931e646f.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-116cfb93931e646f.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-116cfb93931e646f.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-116cfb93931e646f.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/changelog/route-116cfb93931e646f.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/cli/providers/codex/route-116cfb93931e646f.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-116cfb93931e646f.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-116cfb93931e646f.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-116cfb93931e646f.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-116cfb93931e646f.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-116cfb93931e646f.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/models/route-116cfb93931e646f.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/readiness/route-116cfb93931e646f.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-116cfb93931e646f.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-116cfb93931e646f.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-116cfb93931e646f.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-116cfb93931e646f.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-116cfb93931e646f.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-116cfb93931e646f.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-116cfb93931e646f.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-116cfb93931e646f.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-116cfb93931e646f.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-116cfb93931e646f.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-116cfb93931e646f.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-116cfb93931e646f.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-116cfb93931e646f.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-116cfb93931e646f.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-116cfb93931e646f.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-116cfb93931e646f.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/test/route-116cfb93931e646f.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/combos/export/route-116cfb93931e646f.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/combos/import/route-116cfb93931e646f.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/combos/route-116cfb93931e646f.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/combos/test/route-116cfb93931e646f.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/convoy/rules/route-116cfb93931e646f.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-116cfb93931e646f.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-116cfb93931e646f.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-116cfb93931e646f.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-116cfb93931e646f.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-116cfb93931e646f.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-116cfb93931e646f.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/health/route-116cfb93931e646f.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/init/route-116cfb93931e646f.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/internal/codex-native/lease/[action]/route-116cfb93931e646f.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-116cfb93931e646f.js +1 -0
  921. package/app/.next-cli-build/static/chunks/app/api/keys/route-116cfb93931e646f.js +1 -0
  922. package/app/.next-cli-build/static/chunks/app/api/locale/route-116cfb93931e646f.js +1 -0
  923. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-116cfb93931e646f.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-116cfb93931e646f.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/route-116cfb93931e646f.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/test/route-116cfb93931e646f.js +1 -0
  927. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/route-116cfb93931e646f.js +1 -0
  928. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/[id]/route-116cfb93931e646f.js +1 -0
  929. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/route-116cfb93931e646f.js +1 -0
  930. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/message/route-116cfb93931e646f.js +1 -0
  931. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/oauth/[id]/[action]/route-116cfb93931e646f.js +1 -0
  932. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/route-116cfb93931e646f.js +1 -0
  933. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/sse/route-116cfb93931e646f.js +1 -0
  934. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-116cfb93931e646f.js +1 -0
  935. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-116cfb93931e646f.js +1 -0
  936. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-116cfb93931e646f.js +1 -0
  937. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-116cfb93931e646f.js +1 -0
  938. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-116cfb93931e646f.js +1 -0
  939. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-116cfb93931e646f.js +1 -0
  940. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-116cfb93931e646f.js +1 -0
  941. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-116cfb93931e646f.js +1 -0
  942. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-116cfb93931e646f.js +1 -0
  943. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-116cfb93931e646f.js +1 -0
  944. package/app/.next-cli-build/static/chunks/app/api/models/route-116cfb93931e646f.js +1 -0
  945. package/app/.next-cli-build/static/chunks/app/api/models/test/route-116cfb93931e646f.js +1 -0
  946. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-116cfb93931e646f.js +1 -0
  947. package/app/.next-cli-build/static/chunks/app/api/oauth/callback/route-116cfb93931e646f.js +1 -0
  948. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-116cfb93931e646f.js +1 -0
  949. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-116cfb93931e646f.js +1 -0
  950. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-116cfb93931e646f.js +1 -0
  951. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-116cfb93931e646f.js +1 -0
  952. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-116cfb93931e646f.js +1 -0
  953. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-116cfb93931e646f.js +1 -0
  954. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-116cfb93931e646f.js +1 -0
  955. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-116cfb93931e646f.js +1 -0
  956. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-116cfb93931e646f.js +1 -0
  957. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-116cfb93931e646f.js +1 -0
  958. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-116cfb93931e646f.js +1 -0
  959. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-116cfb93931e646f.js +1 -0
  960. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-116cfb93931e646f.js +1 -0
  961. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-116cfb93931e646f.js +1 -0
  962. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-116cfb93931e646f.js +1 -0
  963. package/app/.next-cli-build/static/chunks/app/api/pricing/route-116cfb93931e646f.js +1 -0
  964. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-116cfb93931e646f.js +1 -0
  965. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-116cfb93931e646f.js +1 -0
  966. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-116cfb93931e646f.js +1 -0
  967. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-116cfb93931e646f.js +1 -0
  968. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/refresh-profile/route-116cfb93931e646f.js +1 -0
  969. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-116cfb93931e646f.js +1 -0
  970. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-116cfb93931e646f.js +1 -0
  971. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-116cfb93931e646f.js +1 -0
  972. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-116cfb93931e646f.js +1 -0
  973. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-116cfb93931e646f.js +1 -0
  974. package/app/.next-cli-build/static/chunks/app/api/providers/route-116cfb93931e646f.js +1 -0
  975. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-116cfb93931e646f.js +1 -0
  976. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-116cfb93931e646f.js +1 -0
  977. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-116cfb93931e646f.js +1 -0
  978. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-116cfb93931e646f.js +1 -0
  979. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-116cfb93931e646f.js +1 -0
  980. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-116cfb93931e646f.js +1 -0
  981. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-116cfb93931e646f.js +1 -0
  982. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-116cfb93931e646f.js +1 -0
  983. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-116cfb93931e646f.js +1 -0
  984. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-116cfb93931e646f.js +1 -0
  985. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-116cfb93931e646f.js +1 -0
  986. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-116cfb93931e646f.js +1 -0
  987. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-116cfb93931e646f.js +1 -0
  988. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-116cfb93931e646f.js +1 -0
  989. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-116cfb93931e646f.js +1 -0
  990. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-116cfb93931e646f.js +1 -0
  991. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-116cfb93931e646f.js +1 -0
  992. package/app/.next-cli-build/static/chunks/app/api/routing-health/route-116cfb93931e646f.js +1 -0
  993. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-116cfb93931e646f.js +1 -0
  994. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-116cfb93931e646f.js +1 -0
  995. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-116cfb93931e646f.js +1 -0
  996. package/app/.next-cli-build/static/chunks/app/api/settings/route-116cfb93931e646f.js +1 -0
  997. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-116cfb93931e646f.js +1 -0
  998. package/app/.next-cli-build/static/chunks/app/api/tags/route-116cfb93931e646f.js +1 -0
  999. package/app/.next-cli-build/static/chunks/app/api/token-saver/stats/route-116cfb93931e646f.js +1 -0
  1000. package/app/.next-cli-build/static/chunks/app/api/token-saver/stream/route-116cfb93931e646f.js +1 -0
  1001. package/app/.next-cli-build/static/chunks/app/api/tool-disclosure/stats/route-116cfb93931e646f.js +1 -0
  1002. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-116cfb93931e646f.js +1 -0
  1003. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-116cfb93931e646f.js +1 -0
  1004. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-116cfb93931e646f.js +1 -0
  1005. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-116cfb93931e646f.js +1 -0
  1006. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-116cfb93931e646f.js +1 -0
  1007. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-116cfb93931e646f.js +1 -0
  1008. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-116cfb93931e646f.js +1 -0
  1009. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-116cfb93931e646f.js +1 -0
  1010. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-116cfb93931e646f.js +1 -0
  1011. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-116cfb93931e646f.js +1 -0
  1012. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-116cfb93931e646f.js +1 -0
  1013. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-116cfb93931e646f.js +1 -0
  1014. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-116cfb93931e646f.js +1 -0
  1015. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-116cfb93931e646f.js +1 -0
  1016. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-116cfb93931e646f.js +1 -0
  1017. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-116cfb93931e646f.js +1 -0
  1018. package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-116cfb93931e646f.js +1 -0
  1019. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-116cfb93931e646f.js +1 -0
  1020. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-116cfb93931e646f.js +1 -0
  1021. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-116cfb93931e646f.js +1 -0
  1022. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-116cfb93931e646f.js +1 -0
  1023. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-116cfb93931e646f.js +1 -0
  1024. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-116cfb93931e646f.js +1 -0
  1025. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-116cfb93931e646f.js +1 -0
  1026. package/app/.next-cli-build/static/chunks/app/api/v1/alpha/search/route-116cfb93931e646f.js +1 -0
  1027. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-116cfb93931e646f.js +1 -0
  1028. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-116cfb93931e646f.js +1 -0
  1029. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-116cfb93931e646f.js +1 -0
  1030. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-116cfb93931e646f.js +1 -0
  1031. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-116cfb93931e646f.js +1 -0
  1032. package/app/.next-cli-build/static/chunks/app/api/v1/codex/alpha/search/route-116cfb93931e646f.js +1 -0
  1033. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/edits/route-116cfb93931e646f.js +1 -0
  1034. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/generations/route-116cfb93931e646f.js +1 -0
  1035. package/app/.next-cli-build/static/chunks/app/api/v1/codex/memories/trace_summarize/route-116cfb93931e646f.js +1 -0
  1036. package/app/.next-cli-build/static/chunks/app/api/v1/codex/models/route-116cfb93931e646f.js +1 -0
  1037. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/compact/route-116cfb93931e646f.js +1 -0
  1038. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/route-116cfb93931e646f.js +1 -0
  1039. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-116cfb93931e646f.js +1 -0
  1040. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-116cfb93931e646f.js +1 -0
  1041. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-116cfb93931e646f.js +1 -0
  1042. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-116cfb93931e646f.js +1 -0
  1043. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-116cfb93931e646f.js +1 -0
  1044. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-116cfb93931e646f.js +1 -0
  1045. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-116cfb93931e646f.js +1 -0
  1046. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-116cfb93931e646f.js +1 -0
  1047. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-116cfb93931e646f.js +1 -0
  1048. package/app/.next-cli-build/static/chunks/app/api/v1/route-116cfb93931e646f.js +1 -0
  1049. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-116cfb93931e646f.js +1 -0
  1050. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-116cfb93931e646f.js +1 -0
  1051. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-116cfb93931e646f.js +1 -0
  1052. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-116cfb93931e646f.js +1 -0
  1053. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-116cfb93931e646f.js +1 -0
  1054. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-116cfb93931e646f.js +1 -0
  1055. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-116cfb93931e646f.js +1 -0
  1056. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-116cfb93931e646f.js +1 -0
  1057. package/app/.next-cli-build/static/chunks/app/api/version/route-116cfb93931e646f.js +1 -0
  1058. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-116cfb93931e646f.js +1 -0
  1059. package/app/.next-cli-build/static/chunks/app/api/version/update/route-116cfb93931e646f.js +1 -0
  1060. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-116cfb93931e646f.js +1 -0
  1061. package/app/.next-cli-build/static/chunks/app/page-116cfb93931e646f.js +1 -0
  1062. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-116cfb93931e646f.js +1 -0
  1063. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-116cfb93931e646f.js +1 -0
  1064. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-116cfb93931e646f.js +1 -0
  1065. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-116cfb93931e646f.js +1 -0
  1066. package/app/CHANGELOG.md +14 -0
  1067. package/app/package.json +1 -1
  1068. package/app/public/CHANGELOG.md +14 -0
  1069. package/app/src/lib/db/migrate.js +22 -1
  1070. package/app/src/lib/oauth/providers/xiaomi-mimo.js +123 -0
  1071. package/app/src/mitm/server.js +31 -31
  1072. package/app/src/sse/services/backgroundTokenRefresh.js +9 -6
  1073. package/cli.js +4 -3
  1074. package/package.json +1 -1
  1075. package/src/cli/tray/autostart.js +65 -3
  1076. package/src/cli/utils/modelSelector.js +182 -45
  1077. package/app/.next-cli-build/server/chunks/1012.js +0 -1
  1078. package/app/.next-cli-build/server/chunks/2221.js +0 -300
  1079. package/app/.next-cli-build/server/chunks/5681.js +0 -1
  1080. package/app/.next-cli-build/server/chunks/5822.js +0 -1
  1081. package/app/.next-cli-build/server/chunks/6030.js +0 -1
  1082. package/app/.next-cli-build/server/chunks/8540.js +0 -1
  1083. package/app/.next-cli-build/server/chunks/9637.js +0 -1
  1084. package/app/.next-cli-build/static/3kPJjWzmNgPDoa5VgYHwk/_buildManifest.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/2595-a258abe0d4a34649.js +0 -95
  1086. package/app/.next-cli-build/static/chunks/8105-b488efe0a830e2a7.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/9227-bb7d883d6cd67632.js +0 -3
  1088. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-2c65df20769d31df.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-c2fb956227849ef3.js +0 -27
  1090. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-10cfe308dcee550e.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c55b823e44230396.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-e38b4f8ebf6a3d47.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/_global-error/page-25eef5877853a92d.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-25eef5877853a92d.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-25eef5877853a92d.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-25eef5877853a92d.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-25eef5877853a92d.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-25eef5877853a92d.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-25eef5877853a92d.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-25eef5877853a92d.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-25eef5877853a92d.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-25eef5877853a92d.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-25eef5877853a92d.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-25eef5877853a92d.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/changelog/route-25eef5877853a92d.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/cli/providers/codex/route-25eef5877853a92d.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-25eef5877853a92d.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-25eef5877853a92d.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-25eef5877853a92d.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-25eef5877853a92d.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-25eef5877853a92d.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/models/route-25eef5877853a92d.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/readiness/route-25eef5877853a92d.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-25eef5877853a92d.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-25eef5877853a92d.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-25eef5877853a92d.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-25eef5877853a92d.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-25eef5877853a92d.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-25eef5877853a92d.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-25eef5877853a92d.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-25eef5877853a92d.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-25eef5877853a92d.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-25eef5877853a92d.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-25eef5877853a92d.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-25eef5877853a92d.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-25eef5877853a92d.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-25eef5877853a92d.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-25eef5877853a92d.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-25eef5877853a92d.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/test/route-25eef5877853a92d.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/combos/export/route-25eef5877853a92d.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/combos/import/route-25eef5877853a92d.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/combos/route-25eef5877853a92d.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/combos/test/route-25eef5877853a92d.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/convoy/rules/route-25eef5877853a92d.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-25eef5877853a92d.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-25eef5877853a92d.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-25eef5877853a92d.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-25eef5877853a92d.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-25eef5877853a92d.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-25eef5877853a92d.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/health/route-25eef5877853a92d.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/init/route-25eef5877853a92d.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/internal/codex-native/lease/[action]/route-25eef5877853a92d.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-25eef5877853a92d.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/keys/route-25eef5877853a92d.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/locale/route-25eef5877853a92d.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-25eef5877853a92d.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-25eef5877853a92d.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/route-25eef5877853a92d.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/test/route-25eef5877853a92d.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/route-25eef5877853a92d.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/[id]/route-25eef5877853a92d.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/route-25eef5877853a92d.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/message/route-25eef5877853a92d.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/oauth/[id]/[action]/route-25eef5877853a92d.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/route-25eef5877853a92d.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/sse/route-25eef5877853a92d.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-25eef5877853a92d.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-25eef5877853a92d.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-25eef5877853a92d.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-25eef5877853a92d.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-25eef5877853a92d.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-25eef5877853a92d.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-25eef5877853a92d.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-25eef5877853a92d.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-25eef5877853a92d.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-25eef5877853a92d.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/models/route-25eef5877853a92d.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/models/test/route-25eef5877853a92d.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-25eef5877853a92d.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/oauth/callback/route-25eef5877853a92d.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-25eef5877853a92d.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-25eef5877853a92d.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-25eef5877853a92d.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-25eef5877853a92d.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-25eef5877853a92d.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-25eef5877853a92d.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-25eef5877853a92d.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-25eef5877853a92d.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-25eef5877853a92d.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-25eef5877853a92d.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-25eef5877853a92d.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-25eef5877853a92d.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-25eef5877853a92d.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/pricing/route-25eef5877853a92d.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-25eef5877853a92d.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-25eef5877853a92d.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-25eef5877853a92d.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-25eef5877853a92d.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/refresh-profile/route-25eef5877853a92d.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-25eef5877853a92d.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-25eef5877853a92d.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-25eef5877853a92d.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-25eef5877853a92d.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-25eef5877853a92d.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/providers/route-25eef5877853a92d.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-25eef5877853a92d.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-25eef5877853a92d.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-25eef5877853a92d.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-25eef5877853a92d.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-25eef5877853a92d.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-25eef5877853a92d.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-25eef5877853a92d.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-25eef5877853a92d.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-25eef5877853a92d.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-25eef5877853a92d.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-25eef5877853a92d.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-25eef5877853a92d.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-25eef5877853a92d.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-25eef5877853a92d.js +0 -1
  1212. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-25eef5877853a92d.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-25eef5877853a92d.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-25eef5877853a92d.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/app/api/routing-health/route-25eef5877853a92d.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-25eef5877853a92d.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-25eef5877853a92d.js +0 -1
  1218. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-25eef5877853a92d.js +0 -1
  1219. package/app/.next-cli-build/static/chunks/app/api/settings/route-25eef5877853a92d.js +0 -1
  1220. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-25eef5877853a92d.js +0 -1
  1221. package/app/.next-cli-build/static/chunks/app/api/tags/route-25eef5877853a92d.js +0 -1
  1222. package/app/.next-cli-build/static/chunks/app/api/token-saver/stats/route-25eef5877853a92d.js +0 -1
  1223. package/app/.next-cli-build/static/chunks/app/api/token-saver/stream/route-25eef5877853a92d.js +0 -1
  1224. package/app/.next-cli-build/static/chunks/app/api/tool-disclosure/stats/route-25eef5877853a92d.js +0 -1
  1225. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-25eef5877853a92d.js +0 -1
  1226. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-25eef5877853a92d.js +0 -1
  1227. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-25eef5877853a92d.js +0 -1
  1228. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-25eef5877853a92d.js +0 -1
  1229. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-25eef5877853a92d.js +0 -1
  1230. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-25eef5877853a92d.js +0 -1
  1231. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-25eef5877853a92d.js +0 -1
  1232. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-25eef5877853a92d.js +0 -1
  1233. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-25eef5877853a92d.js +0 -1
  1234. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-25eef5877853a92d.js +0 -1
  1235. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-25eef5877853a92d.js +0 -1
  1236. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-25eef5877853a92d.js +0 -1
  1237. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-25eef5877853a92d.js +0 -1
  1238. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-25eef5877853a92d.js +0 -1
  1239. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-25eef5877853a92d.js +0 -1
  1240. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-25eef5877853a92d.js +0 -1
  1241. package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-25eef5877853a92d.js +0 -1
  1242. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-25eef5877853a92d.js +0 -1
  1243. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-25eef5877853a92d.js +0 -1
  1244. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-25eef5877853a92d.js +0 -1
  1245. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-25eef5877853a92d.js +0 -1
  1246. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-25eef5877853a92d.js +0 -1
  1247. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-25eef5877853a92d.js +0 -1
  1248. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-25eef5877853a92d.js +0 -1
  1249. package/app/.next-cli-build/static/chunks/app/api/v1/alpha/search/route-25eef5877853a92d.js +0 -1
  1250. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-25eef5877853a92d.js +0 -1
  1251. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-25eef5877853a92d.js +0 -1
  1252. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-25eef5877853a92d.js +0 -1
  1253. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-25eef5877853a92d.js +0 -1
  1254. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-25eef5877853a92d.js +0 -1
  1255. package/app/.next-cli-build/static/chunks/app/api/v1/codex/alpha/search/route-25eef5877853a92d.js +0 -1
  1256. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/edits/route-25eef5877853a92d.js +0 -1
  1257. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/generations/route-25eef5877853a92d.js +0 -1
  1258. package/app/.next-cli-build/static/chunks/app/api/v1/codex/memories/trace_summarize/route-25eef5877853a92d.js +0 -1
  1259. package/app/.next-cli-build/static/chunks/app/api/v1/codex/models/route-25eef5877853a92d.js +0 -1
  1260. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/compact/route-25eef5877853a92d.js +0 -1
  1261. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/route-25eef5877853a92d.js +0 -1
  1262. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-25eef5877853a92d.js +0 -1
  1263. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-25eef5877853a92d.js +0 -1
  1264. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-25eef5877853a92d.js +0 -1
  1265. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-25eef5877853a92d.js +0 -1
  1266. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-25eef5877853a92d.js +0 -1
  1267. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-25eef5877853a92d.js +0 -1
  1268. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-25eef5877853a92d.js +0 -1
  1269. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-25eef5877853a92d.js +0 -1
  1270. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-25eef5877853a92d.js +0 -1
  1271. package/app/.next-cli-build/static/chunks/app/api/v1/route-25eef5877853a92d.js +0 -1
  1272. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-25eef5877853a92d.js +0 -1
  1273. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-25eef5877853a92d.js +0 -1
  1274. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-25eef5877853a92d.js +0 -1
  1275. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-25eef5877853a92d.js +0 -1
  1276. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-25eef5877853a92d.js +0 -1
  1277. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-25eef5877853a92d.js +0 -1
  1278. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-25eef5877853a92d.js +0 -1
  1279. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-25eef5877853a92d.js +0 -1
  1280. package/app/.next-cli-build/static/chunks/app/api/version/route-25eef5877853a92d.js +0 -1
  1281. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-25eef5877853a92d.js +0 -1
  1282. package/app/.next-cli-build/static/chunks/app/api/version/update/route-25eef5877853a92d.js +0 -1
  1283. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-25eef5877853a92d.js +0 -1
  1284. package/app/.next-cli-build/static/chunks/app/page-25eef5877853a92d.js +0 -1
  1285. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-25eef5877853a92d.js +0 -1
  1286. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-25eef5877853a92d.js +0 -1
  1287. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-25eef5877853a92d.js +0 -1
  1288. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-25eef5877853a92d.js +0 -1
  1289. /package/app/.next-cli-build/static/{3kPJjWzmNgPDoa5VgYHwk → caISOCVUmfRaqJe0JjnZh}/_ssgManifest.js +0 -0
@@ -1,3 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9227],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>n,Hx:()=>r,Iv:()=>c,Nv:()=>u,RL:()=>d,ev:()=>m,fl:()=>i,hT:()=>l,oX:()=>a,t6:()=>o});let l=["zh-CN","zh-TW"],a=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],r=2e3,n=3e5,i=5e3,o=5,d=1e4,c=5e3,m=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],u=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},34403:(e,t,s)=>{"use strict";s.d(t,{default:()=>w});var l=s(95155),a=s(12115),r=s(14051),n=s.n(r),i=s(35497),o=s(11059),d=s(15536);async function c(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(d.Iv)})).ok}catch{return!1}}async function m(...e){let t=e.filter(Boolean).map(c);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}function u({label:e,url:t,copyId:s,copied:a,onCopy:r,badge:n,actions:o}){return(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${"CF"===n||"TS"===n?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:e}),(0,l.jsx)(i.pd,{value:t,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,l.jsx)("button",{onClick:()=>r(t,s),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:a===s?"check":"content_copy"})}),o]})}function x({status:e,className:t=""}){return(0,l.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,l.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function p({text:e}){return(0,l.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,l.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function h({message:e,action:t}){return(0,l.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,l.jsx)("p",{className:"text-xs flex-1",children:e}),t&&(0,l.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}var b=s(57250),y=s(88105);function g({value:e,onChange:t}){let[s,r]=(0,a.useState)([]),[n,i]=(0,a.useState)(!0),[o,d]=(0,a.useState)(()=>new Set);(0,a.useEffect)(()=>{let e=!1;return fetch("/v1/models",{cache:"no-store"}).then(e=>e.ok?e.json():{data:[]}).then(t=>{e||r(Array.isArray(t.data)?t.data:[])}).catch(()=>{e||r([])}).finally(()=>{e||i(!1)}),()=>{e=!0}},[]);let c=(0,a.useMemo)(()=>(function(e){let t=new Map;for(let s of e){if(!s?.id||"string"!=typeof s.id||!s.id.includes("/"))continue;let e=s.owned_by||s.id.slice(0,s.id.indexOf("/")),l=s.id.slice(s.id.indexOf("/")+1);t.has(e)||t.set(e,[]),t.get(e).push(l)}return t})(s),[s]),m=(0,a.useMemo)(()=>Array.from(c.keys()).sort((e,t)=>e.localeCompare(t)),[c]),u=null==e,x=(0,a.useMemo)(()=>new Set(e?.providers||[]),[e]);(0,a.useMemo)(()=>new Set(e?.models||[]),[e]);let p=t=>{let s=`${t}/`;return(e?.models||[]).filter(e=>e.startsWith(s))},h=(e,s)=>{0===e.length?t(null):t({providers:e,models:s})},f=e=>{d(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})};return n?(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Loading available providers…"}):(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,l.jsx)("input",{type:"checkbox",checked:u,onChange:e=>t(e.target.checked?null:{providers:[],models:[]})}),(0,l.jsx)("span",{children:"Unrestricted (key can reach every provider and model)"})]}),!u&&(0,l.jsxs)("div",{className:"flex flex-col gap-1 max-h-80 overflow-y-auto border border-black/[0.06] dark:border-white/[0.06] rounded-lg p-2",children:[0===m.length&&(0,l.jsx)("p",{className:"text-sm text-text-muted px-2 py-1",children:"No providers configured yet."}),m.map(t=>{let s,a=(0,y.rs)(t),r=y.Q2[a],n=c.get(t)||[],i=(s=(0,y.rs)(t),x.has(t)||x.has(s)),d=p(t),m=o.has(t);return(0,l.jsxs)("div",{className:"border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 py-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("input",{type:"checkbox",checked:i,onChange:()=>{let s,l;return s=new Set(e?.providers||[]),l=(e?.models||[]).slice(),void(s.has(t)?(s.delete(t),l=l.filter(e=>!e.startsWith(`${t}/`))):s.add(t),h(Array.from(s),l))}}),(0,l.jsx)(b.A,{providerId:a,size:16}),(0,l.jsx)("button",{type:"button",className:"flex-1 text-left text-sm font-medium",onClick:()=>f(t),children:r?.name||t}),(0,l.jsx)("span",{className:"text-xs text-text-muted",children:i?0===d.length?`all ${n.length} models`:`${d.length}/${n.length} models`:""}),(0,l.jsx)("button",{type:"button",className:"material-symbols-outlined text-[16px] text-text-muted",onClick:()=>f(t),children:m?"expand_less":"expand_more"})]}),m&&(0,l.jsx)("div",{className:"pl-8 mt-1 flex flex-col gap-1",children:n.map(s=>{let a=`${t}/${s}`,r=i&&(0===d.length||d.includes(a));return(0,l.jsxs)("label",{className:"flex items-center gap-2 text-xs",children:[(0,l.jsx)("input",{type:"checkbox",checked:r,onChange:()=>{let l,a,r,n,i,o;return(a=new Set(e?.providers||[])).add(t),r=`${t}/${s}`,n=p(t),i=c.get(t)||[],o=(e?.models||[]).filter(e=>!e.startsWith(`${t}/`)),void(0===n.length?l=i.filter(e=>e!==s).map(e=>`${t}/${e}`):n.includes(r)?l=n.filter(e=>e!==r):(l=[...n,r]).length===i.length&&(l=[]),h(Array.from(a),[...o,...l]))}}),(0,l.jsx)("span",{className:"font-mono",children:s})]},a)})})]},t)})]})]})}g.propTypes={value:n().shape({providers:n().arrayOf(n().string),models:n().arrayOf(n().string)}),onChange:n().func.isRequired};let f=[{label:"100K",value:"100000"},{label:"500K",value:"500000"},{label:"1M",value:"1000000"},{label:"5M",value:"5000000"},{label:"10M",value:"10000000"}];function j(e){let t=Math.max(0,Number(e)||0);return t>=1e6?`${(t/1e6).toFixed(+(t%1e6!=0))}M`:t>=1e3?`${(t/1e3).toFixed(+(t%1e3!=0))}K`:String(t)}function v({used:e,limit:t}){let s=Math.max(1,Number(t)||1),a=Math.max(0,Number(e)||0),r=Math.min(100,Math.round(a/s*100)),n=Math.max(0,s-a),i=r>=90?{bar:"bg-red-500",text:"text-red-600 dark:text-red-400"}:r>=75?{bar:"bg-amber-500",text:"text-amber-600 dark:text-amber-400"}:{bar:"bg-emerald-500",text:"text-text-muted"};return(0,l.jsxs)("div",{className:"mt-2 max-w-sm",title:`${j(a)} of ${j(s)} tokens used`,children:[(0,l.jsxs)("div",{className:"mb-1 flex items-center justify-between gap-3 text-[11px]",children:[(0,l.jsxs)("span",{className:i.text,children:[r,"% used"]}),(0,l.jsxs)("span",{className:"text-text-muted",children:[j(n)," remaining"]})]}),(0,l.jsx)("div",{className:"h-1.5 overflow-hidden rounded-full bg-black/10 dark:bg-white/10",role:"progressbar","aria-label":`Token usage: ${r}% used, ${j(n)} remaining`,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":Math.min(a,s),children:(0,l.jsx)("div",{className:`h-full rounded-full transition-[width] duration-300 ${i.bar}`,style:{width:`${r}%`}})})]})}function k({apiKey:e,activeProviders:t,modelAliases:s,onClose:r,onSave:n}){let[o,d]=(0,a.useState)(e.expiresAt?e.expiresAt.slice(0,16):""),[c,m]=(0,a.useState)(e.allowedModels||[]),[u,x]=(0,a.useState)(""),[p,h]=(0,a.useState)(null==e.tokenLimit?"unlimited":"unchanged"),[b,y]=(0,a.useState)(!1),[g,v]=(0,a.useState)(!1),w=null!=e.tokenLimit,N=async()=>{v(!0),await n({expiresAt:o||null,allowedModels:c,..."unlimited"===p?{tokenLimit:null}:u?{[w?"tokenLimitIncrement":"tokenLimit"]:u}:{}}),v(!1)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.aF,{isOpen:!0,onClose:r,title:`Edit ${e.name}`,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(i.pd,{label:"Expires at (optional)",type:"datetime-local",value:o,onChange:e=>d(e.target.value),hint:"Leave blank for no expiry."}),(0,l.jsx)(i.pd,{label:w?"Add tokens":"Set token limit",type:"number",min:"1",step:"1",value:u,onChange:e=>{let t=e.target.value;x(t),h(t?"amount":w?"unchanged":"unlimited")},placeholder:w?"e.g. 500000":"e.g. 1000000",hint:w?`Added to the current ${j(e.tokenLimit)} limit; usage is preserved.`:"Choose Unlimited to remove the limit."}),(0,l.jsxs)("div",{className:"-mt-2 flex flex-wrap gap-1.5","aria-label":"Token limit presets",children:[f.map(e=>{let t="amount"===p&&u===e.value;return(0,l.jsx)("button",{type:"button",onClick:()=>{x(e.value),h("amount")},"aria-pressed":t,className:`rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${t?"border-primary bg-primary text-white":"border-border bg-surface-2 text-text-muted hover:border-primary/50 hover:text-primary"}`,children:e.label},e.value)}),(0,l.jsx)("button",{type:"button",onClick:()=>{x(""),h("unlimited")},"aria-pressed":"unlimited"===p,className:`rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${"unlimited"===p?"border-primary bg-primary text-white":"border-border bg-surface-2 text-text-muted hover:border-primary/50 hover:text-primary"}`,children:"Unlimited"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"mb-1.5 block text-sm font-medium text-text-main",children:"Allowed models"}),(0,l.jsx)("div",{className:"flex min-h-12 flex-wrap gap-1 rounded-lg border border-border bg-surface-2 p-2",children:c.length?c.map(e=>(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2 py-1 text-xs text-primary",children:[(0,l.jsx)("span",{children:e}),(0,l.jsx)("button",{type:"button",onClick:()=>m(t=>t.filter(t=>t!==e)),"aria-label":`Remove ${e}`,className:"material-symbols-outlined text-[14px]",children:"close"})]},e)):(0,l.jsx)("span",{className:"p-1 text-xs text-text-muted",children:"All models allowed"})}),(0,l.jsxs)("button",{type:"button",onClick:()=>y(!0),className:"mt-2 flex w-full items-center justify-center gap-1 rounded-lg border border-dashed border-black/10 py-2 text-xs font-medium text-primary dark:border-white/10",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"}),"Edit model access"]})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:N,fullWidth:!0,disabled:g,children:g?"Saving...":"Save changes"}),(0,l.jsx)(i.$n,{onClick:r,variant:"ghost",fullWidth:!0,disabled:g,children:"Cancel"})]})]})}),b&&(0,l.jsx)(i.rq,{isOpen:!0,onClose:()=>y(!1),onSelect:e=>m(t=>t.includes(e.value)?t:[...t,e.value]),onDeselect:e=>m(t=>t.filter(t=>t!==e.value)),activeProviders:t,modelAliases:s,addedModelValues:c,closeOnSelect:!1,title:"Edit allowed models"})]})}function w({machineId:e}){let[t,s]=(0,a.useState)([]),[r,n]=(0,a.useState)(!0),[b,y]=(0,a.useState)(!1),[j,N]=(0,a.useState)(""),[C,S]=(0,a.useState)(""),[$,T]=(0,a.useState)(""),[A,E]=(0,a.useState)([]),[P,_]=(0,a.useState)(!1),[O,U]=(0,a.useState)([]),[L,F]=(0,a.useState)({}),[I,R]=(0,a.useState)(null),[D,M]=(0,a.useState)(null),[q,W]=(0,a.useState)(null),[K,z]=(0,a.useState)(null),[H,J]=(0,a.useState)(null),[B,Q]=(0,a.useState)(null),[V,X]=(0,a.useState)(!1),[Z,G]=(0,a.useState)(!0),[Y,ee]=(0,a.useState)(!0),[et,es]=(0,a.useState)(!1),[el,ea]=(0,a.useState)(!0),[er,en]=(0,a.useState)(!1),[ei,eo]=(0,a.useState)(!1),[ed,ec]=(0,a.useState)(""),[em,eu]=(0,a.useState)(""),[ex,ep]=(0,a.useState)(!1),[eh,eb]=(0,a.useState)(""),[ey,eg]=(0,a.useState)(null),[ef,ej]=(0,a.useState)(!1),[ev,ek]=(0,a.useState)(!1),[ew,eN]=(0,a.useState)(!1),[eC,eS]=(0,a.useState)(!1),[e$,eT]=(0,a.useState)(""),[eA,eE]=(0,a.useState)(!1),[eP,e_]=(0,a.useState)(""),[eO,eU]=(0,a.useState)(null),[eL,eF]=(0,a.useState)(""),[eI,eR]=(0,a.useState)(""),[eD,eM]=(0,a.useState)(null),[eq,eW]=(0,a.useState)(!1),[eK,ez]=(0,a.useState)([]),[eH,eJ]=(0,a.useState)(""),[eB,eQ]=(0,a.useState)(!1),[eV,eX]=(0,a.useState)(!1),[eZ,eG]=(0,a.useState)(!1),eY=(0,a.useRef)(null),e0=(0,a.useRef)(0),e1=(0,a.useRef)(0),e5=(0,a.useRef)(!1),e2=(0,a.useRef)(!1),e4=(0,a.useRef)(!1),e3=(0,a.useRef)(!1),[e6,e8]=(0,a.useState)(!1),[e7,e9]=(0,a.useState)(!1),[te,tt]=(0,a.useState)(new Set),[ts,tl]=(0,a.useState)(!1);(0,a.useEffect)(()=>{tl(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]);let{copied:ta,copy:tr}=(0,o.C)(),tn=!Z||!Y,ti=Z?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,a.useEffect)(()=>{eY.current&&(eY.current.scrollTop=eY.current.scrollHeight)},[eK]),(0,a.useEffect)(()=>{tx(),tc()},[]),(0,a.useEffect)(()=>{if(!b&&!q)return;let e=!1;return Promise.all([fetch("/api/providers"),fetch("/api/models/alias")]).then(async([t,s])=>{let[l,a]=await Promise.all([t.ok?t.json():{},s.ok?s.json():{}]);e||(U(l.connections||[]),F(a.aliases||{}))}).catch(e=>console.log("Error loading model picker:",e)),()=>{e=!0}},[b,q]),(0,a.useEffect)(()=>{if(!(er||ew))return;let e=!er||ei,t=!ew||eC,s=()=>{document.hidden||td()};if(document.addEventListener("visibilitychange",s),e&&t)return()=>document.removeEventListener("visibilitychange",s);let l=setInterval(()=>{document.hidden||td()},d.fl);return()=>{clearInterval(l),document.removeEventListener("visibilitychange",s)}},[er,ew,ei,eC]),(0,a.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(er&&(ed||em)){let e=await m(em,ed);e5.current=e,e?(e0.current=0,eo(!0),e4.current||(e4.current=!0,e8(!0))):(e0.current+=1,e0.current>=d.t6&&eo(!1))}else e5.current=!1;if(ew&&e$){let e=await c(e$);e2.current=e,e?(e1.current=0,eS(!0),e3.current||(e3.current=!0,e9(!0))):(e1.current+=1,e1.current>=d.t6&&eS(!1))}else e2.current=!1}};if(!(er&&(ed||em)||ew&&e$))return;e();let t=!ew||eC;if((!er||ei)&&t)return;let s=setInterval(e,d.RL);return()=>clearInterval(s)},[er,ed,em,ew,e$,ei,eC]);let to=(0,a.useCallback)((e,t,s,l,a,r)=>{t.current?(s.current=0,l(!0),a.current||(a.current=!0,r(!0))):(s.current+=1,s.current>=d.t6&&l(!1))},[]),td=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,l=t.tunnel?.tunnelUrl||"";ec(l),eu(t.tunnel?.publicUrl||""),en(s),to(null,e5,e0,eo,e4,e8);let a=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,r=t.tailscale?.tunnelUrl||"";eT(r),eN(a),to(null,e2,e1,eS,e3,e9)}catch{}},tc=async()=>{ea(!0);try{let[e,t]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e.ok){let t=await e.json();X(t.requireApiKey||!1),G(!1!==t.requireLogin),ee(t.hasPassword||!1),es(t.tunnelDashboardAccess||!1)}if(t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,l=e.tunnel?.tunnelUrl||"";ec(l),eu(e.tunnel?.publicUrl||""),en(s),to(null,e5,e0,eo,e4,e8);let a=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,r=e.tailscale?.tunnelUrl||"";eT(r),eN(a),to(null,e2,e1,eS,e3,e9)}}catch(e){console.log("Error loading settings:",e)}finally{ea(!1)}},tm=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:e})})).ok&&es(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},tu=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:e})})).ok&&X(e)}catch(e){console.log("Error updating requireApiKey:",e)}},tx=async()=>{try{let e=await fetch("/api/keys"),t=await e.json();e.ok&&s(t.keys||[])}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},tp=async(...e)=>{ep(!0),eb("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),s=Date.now();for(;Date.now()-s<d.Cp;){if(await new Promise(e=>setTimeout(e,d.Hx)),await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return en(!0),ep(!1),eb(""),!0;if((Date.now()-s)%1e4<d.Hx)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return eg({type:"error",message:"Tunnel process stopped unexpectedly."}),ep(!1),eb(""),!1}}catch{}}return eg({type:"error",message:"Tunnel created but not reachable. Please try again."}),ep(!1),eb(""),!1},th=async()=>{ej(!1),ep(!0),eg(null),eb("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let s=await t.json();s.download?.downloading?eb(`Downloading cloudflared... ${s.download.progress}%`):e&&eb("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let s=await t.json();if(!t.ok)return void eg({type:"error",message:s.error||"Failed to enable tunnel"});let l=s.tunnelUrl;if(!l)return void eg({type:"error",message:"No tunnel URL returned"});ec(l),eu(s.publicUrl||""),await tp(s.publicUrl,l)}catch(e){eg({type:"error",message:e.message})}finally{e=!1,ep(!1),eb("")}},tb=async()=>{ep(!0),eg(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(en(!1),ec(""),ek(!1),eg({type:"success",message:"Tunnel disabled"})):eg({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){eg({type:"error",message:e.message})}finally{ep(!1)}},ty=async()=>{eM(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return eM(t.installed),t}}catch{}return eM(!1),{installed:!1}},tg=async()=>{eW(!0),eU(null),ez([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eH})});eJ("");let t=e.body.getReader(),s=new TextDecoder,l="";for(;;){let{done:e,value:a}=await t.read();if(e)break;let r=(l+=s.decode(a,{stream:!0})).split("\n\n");for(let e of(l=r.pop()||"",r)){let t=e.split("\n"),s="progress",l=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{l=JSON.parse(e.slice(6))}catch{}if(l)if("progress"===s)ez(e=>[...e.slice(-50),l.message]);else if("done"===s){eM(!0),eW(!1),eX(!1),tk();return}else"error"===s&&eU({type:"error",message:l.error||"Install failed"})}}}catch(e){eU({type:"error",message:e.message})}finally{eW(!1)}},tf=async e=>{e_("Waiting for Tailscale ready...");let t=`${e}/api/health`,s=Date.now();for(;Date.now()-s<d.Cp;){await new Promise(e=>setTimeout(e,d.Hx));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},tj=(e,t)=>{eF(e),eR(t)},tv=()=>{eF(""),eR("")},tk=async()=>{eX(!1),eQ(!0),eE(!0),eU(null),e_("Connecting..."),tv();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eT(t.tunnelUrl||"");let e=await tf(t.tunnelUrl);eN(!0),eU(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.needsLogin&&t.authUrl){tj(t.authUrl,"Open Login Page"),e_('Login required — click "Open Login Page" to continue');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){tv(),e_("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eT(t.tunnelUrl||"");let e=await tf(t.tunnelUrl);eN(!0),eU(e?null:{type:"warning",message:"Connected but not reachable yet."})}else t.funnelNotEnabled&&t.enableUrl?await tw(t.enableUrl):eU({type:"error",message:t.error||"Failed to start funnel"});return}}catch{}}tv(),eU({type:"error",message:"Login timed out. Please try again."});return}if(t.funnelNotEnabled&&t.enableUrl)return void await tw(t.enableUrl);eU({type:"error",message:t.error||"Failed to connect"})}catch(e){eU({type:"error",message:e.message})}finally{eE(!1),eQ(!1),e_(""),tv()}},tw=async e=>{tj(e,"Open Funnel Settings"),e_('Click "Open Funnel Settings" to enable Funnel...');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){tv(),eT(t.tunnelUrl||"");let e=await tf(t.tunnelUrl);eN(!0),eU(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.funnelNotEnabled)continue;if(t.error){tv(),eU({type:"error",message:t.error});return}}catch{}}tv(),eU({type:"error",message:"Timed out waiting for Funnel to be enabled."})},tN=async()=>{eE(!0),eU(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(eN(!1),eT(""),eG(!1),eU({type:"success",message:"Tailscale disabled"})):eU({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){eU({type:"error",message:e.message})}finally{eE(!1)}},tC=async()=>{eU(null),ez([]);let e=await ty();e?.installed&&e?.hasCachedPassword?tk():eX(!0)},tS=async()=>{if(j.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:j,expiresAt:C||null,tokenLimit:$||null,allowedModels:A,scope:I})}),t=await e.json();e.ok&&(M(t.key),await tx(),N(""),S(""),T(""),E([]),_(!1),R(null),y(!1))}catch(e){console.log("Error creating key:",e)}},t$=async()=>{if(H)try{(await fetch(`/api/keys/${H.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({scope:B})})).ok&&(s(e=>e.map(e=>e.id===H.id?{...e,scope:B}:e)),J(null),Q(null))}catch(e){console.log("Error updating key scope:",e)}},tT=async e=>{z({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{z(null);try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(s(t.filter(t=>t.id!==e)),tt(t=>{let s=new Set(t);return s.delete(e),s}))}catch(e){console.log("Error deleting key:",e)}}})},tA=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error toggling key:",e)}},tE=async(e,t)=>{let s=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok)throw Error((await s.json()).error||"Failed to update key");await tx(),W(null)},[tP,t_]=(0,a.useState)("/v1");return((0,a.useEffect)(()=>{t_(`${window.location.origin}/v1`)},[]),r)?(0,l.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,l.jsx)(i.Qv,{}),(0,l.jsx)(i.Qv,{})]}):(0,l.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,l.jsxs)(i.Zp,{children:[(0,l.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsx)(u,{label:"Local",url:tP,copyId:"local_url",copied:ta,onCopy:tr}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${er?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),er&&!ex&&ei?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.pd,{value:`${em||ed}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,l.jsx)("button",{onClick:()=>tr(`${em||ed}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===ta?"check":"content_copy"})}),(0,l.jsx)("button",{onClick:()=>ek(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!er||ex||ei?ex?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eh||"Creating tunnel..."]}),(0,l.jsx)("button",{onClick:()=>{ep(!1),eb("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ey?.type==="error"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ey.message]}),(0,l.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>ej(!0),children:"Enable"})]}):el?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,l.jsx)("button",{onClick:()=>ea(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,l.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{tn?eg({type:"error",message:`Security required: ${ti}`}):V?ej(!0):eg({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),e6?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,l.jsx)("button",{onClick:()=>ek(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${ew?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),ew&&!eA&&eC?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.pd,{value:`${e$}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,l.jsx)("button",{onClick:()=>tr(`${e$}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===ta?"check":"content_copy"})}),(0,l.jsx)("button",{onClick:()=>eG(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!ew||eA||eC?eA||eB?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eP||"Connecting..."]}),eL&&(0,l.jsx)(i.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(eL,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:eI||"Open"}),(0,l.jsx)("button",{onClick:()=>{eE(!1),eQ(!1),e_(""),tv()},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):eO?.type==="error"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),eO.message]}),(0,l.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:tC,children:"Enable"})]}):(0,l.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{tn?eU({type:"error",message:`Security required: ${ti}`}):tC()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),e7?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,l.jsx)("button",{onClick:()=>eG(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),tn&&!er&&!ew&&(0,l.jsx)("div",{className:"mt-4",children:(0,l.jsx)(h,{message:ti,action:{label:"Open settings",href:"/dashboard/profile"}})}),(er||ew)&&(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!V&&(0,l.jsx)(h,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!Z||!Y)&&(0,l.jsx)(h,{message:Z?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:Z?"Change password":"Enable",href:"/dashboard/profile"}})]}),(er||ew)&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,l.jsx)(i.lM,{checked:et,onChange:()=>tm(!et)}),(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,l.jsx)(p,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,l.jsxs)(i.Zp,{id:"require-api-key",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,l.jsx)(i.$n,{icon:"add",onClick:()=>y(!0),children:"Create Key"})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,l.jsx)(i.lM,{checked:V,onChange:()=>tu(!V)})]}),ts&&!V&&(0,l.jsx)("div",{className:"mb-4 -mt-2",children:(0,l.jsx)(h,{message:"Endpoint is exposed without an API key."})}),0===t.length?(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,l.jsx)(i.$n,{icon:"add",onClick:()=>y(!0),children:"Create Key"})]}):(0,l.jsx)("div",{className:"flex flex-col",children:t.map(e=>{var t;return(0,l.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,l.jsx)("code",{className:"text-xs text-text-muted font-mono",children:te.has(e.id)?e.key:(t=e.key)&&!(t.length<=10)?t.slice(0,6)+"•".repeat(t.length-10)+t.slice(-4):t||""}),(0,l.jsx)("button",{onClick:()=>{var t;return t=e.id,void tt(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:te.has(e.id)?"Hide key":"Show key",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:te.has(e.id)?"visibility_off":"visibility"})}),(0,l.jsx)("button",{onClick:()=>tr(e.key,e.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ta===e.id?"check":"content_copy"})})]}),(0,l.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString(),e.expiresAt?` \xb7 Expires ${new Date(e.expiresAt).toLocaleString()}`:" \xb7 No expiry",null!=e.tokenLimit?` \xb7 ${e.tokensUsed}/${e.tokenLimit} tokens`:" \xb7 Unlimited tokens"]}),null!=e.tokenLimit&&(0,l.jsx)(v,{used:e.tokensUsed,limit:e.tokenLimit}),Array.isArray(e.allowedModels)&&e.allowedModels.length>0&&(0,l.jsxs)("p",{className:"text-xs text-text-muted mt-1 truncate",title:e.allowedModels.join(", "),children:["Models: ",e.allowedModels.join(", ")]}),!1===e.isActive&&(0,l.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"}),e.scope&&(0,l.jsxs)("p",{className:"text-xs text-primary mt-1",children:["Scoped (",(e.scope.providers||[]).length," provider",1===(e.scope.providers||[]).length?"":"s",")"]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("button",{onClick:()=>{J(e),Q(e.scope??null)},className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",title:"Edit scope",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tune"})}),(0,l.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?z({title:"Pause API Key",message:`Pause API key "${e.name}"?
2
-
3
- This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{z(null),tA(e.id,t)}}):tA(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,l.jsx)("button",{onClick:()=>W(e),className:"p-2 hover:bg-primary/10 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:"Edit key",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,l.jsx)("button",{onClick:()=>tT(e.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),q&&(0,l.jsx)(k,{apiKey:q,activeProviders:O,modelAliases:L,onClose:()=>W(null),onSave:e=>tE(q.id,e)},q.id),(0,l.jsx)(i.aF,{isOpen:b,title:"Create API Key",onClose:()=>{y(!1),N(""),S(""),T(""),E([]),_(!1),R(null)},children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(i.pd,{label:"Key Name",value:j,onChange:e=>N(e.target.value),placeholder:"Production Key"}),(0,l.jsx)(i.pd,{label:"Expires at (optional)",type:"datetime-local",value:C,onChange:e=>S(e.target.value),hint:"Leave blank for no expiry."}),(0,l.jsx)(i.pd,{label:"Token limit (optional)",type:"number",min:"1",step:"1",value:$,onChange:e=>T(e.target.value),placeholder:"Unlimited",hint:"Total input and output tokens. Strictly enforced."}),(0,l.jsxs)("div",{className:"-mt-2 flex flex-wrap gap-1.5","aria-label":"Token limit presets",children:[f.map(e=>{let t=$===e.value;return(0,l.jsx)("button",{type:"button",onClick:()=>T(e.value),"aria-pressed":t,className:`rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${t?"border-primary bg-primary text-white":"border-border bg-surface-2 text-text-muted hover:border-primary/50 hover:text-primary"}`,children:e.label},e.value)}),(0,l.jsx)("button",{type:"button",onClick:()=>T(""),"aria-pressed":!$,className:`rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${!$?"border-primary bg-primary text-white":"border-border bg-surface-2 text-text-muted hover:border-primary/50 hover:text-primary"}`,children:"Unlimited"})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Allowed models (optional)"}),0===A.length?(0,l.jsxs)("div",{className:"rounded-lg border border-dashed border-black/10 bg-black/[0.01] px-3 py-4 text-center dark:border-white/10 dark:bg-white/[0.01]",children:[(0,l.jsx)("span",{className:"material-symbols-outlined mb-1 text-xl text-text-muted",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"All models are allowed"})]}):(0,l.jsx)("div",{className:"flex max-h-28 flex-wrap gap-1 overflow-y-auto rounded-lg border border-border bg-surface-2 p-2",children:A.map(e=>(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2 py-1 text-xs text-primary",children:[(0,l.jsx)("span",{className:"max-w-48 truncate",children:e}),(0,l.jsx)("button",{type:"button",onClick:()=>E(t=>t.filter(t=>t!==e)),"aria-label":`Remove ${e}`,className:"material-symbols-outlined text-[14px] hover:text-red-500",children:"close"})]},e))}),(0,l.jsxs)("button",{type:"button",onClick:()=>_(!0),className:"flex w-full items-center justify-center gap-1 rounded-lg border border-dashed border-black/10 py-2 text-xs font-medium text-primary transition-colors hover:border-primary/50 dark:border-white/10",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),A.length?"Add another model":"Choose models"]}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Leave empty to allow every model."})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-sm font-medium mb-2",children:"Access Scope"}),(0,l.jsx)(g,{value:I,onChange:R})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:tS,fullWidth:!0,disabled:!j.trim(),children:"Create"}),(0,l.jsx)(i.$n,{onClick:()=>{y(!1),N(""),S(""),T(""),E([]),_(!1),R(null)},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,l.jsx)(i.aF,{isOpen:!!H,title:`Edit Scope — ${H?.name||""}`,onClose:()=>{J(null),Q(null)},children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(g,{value:B,onChange:Q}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:t$,fullWidth:!0,children:"Save"}),(0,l.jsx)(i.$n,{onClick:()=>{J(null),Q(null)},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),P&&(0,l.jsx)(i.rq,{isOpen:P,onClose:()=>_(!1),onSelect:e=>E(t=>t.includes(e.value)?t:[...t,e.value]),onDeselect:e=>E(t=>t.filter(t=>t!==e.value)),activeProviders:O,modelAliases:L,addedModelValues:A,closeOnSelect:!1,title:"Choose models for this API key"}),(0,l.jsx)(i.aF,{isOpen:!!D,title:"API Key Created",onClose:()=>M(null),children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,l.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,l.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.pd,{value:D||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,l.jsx)(i.$n,{variant:"secondary",icon:"created_key"===ta?"check":"content_copy",onClick:()=>tr(D,"created_key"),children:"created_key"===ta?"Copied!":"Copy"})]}),(0,l.jsx)(i.$n,{onClick:()=>M(null),fullWidth:!0,children:"Done"})]})}),(0,l.jsx)(i.aF,{isOpen:ef,title:"Enable Tunnel",onClose:()=>ej(!1),children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local 9Router to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,l.jsx)("div",{className:"grid grid-cols-2 gap-3",children:d.oX.map(e=>(0,l.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,l.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:th,fullWidth:!0,children:"Start Tunnel"}),(0,l.jsx)(i.$n,{onClick:()=>ej(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,l.jsx)(i.aF,{isOpen:ev,title:"Disable Tunnel",onClose:()=>!ex&&ek(!1),children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:tb,fullWidth:!0,disabled:ex,variant:"danger",children:ex?"Disabling...":"Disable"}),(0,l.jsx)(i.$n,{onClick:()=>ek(!1),variant:"ghost",fullWidth:!0,disabled:ex,children:"Cancel"})]})]})}),(0,l.jsx)(i.aF,{isOpen:eV,title:"Tailscale Funnel",onClose:()=>{eq||(eX(!1),eJ(""),eU(null))},children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[null===eD&&(0,l.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===eD&&!eq&&(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:tg,fullWidth:!0,children:"Install Tailscale"}),(0,l.jsx)(i.$n,{onClick:()=>eX(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eq&&(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),eK.length>0&&(0,l.jsx)("div",{ref:eY,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:eK.map((e,t)=>(0,l.jsx)("div",{children:e},t))})]}),!0===eD&&!eq&&(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:()=>tk(),fullWidth:!0,children:"Connect"}),(0,l.jsx)(i.$n,{onClick:()=>eX(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eO&&(0,l.jsx)(x,{status:eO})]})}),(0,l.jsx)(i.aF,{isOpen:eZ,title:"Disable Tailscale",onClose:()=>!eA&&eG(!1),children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:tN,fullWidth:!0,disabled:eA,variant:"danger",children:eA?"Disabling...":"Disable"}),(0,l.jsx)(i.$n,{onClick:()=>eG(!1),variant:"ghost",fullWidth:!0,disabled:eA,children:"Cancel"})]})]})}),(0,l.jsx)(i.uo,{isOpen:!!K,onClose:()=>z(null),onConfirm:K?.onConfirm,title:K?.title||"Confirm",message:K?.message,variant:"danger"})]})}v.propTypes={used:n().number,limit:n().number.isRequired},k.propTypes={apiKey:n().object.isRequired,activeProviders:n().array.isRequired,modelAliases:n().object.isRequired,onClose:n().func.isRequired,onSave:n().func.isRequired},w.propTypes={machineId:n().string.isRequired}},59227:(e,t,s)=>{Promise.resolve().then(s.bind(s,34403))}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{20611:(e,l,t)=>{Promise.resolve().then(t.bind(t,63704))},63704:(e,l,t)=>{"use strict";t.d(l,{default:()=>c});var s=t(95155),r=t(12115),n=t(35497),o=t(90620);let a={LOG:"text-green-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400",DEBUG:"text-purple-400"};function c(){let[e,l]=(0,r.useState)([]),t=(0,r.useRef)(null),c=(0,r.useRef)(null),i=async()=>{try{let e=await fetch("/api/translator/console-logs",{method:"DELETE"});if(!e.ok)throw Error(`HTTP ${e.status}`);c.current?.invalidate(),l([])}catch(e){console.error("Failed to clear console logs:",e)}};return(0,r.useEffect)(()=>(c.current=function({onSnapshot:e,onEvent:l,fetchImpl:t=globalThis.fetch,EventSourceImpl:s=globalThis.EventSource,setTimeoutImpl:r=globalThis.setTimeout,clearTimeoutImpl:n=globalThis.clearTimeout,pollIntervalMs:a=o.UY.pollIntervalMs,streamTimeoutMs:c=o.UY.streamTimeoutMs}){let i=!1,u=!1,h=null,d=null,p=null,g=null,m=()=>{d&&(n(d),d=null)},x=async()=>{let l=g?{"If-None-Match":g}:void 0,s=await t("/api/translator/console-logs",{cache:"no-store",headers:l});if(i||304===s.status)return;if(!s.ok)throw Error(`HTTP ${s.status}`);let r=await s.json();!i&&(g=s.headers?.get?.("etag")||null,r.success&&Array.isArray(r.logs)&&e(r.logs))},f=async()=>{if(!i&&u){try{await x()}catch(e){console.error("Failed to poll console logs:",e)}!i&&u&&(p=r(f,a))}},v=()=>i||u?Promise.resolve():(u=!0,m(),h?.close(),h=null,f());return{ready:Promise.resolve(x()).catch(e=>console.error("Failed to load console logs:",e)).finally(()=>{if(!i){if(!s)return void v();try{h=new s("/api/translator/console-logs/stream")}catch{v();return}h.onmessage=e=>{m(),g=null;try{l(JSON.parse(e.data))}catch(e){console.error("Failed to parse console log event:",e)}},h.onerror=v,d=r(v,c)}}),invalidate(){g=null},stop(){i=!0,u=!1,m(),p&&n(p),h?.close()}}}({onSnapshot:e=>{l(e.slice(-o.UY.maxLines))},onEvent:e=>{"init"===e.type?l(e.logs.slice(-o.UY.maxLines)):"line"===e.type?l(l=>{let t=[...l,e.line];return t.length>o.UY.maxLines?t.slice(-o.UY.maxLines):t}):"lines"===e.type?l(l=>{let t=[...l,...e.lines];return t.length>o.UY.maxLines?t.slice(-o.UY.maxLines):t}):"clear"===e.type&&l([])}}),()=>{c.current?.stop(),c.current=null}),[]),(0,r.useEffect)(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[e]),(0,s.jsx)("div",{className:"",children:(0,s.jsxs)(n.Zp,{children:[(0,s.jsx)("div",{className:"flex items-center justify-end px-4 pt-3 pb-2",children:(0,s.jsx)(n.$n,{size:"sm",variant:"outline",icon:"delete",onClick:i,children:"Clear"})}),(0,s.jsx)("div",{ref:t,className:"bg-black rounded-b-lg p-4 text-xs font-mono h-[calc(100vh-220px)] overflow-y-auto",children:0===e.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No console logs yet."}):(0,s.jsx)("div",{className:"space-y-0.5",children:e.map((e,l)=>{let t,r;return(0,s.jsx)("div",{children:(r=a[(t=e.match(/\[(\w+)\]/g))?t[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,s.jsx)("span",{className:r,children:e}))},l)})})})]})})}}},e=>{e.O(0,[8010,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=20611)),_N_E=e.O()}]);
@@ -1,27 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{70217:(e,t,i)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}i.d(t,{g:()=>a})},79355:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>et});var a=i(95155),s=i(12115),l=i(73321),r=i(98500),n=i.n(r),o=i(5772),d=i(8247),c=i(35497),m=i(88105),p=i(28777),u=i(57151),x=i(47224),h=i(40228);let f=["none","low","medium","high"],g=["none","thinking"],y=["none","low","medium","high","max"],b=["none","low","medium","high","xhigh","max"],v={qoder:b,openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":y,"claude-budget":b,"gemini-level":["minimal","low","medium","high"],"gemini-budget":f,zai:g,qwen:f,kimi:y,opencode:y,deepseek:["none","high","max"],minimax:g,hunyuan:f,step:f,nous:f,meta:["minimal","low","medium","high","xhigh"],ollama:y},j=["none","minimal","low","medium","high","xhigh","max"],w=[{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...j,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...j,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:j},{providers:["openai","codex"],pattern:"*gpt-5.6*",levels:["none","minimal","low","medium","high","xhigh","max","ultra"]},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{provider:"ollama",pattern:"*gpt-oss*",levels:["none","low","medium","high"]},{provider:"ollama-local",pattern:"*gpt-oss*",levels:["none","low","medium","high"]},{provider:"codebuddy-cn",pattern:"glm-5.3*",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]}];function k(e,t){if("kiro"===e&&null===function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(t))return"reasoning";if(!t.includes("claude"))return null;let i=t.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!i)return null;let[,a,s]=i,l=Number(a),r=void 0===s?null:Number(s);return l<4||4===l&&(null===r||r<=5||null!==r&&r>=1e3)?null:"output_config"}(t))return null;let i=(0,u.nl)(e,t);if(!i.reasoning)return null;let a=w.find(i=>(!i.providers||!e||i.providers.includes(e))&&(!i.provider||i.provider===e)&&(0,x.gH)(i.pattern,t)),s=(e?h.xq[e]?.thinkingFormat:null)||i.thinkingFormat,l=i.thinkingLevels||a?.levels||v[s]||f;return!1===i.thinkingCanDisable&&(l=l.filter(e=>"none"!==e)),l}var N=i(11059),C=i(929),S=i(73006);let A=new Map;async function T(e){if(e?.type==="static")return e.models||[];if(!e?.url||!e?.type)return[];let t=A.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),i=await fetch(`/api/providers/suggested-models?${t}`);if(!i.ok)return[];let a=(await i.json()).data??[];return A.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}function $({customModels:e=[],modelAliases:t={},providerAlias:i,builtInModels:a=[],type:s="llm",includeLegacyAliases:l=!0}){let r=new Set(a.map(e=>e.id)),n=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==i)continue;let e=t?.kind||t?.type||"llm";if(s&&e!==s||r.has(t.id))continue;let a=`${i}/${t.id}`;n.has(a)||(n.add(a),o.push({id:t.id,name:t.name||t.id,fullModel:a,source:"custom",type:e}))}if(!l)return o;let d=`${i}/`;for(let[e,i]of Object.entries(t||{})){if("string"!=typeof i||!i.startsWith(d))continue;let t=i.slice(d.length);!t||r.has(t)||n.has(i)||(n.add(i),o.push({id:t,alias:e,fullModel:i,source:"legacyAlias",type:s||"llm"}))}return o}var P=i(14051),O=i.n(P);function I({model:e,fullModel:t,alias:i,copied:s,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:m,isTesting:p,onDisable:u,caps:x,thinkingSuffix:h}){let f=h?`${t}(${h})`:t,g="ok"===r?"#22c55e":"error"===r?"#ef4444":"slow"===r||"rate_limited"===r?"#f59e0b":void 0;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"slow"===r||"rate_limited"===r?"border-amber-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:g?{color:g}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"slow"===r||"rate_limited"===r?"warning":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:f}),(0,a.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,a.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,a.jsx)(c.nh,{caps:x,colorOverride:"text-text-muted/70",size:12})]})]}),m&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:m,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:p?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(f,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,a.jsx)("button",{onClick:u,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function E({modelId:e,fullModel:t,copied:i,onCopy:s,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>s(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function R({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:i,customModels:l,copied:r,onCopy:n,onDeleteAlias:o,onAddCustomModel:d,onDeleteCustomModel:m,connections:p,isAnthropic:u,onTestModel:x,externalTestResults:h,externalTestingModelIds:f,disabledModelIds:g=[]}){let[y,b]=(0,s.useState)(""),[v,j]=(0,s.useState)(!1),[w,k]=(0,s.useState)(!1),[N,C]=(0,s.useState)(null),[S,A]=(0,s.useState)({}),T=async t=>{if(x)return void await x(t);if(!N){C(t);try{let i=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await i.json();A(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{A(e=>({...e,[t]:"error"}))}finally{C(null)}}},P=$({customModels:l,modelAliases:i,providerAlias:e,type:"llm"}),O=P.filter(e=>!g.includes(e.id)),I=async()=>{if(!y.trim()||v)return;let e=y.trim();if(P.some(t=>t.id===e))return void alert("Model already exists for this provider.");j(!0);try{await d(e),b("")}catch(e){console.log("Error adding model:",e)}finally{j(!1)}},D=async()=>{if(w)return;let e=p.find(e=>!1!==e.isActive);if(e){k(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),i=await t.json();if(!t.ok)return void alert(i.error||"Failed to import models");let a=i.models||[];if(0===a.length)return void alert("No models returned from /models.");let s=0;for(let e of a){let t=e.id||e.name||e.model;t&&(P.some(e=>e.id===t)||(await d(t),s+=1))}0===s&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{k(!1)}}},_=p.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",u?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:y,onChange:e=>b(e.target.value),onKeyDown:e=>"Enter"===e.key&&I(),placeholder:u?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(c.$n,{size:"sm",icon:"add",onClick:I,disabled:!y.trim()||v,children:v?"Adding...":"Add"}),(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:D,disabled:!_||w,children:w?"Importing...":"Import from /models"})]}),!_&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),O.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:O.map(({id:i,alias:s,source:l})=>(0,a.jsx)(E,{modelId:i,fullModel:`${t}/${i}`,copied:r,onCopy:n,onDeleteAlias:()=>"custom"===l?m(i):o(s),onTest:p.length>0?()=>T(i):void 0,testStatus:h?.[i]||S[i],isTesting:f?.has(i)||N===i},`${l}-${e}/${i}`))})]})}I.propTypes={model:O().shape({id:O().string.isRequired}).isRequired,fullModel:O().string.isRequired,alias:O().string,copied:O().string,onCopy:O().func.isRequired,testStatus:O().oneOf(["ok","error","slow","rate_limited","not_tested"]),isCustom:O().bool,isFree:O().bool,onDeleteAlias:O().func,onTest:O().func,isTesting:O().bool,onDisable:O().func,caps:O().object,thinkingSuffix:O().string},O().string.isRequired,O().string.isRequired,O().string,O().func.isRequired,O().func.isRequired,O().func,O().oneOf(["ok","error"]),O().bool,O().string.isRequired,O().object.isRequired,O().arrayOf(O().object),O().string,O().func.isRequired,O().func.isRequired,O().func.isRequired,O().func.isRequired,R.propTypes={providerStorageAlias:O().string.isRequired,providerDisplayAlias:O().string.isRequired,modelAliases:O().object.isRequired,customModels:O().arrayOf(O().object),copied:O().string,onCopy:O().func.isRequired,onDeleteAlias:O().func.isRequired,onAddCustomModel:O().func.isRequired,onDeleteCustomModel:O().func.isRequired,connections:O().arrayOf(O().shape({id:O().string,isActive:O().bool})).isRequired,isAnthropic:O().bool,onTestModel:O().func,externalTestResults:O().object,externalTestingModelIds:O().instanceOf(Set),disabledModelIds:O().arrayOf(O().string)};var D=i(70217);function _({until:e}){let[t,i]=(0,s.useState)("");return((0,s.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void i("");let a=Math.floor(t/1e3);if(a<60)i(`${a}s`);else if(a<3600)i(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);i(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}_.propTypes={until:O().string.isRequired};let U=["invalid_grant","refresh_token_expired","reauth_required","unrecoverable_refresh_error","refresh_token_reused","refresh_token_invalidated"];function q(e){if(!e||"string"!=typeof e)return!1;let t=e.toLowerCase();return U.some(e=>t.includes(e))}function z({connection:e,plan:t=null,proxyPools:i,isOAuth:l,isFirst:r,isLast:n,onMoveUp:o,onMoveDown:d,onToggleActive:m,onUpdateProxy:p,onEdit:u,onDelete:x,onReconnect:h=null,oneByOneStatus:f=null,autoPing:g=null}){let[y,b]=(0,s.useState)(!1),[v,j]=(0,s.useState)(!1),w=(0,s.useRef)(null),k=new Map((i||[]).map(e=>[e.id,e])),N=e.providerSpecificData?.proxyPoolId||null,C=N?k.get(N):null,S=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,A=!!N||S,T=C?`Pool: ${C.name}`:N?`Pool: ${N} (inactive/missing)`:S?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",$=g?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny request to an available model. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",P="";if(C?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=C?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);P=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{P=t}}let O=C?.noProxy||e.providerSpecificData?.connectionNoProxy||"",I="default";C?.isActive===!0?I="success":(N||S)&&(I="error"),(0,s.useEffect)(()=>{if(!y)return;let e=e=>{w.current&&!w.current.contains(e.target)&&b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[y]);let E=async e=>{j(!0);try{await p("__none__"===e?null:e)}finally{j(!1),b(!1)}},R=e.authType||(l?"oauth":"apikey"),U="oauth"===R,M="cookie"===R,J=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(U?"OAuth Account":M?"Cookie Account":"API Key"),K=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,L=t?.trim(),F=e.providerSpecificData?.chatgptPlanType?.trim(),H="codex"===e.provider?L&&"unknown"!==L.toLowerCase()?L:F:null,[B,W]=(0,s.useState)(!1),G=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,s.useEffect)(()=>{let t=()=>{W(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let i=G?setInterval(t,1e3):null;return()=>{i&&clearInterval(i)}},[G]);let Q="unavailable"!==e.testStatus||B?e.testStatus:"active",V=(U||M)&&"unavailable"===e.testStatus&&function(e,t){if(401===e||403===e)return!0;if(!t||"string"!=typeof t)return!1;let i=t.toLowerCase();return i.includes("unauthorized")||i.includes("token")||i.includes("invalid api key")||i.includes("revoked")||i.includes("auth")||q(t)}(e.errorCode,e.lastError),Z=q(e.lastError)?"Auth expired — reconnect required":e.lastError,X=()=>f?"queued"===f.state?"queued":"testing"===f.state?"testing":"success"===f.state?"success":"failed"===f.state?f.error?`failed: ${f.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:d,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:M?"cookie":U?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:J}),K&&(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:K}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(c.Ex,{variant:(0,D.g)(e.isActive,Q),size:"sm",dot:!0,children:!1===e.isActive?"disabled":Q||"Unknown"}),(0,a.jsx)(c.Ex,{variant:"default",size:"sm",children:U?"OAuth":M?"Cookie":"API Key"}),H&&"unknown"!==H.toLowerCase()&&(0,a.jsx)(c.Ex,{variant:"primary",size:"sm",children:H}),A&&(0,a.jsx)(c.Ex,{variant:I,size:"sm",children:"Proxy"}),B&&!1!==e.isActive&&(0,a.jsx)(_,{until:G}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:Z}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),X()&&(0,a.jsx)(c.Ex,{variant:f?"success"===f.state?"success":"failed"===f.state?"error":"testing"===f.state?"primary":"default":"default",size:"sm",children:X()})]}),A&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:T,children:T}),P&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:P}),O&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:O,children:["no_proxy: ",O]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(i||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:w,children:[(0,a.jsxs)("button",{onClick:()=>b(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${A?"text-primary":"text-text-muted hover:text-primary"}`,disabled:v,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:v?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),y&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>E("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!N?"text-primary font-medium":"text-text-main"}`,children:"None"}),(i||[]).map(e=>(0,a.jsx)("button",{onClick:()=>E(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${N===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),g&&(0,a.jsx)(c.m_,{text:$,children:(0,a.jsxs)("button",{onClick:()=>g.onToggle(!g.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${g.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),V&&h&&(0,a.jsxs)("button",{onClick:()=>h(e),className:"flex flex-col items-center rounded px-2 py-1 text-amber-600 hover:bg-amber-500/10 dark:text-amber-400 dark:hover:bg-amber-500/20 transition-colors",title:"Reconnect account",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"lock_reset"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight font-semibold",children:"Reconnect"})]}),(0,a.jsxs)("button",{onClick:u,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:m,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}z.propTypes={connection:O().shape({id:O().string,name:O().string,email:O().string,displayName:O().string,modelLockUntil:O().string,testStatus:O().string,isActive:O().bool,lastError:O().string,priority:O().number,globalPriority:O().number}).isRequired,plan:O().string,proxyPools:O().arrayOf(O().shape({id:O().string,name:O().string,proxyUrl:O().string,noProxy:O().string,isActive:O().bool})),isOAuth:O().bool.isRequired,isFirst:O().bool.isRequired,isLast:O().bool.isRequired,onMoveUp:O().func.isRequired,onMoveDown:O().func.isRequired,onToggleActive:O().func.isRequired,onUpdateProxy:O().func,onEdit:O().func.isRequired,onDelete:O().func.isRequired,onReconnect:O().func,oneByOneStatus:O().shape({state:O().string,error:O().string}),autoPing:O().shape({on:O().bool,onToggle:O().func,provider:O().string})};let M=`name1|sk-key1
2
- name2|sk-key2
3
- sk-key-only-auto-named`;function J({isOpen:e,provider:t,providerName:i,isCompatible:l,isAnthropic:r,providerNode:n,authType:o,authHint:d,website:p,proxyPools:u,error:x,existingNames:h,onSave:f,onBulkDone:g,onClose:y}){let b="__none__",v="ollama-local"===t,j="cookie"===o,w="xai"===t&&!j,k=j?"Cookie Value":"qoder"===t?"Personal Access Token (PAT)":"API Key",N=m.Q2?.[t]?.baseUrlField||null,C="azure"===t,S="cloudflare-ai"===t,A="vertex"===t||"vertex-partner"===t,T=m.Q2?.[t]?.regions||null,$=m.Q2?.[t]?.defaultRegion||T?.[0]?.id||"",[P,O]=(0,s.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:b,baseUrl:""}),[I,E]=(0,s.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[R,D]=(0,s.useState)({accountId:""}),[_,U]=(0,s.useState)({location:"global",reasoningEffort:"high"}),[q,z]=(0,s.useState)($),[K,L]=(0,s.useState)(!1),[F,H]=(0,s.useState)(null),[B,W]=(0,s.useState)(!1),G=S?`name1|sk-key1|acc123456
4
- name2|sk-key2|def789012
5
- sk-key-only-auto-named`:"qoder"===t?`name1|pt-xxxxx
6
- name2|pt-yyyyy
7
- pt-only-auto-named`:M,[Q,V]=(0,s.useState)("single"),[Z,X]=(0,s.useState)(""),[Y,ee]=(0,s.useState)(null),et=()=>l&&n?{prefix:n.prefix,...n.apiType?{apiType:n.apiType}:{},baseUrl:n.baseUrl,nodeName:n.name,clientIdentityProfile:n.clientIdentityProfile||"default",clientIdentityHeaders:n.clientIdentityHeaders||{}}:A?{location:_.location||"global",reasoningEffort:_.reasoningEffort||"high"}:function({hasBaseUrlField:e=!1,baseUrl:t="",isAzure:i=!1,azureData:a=null,isCloudflareAi:s=!1,cloudflareData:l=null,region:r="",hasRegions:n=!1}={}){if(e){let e=String(t||"").trim();return e?{baseUrl:e}:void 0}return i?{azureEndpoint:a?.azureEndpoint,apiVersion:a?.apiVersion,deployment:a?.deployment,organization:a?.organization}:s?{accountId:l?.accountId}:n&&r?{region:r}:void 0}({hasBaseUrlField:!!N,baseUrl:P.baseUrl,isAzure:C,azureData:I,isCloudflareAi:S,cloudflareData:R,region:q,hasRegions:!!T}),ei=async()=>{if(l&&!P.defaultModel.trim())return void H("failed");L(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:P.apiKey,defaultModel:l?P.defaultModel.trim():void 0,providerSpecificData:et()})}),i=await e.json();H(i.valid?"success":"failed")}catch{H("failed")}finally{L(!1)}},ea=async()=>{if(t&&(v||P.apiKey)&&(v||P.name)&&(!l||P.defaultModel.trim())){W(!0);try{let e=!1;try{L(!0),H(null);let i=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:P.apiKey,defaultModel:l?P.defaultModel.trim():void 0,providerSpecificData:et()})});e=!!(await i.json()).valid,H(e?"success":"failed")}catch{H("failed")}finally{L(!1)}await f({name:P.name||(v?"Ollama Local":""),apiKey:P.apiKey,defaultModel:l?P.defaultModel.trim():void 0,priority:P.priority,proxyPoolId:P.proxyPoolId===b?null:P.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:et()})}finally{W(!1)}}},es=async()=>{let e=Z.split("\n");if(!e.length)return;let i=function(e,t,i={}){let{isCloudflareAi:a=!1}=i,s=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),l=[];for(let t of e){let e,i="string"==typeof t?t.trim():"";if(!i)continue;let r=function(e,t={}){let{isCloudflareAi:i=!1}=t,a=e.split("|");if(i&&a.length>=3){let e=a[0].trim();return{baseName:e||"Key",apiKey:a.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:a[a.length-1].trim()}}}return a.length>=2?{baseName:a[0].trim()||"Key",apiKey:a.slice(1).join("|").trim()}:{baseName:"Key",apiKey:a[0].trim()}}(i,{isCloudflareAi:a});if(!r||!r.apiKey)continue;let n=r.baseName,o=1;for(;e=`${n} ${o}`,s.has(e.toLowerCase());)o+=1;s.add(e.toLowerCase());let d={name:e,apiKey:r.apiKey,skipped:!1};r.providerSpecificData&&(d.providerSpecificData=r.providerSpecificData),l.push(d)}return l}(e,h,{isCloudflareAi:S});if(!i.length)return;W(!0),ee(null);let a=0,s=0;for(let e of i)try{let i=!1;try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey})});i=!!(await a.json().catch(()=>({}))).valid}catch{i=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey,name:e.name,priority:1,testStatus:i?"active":"unknown",...e.providerSpecificData?{providerSpecificData:e.providerSpecificData}:{}})})).ok?a++:s++}catch{s++}W(!1),ee({success:a,failed:s}),a>0&&g&&g()};return t?(0,a.jsx)(c.aF,{isOpen:e,title:`Add ${i||t} ${k}`,onClose:y,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{size:"sm",variant:"single"===Q?"primary":"ghost",onClick:()=>{V("single"),ee(null)},children:"Single"}),(0,a.jsx)(c.$n,{size:"sm",variant:"bulk"===Q?"primary":"ghost",onClick:()=>{V("bulk"),ee(null)},children:"Bulk Add"})]}),"bulk"===Q&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:S?(0,a.jsxs)(a.Fragment,{children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===t?(0,a.jsxs)(a.Fragment,{children:["One PAT per line. Format: ",(0,a.jsx)("code",{children:"name|pt-..."})," or just ",(0,a.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,a.jsxs)(a.Fragment,{children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:G,value:Z,onChange:e=>X(e.target.value)}),Y&&(0,a.jsxs)("div",{className:`text-sm font-medium ${Y.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",Y.success," added",Y.failed>0?`, ✗ ${Y.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:es,fullWidth:!0,disabled:B||!Z.trim(),children:B?"Adding...":"Add All Keys"}),(0,a.jsx)(c.$n,{onClick:y,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.pd,{label:"Name",value:P.name,onChange:e=>O({...P,name:e.target.value}),placeholder:v?"Ollama Local":"Production Key"}),N&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.pd,{label:N.label,value:P.baseUrl,onChange:e=>O({...P,baseUrl:e.target.value}),placeholder:N.placeholder,hint:N.help,className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(c.$n,{onClick:ei,disabled:K||B,variant:"secondary",children:K?"Checking...":"Check"})})]}),!v&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.pd,{label:k,type:j?"text":"password",value:P.apiKey,onChange:e=>O({...P,apiKey:e.target.value}),placeholder:j?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":w?"xai-...":"qoder"===t?"pt-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(c.$n,{onClick:ei,disabled:!P.apiKey||K||B,variant:"secondary",children:K?"Checking...":"Check"})})]}),w&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),j&&d&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[d,p&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",p.replace(/^https?:\/\//,"")]})]})]}),T&&(0,a.jsx)(c.l6,{label:"Region",value:q,onChange:e=>z(e.target.value),options:T.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(c.pd,{label:"Default Model",value:P.defaultModel,onChange:e=>O({...P,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),v&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),F&&(0,a.jsx)(c.Ex,{variant:"success"===F?"success":"error",children:"success"===F?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),S&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(c.pd,{label:"Account ID",value:R.accountId,onChange:e=>D({...R,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),A&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Vertex AI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(c.l6,{label:"Location",value:_.location,onChange:e=>U({..._,location:e.target.value}),options:[{value:"global",label:"global (recommended for Gemini 3.x)"},{value:"us-central1",label:"us-central1"},{value:"us-east4",label:"us-east4"},{value:"europe-west1",label:"europe-west1"},{value:"europe-west4",label:"europe-west4"},{value:"asia-east1",label:"asia-east1"},{value:"asia-northeast1",label:"asia-northeast1"}]}),(0,a.jsx)(c.l6,{label:"Reasoning Effort (default)",value:_.reasoningEffort,onChange:e=>U({..._,reasoningEffort:e.target.value}),options:[{value:"high",label:"high (32k tokens — default for Pro)"},{value:"medium",label:"medium (8k tokens)"},{value:"low",label:"low (1k tokens)"},{value:"",label:"none (let model decide)"}]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Location ",(0,a.jsx)("code",{children:"global"})," is required for Gemini 3.1 Pro Preview. Reasoning effort sets the default ",(0,a.jsx)("code",{children:"thinkingBudget"}),"; clients can override per-request via ",(0,a.jsx)("code",{children:"reasoning_effort"}),"."]})]})]}),C&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(c.pd,{label:"Azure Endpoint",value:I.azureEndpoint,onChange:e=>E({...I,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(c.pd,{label:"Deployment Name",value:I.deployment,onChange:e=>E({...I,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(c.pd,{label:"API Version",value:I.apiVersion,onChange:e=>E({...I,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(c.pd,{label:"Organization",value:I.organization,onChange:e=>E({...I,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(c.pd,{label:"Priority",type:"number",value:P.priority,onChange:e=>O({...P,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(c.l6,{label:"Proxy Pool",value:P.proxyPoolId,onChange:e=>O({...P,proxyPoolId:e.target.value}),options:[{value:b,label:"None"},...(u||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(u||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:ea,fullWidth:!0,disabled:B||!v&&(!P.name||!P.apiKey)||l&&!P.defaultModel.trim()||C&&(!I.azureEndpoint||!I.deployment||!I.organization)||S&&!R.accountId,children:B?"Saving...":"Save"}),(0,a.jsx)(c.$n,{onClick:y,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}J.propTypes={isOpen:O().bool.isRequired,provider:O().string,providerName:O().string,isCompatible:O().bool,isAnthropic:O().bool,providerNode:O().shape({name:O().string,prefix:O().string,apiType:O().string,baseUrl:O().string,clientIdentityProfile:O().string,clientIdentityHeaders:O().object}),authType:O().string,authHint:O().string,website:O().string,proxyPools:O().arrayOf(O().shape({id:O().string,name:O().string})),error:O().string,existingNames:O().arrayOf(O().string),onSave:O().func.isRequired,onBulkDone:O().func,onClose:O().func.isRequired};let K=[{value:"default",label:"Default"},{value:"claude-cli",label:"Claude CLI"},{value:"codex-cli",label:"Codex CLI"},{value:"openclaw",label:"OpenClaw"},{value:"custom",label:"Custom Headers"}],L=new Set(["authorization","x-api-key","api-key","cookie"]);function F(e){let t=String(e||"").trim();if(!t)return{headers:{}};try{let e;if(t.startsWith("{")){let i=JSON.parse(t);if(!i||"object"!=typeof i||Array.isArray(i))return{error:"Use a JSON object or Header: value lines."};e=Object.entries(i)}else for(let i of(e=[],t.split(/\r?\n/))){let t=i.trim();if(!t||t.startsWith("#"))continue;let a=t.indexOf(":");if(a<=0)return{error:"Each custom header line must use Header: value."};e.push([t.slice(0,a),t.slice(a+1)])}let i={};for(let[t,a]of e){let e=String(t||"").trim(),s=String(a||"").trim();!e||!s||L.has(e.toLowerCase())||(i[e]=s)}return{headers:i}}catch{return{error:"Use valid JSON or Header: value lines."}}}function H({isOpen:e,node:t,onSave:i,onClose:l,isAnthropic:r}){let[n,o]=(0,s.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1",clientIdentityProfile:"default",clientIdentityHeadersText:""}),[d,m]=(0,s.useState)(!1),[p,u]=(0,s.useState)(""),[x,h]=(0,s.useState)(""),[f,g]=(0,s.useState)(!1),[y,b]=(0,s.useState)(null);(0,s.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1"),clientIdentityProfile:t.clientIdentityProfile||"default",clientIdentityHeadersText:t.clientIdentityHeaders?JSON.stringify(t.clientIdentityHeaders,null,2):""})},[t,r]);let v=async()=>{if(!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim())return;let e="custom"===n.clientIdentityProfile?F(n.clientIdentityHeadersText):{headers:{}};if(e.error)return void b("failed");m(!0);try{let t={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl,clientIdentityProfile:n.clientIdentityProfile,clientIdentityHeaders:e.headers};r||(t.apiType=n.apiType),await i(t)}finally{m(!1)}},j=async()=>{let e="custom"===n.clientIdentityProfile?F(n.clientIdentityHeadersText):{headers:{}};if(e.error)return void b("failed");g(!0);try{let t=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:p,type:r?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0,clientIdentityProfile:n.clientIdentityProfile,clientIdentityHeaders:e.headers})}),i=await t.json();b(i.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(c.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(c.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(c.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(c.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(c.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsx)(c.l6,{label:"Client Identity",options:K,value:n.clientIdentityProfile,onChange:e=>o({...n,clientIdentityProfile:e.target.value}),hint:"Optional. Adds client fingerprint headers for compatible gateways."}),"custom"===n.clientIdentityProfile&&(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Custom Headers"}),(0,a.jsx)("textarea",{value:n.clientIdentityHeadersText,onChange:e=>o({...n,clientIdentityHeadersText:e.target.value}),placeholder:'{\n "User-Agent": "custom/1.0"\n}',rows:5,className:"w-full resize-y rounded-[10px] border border-transparent bg-surface-2 px-3 py-2.5 text-[16px] text-text-main placeholder-text-muted/70 transition-all duration-150 focus:border-brand-500/40 focus:outline-none focus:ring-2 focus:ring-brand-500/30 sm:text-sm"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"JSON object or Header: value lines. Auth headers are ignored."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>u(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(c.$n,{onClick:j,disabled:!p||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(c.pd,{label:"Model ID (optional)",value:x,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(c.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,a.jsx)(c.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}H.propTypes={isOpen:O().bool.isRequired,node:O().shape({id:O().string,name:O().string,prefix:O().string,apiType:O().string,baseUrl:O().string,clientIdentityProfile:O().string,clientIdentityHeaders:O().object}),onSave:O().func.isRequired,onClose:O().func.isRequired,isAnthropic:O().bool};let B=()=>Object.fromEntries(Object.keys(p.bs).map(e=>[e,!1]));function W({isOpen:e,providerAlias:t,providerDisplayAlias:i,notice:l,onSave:r,onClose:n}){let[o,d]=(0,s.useState)(""),[m,u]=(0,s.useState)(B),[x,h]=(0,s.useState)(null),[f,g]=(0,s.useState)(""),[y,b]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(d(""),u(B()),h(null),g(""))},[e]);let v=e=>{let i=`${t}/`;return e.startsWith(i)?e.slice(i.length):e},j=async()=>{let e=v(o.trim());if(e){h("testing"),g("");try{let i=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await i.json();h(a.ok?"ok":"error"),g(a.error||"")}catch(e){h("error"),g(e.message)}}},w=async()=>{let e=v(o.trim());if(e&&!y){b(!0);try{await r(e,m)}finally{b(!1)}}};return(0,a.jsx)(c.aF,{isOpen:e,onClose:n,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[l&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-xs text-text-muted bg-sidebar rounded-lg p-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"info"}),(0,a.jsx)("span",{children:l})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:o,onChange:e=>{d(e.target.value),h(null),g("")},onKeyDown:e=>{"Enter"===e.key&&j()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(c.$n,{variant:"secondary",icon:"science",loading:"testing"===x,onClick:j,disabled:!o.trim()||"testing"===x,children:"testing"===x?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:v(o.trim())||"model-id"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Capabilities"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-4",children:Object.entries(p.bs).map(([e,t])=>(0,a.jsx)(c.lM,{checked:!!m[e],onChange:t=>u(i=>({...i,[e]:t})),label:t.label,description:t.desc,size:"sm"},e))})]}),"ok"===x&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===x&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:f||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(c.$n,{onClick:n,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(c.$n,{onClick:w,fullWidth:!0,size:"sm",disabled:!o.trim()||y,children:y?"Adding...":"Add Model"})]})]})})}W.propTypes={isOpen:O().bool.isRequired,providerAlias:O().string.isRequired,providerDisplayAlias:O().string.isRequired,notice:O().string,onSave:O().func.isRequired,onClose:O().func.isRequired};let G=`[
8
- {
9
- "accessToken": "eyJhbGc...",
10
- "refreshToken": "rt_...",
11
- "idToken": "eyJhbGc...",
12
- "email": "user@example.com"
13
- }
14
- ]`;function Q({isOpen:e,onClose:t,onSuccess:i}){let[l,r]=(0,s.useState)(""),[n,o]=(0,s.useState)(!1),[d,m]=(0,s.useState)(""),[p,u]=(0,s.useState)(null),x=()=>{n||(r(""),m(""),u(null),t())},h=async()=>{var e;let t;m(""),u(null);let a=l.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){m(`${(0,S.Tl)("Invalid JSON")}: ${e.message}`);return}let s=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!s||0===s.length)return void m((0,S.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:s})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof i&&i()}catch(e){m(e.message||(0,S.Tl)("Request failed"))}finally{o(!1)}},f=p?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(c.aF,{isOpen:e,title:(0,S.Tl)("Bulk Add Codex Accounts"),onClose:x,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,S.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:G,value:l,onChange:e=>r(e.target.value),disabled:n}),d&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,S.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,S.Tl)("failed")}`:""]}),f.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:f.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:h,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,S.Tl)("Importing..."):(0,S.Tl)("Import All")}),(0,a.jsx)(c.$n,{onClick:x,variant:"ghost",fullWidth:!0,disabled:n,children:(0,S.Tl)("Close")})]})]})})}Q.propTypes={isOpen:O().bool.isRequired,onClose:O().func.isRequired,onSuccess:O().func};let V=`[
15
- {
16
- "access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
17
- "refresh_token": "LZhriF9bf88pPykpXCuZ9...",
18
- "id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
19
- "email": "account1@example.com"
20
- },
21
- {
22
- "access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
23
- "refresh_token": "LZhriF9bf88pPykpXCuZ9...",
24
- "id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
25
- "email": "account2@example.com"
26
- }
27
- ]`;function Z(e){let t,i=e.trim();if(!i)return[];try{t=JSON.parse(i)}catch(e){try{let e=i;e.startsWith("[")||((e=e.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(e=e.slice(0,-1)),e=`[${e}]`),t=JSON.parse(e)}catch{throw e}}if(Array.isArray(t))return t;if(t&&"object"==typeof t)return Array.isArray(t.accounts)?t.accounts:[t];throw Error("Input must be a JSON object or array of objects")}function X({isOpen:e,onClose:t,onSuccess:i}){let[l,r]=(0,s.useState)(""),[n,o]=(0,s.useState)(!1),[d,m]=(0,s.useState)(""),[p,u]=(0,s.useState)(null),[x,h]=(0,s.useState)(!1),[f,g]=(0,s.useState)(null),y=(0,s.useRef)(null),b=()=>{n||(r(""),m(""),u(null),g(null),h(!1),t())},v=async e=>{if(!e||0===e.length)return;m("");let t=Array.from(e).filter(e=>e.name.endsWith(".json")||"application/json"===e.type||""===e.type);if(0===t.length)return void m((0,S.Tl)("Please select valid .json files"));try{let e=[];for(let i of t){let t=await i.text(),a=Z(t);Array.isArray(a)?e.push(...a):a&&e.push(a)}if(0===e.length)return void m((0,S.Tl)("No accounts found in selected files"));r(JSON.stringify(e,null,2)),g({filesCount:t.length,accountsCount:e.length})}catch(e){m(`${(0,S.Tl)("Error reading files")}: ${e.message}`)}},j=async()=>{let e;m(""),u(null);try{e=Z(l)}catch(e){m(`${(0,S.Tl)("Invalid JSON")}: ${e.message}`);return}if(!e||0===e.length)return void m((0,S.Tl)("No accounts found in input"));o(!0);try{let t=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),a=await t.json();if(!t.ok)return void m(a?.error||`Request failed: ${t.status}`);u(a),a.success>0&&"function"==typeof i&&i()}catch(e){m(e.message||(0,S.Tl)("Request failed"))}finally{o(!1)}},w=p?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(c.aF,{isOpen:e,title:(0,S.Tl)("Bulk Add Grok CLI Accounts"),onClose:b,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,S.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,a.jsx)("input",{ref:y,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:e=>{v(e.target.files),e.target&&(e.target.value="")}}),(0,a.jsx)(c.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>y.current?.click(),disabled:n,children:(0,S.Tl)("Upload JSON Files")})]}),(0,a.jsxs)("div",{onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:e=>{e.preventDefault(),h(!1)},onDrop:e=>{e.preventDefault(),h(!1),e.dataTransfer?.files?.length>0&&v(e.dataTransfer.files)},className:`relative rounded border transition-colors ${x?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,a.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:V,value:l,onChange:e=>{r(e.target.value),g(null)},disabled:n}),x&&(0,a.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,a.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,S.Tl)("Drop .json files here")})]})]}),f&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,a.jsxs)("span",{children:[(0,S.Tl)("Loaded")," ",f.accountsCount," ",(0,S.Tl)("account(s) from")," ",f.filesCount," ",(0,S.Tl)("file(s)")]})]}),d&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&p.failed>0&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",p.failed," ",(0,S.Tl)("failed")]}),w.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:w.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:j,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,S.Tl)("Importing..."):(0,S.Tl)("Import All")}),(0,a.jsx)(c.$n,{onClick:b,variant:"ghost",fullWidth:!0,disabled:n,children:(0,S.Tl)("Close")})]})]})})}let Y={claude:"claudeAutoPing",codex:"codexAutoPing"},ee=[{value:"auto",label:"Retry: Auto"},{value:"15",label:"Retry: 15s"},{value:"30",label:"Retry: 30s"},{value:"60",label:"Retry: 1m"},{value:"120",label:"Retry: 2m"},{value:"300",label:"Retry: 5m"},{value:"600",label:"Retry: 10m"},{value:"1800",label:"Retry: 30m"},{value:"3600",label:"Retry: 1h"}];function et(){let e,t=(0,l.useParams)(),i=(0,l.useRouter)(),r=t.id,{getCaps:u}=(0,C.y)(),[x,h]=(0,s.useState)([]),[f,g]=(0,s.useState)(1),[y,b]=(0,s.useState)(10),[v,j]=(0,s.useState)(!0),[w,A]=(0,s.useState)(null),[P,O]=(0,s.useState)([]),[E,D]=(0,s.useState)(!1),[_,U]=(0,s.useState)(!1),[q,M]=(0,s.useState)(!1),[K,L]=(0,s.useState)(""),[F,B]=(0,s.useState)(!1),[G,V]=(0,s.useState)(!1),[Z,et]=(0,s.useState)(!1),[ei,ea]=(0,s.useState)(!1),[es,el]=(0,s.useState)(!1),[er,en]=(0,s.useState)(null),[eo,ed]=(0,s.useState)({}),[ec,em]=(0,s.useState)([]),[ep,eu]=(0,s.useState)(!1),[ex,eh]=(0,s.useState)({}),[ef,eg]=(0,s.useState)(""),[ey,eb]=(0,s.useState)(()=>new Set),[ev,ej]=(0,s.useState)(!1),[ew,ek]=(0,s.useState)([]),[eN,eC]=(0,s.useState)("__none__"),[eS,eA]=(0,s.useState)(!1),[eT,e$]=(0,s.useState)(null),[eP,eO]=(0,s.useState)(""),[eI,eE]=(0,s.useState)("auto"),[eR,eD]=(0,s.useState)("auto"),[e_,eU]=(0,s.useState)(""),[eq,ez]=(0,s.useState)({enabled:!1,connections:{}}),[eM,eJ]=(0,s.useState)([]),[eK,eL]=(0,s.useState)([]),[eF,eH]=(0,s.useState)([]),[eB,eW]=(0,s.useState)([]),[eG,eQ]=(0,s.useState)(null),[eV,eZ]=(0,s.useState)(!1),[eX,eY]=(0,s.useState)(!1),[e0,e1]=(0,s.useState)(!1),[e2,e5]=(0,s.useState)(null),[e3,e4]=(0,s.useState)({}),[e6,e8]=(0,s.useState)(null),e7=(0,s.useRef)(!1),[e9,te]=(0,s.useState)(!1),{copied:tt,copy:ti}=(0,N.C)(),ta="ag_risk_confirmed",ts=()=>{D(!0)},tl=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(ta)?eZ(!0):tc?ts():(L(""),M(!0))},tr=()=>{L(""),M(!0)},tn=()=>{tc?tl():tr()},to=w?{id:w.id,name:w.name||("anthropic-compatible"===w.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===w.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===w.type?"AC":"OC",apiType:w.apiType,baseUrl:w.baseUrl,type:w.type}:m.zN[r]||m.fg[r]||m.IS[r]||m.nJ[r]||m.br[r],td=to?.authModes||[],tc=!!m.zN[r]||!!m.IS[r]||td.includes("oauth"),tm=!!m.fg[r]||td.includes("apikey"),tp=!!m.IS[r]?.noAuth,tu=(0,p.KC)(r),tx="cursor"===r&&eK.length>0?eK:tu,th=(0,m.wG)(r),tf=(0,m.mq)(r),tg=(0,m.gb)(r),ty=tf||tg,tb=!ty&&tc&&tm,tv="xai"===r?"Grok Build OAuth":"grok-cli"===r?"Grok CLI Device Login":"kimi"===r?"Kimi Coding OAuth":"OAuth",tj="xai"===r?"xAI API Key":"kimi"===r?"Kimi API Key":"API Key",tw=e=>{if(!eI||"auto"===eI)return null;let t=k(r,e);return t&&t.includes(eI)?eI:null},tk=ty?r:th,tN=(()=>{let e=new Set,t=new Set,i=i=>{if(!i||t.has(i))return;t.add(i);let a=k(r,i);a&&a.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of tx)i(e.id);for(let e of eF)i(e.id);for(let e of ec)e.providerAlias===tk&&"llm"===(e.kind||e.type||"llm")&&i(e.id);return e.size?["auto",...e]:null})(),tC=ty?w?.prefix||r:th,tS=(0,s.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tk)}`,{cache:"no-store"}),t=await e.json();e.ok&&eW(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tk]),tA=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tk,ids:[e]})})).ok&&await tS()}catch(e){console.log("Error disabling model:",e)}},tT=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tk)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tS()}catch(e){console.log("Error enabling model:",e)}},t$=async e=>{e.length&&eQ({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eQ(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tk,ids:e})})).ok&&await tS()}catch(e){console.log("Error disabling all models:",e)}}})},tP=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tk)}`,{method:"DELETE"})).ok&&await tS()}catch(e){console.log("Error enabling all models:",e)}},tO=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ed(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tI=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&em(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,s.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eH(e.models)}).catch(()=>{})},[r]);let tE=(0,s.useCallback)(async()=>{try{let[e,t,i,a]=await Promise.all([fetch(`/api/providers?provider=${encodeURIComponent(r)}`,{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),s=await e.json(),l=await t.json(),n=await i.json(),o=a.ok?await a.json():{};e.ok&&h(s.connections||[]),i.ok&&O(n.proxyPools||[]);let d=(o.providerStrategies||{})[r]||{};e$(d.fallbackStrategy||null),eO(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1");let c=(o.providerThinking||{})[r]||{};eE(c.mode||"auto");let m=(o.retryDelayByProvider||{})[r];eD(null!=m&&"auto"!==m?String(m):"auto");let p=(o.rpmByProvider||{})[r];eU(null!=p?String(p):"");let u=Y[r],x=u&&o[u]||{};if(ez({enabled:!0===x.enabled,connections:x.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&ty)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}A(e)}}catch(e){console.log("Error fetching connections:",e)}finally{j(!1)}},[r,ty]),tR=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),i=await t.json();t.ok&&(A(i.node),await tE(),ea(!1))}catch(e){console.log("Error updating provider node:",e)}},tD=async(e,t)=>{try{let i=await fetch("/api/settings",{cache:"no-store"}),a=(i.ok?await i.json():{}).providerStrategies||{},s={};e&&(s.fallbackStrategy=e),"round-robin"===e&&""!==t&&(s.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(s).length?delete l[r]:l[r]=s,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},t_=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),i={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?i[r]={mode:e}:delete i[r],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:i})})}catch(e){console.log("Error saving thinking config:",e)}},tU=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),i={...(t.ok?await t.json():{}).retryDelayByProvider||{}};e&&"auto"!==e?i[r]=Number(e):delete i[r],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({retryDelayByProvider:i})})}catch(e){console.log("Error saving retry delay:",e)}},tq=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),i={...(t.ok?await t.json():{}).rpmByProvider||{}},a=String(e??"").trim();""===a?delete i[r]:i[r]=Math.max(0,Number(a)||0),await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rpmByProvider:i})})}catch(e){console.log("Error saving RPM limit:",e)}},tz=async e=>{let t=Y[r];if(t){ez(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,s.useEffect)(()=>{tE(),tO(),tI(),tS()},[tE,tO,tI,tS]),(0,s.useEffect)(()=>{if("cursor"!==r)return void eL([]);let e=x.find(e=>!1!==e.isActive);if(!e?.id)return void eL([]);let t=!1;return fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json()})).then(({ok:e,data:i})=>{!t&&e&&Array.isArray(i.models)&&i.models.length>0&&eL(i.models)}).catch(()=>{}),()=>{t=!0}},[r,x]),(0,s.useEffect)(()=>{let e=(m.zN[r]||m.fg[r]||m.IS[r]||m.nJ[r])?.modelsFetcher;e&&T(e).then(eJ)},[r]);let tM=async(e,t,i=th)=>{let a=`${i}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await tO();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tJ=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tO()}catch(e){console.log("Error deleting alias:",e)}},tK=async(e,t="llm",i=tk,a)=>{try{let s=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:i,id:e,type:t,...a?{caps:a}:{}})}),l=await s.json().catch(()=>({}));s.ok?(!1===l.added&&alert("Model already exists (duplicate). Check built-in or custom list."),await tI(),window.dispatchEvent(new CustomEvent("customModelChanged"))):alert(l.error||"Failed to add custom model")}catch(e){console.log("Error adding custom model:",e),alert(e.message||"Failed to add custom model")}},tL=async(e,t="llm",i=tk)=>{try{let a=new URLSearchParams({providerAlias:i,id:e,type:t});(await fetch(`/api/models/custom?${a}`,{method:"DELETE"})).ok&&(await tI(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},tF=async()=>{if(e9)return;let e=x.find(e=>!1!==e.isActive);if(!e)return void alert((0,S.Tl)("Please add an active Qoder connection first"));te(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),i=await t.json();if(!t.ok)return void alert(i.error||(0,S.Tl)("Failed to fetch models"));let a=i.models||[];if(0===a.length)return void alert((0,S.Tl)("No models returned"));let s=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let i=t.replace(/^qoder\//,"");ec.some(e=>e.providerAlias===tk&&e.id===i&&"llm"===(e.kind||e.type||"llm"))||Object.values(eo).includes(`${tk}/${i}`)||(await tK(i,"llm",tk),s+=1)}0===s?alert((0,S.Tl)("All models already exist, no new models added")):alert((0,S.Tl)("Successfully added")+` ${s} `+(0,S.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,S.Tl)("Error fetching models")+": "+e.message)}finally{te(!1)}},tH=async()=>{if(eX||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));e7.current=!1,eY(!0),e1(!1),e5(null),e4(e),e8({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,i=0;try{for(let e=0;e<x.length;e+=1){if(e7.current){e8({total:x.length,completed:e,passed:t,failed:i,stopped:!0});break}let a=x[e];e5(a.id),e4(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),s=await e.json(),l=!!s.valid;l?t+=1:i+=1,e4(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:s.error||null}}))}catch(e){i+=1,e4(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}e8({total:x.length,completed:e+1,passed:t,failed:i,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{e5(null),eY(!1),e1(!1),e7.current=!1}},tB=async e=>{eQ({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eQ(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&h(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tW=()=>{tE(),D(!1)},tG=async e=>{L("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),i=null;try{i=await t.json()}catch{i=null}if(t.ok){await tE(),M(!1);return}L(i?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),L("Failed to save connection")}},tQ=async e=>{try{(await fetch(`/api/providers/${er.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tE(),et(!1))}catch(e){console.log("Error updating connection:",e)}},tV=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&h(i=>i.map(i=>i.id===e?{...i,isActive:t}:i))}catch(e){console.log("Error updating connection status:",e)}},tZ=async(e,t)=>{let i=[...x];[i[e],i[t]]=[i[t],i[e]],h(i);try{await Promise.all([fetch(`/api/providers/${i[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${i[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tE()}},tX=x.filter(e=>ew.includes(e.id));(0,s.useEffect)(()=>{ek(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tX.length)return;let e=new Set(tX.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let i=P.find(e=>e.id===t);return i?.name}})();let tY=()=>{eS||el(!1)},t0=async e=>{eA(!0);try{let t=0;for(let{connectionId:i,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",i,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tE(),el(!1)}finally{eA(!1)}},t1=e=>t0(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),{currentPage:t2,items:t5,start:t3}=function(e=[],t=1,i=10){let a=Array.isArray(e)?e:[],s=Number.isFinite(i)&&i>=1?Math.floor(i):10,l=a.length,r=Math.max(1,Math.ceil(l/s)),n=Math.floor(Number(t)),o=Math.min(Number.isFinite(n)&&n>0?n:1,r),d=(o-1)*s,c=a.slice(d,d+s);return{currentPage:o,totalPages:r,totalItems:l,start:d,items:c,pageSize:s}}(x,f,y),t4=new Set(t5.map(e=>e.id)),t6=t5.length>0&&t5.every(e=>ew.includes(e.id)),t8=(0,a.jsxs)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:[t5.map((e,t)=>{let i,s=t3+t;return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,a.jsx)("input",{type:"checkbox",checked:(i=e.id,ew.includes(i)),onChange:()=>{var t;return t=e.id,void ek(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(z,{connection:e,proxyPools:P,isOAuth:tc,isFirst:0===s,isLast:s===x.length-1,onMoveUp:()=>tZ(s,s-1),onMoveDown:()=>tZ(s,s+1),onToggleActive:t=>tV(e.id,t),autoPing:Y[r]&&"oauth"===e.authType?{on:!0===eq.connections[e.id],onToggle:t=>{var i;return i=e.id,void tz({...eq,connections:{...eq.connections,[i]:t}})},provider:r}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&h(i=>i.map(i=>i.id===e.id?{...i,providerSpecificData:{...i.providerSpecificData,proxyPoolId:t||null}}:i))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{en(e),et(!0)},onReconnect:()=>{"iflow"===r?U(!0):D(!0)},onDelete:()=>tB(e.id),oneByOneStatus:e3[e.id]||null})})]},e.id)}),x.length>10&&(0,a.jsx)(c.dK,{currentPage:t2,pageSize:y,totalItems:x.length,onPageChange:g,onPageSizeChange:e=>{b(e),g(1)},allowCustomPageSize:!0,maxPageSize:200})]}),t7=P.filter(e=>!0===e.isActive),t9=(0,a.jsx)(c.aF,{isOpen:es,onClose:tY,title:`Apply Proxy (${x.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=P.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):t0(x.map((t,i)=>({connectionId:t.id,proxyPoolId:e[i%e.length].id})))},disabled:eS||0===t7.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>t1(null),disabled:eS,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),P.map(e=>(0,a.jsxs)("button",{onClick:()=>t1(e.id),disabled:eS||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eS&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(c.$n,{onClick:tY,variant:"ghost",fullWidth:!0,disabled:eS,children:"Cancel"})]})}),ie=async e=>{if(!ey.has(e)){eb(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tk}/${e}`})}),i=await t.json();eh(t=>({...t,[e]:i.ok?"ok":"error"})),eg(i.ok?"":i.error||"Model not reachable")}catch{eh(t=>({...t,[e]:"error"})),eg("Network error")}finally{eb(t=>{let i=new Set(t);return i.delete(e),i})}}};if(v)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(c.Qv,{}),(0,a.jsx)(c.Qv,{})]});if(!to)return(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let it=()=>tf&&to.apiType?"responses"===to.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tg?"/providers/anthropic-m.png":(0,d.HY)(to.id);return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${to.color}15`},children:ep||!it()?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:to.color},children:to.textIcon||to.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:it(),alt:to.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,d.Kw)(to.id),eu(!0)},loading:"lazy",decoding:"async"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:to.name}),(to.notice?.apiKeyUrl||to.notice?.signupUrl||to.website)&&(0,a.jsxs)("a",{href:to.notice?.apiKeyUrl||to.notice?.signupUrl||to.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),to.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]}),(0,a.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[(0,a.jsx)("span",{className:"hidden text-xs text-text-muted sm:inline",children:"RPM / account"}),(0,a.jsx)("input",{type:"number",min:"0",value:e_,placeholder:String(m.W[r]||0),onChange:e=>eU(e.target.value),onBlur:e=>tq(e.target.value),title:"Max requests per minute per account. Accounts over the cap are skipped before a request is sent, so the provider never sees a 429. Blank = provider default, 0 = unlimited.",className:"w-16 rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none"}),(0,a.jsx)("span",{className:"hidden text-xs text-text-muted sm:inline",children:"Retry delay"}),(0,a.jsx)("select",{value:eR,onChange:e=>{var t;eD(t=e.target.value),tU(t)},title:"Cooldown after a rate-limit/error when the provider reports no reset time of its own. Auto = honor the provider's reported delay, else built-in backoff.",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:ee.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})]})]})]}),to.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:to.deprecationNotice})]}),to.notice?.text&&!to.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:to.notice.text}),to.notice.apiKeyUrl&&(0,a.jsx)("a",{href:to.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),ty&&w&&(0,a.jsx)(c.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:tg?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tg?"Messages API":"responses"===w.apiType?"Responses API":"Chat Completions"," \xb7 ",(w.baseUrl||"").replace(/\/$/,""),"/",tg?"messages":"responses"===w.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{L(""),M(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ea(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eQ({title:"Delete Compatible Node",message:`Delete this ${tg?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eQ(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&i.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tp?(0,a.jsx)(c.gw,{providerId:r}):(0,a.jsxs)(c.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[x.length>0&&P.length>0&&(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>el(!0),children:"Apply Proxy"}),x.length>0&&(0,a.jsxs)(a.Fragment,{children:[ew.length>0&&(0,a.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=ew.length;0!==e&&eQ({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eQ(null);let e=0,t=[...ew];for(let i of t)try{(await fetch(`/api/providers/${i}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}h(e=>e.filter(e=>!t.includes(e.id))),ek([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",ew.length,")"]}),(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tH,disabled:eX,children:eX?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eX&&(0,a.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eX&&(e7.current=!0,e1(!0))},disabled:e0,children:e0?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(c.lM,{checked:"round-robin"===eT,onChange:e=>{let t=e?"round-robin":null,i=e?eP||"1":eP;e&&!eP&&eO("1"),e$(t),tD(t,i)}}),"round-robin"===eT&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eP,onChange:e=>{var t;eO(t=e.target.value),tD("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===x.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tc?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tb&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tv," or ",tj,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:tb?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tl,children:tv}),(0,a.jsx)(c.$n,{size:"sm",icon:"key",onClick:tr,children:tj})]}):(0,a.jsxs)(a.Fragment,{children:[!ty&&"iflow"===r&&(0,a.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>U(!0),children:"Cookie"}),"codex"===r&&(0,a.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>B(!0),children:(0,S.Tl)("Bulk Add")}),"grok-cli"===r&&(0,a.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>V(!0),children:(0,S.Tl)("Bulk Add")}),(0,a.jsx)(c.$n,{size:"sm",icon:"add",onClick:tn,children:ty?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[e6&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",e6.total]}),(0,a.jsxs)("span",{children:["Completed: ",e6.completed]}),(0,a.jsxs)("span",{children:["Passed: ",e6.passed]}),(0,a.jsxs)("span",{children:["Failed: ",e6.failed]}),e6.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eX&&e2&&(0,a.jsxs)("span",{children:["Running: ",x.find(e=>e.id===e2)?.name||e2]})]})}),x.length>0&&(0,a.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,a.jsx)("input",{type:"checkbox",checked:t6,onChange:()=>{t6?ek(e=>e.filter(e=>!t4.has(e))):ek(e=>{let t=new Set(e);for(let e of t4)t.add(e);return[...t]})},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),t8,!ty&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,a.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>U(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===r&&(0,a.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>B(!0),title:(0,S.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,S.Tl)("Bulk Add")}),"grok-cli"===r&&(0,a.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>V(!0),title:(0,S.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,S.Tl)("Bulk Add")}),tb?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tl,className:"w-full sm:w-auto",children:tv}),(0,a.jsx)(c.$n,{size:"sm",icon:"key",onClick:tr,className:"w-full sm:w-auto",children:tj})]}):(0,a.jsx)(c.$n,{size:"sm",icon:"add",onClick:tn,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsxs)(c.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),tN&&(0,a.jsx)("select",{value:eI,onChange:e=>{var t;eE(t=e.target.value),t_(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:tN.map(e=>(0,a.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!ty&&(e=[...tx,...eF.filter(e=>!tx.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eB.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eB.length>0&&(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tP,children:"Active All"}),e.length>0&&(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>t$(e),children:"Disable All"})]}))]}),!!ef&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:ef}),(()=>{let e,t,i;if(ty)return(0,a.jsx)(R,{providerStorageAlias:tk,providerDisplayAlias:tC,modelAliases:eo,customModels:ec,copied:tt,onCopy:ti,onSetAlias:tM,onDeleteAlias:tJ,onAddCustomModel:e=>tK(e,"llm",tk),onDeleteCustomModel:e=>tL(e,"llm",tk),connections:x,isAnthropic:tg});let s=[...tx,...eF.filter(e=>!tx.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}),l=new Set(eB),n=s.filter(e=>!l.has(e.id)),o=s.filter(e=>l.has(e.id)),d=$({customModels:ec,modelAliases:eo,providerAlias:tk,builtInModels:tx,type:"llm"});return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,a.jsx)(I,{model:{id:e.id,name:e.name},fullModel:`${tC}/${e.id}`,alias:e.alias,copied:tt,onCopy:ti,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tL(e.id,"llm",tk):tJ(e.alias)},testStatus:ex[e.id],onTest:x.length>0||tp?()=>ie(e.id):void 0,isTesting:ey.has(e.id),isCustom:!0,isFree:!1,caps:u(`${r}/${e.id}`),thinkingSuffix:tw(e.id)},`${e.source}-${e.fullModel}`)),n.map(e=>{let t=`${tk}/${e.id}`,i=`${r}/${e.id}`,s=Object.entries(eo).find(([,e])=>e===t||e===i)?.[0];return(0,a.jsx)(I,{model:e,fullModel:`${tC}/${e.id}`,alias:s,copied:tt,onCopy:ti,onSetAlias:t=>tM(e.id,t,tk),onDeleteAlias:()=>tJ(s),testStatus:ex[e.id],onTest:x.length>0||tp?()=>ie(e.id):void 0,isTesting:ey.has(e.id),isFree:e.isFree,onDisable:()=>tA(e.id),caps:u(`${r}/${e.id}`),thinkingSuffix:tw(e.id)},e.id)}),(0,a.jsxs)("button",{onClick:()=>ej(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===r&&x.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:tF,disabled:e9,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:e9?{animation:"spin 1s linear infinite"}:void 0,children:e9?"progress_activity":"download"}),e9?(0,S.Tl)("Fetching..."):(0,S.Tl)("Fetch Qoder Models")]}),eM.length>0&&(e=new Set([...Object.values(eo),...d.map(e=>e.fullModel)]),t=new Set(tx.map(e=>e.id)),0===(i=eM.filter(i=>!e.has(`${tk}/${i.id}`)&&!t.has(i.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,a.jsxs)("button",{onClick:async()=>{await tK(e.id,"llm",tk)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>tT(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),t9,"kiro"===r?(0,a.jsx)(c.Mh,{isOpen:E,providerInfo:to,onSuccess:tW,onClose:()=>D(!1)}):"cursor"===r?(0,a.jsx)(c.G9,{isOpen:E,onSuccess:tW,onClose:()=>D(!1)}):"gitlab"===r?(0,a.jsx)(c.vj,{isOpen:E,providerInfo:to,onSuccess:tW,onClose:()=>D(!1)}):(0,a.jsx)(c.LF,{isOpen:E,provider:r,providerInfo:to,onSuccess:tW,onClose:()=>D(!1)}),"iflow"===r&&(0,a.jsx)(c.vE,{isOpen:_,onSuccess:()=>{tE(),U(!1)},onClose:()=>U(!1)}),(0,a.jsx)(J,{isOpen:q,provider:r,providerName:to.name,isCompatible:ty,isAnthropic:tg,authType:to?.authType,authHint:to?.authHint,website:to?.website,proxyPools:P,error:K,existingNames:x.map(e=>e.name).filter(Boolean),onSave:tG,onBulkDone:tE,onClose:()=>{L(""),M(!1)}}),(0,a.jsx)(c.wI,{isOpen:Z,connection:er,proxyPools:P,onSave:tQ,onClose:()=>et(!1)}),ty&&(0,a.jsx)(H,{isOpen:ei,node:w,onSave:tR,onClose:()=>ea(!1),isAnthropic:tg}),!ty&&(0,a.jsx)(W,{isOpen:ev,providerAlias:tk,providerDisplayAlias:tC,onSave:async(e,t)=>{await tK(e,"llm",tk,t),ej(!1)},onClose:()=>ej(!1)}),"codex"===r&&(0,a.jsx)(Q,{isOpen:F,onClose:()=>B(!1),onSuccess:tE}),"grok-cli"===r&&(0,a.jsx)(X,{isOpen:G,onClose:()=>V(!1),onSuccess:tE}),(0,a.jsx)(c.uo,{isOpen:eV,onClose:()=>eZ(!1),onConfirm:()=>{(window.localStorage.setItem(ta,"true"),eZ(!1),tc)?ts():tr()},title:"Risk Notice",message:to?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(c.uo,{isOpen:!!eG,onClose:()=>eQ(null),onConfirm:eG?.onConfirm,title:eG?.title||"Confirm",message:eG?.message,variant:"danger"})]})}},85295:(e,t,i)=>{Promise.resolve().then(i.bind(i,79355))}},e=>{e.O(0,[8010,5772,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=85295)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{28915:(e,t,r)=>{"use strict";r.d(t,{E2:()=>a,gs:()=>s});function a(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}function s(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let r=Math.floor(t/60);if(r<24)return`${r}h ago`;let a=Math.floor(r/24);return`${a}d ago`}r(8247)},62622:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>I});var a=r(95155),s=r(12115),l=r(14051),i=r.n(l),n=r(35497),o=r(57250),d=r(8247),c=r(90620),p=r(88105),m=r(98500),u=r.n(m),x=r(28915),h=r(65921),f=r(38003),b=r(73006);let g={available:{icon:"check_circle",color:"#22c55e",label:"Available"},cooldown:{icon:"schedule",color:"#f59e0b",label:"Cooldown"},unavailable:{icon:"error",color:"#ef4444",label:"Unavailable"},unknown:{icon:"help",color:"#6b7280",label:"Unknown"}};function y(){let[e,t]=(0,s.useState)(null),[r,l]=(0,s.useState)(!0),[i,o]=(0,s.useState)(!1),[d,c]=(0,s.useState)(null),p=(0,s.useRef)(null),m=(0,h.i)(),u=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/models/availability");if(e.ok){let r=await e.json();t(r)}}catch{}finally{l(!1)}},[]);(0,s.useEffect)(()=>{u();let e=setInterval(u,3e4);return()=>clearInterval(e)},[u]),(0,s.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&o(!1)};return i&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);let x=async(e,t)=>{c(`${e}:${t}`);try{(await fetch("/api/models/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clearCooldown",provider:e,model:t})})).ok?(m.success(`Cooldown cleared for ${t}`),await u()):m.error("Failed to clear cooldown")}catch{m.error("Failed to clear cooldown")}finally{c(null)}};if(r)return null;let f=e?.models||[],b=0===(e?.unavailableCount||f.filter(e=>"available"!==e.status).length),y={};return f.forEach(e=>{if("available"===e.status)return;let t=e.provider||"unknown";y[t]||(y[t]=[]),y[t].push(e)}),(0,a.jsx)("div",{className:"relative",ref:p,children:i&&(0,a.jsxs)("div",{className:"absolute top-full right-0 mt-2 w-80 bg-surface border border-border rounded-xl shadow-2xl z-50 overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:b?"#22c55e":"#f59e0b"},children:b?"verified":"warning"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,a.jsx)("button",{onClick:u,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,a.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:b?(0,a.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,a.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(y).map(([e,t])=>(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:e}),(0,a.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let t=g[e.status]||g.unknown,r=d===`${e.provider}:${e.model}`;return(0,a.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:t.color},children:t.icon}),(0,a.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:e.model})]}),"cooldown"===e.status&&(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>x(e.provider,e.model),disabled:r,className:"text-[10px] px-1.5! py-0.5! ml-2",children:r?"...":"Clear"})]},`${e.provider}-${e.model}`)})})]},e))})})]})})}let v={openai:{title:"Add OpenAI Compatible",type:"openai-compatible",defaultBaseUrl:"https://api.openai.com/v1",namePlaceholder:"OpenAI Compatible (Prod)",prefixPlaceholder:"oc-prod",baseUrlHint:"Use the base URL (ending in /v1) for your OpenAI-compatible API.",modelIdPlaceholder:"e.g. gpt-4, claude-3-opus",errorLabel:"OpenAI Compatible",hasApiType:!0},anthropic:{title:"Add Anthropic Compatible",type:"anthropic-compatible",defaultBaseUrl:"https://api.anthropic.com/v1",namePlaceholder:"Anthropic Compatible (Prod)",prefixPlaceholder:"ac-prod",baseUrlHint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages.",modelIdPlaceholder:"e.g. claude-3-opus",errorLabel:"Anthropic Compatible",hasApiType:!1}},j=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],N=[{value:"default",label:"Default"},{value:"claude-cli",label:"Claude CLI"},{value:"codex-cli",label:"Codex CLI"},{value:"openclaw",label:"OpenClaw"},{value:"custom",label:"Custom Headers"}],w=new Set(["authorization","x-api-key","api-key","cookie"]);function k(e){let t=String(e||"").trim();if(!t)return{headers:{}};try{let e;if(t.startsWith("{")){let r=JSON.parse(t);if(!r||"object"!=typeof r||Array.isArray(r))return{error:"Use a JSON object or Header: value lines."};e=Object.entries(r)}else for(let r of(e=[],t.split(/\r?\n/))){let t=r.trim();if(!t||t.startsWith("#"))continue;let a=t.indexOf(":");if(a<=0)return{error:"Each custom header line must use Header: value."};e.push([t.slice(0,a),t.slice(a+1)])}let r={};for(let[t,a]of e){let e=String(t||"").trim(),s=String(a||"").trim();!e||!s||w.has(e.toLowerCase())||(r[e]=s)}return{headers:r}}catch{return{error:"Use valid JSON or Header: value lines."}}}function C({variant:e,isOpen:t,onClose:r,onCreated:l}){let i=v[e],o=()=>({name:"",prefix:"",...i.hasApiType?{apiType:"chat"}:{},baseUrl:i.defaultBaseUrl,clientIdentityProfile:"default",clientIdentityHeadersText:""}),[d,c]=(0,s.useState)(o),[p,m]=(0,s.useState)(!1),[u,x]=(0,s.useState)(""),[h,f]=(0,s.useState)(""),[b,g]=(0,s.useState)(!1),[y,w]=(0,s.useState)(null);(0,s.useEffect)(()=>{i.hasApiType?c(e=>({...e,baseUrl:i.defaultBaseUrl})):t&&(w(null),x(""),f(""))},[i.hasApiType?d.apiType:t]);let T=async()=>{if(!d.name.trim()||!d.prefix.trim()||!d.baseUrl.trim())return;let e="custom"===d.clientIdentityProfile?k(d.clientIdentityHeadersText):{headers:{}};if(e.error)return void w({valid:!1,error:e.error});m(!0);try{let t=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:d.name,prefix:d.prefix,...i.hasApiType?{apiType:d.apiType}:{},baseUrl:d.baseUrl,type:i.type,clientIdentityProfile:d.clientIdentityProfile,clientIdentityHeaders:e.headers})}),r=await t.json();t.ok&&(l(r.node),c(o()),x(""),w(null))}catch(e){console.log(`Error creating ${i.errorLabel} node:`,e)}finally{m(!1)}},A=async()=>{let e="custom"===d.clientIdentityProfile?k(d.clientIdentityHeadersText):{headers:{}};if(e.error)return void w({valid:!1,error:e.error});g(!0);try{let t=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:d.baseUrl,apiKey:u,type:i.type,modelId:h.trim()||void 0,clientIdentityProfile:d.clientIdentityProfile,clientIdentityHeaders:e.headers})}),r=await t.json();w(r)}catch{w({valid:!1,error:"Network error"})}finally{g(!1)}};return(0,a.jsx)(n.aF,{isOpen:t,title:i.title,onClose:r,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(n.pd,{label:"Name",value:d.name,onChange:e=>c({...d,name:e.target.value}),placeholder:i.namePlaceholder,hint:"Required. A friendly label for this node."}),(0,a.jsx)(n.pd,{label:"Prefix",value:d.prefix,onChange:e=>c({...d,prefix:e.target.value}),placeholder:i.prefixPlaceholder,hint:"Required. Used as the provider prefix for model IDs."}),i.hasApiType&&(0,a.jsx)(n.l6,{label:"API Type",options:j,value:d.apiType,onChange:e=>c({...d,apiType:e.target.value})}),(0,a.jsx)(n.pd,{label:"Base URL",value:d.baseUrl,onChange:e=>c({...d,baseUrl:e.target.value}),placeholder:i.defaultBaseUrl,hint:i.baseUrlHint}),(0,a.jsx)(n.l6,{label:"Client Identity",options:N,value:d.clientIdentityProfile,onChange:e=>c({...d,clientIdentityProfile:e.target.value}),hint:"Optional. Adds client fingerprint headers for compatible gateways."}),"custom"===d.clientIdentityProfile&&(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Custom Headers"}),(0,a.jsx)("textarea",{value:d.clientIdentityHeadersText,onChange:e=>c({...d,clientIdentityHeadersText:e.target.value}),placeholder:'{\n "User-Agent": "custom/1.0"\n}',rows:5,className:"w-full resize-y rounded-[10px] border border-transparent bg-surface-2 px-3 py-2.5 text-[16px] text-text-main placeholder-text-muted/70 transition-all duration-150 focus:border-brand-500/40 focus:outline-none focus:ring-2 focus:ring-brand-500/30 sm:text-sm"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"JSON object or Header: value lines. Auth headers are ignored."})]}),(0,a.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:u,onChange:e=>x(e.target.value)}),(0,a.jsx)(n.pd,{label:"Model ID (optional)",value:h,onChange:e=>f(e.target.value),placeholder:i.modelIdPlaceholder,hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,a.jsx)(n.$n,{onClick:A,disabled:!u||b||!d.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:b?"Checking...":"Check"}),(()=>{if(!y)return null;let{valid:e,error:t,method:r}=y;return e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===r&&(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,a.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,a.jsx)(n.$n,{onClick:T,fullWidth:!0,disabled:!d.name.trim()||!d.prefix.trim()||!d.baseUrl.trim()||p,children:p?"Creating...":"Create"}),(0,a.jsx)(n.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}C.propTypes={variant:i().oneOf(["openai","anthropic"]).isRequired,isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired};let T=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"inactive",label:"Inactive"},{value:"none",label:"No connection"}];function A(e,t,r){let s=[];if(e>0&&s.push((0,a.jsxs)(n.Ex,{variant:"success",size:"sm",dot:!0,children:[e," Connected"]},"connected")),t>0){let e=r?`${t} Error (${r})`:`${t} Error`;s.push((0,a.jsx)(n.Ex,{variant:"error",size:"sm",dot:!0,children:e},"error"))}return 0===s.length?(0,a.jsx)("span",{className:"text-text-muted",children:"No connections"}):s}function I(){let e,t,[r,l]=(0,s.useState)([]),[i,o]=(0,s.useState)([]),[d,m]=(0,s.useState)(!0),[u,g]=(0,s.useState)(!1),[v,j]=(0,s.useState)(!1),[N,w]=(0,s.useState)(!1),[k,A]=(0,s.useState)(null),[I,E]=(0,s.useState)(null),[$,U]=(0,s.useState)("all"),R=(0,h.i)(),_=(0,f.C)(e=>e.query),z=(0,f.C)(e=>e.register),H=(0,f.C)(e=>e.unregister);(0,s.useEffect)(()=>(z("Search providers..."),()=>H()),[z,H]);let q=e=>!_.trim()||!!e&&e.toLowerCase().includes(_.trim().toLowerCase());(0,s.useEffect)(()=>{(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),r=await e.json(),a=await t.json();e.ok&&l(r.connections||[]),t.ok&&o(a.nodes||[])}catch(e){console.log("Error fetching data:",e)}finally{m(!1)}})()},[]);let D=(e,t)=>{let a=Array.isArray(t)?t:t?[t]:null,s=r.filter(t=>t.provider===e&&(!!(!a||a.includes("all")||a.includes("freeTier")||a.includes("free")||a.includes("apikey")&&("apikey"===t.authType||"api_key"===t.authType))||a.includes(t.authType))),l=e=>{let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"},i=s.filter(e=>{let t=l(e);return"active"===t||"success"===t}).length,n=s.filter(e=>{let t=l(e);return"error"===t||"expired"===t||"unavailable"===t}),o=n.length,d=s.length,c=d>0&&s.every(e=>!1===e.isActive),p=n.sort((e,t)=>new Date(t.lastErrorAt||0)-new Date(e.lastErrorAt||0))[0];return{connected:i,error:o,total:d,errorCode:p?function(e){if(!e)return null;let t=e.lastErrorType;if("runtime_error"===t)return"RUNTIME";if("upstream_auth_error"===t||"auth_missing"===t||"token_refresh_failed"===t||"token_expired"===t)return"AUTH";if("upstream_rate_limited"===t)return"429";if("upstream_unavailable"===t)return"5XX";if("network_error"===t)return"NET";let r=Number(e.errorCode);if(Number.isFinite(r)&&r>=400)return String(r);let a=(0,x.E2)(e.lastError);if("401"===a||"403"===a)return"AUTH";if(a&&"ERR"!==a)return a;let s=(e.lastError||"").toLowerCase();return s.includes("runtime")||s.includes("not runnable")||s.includes("not installed")?"RUNTIME":s.includes("invalid api key")||s.includes("token invalid")||s.includes("revoked")||s.includes("unauthorized")?"AUTH":"ERR"}(p):null,errorTime:p?.lastErrorAt?(0,x.gs)(p.lastErrorAt):null,allDisabled:c}},L=(e,t)=>(function(e,t,r=!1){return"all"===e||function(e,t=!1){return t?"active":e&&0!==e.total?e.allDisabled?"inactive":"active":"none"}(t,r)===e})($,e,t),M=async(e,t,a)=>{let s=Array.isArray(t)?t:t?[t]:null,i=t=>t.provider===e&&(!!(!s||s.includes("all")||s.includes("freeTier")||s.includes("free")||s.includes("apikey")&&("apikey"===t.authType||"api_key"===t.authType))||s.includes(t.authType)),n=r.filter(i);l(e=>e.map(e=>i(e)?{...e,isActive:a}:e)),await Promise.allSettled(n.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:a})})))},F=async(e,t=null)=>{if(!k){A("provider"===e?t:e),E(null);try{let r=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),a=await r.json();if(E(a),a.summary){let{passed:e,failed:t,total:r}=a.summary;0===t?R.success(`All ${r} tests passed`):R.warning(`${e}/${r} passed, ${t} failed`)}}catch(e){E({error:"Test request failed"}),R.error("Provider test failed")}finally{A(null)}}},J=i.filter(e=>"openai-compatible"===e.type).map(e=>({id:e.id,name:e.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:e.apiType})).filter(e=>q(e.name)&&L(D(e.id,"apikey"))),K=i.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>q(e.name)&&L(D(e.id,"apikey"))),W=(e,t)=>{if("kiro"===t)return["oauth","apikey","api_key"];let r=e?.authModes;return Array.isArray(r)?r.includes("apikey")?["oauth","apikey","api_key"]:"oauth":t in p.nJ||t in c.fg?["oauth","apikey","api_key"]:"oauth"},B=(e=Object.entries(c.zN).filter(([e,t])=>!t.hidden&&q(t.name)&&L(D(e,W(t,e)),t.noAuth)),t="oauth",[...e].sort(([e,r],[a,s])=>{let l=r.priority??999,i=s.priority??999;if(l!==i)return l-i;let n=D(e,t),o=D(a,t),d=+(n.connected>0),c=+(o.connected>0);return d!==c?c-d:(r.name||"").localeCompare(s.name||"")})),Q=Object.entries(p.IS).filter(([e,t])=>!t.hidden&&q(t.name)&&L(D(e,W(t,e)),t.noAuth)).sort(([,e],[,t])=>!!t.noAuth-!!e.noAuth),X=Object.entries(p.nJ).filter(([e,t])=>!t.hidden&&q(t.name)&&(t.serviceKinds??["llm"]).includes("llm")&&L(D(e,W(t,e)),t.noAuth)).sort(([e,t],[r,a])=>{let s=t.priority??999,l=a.priority??999;if(s!==l)return s-l;let i=!!a.noAuth-!!t.noAuth;if(0!==i)return i;let n=D(e,W(t,e)).connected>0?0:1,o=D(r,W(a,r)).connected>0?0:1;return n!==o?n-o:(t.name||"").localeCompare(a.name||"")}),Z=Object.entries(c.fg).filter(([e,t])=>!t.hidden&&(t.serviceKinds??["llm"]).includes("llm")&&q(t.name)&&L(D(e,"apikey"),t.noAuth)).sort(([e,t],[r,a])=>{let s=D(e,"apikey").total>0?0:1,l=D(r,"apikey").total>0?0:1;return s!==l?s-l:(t.name||"").localeCompare(a.name||"")}),V=!!_.trim()||"all"!==$,Y=V||u?Z:Z.slice(0,20),G=Z.length-20;if(d)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(n.Qv,{}),(0,a.jsx)(n.Qv,{})]});let ee=B.length>0||Q.length>0||X.length>0||Z.length>0||J.length>0||K.length>0;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsx)("div",{className:"flex items-center justify-end",children:(0,a.jsx)("select",{value:$,onChange:e=>U(e.target.value),className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter providers by connection status",children:T.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})}),!ee&&(0,a.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"No providers match your search or filters"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["Custom Providers (OpenAI/Anthropic Compatible)"," "]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,a.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>w(!0),className:"w-full sm:w-auto",children:"Add Anthropic Compatible"}),(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>j(!0),className:"w-full !bg-white !text-black hover:!bg-gray-100 sm:w-auto",children:"Add OpenAI Compatible"})]})]}),0===J.length&&0===K.length?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2 border border-dashed border-border rounded-xl text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"extension"}),(0,a.jsx)("span",{children:"No custom providers — use buttons above to add OpenAI/Anthropic compatible endpoints"})]}):(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:[...J,...K].map(e=>(0,a.jsx)(O,{providerId:e.id,provider:e,stats:D(e.id,"apikey"),authType:"compatible",onToggle:t=>M(e.id,"apikey",t)},e.id))})]}),B.length>0&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"OAuth Providers"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(y,{}),(0,a.jsxs)("button",{onClick:()=>F("oauth"),disabled:!!k,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"oauth"===k?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all OAuth connections","aria-label":"Test all OAuth connections",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px]${"oauth"===k?" animate-spin":""}`,children:"play_arrow"}),"oauth"===k?"Testing...":"Test All"]})]})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:B.map(([e,t])=>(0,a.jsx)(P,{providerId:e,provider:t,stats:D(e,"oauth"),authType:"oauth",onToggle:t=>M(e,"oauth",t)},e))})]}),(Q.length>0||X.length>0)&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"Free Tier Providers"}),(0,a.jsxs)("button",{onClick:()=>F("free"),disabled:!!k,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"free"===k?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all Free connections","aria-label":"Test all Free provider connections",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px]${"free"===k?" animate-spin":""}`,children:"play_arrow"}),"free"===k?"Testing...":"Test All"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:[Q.map(([e,t])=>{let r="kiro"===e?["oauth","apikey","api_key"]:"oauth";return(0,a.jsx)(P,{providerId:e,provider:t,stats:D(e,r),authType:"free",onToggle:t=>M(e,r,t)},e)}),X.map(([e,t])=>{let r=!!t.hasOAuth||"oauth"===t.authType||(t.authModes||[]).includes("oauth"),s=r?P:O,l=["oauth","apikey","api_key","cookie"];return(0,a.jsx)(s,{providerId:e,provider:t,stats:D(e,l),authType:r?"oauth":"apikey",onToggle:t=>M(e,l,t)},e)})]})]}),Z.length>0&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["API Key Providers"," "]}),(0,a.jsxs)("button",{onClick:()=>F("apikey"),disabled:!!k,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"apikey"===k?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all API Key connections","aria-label":"Test all API Key connections",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px]${"apikey"===k?" animate-spin":""}`,children:"play_arrow"}),"apikey"===k?"Testing...":"Test All"]})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:Y.map(([e,t])=>(0,a.jsx)(O,{providerId:e,provider:t,stats:D(e,"apikey"),authType:"apikey",onToggle:t=>M(e,"apikey",t)},e))}),!V&&!u&&G>0&&(0,a.jsxs)("button",{onClick:()=>g(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2.5 text-sm font-medium text-primary transition-colors hover:border-primary hover:bg-primary/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"}),(0,b.Tl)("Show all")," ",Z.length," ",(0,b.Tl)("providers")]})]}),(0,a.jsx)(C,{variant:"openai",isOpen:v,onClose:()=>j(!1),onCreated:e=>{o(t=>[...t,e]),j(!1)}}),(0,a.jsx)(C,{variant:"anthropic",isOpen:N,onClose:()=>w(!1),onCreated:e=>{o(t=>[...t,e]),w(!1)}}),I&&(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>E(null),children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,a.jsxs)("div",{className:"relative bg-surface border border-border rounded-xl w-full max-w-[600px] max-h-[86vh] sm:max-h-[80vh] overflow-y-auto shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between px-5 py-3 border-b border-border bg-surface/95 backdrop-blur-sm rounded-t-xl",children:[(0,a.jsx)("h3",{className:"font-semibold",children:"Test Results"}),(0,a.jsx)("button",{onClick:()=>E(null),className:"p-1 rounded-lg hover:bg-bg text-text-muted hover:text-text-main transition-colors","aria-label":"Close test results",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,a.jsx)("div",{className:"p-5",children:(0,a.jsx)(S,{results:I})})]})]})]})}function P({providerId:e,provider:t,stats:r,authType:s,onToggle:l}){let{connected:i,error:d,errorCode:c,errorTime:p,allDisabled:m}=r,x=!!t.noAuth;return(0,a.jsx)(u(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,a.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${m?"opacity-50":""}`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,a.jsx)(o.A,{src:`/providers/${t.id}.png`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[32px] max-h-[32px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"truncate font-semibold",children:t.name}),(0,a.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:m?(0,a.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):x?(0,a.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:"Ready"}):(0,a.jsxs)(a.Fragment,{children:[A(i,d,c),p&&(0,a.jsx)("span",{className:"text-text-muted",children:p})]})})]})]}),(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:r.total>0&&(0,a.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!m)},children:(0,a.jsx)(n.lM,{size:"sm",checked:!m,onChange:()=>{},title:m?"Enable provider":"Disable provider"})})})]})})})}function O({providerId:e,provider:t,stats:r,authType:s,onToggle:l}){let{connected:i,error:c,errorCode:m,errorTime:x,allDisabled:h}=r,f=e.startsWith(p.JH),b=e.startsWith(p.DI);return(0,a.jsx)(u(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,a.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${h?"opacity-50":""}`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,a.jsx)(o.A,{src:f&&t.apiType?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":b?"/providers/anthropic-m.png":(0,d.HY)(t.id),alt:t.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"truncate font-semibold",children:t.name}),(0,a.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:h?(0,a.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):(0,a.jsxs)(a.Fragment,{children:[A(i,c,m),f&&(0,a.jsx)(n.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),b&&(0,a.jsx)(n.Ex,{variant:"default",size:"sm",children:"Messages"}),x&&(0,a.jsx)("span",{className:"text-text-muted",children:x})]})})]})]}),(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:r.total>0&&(0,a.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!h)},children:(0,a.jsx)(n.lM,{size:"sm",checked:!h,onChange:()=>{},title:h?"Enable provider":"Disable provider"})})})]})})})}function S({results:e}){if(e.error&&!e.results)return(0,a.jsxs)("div",{className:"text-center py-6",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,a.jsx)("p",{className:"text-sm text-red-400",children:e.error})]});let{summary:t,mode:r}=e,s=e.results||[];return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[{oauth:"OAuth",free:"Free",apikey:"API Key",provider:"Provider",all:"All"}[r]||r," Test"]}),(0,a.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[t.passed," passed"]}),t.failed>0&&(0,a.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[t.failed," failed"]}),(0,a.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),s.map((e,t)=>(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-black/[0.03] px-3 py-2 text-xs dark:bg-white/[0.03] sm:flex-nowrap",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-emerald-500":"text-red-500"}`,children:e.valid?"check_circle":"error"}),(0,a.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,a.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,a.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,a.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[e.latencyMs,"ms"]}),(0,a.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${e.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===s.length&&(0,a.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:"No active connections found for this group."})]})}P.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},O.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string,apiType:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},S.propTypes={results:i().shape({mode:i().string,results:i().array,summary:i().shape({total:i().number,passed:i().number,failed:i().number}),error:i().string}).isRequired}},69671:(e,t,r)=>{Promise.resolve().then(r.bind(r,62622))}},e=>{e.O(0,[8010,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=69671)),_N_E=e.O()}]);