n9router 0.4.55 → 0.4.58

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 (1129) hide show
  1. package/README.md +15 -0
  2. package/app/.next/BUILD_ID +1 -1
  3. package/app/.next/app-path-routes-manifest.json +21 -19
  4. package/app/.next/build-manifest.json +2 -2
  5. package/app/.next/prerender-manifest.json +3 -3
  6. package/app/.next/required-server-files.json +1 -3
  7. package/app/.next/routes-manifest.json +16 -4
  8. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  9. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  12. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  15. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  18. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  19. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  21. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  22. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  24. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  25. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +5 -5
  27. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  28. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  30. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  31. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  32. package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  33. package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  34. package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  35. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  36. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  37. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  38. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  39. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  40. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  41. package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
  42. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  43. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  44. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  45. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  46. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  47. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +17 -4
  48. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  49. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  50. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  51. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  52. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  53. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  54. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  55. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  56. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  57. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  58. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  59. package/app/.next/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  60. package/app/.next/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  61. package/app/.next/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  62. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  63. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  64. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  65. package/app/.next/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  66. package/app/.next/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  67. package/app/.next/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  68. package/app/.next/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  69. package/app/.next/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  70. package/app/.next/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  71. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  72. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  73. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  74. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +3 -3
  75. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  76. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  77. package/app/.next/server/app/_global-error/page.js +2 -2
  78. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  79. package/app/.next/server/app/_global-error.html +1 -1
  80. package/app/.next/server/app/_global-error.rsc +1 -1
  81. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  82. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  83. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  84. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  85. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  86. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  87. package/app/.next/server/app/_not-found/page.js +2 -2
  88. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  89. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  90. package/app/.next/server/app/_not-found.html +1 -1
  91. package/app/.next/server/app/_not-found.rsc +4 -4
  92. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
  93. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  94. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
  95. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  96. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  97. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  98. package/app/.next/server/app/api/antigravity-app/route.js +1 -1
  99. package/app/.next/server/app/api/antigravity-app-v2/route.js +1 -1
  100. package/app/.next/server/app/api/antigravity-ide/route.js +1 -1
  101. package/app/.next/server/app/api/antigravity-targets/route.js +1 -1
  102. package/app/.next/server/app/api/antigravity-tools/import/route.js +1 -1
  103. package/app/.next/server/app/api/antigravity-tools/import/route.js.nft.json +1 -1
  104. package/app/.next/server/app/api/antigravity-tools/import-refresh-tokens/route.js +1 -1
  105. package/app/.next/server/app/api/antigravity-tools/import-refresh-tokens/route.js.nft.json +1 -1
  106. package/app/.next/server/app/api/auth/login/route.js +1 -1
  107. package/app/.next/server/app/api/auth/logout/route.js +1 -1
  108. package/app/.next/server/app/api/auth/oidc/callback/route.js +1 -1
  109. package/app/.next/server/app/api/auth/oidc/start/route.js +1 -1
  110. package/app/.next/server/app/api/auth/oidc/test/route.js +1 -1
  111. package/app/.next/server/app/api/auth/reset-password/route.js +1 -1
  112. package/app/.next/server/app/api/auth/saml/acs/route.js +1 -1
  113. package/app/.next/server/app/api/auth/saml/metadata/route.js +1 -1
  114. package/app/.next/server/app/api/auth/saml/start/route.js +1 -1
  115. package/app/.next/server/app/api/auth/saml/test/route.js +2 -2
  116. package/app/.next/server/app/api/auth/status/route.js +1 -1
  117. package/app/.next/server/app/api/cli-tools/all-statuses/route.js +7 -7
  118. package/app/.next/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  119. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  120. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  121. package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
  122. package/app/.next/server/app/api/cli-tools/cline-settings/route.js +2 -2
  123. package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
  124. package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  125. package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  126. package/app/.next/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  127. package/app/.next/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  128. package/app/.next/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  129. package/app/.next/server/app/api/cli-tools/cursor-byok/jobs/[jobId]/events/route.js +2 -2
  130. package/app/.next/server/app/api/cli-tools/cursor-byok/jobs/[jobId]/sudo/route.js +1 -1
  131. package/app/.next/server/app/api/cli-tools/cursor-byok/jobs/route.js +1 -1
  132. package/app/.next/server/app/api/cli-tools/cursor-byok/route.js +1 -1
  133. package/app/.next/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  134. package/app/.next/server/app/api/cli-tools/devin-settings/route.js +2 -2
  135. package/app/.next/server/app/api/cli-tools/droid-settings/route.js +1 -1
  136. package/app/.next/server/app/api/cli-tools/grok-build-settings/route.js +4 -4
  137. package/app/.next/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  138. package/app/.next/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  139. package/app/.next/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  140. package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  141. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  142. package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  143. package/app/.next/server/app/api/combos/[id]/route.js +1 -1
  144. package/app/.next/server/app/api/combos/[id]/route.js.nft.json +1 -1
  145. package/app/.next/server/app/api/combos/route.js +1 -1
  146. package/app/.next/server/app/api/donate/route.js +1 -1
  147. package/app/.next/server/app/api/headroom/extras/route.js +1 -1
  148. package/app/.next/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  149. package/app/.next/server/app/api/headroom/restart/route.js +1 -1
  150. package/app/.next/server/app/api/headroom/start/route.js +1 -1
  151. package/app/.next/server/app/api/headroom/status/route.js +1 -1
  152. package/app/.next/server/app/api/headroom/stop/route.js +1 -1
  153. package/app/.next/server/app/api/health/route.js +1 -1
  154. package/app/.next/server/app/api/init/route.js +1 -1
  155. package/app/.next/server/app/api/internal/account-health/route.js +1 -1
  156. package/app/.next/server/app/api/internal/request-detail/route.js +1 -1
  157. package/app/.next/server/app/api/internal/request-detail/route.js.nft.json +1 -1
  158. package/app/.next/server/app/api/internal/usage/route.js +1 -1
  159. package/app/.next/server/app/api/internal/usage/route.js.nft.json +1 -1
  160. package/app/.next/server/app/api/keys/[id]/reset-usage/route.js +1 -1
  161. package/app/.next/server/app/api/keys/[id]/reset-usage/route.js.nft.json +1 -1
  162. package/app/.next/server/app/api/keys/[id]/route.js +1 -1
  163. package/app/.next/server/app/api/keys/[id]/route.js.nft.json +1 -1
  164. package/app/.next/server/app/api/keys/[id]/usage/route.js +1 -1
  165. package/app/.next/server/app/api/keys/[id]/usage/route.js.nft.json +1 -1
  166. package/app/.next/server/app/api/keys/route.js +1 -1
  167. package/app/.next/server/app/api/locale/route.js +1 -1
  168. package/app/.next/server/app/api/mcp/[plugin]/message/route.js +1 -1
  169. package/app/.next/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  170. package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  171. package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  172. package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  173. package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  174. package/app/.next/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  175. package/app/.next/server/app/api/media-providers/tts/voices/route.js +1 -1
  176. package/app/.next/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  177. package/app/.next/server/app/api/models/alias/route.js +1 -1
  178. package/app/.next/server/app/api/models/availability/route.js +1 -1
  179. package/app/.next/server/app/api/models/catalog-sync/route.js +1 -0
  180. package/app/.next/server/app/api/models/catalog-sync/route.js.nft.json +1 -0
  181. package/app/.next/server/app/api/models/catalog-sync/route_client-reference-manifest.js +1 -0
  182. package/app/.next/server/app/api/models/custom/route.js +1 -1
  183. package/app/.next/server/app/api/models/custom/route.js.nft.json +1 -1
  184. package/app/.next/server/app/api/models/disabled/route.js +1 -1
  185. package/app/.next/server/app/api/models/route.js +1 -1
  186. package/app/.next/server/app/api/models/route.js.nft.json +1 -1
  187. package/app/.next/server/app/api/models/test/route.js +1 -1
  188. package/app/.next/server/app/api/models/test/route.js.nft.json +1 -1
  189. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  190. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  191. package/app/.next/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  192. package/app/.next/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  193. package/app/.next/server/app/api/oauth/codex/import-token/route.js +1 -1
  194. package/app/.next/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  195. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  196. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  197. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  198. package/app/.next/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  199. package/app/.next/server/app/api/oauth/gitlab/pat/route.js +1 -1
  200. package/app/.next/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -0
  201. package/app/.next/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -0
  202. package/app/.next/server/app/api/oauth/grok-cli/bulk-import/route_client-reference-manifest.js +1 -0
  203. package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
  204. package/app/.next/server/app/api/oauth/kiro/api-key/route.js +1 -1
  205. package/app/.next/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  206. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  207. package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
  208. package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  209. package/app/.next/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  210. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  211. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  212. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  213. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  214. package/app/.next/server/app/api/pricing/route.js +1 -1
  215. package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
  216. package/app/.next/server/app/api/provider-nodes/route.js +1 -1
  217. package/app/.next/server/app/api/provider-nodes/route.js.nft.json +1 -1
  218. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  219. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  220. package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  221. package/app/.next/server/app/api/providers/[id]/route.js +1 -1
  222. package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
  223. package/app/.next/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  224. package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
  225. package/app/.next/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  226. package/app/.next/server/app/api/providers/client/route.js +1 -1
  227. package/app/.next/server/app/api/providers/client/route.js.nft.json +1 -1
  228. package/app/.next/server/app/api/providers/kilo/free-models/route.js +1 -1
  229. package/app/.next/server/app/api/providers/route.js +1 -1
  230. package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
  231. package/app/.next/server/app/api/providers/suggested-models/route.js +1 -1
  232. package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
  233. package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  234. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  235. package/app/.next/server/app/api/providers/validate/route.js.nft.json +1 -1
  236. package/app/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
  237. package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  238. package/app/.next/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  239. package/app/.next/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  240. package/app/.next/server/app/api/proxy-pools/route.js +1 -1
  241. package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  242. package/app/.next/server/app/api/pxpipe/health/route.js +2 -2
  243. package/app/.next/server/app/api/pxpipe/install/route.js +2 -2
  244. package/app/.next/server/app/api/pxpipe/logs/route.js +2 -2
  245. package/app/.next/server/app/api/pxpipe/restart/route.js +2 -2
  246. package/app/.next/server/app/api/pxpipe/start/route.js +2 -2
  247. package/app/.next/server/app/api/pxpipe/stats/route.js +2 -2
  248. package/app/.next/server/app/api/pxpipe/status/route.js +2 -2
  249. package/app/.next/server/app/api/pxpipe/stop/route.js +2 -2
  250. package/app/.next/server/app/api/settings/database/route.js +1 -1
  251. package/app/.next/server/app/api/settings/database/selective/route.js +1 -1
  252. package/app/.next/server/app/api/settings/proxy-test/route.js +1 -1
  253. package/app/.next/server/app/api/settings/require-login/route.js +1 -1
  254. package/app/.next/server/app/api/settings/route.js +1 -1
  255. package/app/.next/server/app/api/settings/route.js.nft.json +1 -1
  256. package/app/.next/server/app/api/shutdown/route.js +1 -1
  257. package/app/.next/server/app/api/tags/route.js +1 -1
  258. package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
  259. package/app/.next/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  260. package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
  261. package/app/.next/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  262. package/app/.next/server/app/api/translator/load/route.js +1 -1
  263. package/app/.next/server/app/api/translator/save/route.js +1 -1
  264. package/app/.next/server/app/api/translator/send/route.js +1 -1
  265. package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
  266. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  267. package/app/.next/server/app/api/translator/translate/route.js.nft.json +1 -1
  268. package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
  269. package/app/.next/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  270. package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
  271. package/app/.next/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  272. package/app/.next/server/app/api/tunnel/status/route.js +1 -1
  273. package/app/.next/server/app/api/tunnel/tailscale-check/route.js +1 -1
  274. package/app/.next/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  275. package/app/.next/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  276. package/app/.next/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  277. package/app/.next/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  278. package/app/.next/server/app/api/tunnel/tailscale-install/route.js +2 -2
  279. package/app/.next/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  280. package/app/.next/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  281. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  282. package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  283. package/app/.next/server/app/api/usage/chart/route.js +1 -1
  284. package/app/.next/server/app/api/usage/chart/route.js.nft.json +1 -1
  285. package/app/.next/server/app/api/usage/history/route.js +1 -1
  286. package/app/.next/server/app/api/usage/history/route.js.nft.json +1 -1
  287. package/app/.next/server/app/api/usage/logs/route.js +1 -1
  288. package/app/.next/server/app/api/usage/logs/route.js.nft.json +1 -1
  289. package/app/.next/server/app/api/usage/providers/route.js +1 -1
  290. package/app/.next/server/app/api/usage/providers/route.js.nft.json +1 -1
  291. package/app/.next/server/app/api/usage/report/route.js +1 -1
  292. package/app/.next/server/app/api/usage/report/route.js.nft.json +1 -1
  293. package/app/.next/server/app/api/usage/request-details/route.js +1 -1
  294. package/app/.next/server/app/api/usage/request-details/route.js.nft.json +1 -1
  295. package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
  296. package/app/.next/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  297. package/app/.next/server/app/api/usage/stats/route.js +1 -1
  298. package/app/.next/server/app/api/usage/stats/route.js.nft.json +1 -1
  299. package/app/.next/server/app/api/usage/stream/route.js +2 -2
  300. package/app/.next/server/app/api/usage/stream/route.js.nft.json +1 -1
  301. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  302. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  303. package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
  304. package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  305. package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
  306. package/app/.next/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  307. package/app/.next/server/app/api/v1/audio/voices/route.js +1 -1
  308. package/app/.next/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  309. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  310. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  311. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  312. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  313. package/app/.next/server/app/api/v1/images/generations/route.js +2 -2
  314. package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  315. package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
  316. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  317. package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
  318. package/app/.next/server/app/api/v1/models/[...model]/route.js +1 -0
  319. package/app/.next/server/app/api/v1/models/[...model]/route.js.nft.json +1 -0
  320. package/app/.next/server/app/api/v1/models/[...model]/route_client-reference-manifest.js +1 -0
  321. package/app/.next/server/app/api/v1/models/info/route.js +1 -1
  322. package/app/.next/server/app/api/v1/models/info/route.js.nft.json +1 -1
  323. package/app/.next/server/app/api/v1/models/route.js +1 -1
  324. package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
  325. package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  326. package/app/.next/server/app/api/v1/responses/compact/route.js +1 -1
  327. package/app/.next/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  328. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  329. package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
  330. package/app/.next/server/app/api/v1/route.js +1 -1
  331. package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
  332. package/app/.next/server/app/api/v1/search/route.js +1 -1
  333. package/app/.next/server/app/api/v1/search/route.js.nft.json +1 -1
  334. package/app/.next/server/app/api/v1/videos/[id]/route.js +1 -1
  335. package/app/.next/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  336. package/app/.next/server/app/api/v1/videos/edits/route.js +1 -1
  337. package/app/.next/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  338. package/app/.next/server/app/api/v1/videos/extensions/route.js +1 -1
  339. package/app/.next/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  340. package/app/.next/server/app/api/v1/videos/generations/route.js +1 -1
  341. package/app/.next/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  342. package/app/.next/server/app/api/v1/web/fetch/route.js +1 -1
  343. package/app/.next/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  344. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  345. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  346. package/app/.next/server/app/api/v1beta/models/route.js +1 -1
  347. package/app/.next/server/app/api/v1beta/models/route.js.nft.json +1 -1
  348. package/app/.next/server/app/api/version/route.js +1 -1
  349. package/app/.next/server/app/api/version/shutdown/route.js +1 -1
  350. package/app/.next/server/app/api/version/shutdown/route.js.nft.json +1 -1
  351. package/app/.next/server/app/api/version/update/route.js +1 -1
  352. package/app/.next/server/app/api/version/update/route.js.nft.json +1 -1
  353. package/app/.next/server/app/callback/page.js +2 -2
  354. package/app/.next/server/app/callback/page.js.nft.json +1 -1
  355. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  356. package/app/.next/server/app/callback.html +1 -1
  357. package/app/.next/server/app/callback.rsc +4 -4
  358. package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
  359. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  360. package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
  361. package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
  362. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  363. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  364. package/app/.next/server/app/dashboard/basic-chat.html +1 -1
  365. package/app/.next/server/app/dashboard/basic-chat.rsc +6 -6
  366. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  367. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  368. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  369. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  370. package/app/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  371. package/app/.next/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  372. package/app/.next/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  373. package/app/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  374. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  375. package/app/.next/server/app/dashboard/cli-tools.rsc +6 -6
  376. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  377. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  378. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  379. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  380. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  381. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  382. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  383. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  384. package/app/.next/server/app/dashboard/combos.html +1 -1
  385. package/app/.next/server/app/dashboard/combos.rsc +6 -6
  386. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  387. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  388. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  389. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  390. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  391. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  392. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  393. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  394. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  395. package/app/.next/server/app/dashboard/endpoint.rsc +6 -6
  396. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  397. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  398. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  399. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  400. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  401. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  402. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  403. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  404. package/app/.next/server/app/dashboard/media-providers/web.html +1 -1
  405. package/app/.next/server/app/dashboard/media-providers/web.rsc +15 -14
  406. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  407. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  408. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  409. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  410. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  411. package/app/.next/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +15 -14
  412. package/app/.next/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  413. package/app/.next/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  414. package/app/.next/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  415. package/app/.next/server/app/dashboard/mitm.html +1 -1
  416. package/app/.next/server/app/dashboard/mitm.rsc +6 -6
  417. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  418. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  419. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  420. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  421. package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  422. package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  423. package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  424. package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  425. package/app/.next/server/app/dashboard/profile.html +1 -1
  426. package/app/.next/server/app/dashboard/profile.rsc +6 -6
  427. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  428. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  429. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  430. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  431. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  432. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  433. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  434. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  435. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  436. package/app/.next/server/app/dashboard/providers/new.rsc +15 -14
  437. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  438. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  439. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  440. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  441. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  442. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +15 -14
  443. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  444. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  445. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  446. package/app/.next/server/app/dashboard/providers.html +1 -1
  447. package/app/.next/server/app/dashboard/providers.rsc +6 -6
  448. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  449. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  450. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  451. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  452. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  453. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  454. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  455. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  456. package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
  457. package/app/.next/server/app/dashboard/proxy-pools.rsc +6 -6
  458. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  459. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  460. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  461. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  462. package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  463. package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  464. package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  465. package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  466. package/app/.next/server/app/dashboard/pxpipe.html +1 -1
  467. package/app/.next/server/app/dashboard/pxpipe.rsc +6 -6
  468. package/app/.next/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  469. package/app/.next/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  470. package/app/.next/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  471. package/app/.next/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  472. package/app/.next/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  473. package/app/.next/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  474. package/app/.next/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  475. package/app/.next/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  476. package/app/.next/server/app/dashboard/quota.html +2 -2
  477. package/app/.next/server/app/dashboard/quota.rsc +7 -7
  478. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  479. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  480. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  481. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  482. package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  483. package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  484. package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  485. package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  486. package/app/.next/server/app/dashboard/settings/pricing/page.js +2 -2
  487. package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  488. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  489. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  490. package/app/.next/server/app/dashboard/settings/pricing.rsc +5 -5
  491. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  492. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  493. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  494. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  495. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  496. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  497. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  498. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  499. package/app/.next/server/app/dashboard/skills.html +1 -1
  500. package/app/.next/server/app/dashboard/skills.rsc +6 -6
  501. package/app/.next/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  502. package/app/.next/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  503. package/app/.next/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  504. package/app/.next/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  505. package/app/.next/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  506. package/app/.next/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  507. package/app/.next/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  508. package/app/.next/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  509. package/app/.next/server/app/dashboard/token-saver.html +1 -1
  510. package/app/.next/server/app/dashboard/token-saver.rsc +6 -6
  511. package/app/.next/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  512. package/app/.next/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  513. package/app/.next/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  514. package/app/.next/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  515. package/app/.next/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  516. package/app/.next/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  517. package/app/.next/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  518. package/app/.next/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  519. package/app/.next/server/app/dashboard/translator.html +1 -1
  520. package/app/.next/server/app/dashboard/translator.rsc +6 -6
  521. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  522. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  523. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  524. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  525. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  526. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  527. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  528. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  529. package/app/.next/server/app/dashboard/usage.html +1 -1
  530. package/app/.next/server/app/dashboard/usage.rsc +6 -6
  531. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  532. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  533. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  534. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  535. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  536. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  537. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  538. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  539. package/app/.next/server/app/dashboard.html +1 -1
  540. package/app/.next/server/app/dashboard.rsc +6 -6
  541. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  542. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  543. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  544. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +6 -6
  545. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  546. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +4 -4
  547. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  548. package/app/.next/server/app/favicon.ico/route.js +1 -1
  549. package/app/.next/server/app/index.html +1 -1
  550. package/app/.next/server/app/index.rsc +4 -4
  551. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  552. package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
  553. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  554. package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
  555. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  556. package/app/.next/server/app/landing/page.js +2 -2
  557. package/app/.next/server/app/landing/page.js.nft.json +1 -1
  558. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  559. package/app/.next/server/app/landing.html +1 -1
  560. package/app/.next/server/app/landing.rsc +5 -5
  561. package/app/.next/server/app/landing.segments/_full.segment.rsc +5 -5
  562. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  563. package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
  564. package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
  565. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  566. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  567. package/app/.next/server/app/login/page.js +2 -2
  568. package/app/.next/server/app/login/page.js.nft.json +1 -1
  569. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  570. package/app/.next/server/app/login.html +1 -1
  571. package/app/.next/server/app/login.rsc +5 -5
  572. package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
  573. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  574. package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
  575. package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  576. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  577. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  578. package/app/.next/server/app/manifest.webmanifest/route.js +2 -2
  579. package/app/.next/server/app/page.js +2 -2
  580. package/app/.next/server/app/page.js.nft.json +1 -1
  581. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  582. package/app/.next/server/app-paths-manifest.json +21 -19
  583. package/app/.next/server/chunks/1470.js +1 -1
  584. package/app/.next/server/chunks/24.js +1 -0
  585. package/app/.next/server/chunks/318.js +7 -7
  586. package/app/.next/server/chunks/3481.js +1 -1
  587. package/app/.next/server/chunks/3662.js +1 -0
  588. package/app/.next/server/chunks/3726.js +1 -0
  589. package/app/.next/server/chunks/3753.js +1 -0
  590. package/app/.next/server/chunks/3913.js +1 -1
  591. package/app/.next/server/chunks/3943.js +1 -1
  592. package/app/.next/server/chunks/3962.js +1 -1
  593. package/app/.next/server/chunks/4037.js +1 -1
  594. package/app/.next/server/chunks/412.js +1 -1
  595. package/app/.next/server/chunks/4123.js +1 -1
  596. package/app/.next/server/chunks/4125.js +1 -1
  597. package/app/.next/server/chunks/4334.js +2 -2
  598. package/app/.next/server/chunks/436.js +1 -0
  599. package/app/.next/server/chunks/4940.js +95 -0
  600. package/app/.next/server/chunks/{4676.js → 5139.js} +2 -2
  601. package/app/.next/server/chunks/5612.js +1 -1
  602. package/app/.next/server/chunks/5615.js +1 -1
  603. package/app/.next/server/chunks/5729.js +1 -0
  604. package/app/.next/server/chunks/6070.js +1 -1
  605. package/app/.next/server/chunks/615.js +1 -1
  606. package/app/.next/server/chunks/6763.js +1 -1
  607. package/app/.next/server/chunks/6777.js +1 -1
  608. package/app/.next/server/chunks/6818.js +1 -1
  609. package/app/.next/server/chunks/6922.js +1 -0
  610. package/app/.next/server/chunks/7137.js +1 -1
  611. package/app/.next/server/chunks/7211.js +1 -1
  612. package/app/.next/server/chunks/7247.js +1 -0
  613. package/app/.next/server/chunks/{4705.js → 7637.js} +1 -1
  614. package/app/.next/server/chunks/7716.js +1 -0
  615. package/app/.next/server/chunks/8145.js +1 -1
  616. package/app/.next/server/chunks/8236.js +1 -0
  617. package/app/.next/server/chunks/8402.js +1 -0
  618. package/app/.next/server/chunks/8499.js +8 -8
  619. package/app/.next/server/chunks/8635.js +3 -0
  620. package/app/.next/server/chunks/869.js +1 -1
  621. package/app/.next/server/chunks/8895.js +19 -13
  622. package/app/.next/server/chunks/8910.js +1 -1
  623. package/app/.next/server/chunks/8920.js +1 -1
  624. package/app/.next/server/chunks/9441.js +1 -0
  625. package/app/.next/server/chunks/9820.js +1 -0
  626. package/app/.next/server/chunks/9896.js +1 -0
  627. package/app/.next/server/chunks/{4443.js → 9927.js} +1 -1
  628. package/app/.next/server/instrumentation.js +1 -1
  629. package/app/.next/server/middleware-build-manifest.js +1 -1
  630. package/app/.next/server/middleware.js +1 -1
  631. package/app/.next/server/pages/404.html +1 -1
  632. package/app/.next/server/pages/500.html +1 -1
  633. package/app/.next/server/server-reference-manifest.js +1 -1
  634. package/app/.next/server/server-reference-manifest.json +1 -1
  635. package/app/.next/static/Kxev_rxnwFUOd40N9Z0wC/_buildManifest.js +1 -0
  636. package/app/.next/static/chunks/1321-0c49c9bb979ef503.js +1 -0
  637. package/app/.next/static/chunks/3277-5ccea691719301a1.js +64 -0
  638. package/app/.next/static/chunks/511-12d7a4aee984e083.js +95 -0
  639. package/app/.next/static/chunks/5497-5dcbb92529844695.js +7 -0
  640. package/app/.next/static/chunks/{705-10f93cd2550e6494.js → 705-f07c546a169bc3d2.js} +1 -1
  641. package/app/.next/static/chunks/8198-2f2b63f52e0d44f9.js +1 -0
  642. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-ddcb29448c366123.js → page-fbd0e639f6248423.js} +1 -1
  643. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-bc35ad34049d7ff5.js → page-9dd5b20bf0221838.js} +1 -1
  644. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-00363c4bec619120.js +59 -0
  645. package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/{page-a571e53340e18f91.js → page-c8943c6168a7bc3f.js} +1 -1
  646. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-e6ee66418932601a.js +27 -0
  647. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-b2e8e7af27239aef.js +1 -0
  648. package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-c48d4a86c94ab13a.js +1 -0
  649. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/page-156920b6e519dc17.js +1 -0
  650. package/app/.next/static/chunks/app/(dashboard)/dashboard/token-saver/page-6aae3d87e3964ab9.js +1 -0
  651. package/app/.next/static/chunks/app/(dashboard)/layout-a0e61866894b6cee.js +1 -0
  652. package/app/.next/static/chunks/app/_global-error/page-b3fe65cd692af32a.js +1 -0
  653. package/app/.next/static/chunks/app/api/antigravity-app/route-b3fe65cd692af32a.js +1 -0
  654. package/app/.next/static/chunks/app/api/antigravity-app-v2/route-b3fe65cd692af32a.js +1 -0
  655. package/app/.next/static/chunks/app/api/antigravity-ide/route-b3fe65cd692af32a.js +1 -0
  656. package/app/.next/static/chunks/app/api/antigravity-targets/route-b3fe65cd692af32a.js +1 -0
  657. package/app/.next/static/chunks/app/api/antigravity-tools/import/route-b3fe65cd692af32a.js +1 -0
  658. package/app/.next/static/chunks/app/api/antigravity-tools/import-refresh-tokens/route-b3fe65cd692af32a.js +1 -0
  659. package/app/.next/static/chunks/app/api/auth/login/route-b3fe65cd692af32a.js +1 -0
  660. package/app/.next/static/chunks/app/api/auth/logout/route-b3fe65cd692af32a.js +1 -0
  661. package/app/.next/static/chunks/app/api/auth/oidc/callback/route-b3fe65cd692af32a.js +1 -0
  662. package/app/.next/static/chunks/app/api/auth/oidc/start/route-b3fe65cd692af32a.js +1 -0
  663. package/app/.next/static/chunks/app/api/auth/oidc/test/route-b3fe65cd692af32a.js +1 -0
  664. package/app/.next/static/chunks/app/api/auth/reset-password/route-b3fe65cd692af32a.js +1 -0
  665. package/app/.next/static/chunks/app/api/auth/saml/acs/route-b3fe65cd692af32a.js +1 -0
  666. package/app/.next/static/chunks/app/api/auth/saml/metadata/route-b3fe65cd692af32a.js +1 -0
  667. package/app/.next/static/chunks/app/api/auth/saml/start/route-b3fe65cd692af32a.js +1 -0
  668. package/app/.next/static/chunks/app/api/auth/saml/test/route-b3fe65cd692af32a.js +1 -0
  669. package/app/.next/static/chunks/app/api/auth/status/route-b3fe65cd692af32a.js +1 -0
  670. package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-b3fe65cd692af32a.js +1 -0
  671. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-b3fe65cd692af32a.js +1 -0
  672. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-b3fe65cd692af32a.js +1 -0
  673. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-b3fe65cd692af32a.js +1 -0
  674. package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-b3fe65cd692af32a.js +1 -0
  675. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-b3fe65cd692af32a.js +1 -0
  676. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-b3fe65cd692af32a.js +1 -0
  677. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-b3fe65cd692af32a.js +1 -0
  678. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-b3fe65cd692af32a.js +1 -0
  679. package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-b3fe65cd692af32a.js +1 -0
  680. package/app/.next/static/chunks/app/api/cli-tools/cursor-byok/jobs/[jobId]/events/route-b3fe65cd692af32a.js +1 -0
  681. package/app/.next/static/chunks/app/api/cli-tools/cursor-byok/jobs/[jobId]/sudo/route-b3fe65cd692af32a.js +1 -0
  682. package/app/.next/static/chunks/app/api/cli-tools/cursor-byok/jobs/route-b3fe65cd692af32a.js +1 -0
  683. package/app/.next/static/chunks/app/api/cli-tools/cursor-byok/route-b3fe65cd692af32a.js +1 -0
  684. package/app/.next/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-b3fe65cd692af32a.js +1 -0
  685. package/app/.next/static/chunks/app/api/cli-tools/devin-settings/route-b3fe65cd692af32a.js +1 -0
  686. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-b3fe65cd692af32a.js +1 -0
  687. package/app/.next/static/chunks/app/api/cli-tools/grok-build-settings/route-b3fe65cd692af32a.js +1 -0
  688. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-b3fe65cd692af32a.js +1 -0
  689. package/app/.next/static/chunks/app/api/cli-tools/jcode-settings/route-b3fe65cd692af32a.js +1 -0
  690. package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-b3fe65cd692af32a.js +1 -0
  691. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-b3fe65cd692af32a.js +1 -0
  692. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-b3fe65cd692af32a.js +1 -0
  693. package/app/.next/static/chunks/app/api/combos/[id]/route-b3fe65cd692af32a.js +1 -0
  694. package/app/.next/static/chunks/app/api/combos/route-b3fe65cd692af32a.js +1 -0
  695. package/app/.next/static/chunks/app/api/donate/route-b3fe65cd692af32a.js +1 -0
  696. package/app/.next/static/chunks/app/api/headroom/extras/route-b3fe65cd692af32a.js +1 -0
  697. package/app/.next/static/chunks/app/api/headroom/proxy/[...path]/route-b3fe65cd692af32a.js +1 -0
  698. package/app/.next/static/chunks/app/api/headroom/restart/route-b3fe65cd692af32a.js +1 -0
  699. package/app/.next/static/chunks/app/api/headroom/start/route-b3fe65cd692af32a.js +1 -0
  700. package/app/.next/static/chunks/app/api/headroom/status/route-b3fe65cd692af32a.js +1 -0
  701. package/app/.next/static/chunks/app/api/headroom/stop/route-b3fe65cd692af32a.js +1 -0
  702. package/app/.next/static/chunks/app/api/health/route-b3fe65cd692af32a.js +1 -0
  703. package/app/.next/static/chunks/app/api/init/route-b3fe65cd692af32a.js +1 -0
  704. package/app/.next/static/chunks/app/api/internal/account-health/route-b3fe65cd692af32a.js +1 -0
  705. package/app/.next/static/chunks/app/api/internal/request-detail/route-b3fe65cd692af32a.js +1 -0
  706. package/app/.next/static/chunks/app/api/internal/usage/route-b3fe65cd692af32a.js +1 -0
  707. package/app/.next/static/chunks/app/api/keys/[id]/reset-usage/route-b3fe65cd692af32a.js +1 -0
  708. package/app/.next/static/chunks/app/api/keys/[id]/route-b3fe65cd692af32a.js +1 -0
  709. package/app/.next/static/chunks/app/api/keys/[id]/usage/route-b3fe65cd692af32a.js +1 -0
  710. package/app/.next/static/chunks/app/api/keys/route-b3fe65cd692af32a.js +1 -0
  711. package/app/.next/static/chunks/app/api/locale/route-b3fe65cd692af32a.js +1 -0
  712. package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-b3fe65cd692af32a.js +1 -0
  713. package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-b3fe65cd692af32a.js +1 -0
  714. package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-b3fe65cd692af32a.js +1 -0
  715. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-b3fe65cd692af32a.js +1 -0
  716. package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-b3fe65cd692af32a.js +1 -0
  717. package/app/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-b3fe65cd692af32a.js +1 -0
  718. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-b3fe65cd692af32a.js +1 -0
  719. package/app/.next/static/chunks/app/api/models/alias/route-b3fe65cd692af32a.js +1 -0
  720. package/app/.next/static/chunks/app/api/models/availability/route-b3fe65cd692af32a.js +1 -0
  721. package/app/.next/static/chunks/app/api/models/catalog-sync/route-b3fe65cd692af32a.js +1 -0
  722. package/app/.next/static/chunks/app/api/models/custom/route-b3fe65cd692af32a.js +1 -0
  723. package/app/.next/static/chunks/app/api/models/disabled/route-b3fe65cd692af32a.js +1 -0
  724. package/app/.next/static/chunks/app/api/models/route-b3fe65cd692af32a.js +1 -0
  725. package/app/.next/static/chunks/app/api/models/test/route-b3fe65cd692af32a.js +1 -0
  726. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-b3fe65cd692af32a.js +1 -0
  727. package/app/.next/static/chunks/app/api/oauth/codex/bulk-import/route-b3fe65cd692af32a.js +1 -0
  728. package/app/.next/static/chunks/app/api/oauth/codex/import-token/route-b3fe65cd692af32a.js +1 -0
  729. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-b3fe65cd692af32a.js +1 -0
  730. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-b3fe65cd692af32a.js +1 -0
  731. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-b3fe65cd692af32a.js +1 -0
  732. package/app/.next/static/chunks/app/api/oauth/grok-cli/bulk-import/route-b3fe65cd692af32a.js +1 -0
  733. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-b3fe65cd692af32a.js +1 -0
  734. package/app/.next/static/chunks/app/api/oauth/kiro/api-key/route-b3fe65cd692af32a.js +1 -0
  735. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-b3fe65cd692af32a.js +1 -0
  736. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-b3fe65cd692af32a.js +1 -0
  737. package/app/.next/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-b3fe65cd692af32a.js +1 -0
  738. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-b3fe65cd692af32a.js +1 -0
  739. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-b3fe65cd692af32a.js +1 -0
  740. package/app/.next/static/chunks/app/api/pricing/route-b3fe65cd692af32a.js +1 -0
  741. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-b3fe65cd692af32a.js +1 -0
  742. package/app/.next/static/chunks/app/api/provider-nodes/route-b3fe65cd692af32a.js +1 -0
  743. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-b3fe65cd692af32a.js +1 -0
  744. package/app/.next/static/chunks/app/api/providers/[id]/models/route-b3fe65cd692af32a.js +1 -0
  745. package/app/.next/static/chunks/app/api/providers/[id]/route-b3fe65cd692af32a.js +1 -0
  746. package/app/.next/static/chunks/app/api/providers/[id]/test/route-b3fe65cd692af32a.js +1 -0
  747. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-b3fe65cd692af32a.js +1 -0
  748. package/app/.next/static/chunks/app/api/providers/client/route-b3fe65cd692af32a.js +1 -0
  749. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-b3fe65cd692af32a.js +1 -0
  750. package/app/.next/static/chunks/app/api/providers/route-b3fe65cd692af32a.js +1 -0
  751. package/app/.next/static/chunks/app/api/providers/suggested-models/route-b3fe65cd692af32a.js +1 -0
  752. package/app/.next/static/chunks/app/api/providers/test-batch/route-b3fe65cd692af32a.js +1 -0
  753. package/app/.next/static/chunks/app/api/providers/validate/route-b3fe65cd692af32a.js +1 -0
  754. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-b3fe65cd692af32a.js +1 -0
  755. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-b3fe65cd692af32a.js +1 -0
  756. package/app/.next/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-b3fe65cd692af32a.js +1 -0
  757. package/app/.next/static/chunks/app/api/proxy-pools/deno-deploy/route-b3fe65cd692af32a.js +1 -0
  758. package/app/.next/static/chunks/app/api/proxy-pools/route-b3fe65cd692af32a.js +1 -0
  759. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-b3fe65cd692af32a.js +1 -0
  760. package/app/.next/static/chunks/app/api/pxpipe/health/route-b3fe65cd692af32a.js +1 -0
  761. package/app/.next/static/chunks/app/api/pxpipe/install/route-b3fe65cd692af32a.js +1 -0
  762. package/app/.next/static/chunks/app/api/pxpipe/logs/route-b3fe65cd692af32a.js +1 -0
  763. package/app/.next/static/chunks/app/api/pxpipe/restart/route-b3fe65cd692af32a.js +1 -0
  764. package/app/.next/static/chunks/app/api/pxpipe/start/route-b3fe65cd692af32a.js +1 -0
  765. package/app/.next/static/chunks/app/api/pxpipe/stats/route-b3fe65cd692af32a.js +1 -0
  766. package/app/.next/static/chunks/app/api/pxpipe/status/route-b3fe65cd692af32a.js +1 -0
  767. package/app/.next/static/chunks/app/api/pxpipe/stop/route-b3fe65cd692af32a.js +1 -0
  768. package/app/.next/static/chunks/app/api/settings/database/route-b3fe65cd692af32a.js +1 -0
  769. package/app/.next/static/chunks/app/api/settings/database/selective/route-b3fe65cd692af32a.js +1 -0
  770. package/app/.next/static/chunks/app/api/settings/proxy-test/route-b3fe65cd692af32a.js +1 -0
  771. package/app/.next/static/chunks/app/api/settings/require-login/route-b3fe65cd692af32a.js +1 -0
  772. package/app/.next/static/chunks/app/api/settings/route-b3fe65cd692af32a.js +1 -0
  773. package/app/.next/static/chunks/app/api/shutdown/route-b3fe65cd692af32a.js +1 -0
  774. package/app/.next/static/chunks/app/api/tags/route-b3fe65cd692af32a.js +1 -0
  775. package/app/.next/static/chunks/app/api/translator/console-logs/route-b3fe65cd692af32a.js +1 -0
  776. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-b3fe65cd692af32a.js +1 -0
  777. package/app/.next/static/chunks/app/api/translator/load/route-b3fe65cd692af32a.js +1 -0
  778. package/app/.next/static/chunks/app/api/translator/save/route-b3fe65cd692af32a.js +1 -0
  779. package/app/.next/static/chunks/app/api/translator/send/route-b3fe65cd692af32a.js +1 -0
  780. package/app/.next/static/chunks/app/api/translator/translate/route-b3fe65cd692af32a.js +1 -0
  781. package/app/.next/static/chunks/app/api/tunnel/disable/route-b3fe65cd692af32a.js +1 -0
  782. package/app/.next/static/chunks/app/api/tunnel/enable/route-b3fe65cd692af32a.js +1 -0
  783. package/app/.next/static/chunks/app/api/tunnel/status/route-b3fe65cd692af32a.js +1 -0
  784. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-b3fe65cd692af32a.js +1 -0
  785. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-b3fe65cd692af32a.js +1 -0
  786. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-b3fe65cd692af32a.js +1 -0
  787. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-b3fe65cd692af32a.js +1 -0
  788. package/app/.next/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-b3fe65cd692af32a.js +1 -0
  789. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-b3fe65cd692af32a.js +1 -0
  790. package/app/.next/static/chunks/app/api/usage/chart/route-b3fe65cd692af32a.js +1 -0
  791. package/app/.next/static/chunks/app/api/usage/history/route-b3fe65cd692af32a.js +1 -0
  792. package/app/.next/static/chunks/app/api/usage/logs/route-b3fe65cd692af32a.js +1 -0
  793. package/app/.next/static/chunks/app/api/usage/providers/route-b3fe65cd692af32a.js +1 -0
  794. package/app/.next/static/chunks/app/api/usage/report/route-b3fe65cd692af32a.js +1 -0
  795. package/app/.next/static/chunks/app/api/usage/request-details/route-b3fe65cd692af32a.js +1 -0
  796. package/app/.next/static/chunks/app/api/usage/request-logs/route-b3fe65cd692af32a.js +1 -0
  797. package/app/.next/static/chunks/app/api/usage/stats/route-b3fe65cd692af32a.js +1 -0
  798. package/app/.next/static/chunks/app/api/usage/stream/route-b3fe65cd692af32a.js +1 -0
  799. package/app/.next/static/chunks/app/api/v1/api/chat/route-b3fe65cd692af32a.js +1 -0
  800. package/app/.next/static/chunks/app/api/v1/audio/speech/route-b3fe65cd692af32a.js +1 -0
  801. package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-b3fe65cd692af32a.js +1 -0
  802. package/app/.next/static/chunks/app/api/v1/audio/voices/route-b3fe65cd692af32a.js +1 -0
  803. package/app/.next/static/chunks/app/api/v1/chat/completions/route-b3fe65cd692af32a.js +1 -0
  804. package/app/.next/static/chunks/app/api/v1/embeddings/route-b3fe65cd692af32a.js +1 -0
  805. package/app/.next/static/chunks/app/api/v1/images/generations/route-b3fe65cd692af32a.js +1 -0
  806. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-b3fe65cd692af32a.js +1 -0
  807. package/app/.next/static/chunks/app/api/v1/messages/route-b3fe65cd692af32a.js +1 -0
  808. package/app/.next/static/chunks/app/api/v1/models/[...model]/route-b3fe65cd692af32a.js +1 -0
  809. package/app/.next/static/chunks/app/api/v1/models/info/route-b3fe65cd692af32a.js +1 -0
  810. package/app/.next/static/chunks/app/api/v1/models/route-b3fe65cd692af32a.js +1 -0
  811. package/app/.next/static/chunks/app/api/v1/responses/compact/route-b3fe65cd692af32a.js +1 -0
  812. package/app/.next/static/chunks/app/api/v1/responses/route-b3fe65cd692af32a.js +1 -0
  813. package/app/.next/static/chunks/app/api/v1/route-b3fe65cd692af32a.js +1 -0
  814. package/app/.next/static/chunks/app/api/v1/search/route-b3fe65cd692af32a.js +1 -0
  815. package/app/.next/static/chunks/app/api/v1/videos/[id]/route-b3fe65cd692af32a.js +1 -0
  816. package/app/.next/static/chunks/app/api/v1/videos/edits/route-b3fe65cd692af32a.js +1 -0
  817. package/app/.next/static/chunks/app/api/v1/videos/extensions/route-b3fe65cd692af32a.js +1 -0
  818. package/app/.next/static/chunks/app/api/v1/videos/generations/route-b3fe65cd692af32a.js +1 -0
  819. package/app/.next/static/chunks/app/api/v1/web/fetch/route-b3fe65cd692af32a.js +1 -0
  820. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-b3fe65cd692af32a.js +1 -0
  821. package/app/.next/static/chunks/app/api/v1beta/models/route-b3fe65cd692af32a.js +1 -0
  822. package/app/.next/static/chunks/app/api/version/route-b3fe65cd692af32a.js +1 -0
  823. package/app/.next/static/chunks/app/api/version/shutdown/route-b3fe65cd692af32a.js +1 -0
  824. package/app/.next/static/chunks/app/api/version/update/route-b3fe65cd692af32a.js +1 -0
  825. package/app/.next/static/chunks/app/landing/page-8aa1b64c49edfaf2.js +1 -0
  826. package/app/.next/static/chunks/app/manifest.webmanifest/route-b3fe65cd692af32a.js +1 -0
  827. package/app/.next/static/chunks/app/page-b3fe65cd692af32a.js +1 -0
  828. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-b3fe65cd692af32a.js +1 -0
  829. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-b3fe65cd692af32a.js +1 -0
  830. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-b3fe65cd692af32a.js +1 -0
  831. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b3fe65cd692af32a.js +1 -0
  832. package/app/.next/static/css/e88d3a3f66f134dd.css +1 -0
  833. package/app/open-sse/config/appConstants.js +7 -0
  834. package/app/open-sse/config/providerModels.js +5 -1
  835. package/app/open-sse/executors/antigravity.js +5 -5
  836. package/app/open-sse/executors/commandcode.js +235 -7
  837. package/app/open-sse/executors/opencode.js +56 -10
  838. package/app/open-sse/handlers/chatCore/requestDetail.js +8 -2
  839. package/app/open-sse/handlers/chatCore.js +15 -3
  840. package/app/open-sse/handlers/fetch/index.js +70 -3
  841. package/app/open-sse/handlers/imageProviders/antigravity.js +15 -2
  842. package/app/open-sse/handlers/search/callers.js +78 -0
  843. package/app/open-sse/handlers/search/chatSearch.js +101 -3
  844. package/app/open-sse/handlers/search/index.js +11 -2
  845. package/app/open-sse/handlers/search/normalizers.js +87 -1
  846. package/app/open-sse/providers/capabilities.js +103 -6
  847. package/app/open-sse/providers/catalogOverride.js +72 -0
  848. package/app/open-sse/providers/models/helpers.js +7 -0
  849. package/app/open-sse/providers/pricing.js +5 -0
  850. package/app/open-sse/providers/registry/antigravity.js +10 -3
  851. package/app/open-sse/providers/registry/claude.js +3 -2
  852. package/app/open-sse/providers/registry/codebuddy-cn.js +10 -2
  853. package/app/open-sse/providers/registry/commandcode.js +7 -0
  854. package/app/open-sse/providers/registry/deepseek.js +1 -0
  855. package/app/open-sse/providers/registry/gemini.js +1 -0
  856. package/app/open-sse/providers/registry/glm-cn.js +2 -0
  857. package/app/open-sse/providers/registry/glm.js +15 -0
  858. package/app/open-sse/providers/registry/groq.js +10 -0
  859. package/app/open-sse/providers/registry/index.js +4 -0
  860. package/app/open-sse/providers/registry/ollama-search.js +35 -0
  861. package/app/open-sse/providers/registry/ollama.js +10 -1
  862. package/app/open-sse/providers/registry/opencode-go.js +2 -0
  863. package/app/open-sse/providers/registry/opencode.js +6 -1
  864. package/app/open-sse/providers/registry/tokenrouter.js +11 -109
  865. package/app/open-sse/providers/registry/xai.js +2 -0
  866. package/app/open-sse/providers/registry/xquik.js +35 -0
  867. package/app/open-sse/providers/shared.js +4 -4
  868. package/app/open-sse/providers/thinkingLevels.js +7 -0
  869. package/app/open-sse/providers/visionPatterns.js +42 -0
  870. package/app/open-sse/rtk/headroom.js +11 -1
  871. package/app/open-sse/rtk/systemInject.js +307 -68
  872. package/app/open-sse/services/tokenRefresh/providers.js +47 -0
  873. package/app/open-sse/services/tokenRefresh.js +3 -0
  874. package/app/open-sse/services/usage/codex.js +20 -0
  875. package/app/open-sse/services/usage/glm.js +88 -0
  876. package/app/open-sse/services/usage/google.js +34 -1
  877. package/app/open-sse/services/usage/groq.js +133 -0
  878. package/app/open-sse/services/usage/misc.js +2 -61
  879. package/app/open-sse/services/usage/zed.js +222 -0
  880. package/app/open-sse/services/usage.js +5 -1
  881. package/app/open-sse/shared/zedAuth.js +11 -7
  882. package/app/open-sse/translator/concerns/prefetch.js +3 -0
  883. package/app/open-sse/translator/concerns/thinkingUnified.js +31 -11
  884. package/app/open-sse/translator/concerns/toolCall.js +14 -0
  885. package/app/open-sse/translator/formats/claude.js +62 -2
  886. package/app/open-sse/translator/formats/gemini.js +35 -0
  887. package/app/open-sse/translator/index.js +7 -4
  888. package/app/open-sse/translator/request/claude-to-kiro.js +0 -1
  889. package/app/open-sse/translator/request/openai-responses.js +17 -2
  890. package/app/open-sse/translator/request/openai-to-commandcode.js +36 -1
  891. package/app/open-sse/translator/request/openai-to-kiro.js +0 -1
  892. package/app/open-sse/translator/schema/blocks.js +2 -0
  893. package/app/open-sse/utils/claudeCloaking.js +33 -6
  894. package/app/open-sse/utils/claudeToolTypeSelfCheck.mjs +117 -0
  895. package/app/open-sse/utils/modelMarkers.js +20 -0
  896. package/app/open-sse/utils/sessionManager.js +5 -1
  897. package/app/open-sse/utils/stream.js +54 -33
  898. package/app/open-sse/utils/streamHandler.js +2 -1
  899. package/app/open-sse/utils/usageTracking.js +4 -1
  900. package/app/package.json +4 -2
  901. package/app/public/i18n/literals/id.json +1365 -169
  902. package/app/public/i18n/literals/pt-BR.json +144 -0
  903. package/app/public/i18n/literals/zh-CN.json +1 -0
  904. package/app/public/providers/alims-intl.png +0 -0
  905. package/app/public/providers/alitp-intl.png +0 -0
  906. package/app/public/providers/fish-audio.png +0 -0
  907. package/app/public/providers/selfhosted-embedding.png +0 -0
  908. package/app/public/providers/selfhosted-stt.png +0 -0
  909. package/app/public/providers/selfhosted-tts.png +0 -0
  910. package/app/public/providers/xquik.png +0 -0
  911. package/app/server.js +1 -1
  912. package/app/src/mitm/antigravityIdeVersion.js +49 -13
  913. package/app/src/mitm/config.js +6 -2
  914. package/app/src/mitm/handlers/kiro.js +573 -3
  915. package/app/src/mitm/server.js +1 -1
  916. package/app/src/shared/constants/cliTools.js +4 -1
  917. package/app/src/shared/constants/providers.js +1 -1
  918. package/app/src/shared/constants/skills.js +1 -1
  919. package/hooks/postinstall.js +9 -182
  920. package/package.json +1 -1
  921. package/app/.next/server/app/api/v1/models/[kind]/route.js +0 -1
  922. package/app/.next/server/app/api/v1/models/[kind]/route.js.nft.json +0 -1
  923. package/app/.next/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +0 -1
  924. package/app/.next/server/chunks/112.js +0 -3
  925. package/app/.next/server/chunks/4953.js +0 -1
  926. package/app/.next/server/chunks/4975.js +0 -1
  927. package/app/.next/server/chunks/5285.js +0 -1
  928. package/app/.next/server/chunks/5699.js +0 -1
  929. package/app/.next/server/chunks/6292.js +0 -1
  930. package/app/.next/server/chunks/6306.js +0 -1
  931. package/app/.next/server/chunks/6671.js +0 -1
  932. package/app/.next/server/chunks/8301.js +0 -92
  933. package/app/.next/static/chunks/1321-99f0141dbac9848a.js +0 -1
  934. package/app/.next/static/chunks/3277-443e21d6166585f4.js +0 -64
  935. package/app/.next/static/chunks/4028-9d0d68c835868df5.js +0 -92
  936. package/app/.next/static/chunks/5497-017258c3c16b719e.js +0 -7
  937. package/app/.next/static/chunks/8198-bf66ab4ae1cda8e0.js +0 -1
  938. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-308fc8a3b8a069fe.js +0 -59
  939. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-2eaaf5721c2e8376.js +0 -14
  940. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-d6c97bcabadb38ca.js +0 -1
  941. package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-c8a6e0e2bef2932e.js +0 -1
  942. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/page-3a3fbf978b69dabd.js +0 -1
  943. package/app/.next/static/chunks/app/(dashboard)/dashboard/token-saver/page-46e9c726ae1032e0.js +0 -1
  944. package/app/.next/static/chunks/app/(dashboard)/layout-98dba0673f8af6ad.js +0 -1
  945. package/app/.next/static/chunks/app/_global-error/page-1a2fcb867d9ffccf.js +0 -1
  946. package/app/.next/static/chunks/app/api/antigravity-app/route-1a2fcb867d9ffccf.js +0 -1
  947. package/app/.next/static/chunks/app/api/antigravity-app-v2/route-1a2fcb867d9ffccf.js +0 -1
  948. package/app/.next/static/chunks/app/api/antigravity-ide/route-1a2fcb867d9ffccf.js +0 -1
  949. package/app/.next/static/chunks/app/api/antigravity-targets/route-1a2fcb867d9ffccf.js +0 -1
  950. package/app/.next/static/chunks/app/api/antigravity-tools/import/route-1a2fcb867d9ffccf.js +0 -1
  951. package/app/.next/static/chunks/app/api/antigravity-tools/import-refresh-tokens/route-1a2fcb867d9ffccf.js +0 -1
  952. package/app/.next/static/chunks/app/api/auth/login/route-1a2fcb867d9ffccf.js +0 -1
  953. package/app/.next/static/chunks/app/api/auth/logout/route-1a2fcb867d9ffccf.js +0 -1
  954. package/app/.next/static/chunks/app/api/auth/oidc/callback/route-1a2fcb867d9ffccf.js +0 -1
  955. package/app/.next/static/chunks/app/api/auth/oidc/start/route-1a2fcb867d9ffccf.js +0 -1
  956. package/app/.next/static/chunks/app/api/auth/oidc/test/route-1a2fcb867d9ffccf.js +0 -1
  957. package/app/.next/static/chunks/app/api/auth/reset-password/route-1a2fcb867d9ffccf.js +0 -1
  958. package/app/.next/static/chunks/app/api/auth/saml/acs/route-1a2fcb867d9ffccf.js +0 -1
  959. package/app/.next/static/chunks/app/api/auth/saml/metadata/route-1a2fcb867d9ffccf.js +0 -1
  960. package/app/.next/static/chunks/app/api/auth/saml/start/route-1a2fcb867d9ffccf.js +0 -1
  961. package/app/.next/static/chunks/app/api/auth/saml/test/route-1a2fcb867d9ffccf.js +0 -1
  962. package/app/.next/static/chunks/app/api/auth/status/route-1a2fcb867d9ffccf.js +0 -1
  963. package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-1a2fcb867d9ffccf.js +0 -1
  964. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1a2fcb867d9ffccf.js +0 -1
  965. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-1a2fcb867d9ffccf.js +0 -1
  966. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-1a2fcb867d9ffccf.js +0 -1
  967. package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-1a2fcb867d9ffccf.js +0 -1
  968. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-1a2fcb867d9ffccf.js +0 -1
  969. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-1a2fcb867d9ffccf.js +0 -1
  970. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1a2fcb867d9ffccf.js +0 -1
  971. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1a2fcb867d9ffccf.js +0 -1
  972. package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-1a2fcb867d9ffccf.js +0 -1
  973. package/app/.next/static/chunks/app/api/cli-tools/cursor-byok/jobs/[jobId]/events/route-1a2fcb867d9ffccf.js +0 -1
  974. package/app/.next/static/chunks/app/api/cli-tools/cursor-byok/jobs/[jobId]/sudo/route-1a2fcb867d9ffccf.js +0 -1
  975. package/app/.next/static/chunks/app/api/cli-tools/cursor-byok/jobs/route-1a2fcb867d9ffccf.js +0 -1
  976. package/app/.next/static/chunks/app/api/cli-tools/cursor-byok/route-1a2fcb867d9ffccf.js +0 -1
  977. package/app/.next/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-1a2fcb867d9ffccf.js +0 -1
  978. package/app/.next/static/chunks/app/api/cli-tools/devin-settings/route-1a2fcb867d9ffccf.js +0 -1
  979. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-1a2fcb867d9ffccf.js +0 -1
  980. package/app/.next/static/chunks/app/api/cli-tools/grok-build-settings/route-1a2fcb867d9ffccf.js +0 -1
  981. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-1a2fcb867d9ffccf.js +0 -1
  982. package/app/.next/static/chunks/app/api/cli-tools/jcode-settings/route-1a2fcb867d9ffccf.js +0 -1
  983. package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-1a2fcb867d9ffccf.js +0 -1
  984. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-1a2fcb867d9ffccf.js +0 -1
  985. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-1a2fcb867d9ffccf.js +0 -1
  986. package/app/.next/static/chunks/app/api/combos/[id]/route-1a2fcb867d9ffccf.js +0 -1
  987. package/app/.next/static/chunks/app/api/combos/route-1a2fcb867d9ffccf.js +0 -1
  988. package/app/.next/static/chunks/app/api/donate/route-1a2fcb867d9ffccf.js +0 -1
  989. package/app/.next/static/chunks/app/api/headroom/extras/route-1a2fcb867d9ffccf.js +0 -1
  990. package/app/.next/static/chunks/app/api/headroom/proxy/[...path]/route-1a2fcb867d9ffccf.js +0 -1
  991. package/app/.next/static/chunks/app/api/headroom/restart/route-1a2fcb867d9ffccf.js +0 -1
  992. package/app/.next/static/chunks/app/api/headroom/start/route-1a2fcb867d9ffccf.js +0 -1
  993. package/app/.next/static/chunks/app/api/headroom/status/route-1a2fcb867d9ffccf.js +0 -1
  994. package/app/.next/static/chunks/app/api/headroom/stop/route-1a2fcb867d9ffccf.js +0 -1
  995. package/app/.next/static/chunks/app/api/health/route-1a2fcb867d9ffccf.js +0 -1
  996. package/app/.next/static/chunks/app/api/init/route-1a2fcb867d9ffccf.js +0 -1
  997. package/app/.next/static/chunks/app/api/internal/account-health/route-1a2fcb867d9ffccf.js +0 -1
  998. package/app/.next/static/chunks/app/api/internal/request-detail/route-1a2fcb867d9ffccf.js +0 -1
  999. package/app/.next/static/chunks/app/api/internal/usage/route-1a2fcb867d9ffccf.js +0 -1
  1000. package/app/.next/static/chunks/app/api/keys/[id]/reset-usage/route-1a2fcb867d9ffccf.js +0 -1
  1001. package/app/.next/static/chunks/app/api/keys/[id]/route-1a2fcb867d9ffccf.js +0 -1
  1002. package/app/.next/static/chunks/app/api/keys/[id]/usage/route-1a2fcb867d9ffccf.js +0 -1
  1003. package/app/.next/static/chunks/app/api/keys/route-1a2fcb867d9ffccf.js +0 -1
  1004. package/app/.next/static/chunks/app/api/locale/route-1a2fcb867d9ffccf.js +0 -1
  1005. package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-1a2fcb867d9ffccf.js +0 -1
  1006. package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-1a2fcb867d9ffccf.js +0 -1
  1007. package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1a2fcb867d9ffccf.js +0 -1
  1008. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1a2fcb867d9ffccf.js +0 -1
  1009. package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-1a2fcb867d9ffccf.js +0 -1
  1010. package/app/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-1a2fcb867d9ffccf.js +0 -1
  1011. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-1a2fcb867d9ffccf.js +0 -1
  1012. package/app/.next/static/chunks/app/api/models/alias/route-1a2fcb867d9ffccf.js +0 -1
  1013. package/app/.next/static/chunks/app/api/models/availability/route-1a2fcb867d9ffccf.js +0 -1
  1014. package/app/.next/static/chunks/app/api/models/custom/route-1a2fcb867d9ffccf.js +0 -1
  1015. package/app/.next/static/chunks/app/api/models/disabled/route-1a2fcb867d9ffccf.js +0 -1
  1016. package/app/.next/static/chunks/app/api/models/route-1a2fcb867d9ffccf.js +0 -1
  1017. package/app/.next/static/chunks/app/api/models/test/route-1a2fcb867d9ffccf.js +0 -1
  1018. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-1a2fcb867d9ffccf.js +0 -1
  1019. package/app/.next/static/chunks/app/api/oauth/codex/bulk-import/route-1a2fcb867d9ffccf.js +0 -1
  1020. package/app/.next/static/chunks/app/api/oauth/codex/import-token/route-1a2fcb867d9ffccf.js +0 -1
  1021. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-1a2fcb867d9ffccf.js +0 -1
  1022. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-1a2fcb867d9ffccf.js +0 -1
  1023. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-1a2fcb867d9ffccf.js +0 -1
  1024. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-1a2fcb867d9ffccf.js +0 -1
  1025. package/app/.next/static/chunks/app/api/oauth/kiro/api-key/route-1a2fcb867d9ffccf.js +0 -1
  1026. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-1a2fcb867d9ffccf.js +0 -1
  1027. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-1a2fcb867d9ffccf.js +0 -1
  1028. package/app/.next/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-1a2fcb867d9ffccf.js +0 -1
  1029. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-1a2fcb867d9ffccf.js +0 -1
  1030. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-1a2fcb867d9ffccf.js +0 -1
  1031. package/app/.next/static/chunks/app/api/pricing/route-1a2fcb867d9ffccf.js +0 -1
  1032. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-1a2fcb867d9ffccf.js +0 -1
  1033. package/app/.next/static/chunks/app/api/provider-nodes/route-1a2fcb867d9ffccf.js +0 -1
  1034. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-1a2fcb867d9ffccf.js +0 -1
  1035. package/app/.next/static/chunks/app/api/providers/[id]/models/route-1a2fcb867d9ffccf.js +0 -1
  1036. package/app/.next/static/chunks/app/api/providers/[id]/route-1a2fcb867d9ffccf.js +0 -1
  1037. package/app/.next/static/chunks/app/api/providers/[id]/test/route-1a2fcb867d9ffccf.js +0 -1
  1038. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-1a2fcb867d9ffccf.js +0 -1
  1039. package/app/.next/static/chunks/app/api/providers/client/route-1a2fcb867d9ffccf.js +0 -1
  1040. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-1a2fcb867d9ffccf.js +0 -1
  1041. package/app/.next/static/chunks/app/api/providers/route-1a2fcb867d9ffccf.js +0 -1
  1042. package/app/.next/static/chunks/app/api/providers/suggested-models/route-1a2fcb867d9ffccf.js +0 -1
  1043. package/app/.next/static/chunks/app/api/providers/test-batch/route-1a2fcb867d9ffccf.js +0 -1
  1044. package/app/.next/static/chunks/app/api/providers/validate/route-1a2fcb867d9ffccf.js +0 -1
  1045. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-1a2fcb867d9ffccf.js +0 -1
  1046. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-1a2fcb867d9ffccf.js +0 -1
  1047. package/app/.next/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-1a2fcb867d9ffccf.js +0 -1
  1048. package/app/.next/static/chunks/app/api/proxy-pools/deno-deploy/route-1a2fcb867d9ffccf.js +0 -1
  1049. package/app/.next/static/chunks/app/api/proxy-pools/route-1a2fcb867d9ffccf.js +0 -1
  1050. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-1a2fcb867d9ffccf.js +0 -1
  1051. package/app/.next/static/chunks/app/api/pxpipe/health/route-1a2fcb867d9ffccf.js +0 -1
  1052. package/app/.next/static/chunks/app/api/pxpipe/install/route-1a2fcb867d9ffccf.js +0 -1
  1053. package/app/.next/static/chunks/app/api/pxpipe/logs/route-1a2fcb867d9ffccf.js +0 -1
  1054. package/app/.next/static/chunks/app/api/pxpipe/restart/route-1a2fcb867d9ffccf.js +0 -1
  1055. package/app/.next/static/chunks/app/api/pxpipe/start/route-1a2fcb867d9ffccf.js +0 -1
  1056. package/app/.next/static/chunks/app/api/pxpipe/stats/route-1a2fcb867d9ffccf.js +0 -1
  1057. package/app/.next/static/chunks/app/api/pxpipe/status/route-1a2fcb867d9ffccf.js +0 -1
  1058. package/app/.next/static/chunks/app/api/pxpipe/stop/route-1a2fcb867d9ffccf.js +0 -1
  1059. package/app/.next/static/chunks/app/api/settings/database/route-1a2fcb867d9ffccf.js +0 -1
  1060. package/app/.next/static/chunks/app/api/settings/database/selective/route-1a2fcb867d9ffccf.js +0 -1
  1061. package/app/.next/static/chunks/app/api/settings/proxy-test/route-1a2fcb867d9ffccf.js +0 -1
  1062. package/app/.next/static/chunks/app/api/settings/require-login/route-1a2fcb867d9ffccf.js +0 -1
  1063. package/app/.next/static/chunks/app/api/settings/route-1a2fcb867d9ffccf.js +0 -1
  1064. package/app/.next/static/chunks/app/api/shutdown/route-1a2fcb867d9ffccf.js +0 -1
  1065. package/app/.next/static/chunks/app/api/tags/route-1a2fcb867d9ffccf.js +0 -1
  1066. package/app/.next/static/chunks/app/api/translator/console-logs/route-1a2fcb867d9ffccf.js +0 -1
  1067. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-1a2fcb867d9ffccf.js +0 -1
  1068. package/app/.next/static/chunks/app/api/translator/load/route-1a2fcb867d9ffccf.js +0 -1
  1069. package/app/.next/static/chunks/app/api/translator/save/route-1a2fcb867d9ffccf.js +0 -1
  1070. package/app/.next/static/chunks/app/api/translator/send/route-1a2fcb867d9ffccf.js +0 -1
  1071. package/app/.next/static/chunks/app/api/translator/translate/route-1a2fcb867d9ffccf.js +0 -1
  1072. package/app/.next/static/chunks/app/api/tunnel/disable/route-1a2fcb867d9ffccf.js +0 -1
  1073. package/app/.next/static/chunks/app/api/tunnel/enable/route-1a2fcb867d9ffccf.js +0 -1
  1074. package/app/.next/static/chunks/app/api/tunnel/status/route-1a2fcb867d9ffccf.js +0 -1
  1075. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-1a2fcb867d9ffccf.js +0 -1
  1076. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-1a2fcb867d9ffccf.js +0 -1
  1077. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-1a2fcb867d9ffccf.js +0 -1
  1078. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-1a2fcb867d9ffccf.js +0 -1
  1079. package/app/.next/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-1a2fcb867d9ffccf.js +0 -1
  1080. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-1a2fcb867d9ffccf.js +0 -1
  1081. package/app/.next/static/chunks/app/api/usage/chart/route-1a2fcb867d9ffccf.js +0 -1
  1082. package/app/.next/static/chunks/app/api/usage/history/route-1a2fcb867d9ffccf.js +0 -1
  1083. package/app/.next/static/chunks/app/api/usage/logs/route-1a2fcb867d9ffccf.js +0 -1
  1084. package/app/.next/static/chunks/app/api/usage/providers/route-1a2fcb867d9ffccf.js +0 -1
  1085. package/app/.next/static/chunks/app/api/usage/report/route-1a2fcb867d9ffccf.js +0 -1
  1086. package/app/.next/static/chunks/app/api/usage/request-details/route-1a2fcb867d9ffccf.js +0 -1
  1087. package/app/.next/static/chunks/app/api/usage/request-logs/route-1a2fcb867d9ffccf.js +0 -1
  1088. package/app/.next/static/chunks/app/api/usage/stats/route-1a2fcb867d9ffccf.js +0 -1
  1089. package/app/.next/static/chunks/app/api/usage/stream/route-1a2fcb867d9ffccf.js +0 -1
  1090. package/app/.next/static/chunks/app/api/v1/api/chat/route-1a2fcb867d9ffccf.js +0 -1
  1091. package/app/.next/static/chunks/app/api/v1/audio/speech/route-1a2fcb867d9ffccf.js +0 -1
  1092. package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-1a2fcb867d9ffccf.js +0 -1
  1093. package/app/.next/static/chunks/app/api/v1/audio/voices/route-1a2fcb867d9ffccf.js +0 -1
  1094. package/app/.next/static/chunks/app/api/v1/chat/completions/route-1a2fcb867d9ffccf.js +0 -1
  1095. package/app/.next/static/chunks/app/api/v1/embeddings/route-1a2fcb867d9ffccf.js +0 -1
  1096. package/app/.next/static/chunks/app/api/v1/images/generations/route-1a2fcb867d9ffccf.js +0 -1
  1097. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-1a2fcb867d9ffccf.js +0 -1
  1098. package/app/.next/static/chunks/app/api/v1/messages/route-1a2fcb867d9ffccf.js +0 -1
  1099. package/app/.next/static/chunks/app/api/v1/models/[kind]/route-1a2fcb867d9ffccf.js +0 -1
  1100. package/app/.next/static/chunks/app/api/v1/models/info/route-1a2fcb867d9ffccf.js +0 -1
  1101. package/app/.next/static/chunks/app/api/v1/models/route-1a2fcb867d9ffccf.js +0 -1
  1102. package/app/.next/static/chunks/app/api/v1/responses/compact/route-1a2fcb867d9ffccf.js +0 -1
  1103. package/app/.next/static/chunks/app/api/v1/responses/route-1a2fcb867d9ffccf.js +0 -1
  1104. package/app/.next/static/chunks/app/api/v1/route-1a2fcb867d9ffccf.js +0 -1
  1105. package/app/.next/static/chunks/app/api/v1/search/route-1a2fcb867d9ffccf.js +0 -1
  1106. package/app/.next/static/chunks/app/api/v1/videos/[id]/route-1a2fcb867d9ffccf.js +0 -1
  1107. package/app/.next/static/chunks/app/api/v1/videos/edits/route-1a2fcb867d9ffccf.js +0 -1
  1108. package/app/.next/static/chunks/app/api/v1/videos/extensions/route-1a2fcb867d9ffccf.js +0 -1
  1109. package/app/.next/static/chunks/app/api/v1/videos/generations/route-1a2fcb867d9ffccf.js +0 -1
  1110. package/app/.next/static/chunks/app/api/v1/web/fetch/route-1a2fcb867d9ffccf.js +0 -1
  1111. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-1a2fcb867d9ffccf.js +0 -1
  1112. package/app/.next/static/chunks/app/api/v1beta/models/route-1a2fcb867d9ffccf.js +0 -1
  1113. package/app/.next/static/chunks/app/api/version/route-1a2fcb867d9ffccf.js +0 -1
  1114. package/app/.next/static/chunks/app/api/version/shutdown/route-1a2fcb867d9ffccf.js +0 -1
  1115. package/app/.next/static/chunks/app/api/version/update/route-1a2fcb867d9ffccf.js +0 -1
  1116. package/app/.next/static/chunks/app/landing/page-a438c82535cc676a.js +0 -1
  1117. package/app/.next/static/chunks/app/manifest.webmanifest/route-1a2fcb867d9ffccf.js +0 -1
  1118. package/app/.next/static/chunks/app/page-1a2fcb867d9ffccf.js +0 -1
  1119. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-1a2fcb867d9ffccf.js +0 -1
  1120. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-1a2fcb867d9ffccf.js +0 -1
  1121. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-1a2fcb867d9ffccf.js +0 -1
  1122. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-1a2fcb867d9ffccf.js +0 -1
  1123. package/app/.next/static/css/c5181f678ef0b6e0.css +0 -1
  1124. package/app/.next/static/flxITMsAmoXf-wWjPORMD/_buildManifest.js +0 -1
  1125. package/app/node_modules/bindings/bindings.js +0 -221
  1126. package/app/node_modules/bindings/package.json +0 -28
  1127. package/app/node_modules/file-uri-to-path/index.js +0 -66
  1128. package/app/node_modules/file-uri-to-path/package.json +0 -32
  1129. /package/app/.next/static/{flxITMsAmoXf-wWjPORMD → Kxev_rxnwFUOd40N9Z0wC}/_ssgManifest.js +0 -0
@@ -0,0 +1,27 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{68241:(e,t,s)=>{Promise.resolve().then(s.bind(s,80873))},70217:(e,t,s)=>{"use strict";function i(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>i})},80873:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>G});var i=s(95155),a=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(8247),c=s(35497),p=s(88105),m=s(28777),u=s(67899),x=s(62630);s(67468);let h=["none","low","medium","high"],f=["none","thinking"],g=["none","low","medium","high","max"],y={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":g,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":h,zai:f,qwen:h,kimi:g,deepseek:["none","high","max"],minimax:f,hunyuan:h,step:h},b=["none","minimal","low","medium","high","xhigh","max"],v=[{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...b,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...b,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:b},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{provider:"codebuddy-cn",pattern:"glm-5.3*",levels:["low","high","max"]},{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 j(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 s=t.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!s)return null;let[,i,a]=s,l=Number(i),r=void 0===a?null:Number(a);return l<4||4===l&&(null===r||r<=5||null!==r&&r>=1e3)?null:"output_config"}(t))return null;let s=(0,u.nl)(e,t);if(!s.reasoning)return null;let i=v.find(s=>(!s.provider||s.provider===e)&&(0,x.gH)(s.pattern,t)),a=i?.levels||y[s.thinkingFormat]||h;return!1===s.thinkingCanDisable&&(a=a.filter(e=>"none"!==e)),a}var k=s(11059),w=s(929),N=s(73006);let C=new Map;async function S(e){if(!e?.url||!e?.type)return[];let t=C.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let i=(await s.json()).data??[];return C.set(e.url,{data:i,expiresAt:Date.now()+6e5}),i}catch{return[]}}function A({customModels:e=[],modelAliases:t={},providerAlias:s,builtInModels:i=[],type:a="llm",includeLegacyAliases:l=!0}){let r=new Set(i.map(e=>e.id)),n=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==s)continue;let e=t?.kind||t?.type||"llm";if(a&&e!==a||r.has(t.id))continue;let i=`${s}/${t.id}`;n.has(i)||(n.add(i),o.push({id:t.id,name:t.name||t.id,fullModel:i,source:"custom",type:e}))}if(!l)return o;let d=`${s}/`;for(let[e,s]of Object.entries(t||{})){if("string"!=typeof s||!s.startsWith(d))continue;let t=s.slice(d.length);!t||r.has(t)||n.has(s)||(n.add(s),o.push({id:t,alias:e,fullModel:s,source:"legacyAlias",type:a||"llm"}))}return o}var T=s(14051),$=s.n(T);function O({model:e,fullModel:t,alias:s,copied:a,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:p,isTesting:m,onDisable:u,caps:x,thinkingSuffix:h}){let f=h?`${t}(${h})`:t,g="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,i.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":"border-border"} hover:bg-sidebar/50`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:g?{color:g}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,i.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,i.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,i.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,i.jsx)(c.nh,{caps:x,colorOverride:"text-text-muted/70",size:12})]})]}),p&&(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:p,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:m?"Testing...":"Test"})]}),(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:()=>l(f,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})}),(0,i.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:a===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function P({modelId:e,fullModel:t,copied:s,onCopy:a,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,i.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,i.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,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,i.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,i.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:()=>a(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,i.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,i.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function I({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,customModels:l,copied:r,onCopy:n,onDeleteAlias:o,onAddCustomModel:d,onDeleteCustomModel:p,connections:m,isAnthropic:u}){let[x,h]=(0,a.useState)(""),[f,g]=(0,a.useState)(!1),[y,b]=(0,a.useState)(!1),[v,j]=(0,a.useState)(null),[k,w]=(0,a.useState)({}),N=async t=>{if(!v){j(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),i=await s.json();w(e=>({...e,[t]:i.ok?"ok":"error"}))}catch{w(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=A({customModels:l,modelAliases:s,providerAlias:e,type:"llm"}),S=async()=>{if(!x.trim()||f)return;let e=x.trim();if(C.some(t=>t.id===e))return void alert("Model already exists for this provider.");g(!0);try{await d(e),h("")}catch(e){console.log("Error adding model:",e)}finally{g(!1)}},T=async()=>{if(y)return;let e=m.find(e=>!1!==e.isActive);if(e){b(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||"Failed to import models");let i=s.models||[];if(0===i.length)return void alert("No models returned from /models.");let a=0;for(let e of i){let t=e.id||e.name||e.model;t&&(C.some(e=>e.id===t)||(await d(t),a+=1))}0===a&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{b(!1)}}},$=m.some(e=>!1!==e.isActive);return(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",u?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,i.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,i.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,i.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,i.jsx)("input",{id:"new-compatible-model-input",type:"text",value:x,onChange:e=>h(e.target.value),onKeyDown:e=>"Enter"===e.key&&S(),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,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:S,disabled:!x.trim()||f,children:f?"Adding...":"Add"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:T,disabled:!$||y,children:y?"Importing...":"Import from /models"})]}),!$&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,i.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({id:s,alias:a,source:l})=>(0,i.jsx)(P,{modelId:s,fullModel:`${t}/${s}`,copied:r,onCopy:n,onDeleteAlias:()=>"custom"===l?p(s):o(a),onTest:m.length>0?()=>N(s):void 0,testStatus:k[s],isTesting:v===s},`${l}-${e}/${s}`))})]})}O.propTypes={model:$().shape({id:$().string.isRequired}).isRequired,fullModel:$().string.isRequired,alias:$().string,copied:$().string,onCopy:$().func.isRequired,testStatus:$().oneOf(["ok","error"]),isCustom:$().bool,isFree:$().bool,onDeleteAlias:$().func,onTest:$().func,isTesting:$().bool,onDisable:$().func,caps:$().object,thinkingSuffix:$().string},$().string.isRequired,$().string.isRequired,$().string,$().func.isRequired,$().func.isRequired,$().func,$().oneOf(["ok","error"]),$().bool,$().string.isRequired,$().object.isRequired,$().arrayOf($().object),$().string,$().func.isRequired,$().func.isRequired,$().func.isRequired,$().func.isRequired,I.propTypes={providerStorageAlias:$().string.isRequired,providerDisplayAlias:$().string.isRequired,modelAliases:$().object.isRequired,customModels:$().arrayOf($().object),copied:$().string,onCopy:$().func.isRequired,onDeleteAlias:$().func.isRequired,onAddCustomModel:$().func.isRequired,onDeleteCustomModel:$().func.isRequired,connections:$().arrayOf($().shape({id:$().string,isActive:$().bool})).isRequired,isAnthropic:$().bool};var E=s(70217);function D({until:e}){let[t,s]=(0,a.useState)("");return((0,a.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let i=Math.floor(t/1e3);if(i<60)s(`${i}s`);else if(i<3600)s(`${Math.floor(i/60)}m ${i%60}s`);else{let e=Math.floor(i/3600),t=Math.floor(i%3600/60);s(`${e}h ${t}m`)}};t();let i=setInterval(t,1e3);return()=>clearInterval(i)},[e]),t)?(0,i.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function R({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:d,onUpdateProxy:p,onEdit:m,onDelete:u,oneByOneStatus:x=null,autoPing:h=null}){let[f,g]=(0,a.useState)(!1),[y,b]=(0,a.useState)(!1),v=(0,a.useRef)(null),j=new Map((t||[]).map(e=>[e.id,e])),k=e.providerSpecificData?.proxyPoolId||null,w=k?j.get(k):null,N=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!k||N,S=w?`Pool: ${w.name}`:k?`Pool: ${k} (inactive/missing)`:N?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A=h?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. 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.",T="";if(w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);T=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{T=t}}let $=w?.noProxy||e.providerSpecificData?.connectionNoProxy||"",O="default";w?.isActive===!0?O="success":(k||N)&&(O="error"),(0,a.useEffect)(()=>{if(!f)return;let e=e=>{v.current&&!v.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let P=async e=>{b(!0);try{await p("__none__"===e?null:e)}finally{b(!1),g(!1)}},I=e.authType||(s?"oauth":"apikey"),_="oauth"===I,U="cookie"===I,q=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),z=_?q(e.email)?e.email:q(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",K=e.email||e.providerSpecificData?.email||e.providerSpecificData?.githubEmail||null,J=function(e){let t=e.providerSpecificData?.accountId||e.providerSpecificData?.ownerAccountId||e.providerSpecificData?.ssoInstanceAccountId||null;if(t)return{label:`Acct ${t}`,tooltip:`Account ID: ${t}`};if(!e.id)return null;let s=e.id.replace(/-/g,"").slice(0,8).toUpperCase();return{label:`ID#${s}`,tooltip:`Connection ID: ${e.id}`}}(e),[M,F]=(0,a.useState)(!1),L=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,a.useEffect)(()=>{let t=()=>{F(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=L?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[L,e]);let W="unavailable"!==e.testStatus||M?e.testStatus:"active",B=()=>x?"queued"===x.state?"queued":"testing"===x.state?"testing":"success"===x.state?"success":"failed"===x.state?x.error?`failed: ${x.error}`:"failed":null:null;return(0,i.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,i.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,i.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,i.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:U?"cookie":_?"lock":"key"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:z}),J&&(0,i.jsx)("span",{className:"shrink-0 rounded-full border border-black/10 bg-black/[0.03] px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] text-text-muted dark:border-white/10 dark:bg-white/[0.04]",title:J.tooltip,children:J.label})]}),K&&K!==z&&(0,i.jsx)("p",{className:"mt-0.5 truncate text-[11px] text-text-muted",title:K,children:K}),(0,i.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,i.jsx)(c.Ex,{variant:(0,E.g)(e.isActive,W),size:"sm",dot:!0,children:!1===e.isActive?"disabled":W||"Unknown"}),(0,i.jsx)(c.Ex,{variant:"default",size:"sm",children:_?"OAuth":U?"Cookie":"API Key"}),C&&(0,i.jsx)(c.Ex,{variant:O,size:"sm",children:"Proxy"}),M&&!1!==e.isActive&&(0,i.jsx)(D,{until:L}),e.lastError&&!1!==e.isActive&&(0,i.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),B()&&(0,i.jsx)(c.Ex,{variant:x?"success"===x.state?"success":"failed"===x.state?"error":"testing"===x.state?"primary":"default":"default",size:"sm",children:B()})]}),C&&(0,i.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,i.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:S,children:S}),T&&(0,i.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:T}),$&&(0,i.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:$,children:["no_proxy: ",$]})]})]})]}),(0,i.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,i.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,i.jsxs)("div",{className:"relative",ref:v,children:[(0,i.jsxs)("button",{onClick:()=>g(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 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,i.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,i.jsx)("button",{onClick:()=>P("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!k?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,i.jsx)("button",{onClick:()=>P(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${k===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,i.jsx)(c.m_,{text:A,children:(0,i.jsxs)("button",{onClick:()=>h.onToggle(!h.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 ${h.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,i.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,i.jsxs)("button",{onClick:u,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,i.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}D.propTypes={until:$().string.isRequired},R.propTypes={connection:$().shape({id:$().string,name:$().string,email:$().string,displayName:$().string,modelLockUntil:$().string,testStatus:$().string,isActive:$().bool,lastError:$().string,priority:$().number,globalPriority:$().number,providerSpecificData:$().object}).isRequired,proxyPools:$().arrayOf($().shape({id:$().string,name:$().string,proxyUrl:$().string,noProxy:$().string,isActive:$().bool})),isOAuth:$().bool.isRequired,isFirst:$().bool.isRequired,isLast:$().bool.isRequired,onMoveUp:$().func.isRequired,onMoveDown:$().func.isRequired,onToggleActive:$().func.isRequired,onUpdateProxy:$().func,onEdit:$().func.isRequired,onDelete:$().func.isRequired,oneByOneStatus:$().shape({state:$().string,error:$().string}),autoPing:$().shape({on:$().bool,onToggle:$().func,provider:$().string})};let _=`name1|sk-key1
2
+ name2|sk-key2
3
+ sk-key-only-auto-named`;function U({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:d,proxyPools:m,error:u,existingNames:x,onSave:h,onBulkDone:f,onClose:g}){let y="__none__",b="ollama-local"===t,v="cookie"===n,j="xai"===t&&!v,k=v?"Cookie Value":"qoder"===t?"Personal Access Token (PAT)":"API Key",w="azure"===t,N="cloudflare-ai"===t,C=p.Q2?.[t]?.regions||null,S=p.Q2?.[t]?.defaultRegion||C?.[0]?.id||"",[A,T]=(0,a.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:y,ollamaHostUrl:""}),[$,O]=(0,a.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[P,I]=(0,a.useState)({accountId:""}),[E,D]=(0,a.useState)(S),[R,q]=(0,a.useState)(!1),[z,K]=(0,a.useState)(null),[J,M]=(0,a.useState)(!1),F=N?`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`:_,[L,W]=(0,a.useState)("single"),[B,G]=(0,a.useState)(""),[H,Q]=(0,a.useState)(null),V=()=>b&&A.ollamaHostUrl.trim()?{baseUrl:A.ollamaHostUrl.trim()}:w?{azureEndpoint:$.azureEndpoint,apiVersion:$.apiVersion,deployment:$.deployment,organization:$.organization}:N?{accountId:P.accountId}:C&&E?{region:E}:void 0,Z=async()=>{q(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:V()})}),s=await e.json();K(s.valid?"success":"failed")}catch{K("failed")}finally{q(!1)}},X=async()=>{if(t&&(b||A.apiKey)&&(b||A.name)&&(!l||A.defaultModel.trim())){M(!0);try{let e=!1;try{q(!0),K(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:V()})});e=!!(await s.json()).valid,K(e?"success":"failed")}catch{K("failed")}finally{q(!1)}await h({name:A.name||(b?"Ollama Local":""),apiKey:A.apiKey,defaultModel:l?A.defaultModel.trim():void 0,priority:A.priority,proxyPoolId:A.proxyPoolId===y?null:A.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:V()})}finally{M(!1)}}},Y=async()=>{let e=B.split("\n");if(!e.length)return;let s=function(e,t,s={}){let{isCloudflareAi:i=!1}=s,a=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),l=[];for(let t of e){let e,s="string"==typeof t?t.trim():"";if(!s)continue;let r=function(e,t={}){let{isCloudflareAi:s=!1}=t,i=e.split("|");if(s&&i.length>=3){let e=i[0].trim();return{baseName:e||"Key",apiKey:i.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:i[i.length-1].trim()}}}return i.length>=2?{baseName:i[0].trim()||"Key",apiKey:i.slice(1).join("|").trim()}:{baseName:"Key",apiKey:i[0].trim()}}(s,{isCloudflareAi:i});if(!r||!r.apiKey)continue;let n=r.baseName,o=1;for(;e=`${n} ${o}`,a.has(e.toLowerCase());)o+=1;a.add(e.toLowerCase());let d={name:e,apiKey:r.apiKey,skipped:!1};r.providerSpecificData&&(d.providerSpecificData=r.providerSpecificData),l.push(d)}return l}(e,x,{isCloudflareAi:N});if(!s.length)return;M(!0),Q(null);let i=0,a=0;for(let e of s)try{let s=!1;try{let i=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey})});s=!!(await i.json().catch(()=>({}))).valid}catch{s=!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:s?"active":"unknown",...e.providerSpecificData?{providerSpecificData:e.providerSpecificData}:{}})})).ok?i++:a++}catch{a++}M(!1),Q({success:i,failed:a}),i>0&&f&&f()};return t?(0,i.jsx)(c.aF,{isOpen:e,title:`Add ${s||t} ${k}`,onClose:g,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{size:"sm",variant:"single"===L?"primary":"ghost",onClick:()=>{W("single"),Q(null)},children:"Single"}),(0,i.jsx)(c.$n,{size:"sm",variant:"bulk"===L?"primary":"ghost",onClick:()=>{W("bulk"),Q(null)},children:"Bulk Add"})]}),"bulk"===L&&(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:N?(0,i.jsxs)(i.Fragment,{children:["One key per line. Format: ",(0,i.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,i.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===t?(0,i.jsxs)(i.Fragment,{children:["One PAT per line. Format: ",(0,i.jsx)("code",{children:"name|pt-..."})," or just ",(0,i.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,i.jsxs)(i.Fragment,{children:["One key per line. Format: ",(0,i.jsx)("code",{children:"name|apiKey"})," or just ",(0,i.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,i.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:F,value:B,onChange:e=>G(e.target.value)}),H&&(0,i.jsxs)("div",{className:`text-sm font-medium ${H.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",H.success," added",H.failed>0?`, ✗ ${H.failed} failed`:""]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:Y,fullWidth:!0,disabled:J||!B.trim(),children:J?"Adding...":"Add All Keys"}),(0,i.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===L&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.pd,{label:"Name",value:A.name,onChange:e=>T({...A,name:e.target.value}),placeholder:b?"Ollama Local":"Production Key"}),b&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:"Ollama Host URL",value:A.ollamaHostUrl,onChange:e=>T({...A,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:Z,disabled:R||J,variant:"secondary",children:R?"Checking...":"Check"})})]}),!b&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:k,type:v?"text":"password",value:A.apiKey,onChange:e=>T({...A,apiKey:e.target.value}),placeholder:v?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":j?"xai-...":"qoder"===t?"pt-...":"",className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:Z,disabled:!A.apiKey||R||J,variant:"secondary",children:R?"Checking...":"Check"})})]}),j&&(0,i.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."}),v&&o&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:[o,d&&(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",d.replace(/^https?:\/\//,"")]})]})]}),C&&(0,i.jsx)(c.l6,{label:"Region",value:E,onChange:e=>D(e.target.value),options:C.map(e=>({value:e.id,label:e.label}))}),l&&(0,i.jsx)(c.pd,{label:"Default Model",value:A.defaultModel,onChange:e=>T({...A,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),b&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,i.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,i.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),z&&(0,i.jsx)(c.Ex,{variant:"success"===z?"success":"error",children:"success"===z?"Valid":"Invalid"}),u&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:u}),l&&(0,i.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."}),N&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,i.jsx)(c.pd,{label:"Account ID",value:P.accountId,onChange:e=>I({...P,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,i.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),w&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)(c.pd,{label:"Azure Endpoint",value:$.azureEndpoint,onChange:e=>O({...$,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,i.jsx)(c.pd,{label:"Deployment Name",value:$.deployment,onChange:e=>O({...$,deployment:e.target.value}),placeholder:"gpt-4"}),(0,i.jsx)(c.pd,{label:"API Version",value:$.apiVersion,onChange:e=>O({...$,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,i.jsx)(c.pd,{label:"Organization",value:$.organization,onChange:e=>O({...$,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,i.jsx)(c.pd,{label:"Priority",type:"number",value:A.priority,onChange:e=>T({...A,priority:Number.parseInt(e.target.value)||1})}),(0,i.jsx)(c.l6,{label:"Proxy Pool",value:A.proxyPoolId,onChange:e=>T({...A,proxyPoolId:e.target.value}),options:[{value:y,label:"None"},...(m||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(m||[]).length&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:X,fullWidth:!0,disabled:J||!b&&(!A.name||!A.apiKey)||l&&!A.defaultModel.trim()||w&&(!$.azureEndpoint||!$.deployment||!$.organization)||N&&!P.accountId,children:J?"Saving...":"Save"}),(0,i.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function q({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[d,p]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),[f,g]=(0,a.useState)(!1),[y,b]=(0,a.useState)(null);(0,a.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{p(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:m,type:r?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,i.jsx)(c.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.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,i.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,i.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,i.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,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>u(e.target.value),className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:j,disabled:!m||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,i.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,i.jsx)(c.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,i.jsx)(c.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}U.propTypes={isOpen:$().bool.isRequired,provider:$().string,providerName:$().string,isCompatible:$().bool,isAnthropic:$().bool,authType:$().string,authHint:$().string,website:$().string,proxyPools:$().arrayOf($().shape({id:$().string,name:$().string})),error:$().string,existingNames:$().arrayOf($().string),onSave:$().func.isRequired,onBulkDone:$().func,onClose:$().func.isRequired},q.propTypes={isOpen:$().bool.isRequired,node:$().shape({id:$().string,name:$().string,prefix:$().string,apiType:$().string,baseUrl:$().string}),onSave:$().func.isRequired,onClose:$().func.isRequired,isAnthropic:$().bool};let z=()=>Object.fromEntries(Object.keys(m.bs).map(e=>[e,!1]));function K({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,a.useState)(""),[d,p]=(0,a.useState)(z),[u,x]=(0,a.useState)(null),[h,f]=(0,a.useState)(""),[g,y]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&(o(""),p(z()),x(null),f(""))},[e]);let b=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},v=async()=>{let e=b(n.trim());if(e){x("testing"),f("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),i=await s.json();x(i.ok?"ok":"error"),f(i.error||"")}catch(e){x("error"),f(e.message)}}},j=async()=>{let e=b(n.trim());if(e&&!g){y(!0);try{await l(e,d)}finally{y(!1)}}};return(0,i.jsx)(c.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),x(null),f("")},onKeyDown:e=>{"Enter"===e.key&&v()},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,i.jsx)(c.$n,{variant:"secondary",icon:"science",loading:"testing"===u,onClick:v,disabled:!n.trim()||"testing"===u,children:"testing"===u?"Testing...":"Test"})]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,i.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:b(n.trim())||"model-id"})]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Capabilities"}),(0,i.jsx)("div",{className:"flex flex-wrap gap-4",children:Object.entries(m.bs).map(([e,t])=>(0,i.jsx)(c.lM,{checked:!!d[e],onChange:t=>p(s=>({...s,[e]:t})),label:t.label,description:t.desc,size:"sm"},e))})]}),"ok"===u&&(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===u&&(0,i.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,i.jsx)("span",{children:h||"Model not reachable"})]}),(0,i.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,i.jsx)(c.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,i.jsx)(c.$n,{onClick:j,fullWidth:!0,size:"sm",disabled:!n.trim()||g,children:g?"Adding...":"Add Model"})]})]})})}K.propTypes={isOpen:$().bool.isRequired,providerAlias:$().string.isRequired,providerDisplayAlias:$().string.isRequired,onSave:$().func.isRequired,onClose:$().func.isRequired};let J=`[
8
+ {
9
+ "accessToken": "eyJhbGc...",
10
+ "refreshToken": "rt_...",
11
+ "idToken": "eyJhbGc...",
12
+ "email": "user@example.com"
13
+ }
14
+ ]`;function M({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,a.useState)(""),[n,o]=(0,a.useState)(!1),[d,p]=(0,a.useState)(""),[m,u]=(0,a.useState)(null),x=()=>{n||(r(""),p(""),u(null),t())},h=async()=>{var e;let t;p(""),u(null);let i=l.trim();if(!i)return;try{t=JSON.parse(i)}catch(e){p(`${(0,N.Tl)("Invalid JSON")}: ${e.message}`);return}let a=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!a||0===a.length)return void p((0,N.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:a})}),t=await e.json();if(!e.ok)return void p(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof s&&s()}catch(e){p(e.message||(0,N.Tl)("Request failed"))}finally{o(!1)}},f=m?.results?.filter(e=>!e.ok)||[];return(0,i.jsx)(c.aF,{isOpen:e,title:(0,N.Tl)("Bulk Add Codex Accounts"),onClose:x,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:(0,N.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,i.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:J,value:l,onChange:e=>r(e.target.value),disabled:n}),d&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),m&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,N.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,N.Tl)("failed")}`:""]}),f.length>0&&(0,i.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,i.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:h,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,N.Tl)("Importing..."):(0,N.Tl)("Import All")}),(0,i.jsx)(c.$n,{onClick:x,variant:"ghost",fullWidth:!0,disabled:n,children:(0,N.Tl)("Close")})]})]})})}M.propTypes={isOpen:$().bool.isRequired,onClose:$().func.isRequired,onSuccess:$().func};let F=`[
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 L(e){let t,s=e.trim();if(!s)return[];try{t=JSON.parse(s)}catch(e){try{let e=s;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 W({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,a.useState)(""),[n,o]=(0,a.useState)(!1),[d,p]=(0,a.useState)(""),[m,u]=(0,a.useState)(null),[x,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),y=(0,a.useRef)(null),b=()=>{n||(r(""),p(""),u(null),g(null),h(!1),t())},v=async e=>{if(!e||0===e.length)return;p("");let t=Array.from(e).filter(e=>e.name.endsWith(".json")||"application/json"===e.type||""===e.type);if(0===t.length)return void p((0,N.Tl)("Please select valid .json files"));try{let e=[];for(let s of t){let t=await s.text(),i=L(t);Array.isArray(i)?e.push(...i):i&&e.push(i)}if(0===e.length)return void p((0,N.Tl)("No accounts found in selected files"));r(JSON.stringify(e,null,2)),g({filesCount:t.length,accountsCount:e.length})}catch(e){p(`${(0,N.Tl)("Error reading files")}: ${e.message}`)}},j=async()=>{let e;p(""),u(null);try{e=L(l)}catch(e){p(`${(0,N.Tl)("Invalid JSON")}: ${e.message}`);return}if(!e||0===e.length)return void p((0,N.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})}),i=await t.json();if(!t.ok)return void p(i?.error||`Request failed: ${t.status}`);u(i),i.success>0&&"function"==typeof s&&s()}catch(e){p(e.message||(0,N.Tl)("Request failed"))}finally{o(!1)}},k=m?.results?.filter(e=>!e.ok)||[];return(0,i.jsx)(c.aF,{isOpen:e,title:(0,N.Tl)("Bulk Add Grok CLI Accounts"),onClose:b,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:(0,N.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,i.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,i.jsx)(c.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>y.current?.click(),disabled:n,children:(0,N.Tl)("Upload JSON Files")})]}),(0,i.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,i.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:F,value:l,onChange:e=>{r(e.target.value),g(null)},disabled:n}),x&&(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,i.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,N.Tl)("Drop .json files here")})]})]}),f&&(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,i.jsxs)("span",{children:[(0,N.Tl)("Loaded")," ",f.accountsCount," ",(0,N.Tl)("account(s) from")," ",f.filesCount," ",(0,N.Tl)("file(s)")]})]}),d&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),m&&m.failed>0&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",m.failed," ",(0,N.Tl)("failed")]}),k.length>0&&(0,i.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:k.map(e=>(0,i.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:j,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,N.Tl)("Importing..."):(0,N.Tl)("Import All")}),(0,i.jsx)(c.$n,{onClick:b,variant:"ghost",fullWidth:!0,disabled:n,children:(0,N.Tl)("Close")})]})]})})}let B={claude:"claudeAutoPing",codex:"codexAutoPing"};function G(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,{getCaps:u}=(0,w.y)(),[x,h]=(0,a.useState)([]),[f,g]=(0,a.useState)(!0),[y,b]=(0,a.useState)(null),[v,C]=(0,a.useState)([]),[T,$]=(0,a.useState)(!1),[P,E]=(0,a.useState)(!1),[D,_]=(0,a.useState)(!1),[z,J]=(0,a.useState)(""),[F,L]=(0,a.useState)(!1),[G,H]=(0,a.useState)(!1),[Q,V]=(0,a.useState)(!1),[Z,X]=(0,a.useState)(!1),[Y,ee]=(0,a.useState)(!1),[et,es]=(0,a.useState)(null),[ei,ea]=(0,a.useState)({}),[el,er]=(0,a.useState)([]),[en,eo]=(0,a.useState)(!1),[ed,ec]=(0,a.useState)({}),[ep,em]=(0,a.useState)(""),[eu,ex]=(0,a.useState)(()=>new Set),[eh,ef]=(0,a.useState)(!1),[eg,ey]=(0,a.useState)([]),[eb,ev]=(0,a.useState)("__none__"),[ej,ek]=(0,a.useState)(!1),[ew,eN]=(0,a.useState)(null),[eC,eS]=(0,a.useState)(""),[eA,eT]=(0,a.useState)("auto"),[e$,eO]=(0,a.useState)({enabled:!1,connections:{}}),[eP,eI]=(0,a.useState)([]),[eE,eD]=(0,a.useState)([]),[eR,e_]=(0,a.useState)([]),[eU,eq]=(0,a.useState)([]),[ez,eK]=(0,a.useState)(null),[eJ,eM]=(0,a.useState)(!1),[eF,eL]=(0,a.useState)(!1),[eW,eB]=(0,a.useState)(!1),[eG,eH]=(0,a.useState)(null),[eQ,eV]=(0,a.useState)({}),[eZ,eX]=(0,a.useState)(null),eY=(0,a.useRef)(!1),[e0,e1]=(0,a.useState)(!1),{copied:e2,copy:e5}=(0,k.C)(),e3="ag_risk_confirmed",e4=()=>{$(!0)},e6=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(e3)?eM(!0):tt?e4():(J(""),_(!0))},e8=()=>{J(""),_(!0)},e7=()=>{tt?e6():e8()},e9=y?{id:y.id,name:y.name||("anthropic-compatible"===y.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===y.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===y.type?"AC":"OC",apiType:y.apiType,baseUrl:y.baseUrl,type:y.type}:p.zN[r]||p.fg[r]||p.IS[r]||p.nJ[r]||p.br[r],te=e9?.authModes||[],tt=!!p.zN[r]||!!p.IS[r]||te.includes("oauth"),ts=!!p.fg[r]||te.includes("apikey"),ti=!!p.IS[r]?.noAuth,ta=(0,m.KC)(r),tl="cursor"===r&&eE.length>0?eE:ta,tr=(0,p.wG)(r),tn=(0,p.mq)(r),to=(0,p.gb)(r),td=tn||to,tc=!td&&tt&&ts,tp="xai"===r?"Grok Build OAuth":"grok-cli"===r?"Grok CLI Device Login":"kimi"===r?"Kimi Coding OAuth":"OAuth",tm="xai"===r?"xAI API Key":"kimi"===r?"Kimi API Key":"qoder"===r?"PAT":"API Key",tu=e=>{if(!eA||"auto"===eA)return null;let t=j(r,e);return t&&t.includes(eA)?eA:null},tx=td?r:tr,th=(()=>{let e=new Set,t=new Set,s=s=>{if(!s||t.has(s))return;t.add(s);let i=j(r,s);i&&i.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of tl)s(e.id);for(let e of eR)s(e.id);for(let e of el)e.providerAlias===tx&&"llm"===(e.kind||e.type||"llm")&&s(e.id);return e.size?["auto",...e]:null})(),tf=td?y?.prefix||r:tr,tg=(0,a.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tx)}`,{cache:"no-store"}),t=await e.json();e.ok&&eq(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tx]),ty=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tx,ids:[e]})})).ok&&await tg()}catch(e){console.log("Error disabling model:",e)}},tb=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tx)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tg()}catch(e){console.log("Error enabling model:",e)}},tv=async e=>{e.length&&eK({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eK(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tx,ids:e})})).ok&&await tg()}catch(e){console.log("Error disabling all models:",e)}}})},tj=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tx)}`,{method:"DELETE"})).ok&&await tg()}catch(e){console.log("Error enabling all models:",e)}},tk=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ea(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tw=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&er(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,a.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&e_(e.models)}).catch(()=>{})},[r]);let tN=(0,a.useCallback)(async()=>{try{let[e,t,s,i]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),a=await e.json(),l=await t.json(),n=await s.json(),o=i.ok?await i.json():{};if(e.ok){let e=(a.connections||[]).filter(e=>e.provider===r);h(e)}s.ok&&C(n.proxyPools||[]);let d=(o.providerStrategies||{})[r]||{};eN(d.fallbackStrategy||null),eS(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1");let c=(o.providerThinking||{})[r]||{};eT(c.mode||"auto");let p=B[r],m=p&&o[p]||{};if(eO({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&td)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}b(e)}}catch(e){console.log("Error fetching connections:",e)}finally{g(!1)}},[r,td]),tC=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(b(s.node),await tN(),X(!1))}catch(e){console.log("Error updating provider node:",e)}},tS=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),i=(s.ok?await s.json():{}).providerStrategies||{},a={};e&&(a.fallbackStrategy=e),"round-robin"===e&&""!==t&&(a.stickyRoundRobinLimit=Number(t)||3);let l={...i};0===Object.keys(a).length?delete l[r]:l[r]=a,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)}},tA=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?s[r]={mode:e}:delete s[r],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:s})})}catch(e){console.log("Error saving thinking config:",e)}},tT=async e=>{let t=B[r];if(t){eO(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,a.useEffect)(()=>{tN(),tk(),tw(),tg()},[tN,tk,tw,tg]),(0,a.useEffect)(()=>{if("cursor"!==r)return void eD([]);let e=x.find(e=>!1!==e.isActive);if(!e?.id)return void eD([]);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:s})=>{!t&&e&&Array.isArray(s.models)&&s.models.length>0&&eD(s.models)}).catch(()=>{}),()=>{t=!0}},[r,x]),(0,a.useEffect)(()=>{let e=(p.zN[r]||p.fg[r]||p.IS[r]||p.nJ[r])?.modelsFetcher;e&&S(e).then(eI)},[r]);let t$=async(e,t,s=tr)=>{let i=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:i,alias:t})});if(e.ok)await tk();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tO=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tk()}catch(e){console.log("Error deleting alias:",e)}},tP=async(e,t="llm",s=tx,i)=>{try{let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:s,id:e,type:t,...i?{caps:i}:{}})});if(a.ok)await tw(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await a.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tI=async(e,t="llm",s=tx)=>{try{let i=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${i}`,{method:"DELETE"})).ok&&(await tw(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},tE=async()=>{if(e0)return;let e=x.find(e=>!1!==e.isActive);if(!e)return void alert((0,N.Tl)("Please add an active Qoder connection first"));e1(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,N.Tl)("Failed to fetch models"));let i=s.models||[];if(0===i.length)return void alert((0,N.Tl)("No models returned"));let a=0;for(let e of i){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,"");el.some(e=>e.providerAlias===tx&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(ei).includes(`${tx}/${s}`)||(await tP(s,"llm",tx),a+=1)}0===a?alert((0,N.Tl)("All models already exist, no new models added")):alert((0,N.Tl)("Successfully added")+` ${a} `+(0,N.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,N.Tl)("Error fetching models")+": "+e.message)}finally{e1(!1)}},tD=async()=>{if(eF||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eY.current=!1,eL(!0),eB(!1),eH(null),eV(e),eX({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<x.length;e+=1){if(eY.current){eX({total:x.length,completed:e,passed:t,failed:s,stopped:!0});break}let i=x[e];eH(i.id),eV(e=>({...e,[i.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${i.id}/test`,{method:"POST"}),a=await e.json(),l=!!a.valid;l?t+=1:s+=1,eV(e=>({...e,[i.id]:{state:l?"success":"failed",error:l?null:a.error||null}}))}catch(e){s+=1,eV(t=>({...t,[i.id]:{state:"failed",error:e.message||"Test failed"}}))}eX({total:x.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eH(null),eL(!1),eB(!1),eY.current=!1}},tR=async e=>{eK({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eK(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)}}})},t_=()=>{tN(),$(!1)},tU=async e=>{J("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tN(),_(!1);return}J(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),J("Failed to save connection")}},tq=async e=>{try{(await fetch(`/api/providers/${et.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tN(),V(!1))}catch(e){console.log("Error updating connection:",e)}},tz=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&h(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tK=async(e,t)=>{let s=[...x];[s[e],s[t]]=[s[t],s[e]],h(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tN()}},tJ=x.filter(e=>eg.includes(e.id)),tM=x.length>0&&eg.length===x.length;(0,a.useEffect)(()=>{ey(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tJ.length)return;let e=new Set(tJ.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=v.find(e=>e.id===t);return s?.name}})();let tF=()=>{ej||ee(!1)},tL=async e=>{ek(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:i}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:i})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tN(),ee(!1)}finally{ek(!1)}},tW=e=>tL(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),tB=(0,i.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03] max-h-[500px] overflow-y-auto pr-1",children:x.map((e,t)=>{let s;return(0,i.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,i.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,i.jsx)("input",{type:"checkbox",checked:(s=e.id,eg.includes(s)),onChange:()=>{var t;return t=e.id,void ey(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,i.jsx)("div",{className:"flex-1 min-w-0",children:(0,i.jsx)(R,{connection:e,proxyPools:v,isOAuth:tt,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tK(t,t-1),onMoveDown:()=>tK(t,t+1),onToggleActive:t=>tz(e.id,t),autoPing:B[r]&&"oauth"===e.authType?{on:!0===e$.connections[e.id],onToggle:t=>{var s;return s=e.id,void tT({...e$,connections:{...e$.connections,[s]: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(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{es(e),V(!0)},onDelete:()=>tR(e.id),oneByOneStatus:eQ[e.id]||null})})]},e.id)})}),tG=v.filter(e=>!0===e.isActive),tH=(0,i.jsx)(c.aF,{isOpen:Y,onClose:tF,title:`Apply Proxy (${x.length} connections)`,children:(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsxs)("button",{onClick:()=>{let e=v.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tL(x.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:ej||0===tG.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,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,i.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,i.jsxs)("button",{onClick:()=>tW(null),disabled:ej,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,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,i.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),v.map(e=>(0,i.jsxs)("button",{onClick:()=>tW(e.id),disabled:ej||!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,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,i.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,i.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),ej&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,i.jsx)(c.$n,{onClick:tF,variant:"ghost",fullWidth:!0,disabled:ej,children:"Cancel"})]})}),tQ=async e=>{if(!eu.has(e)){ex(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:`${tx}/${e}`})}),s=await t.json();ec(t=>({...t,[e]:s.ok?"ok":"error"})),em(s.ok?"":s.error||"Model not reachable")}catch{ec(t=>({...t,[e]:"error"})),em("Network error")}finally{ex(t=>{let s=new Set(t);return s.delete(e),s})}}};if(f)return(0,i.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,i.jsx)(c.Qv,{}),(0,i.jsx)(c.Qv,{})]});if(!e9)return(0,i.jsxs)("div",{className:"text-center py-20",children:[(0,i.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,i.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let tV=()=>tn&&e9.apiType?"responses"===e9.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":to?"/providers/anthropic-m.png":(0,d.HY)(e9.id);return(0,i.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,i.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e9.color}15`},children:en||!tV()?(0,i.jsx)("span",{className:"text-sm font-bold",style:{color:e9.color},children:e9.textIcon||e9.id.slice(0,2).toUpperCase()}):(0,i.jsx)(o.default,{src:tV(),alt:e9.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,d.Kw)(e9.id),eo(!0)},loading:"lazy",decoding:"async"})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,i.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e9.name}),(e9.notice?.apiKeyUrl||e9.notice?.signupUrl||e9.website)&&(0,i.jsxs)("a",{href:e9.notice?.apiKeyUrl||e9.notice?.signupUrl||e9.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e9.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,i.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),e9.deprecated&&(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,i.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e9.deprecationNotice})]}),e9.notice?.text&&!e9.deprecated&&(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,i.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:e9.notice.text}),e9.notice.apiKeyUrl&&(0,i.jsx)("a",{href:e9.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 →"})]}),td&&y&&(0,i.jsx)(c.Zp,{children:(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:to?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,i.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[to?"Messages API":"responses"===y.apiType?"Responses API":"Chat Completions"," \xb7 ",(y.baseUrl||"").replace(/\/$/,""),"/",to?"messages":"responses"===y.apiType?"responses":"chat/completions"]})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{J(""),_(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>X(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eK({title:"Delete Compatible Node",message:`Delete this ${to?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eK(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),ti?(0,i.jsx)(c.gw,{providerId:r}):(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[x.length>0&&v.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ee(!0),children:"Apply Proxy"}),x.length>0&&(0,i.jsxs)(i.Fragment,{children:[eg.length>0&&(0,i.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eg.length;0!==e&&eK({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eK(null);let e=0,t=[...eg];for(let s of t)try{(await fetch(`/api/providers/${s}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}h(e=>e.filter(e=>!t.includes(e.id))),ey([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eg.length,")"]}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tD,disabled:eF,children:eF?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eF&&(0,i.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eF&&(eY.current=!0,eB(!0))},disabled:eW,children:eW?"Stopping...":"Stop"})]}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,i.jsx)(c.lM,{checked:"round-robin"===ew,onChange:e=>{let t=e?"round-robin":null,s=e?eC||"1":eC;e&&!eC&&eS("1"),eN(t),tS(t,s)}}),"round-robin"===ew&&(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,i.jsx)("input",{type:"number",min:1,value:eC,onChange:e=>{var t;eS(t=e.target.value),tS("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,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tt?"lock":"key"})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tc&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tp," or ",tm,"."]})]})]}),(0,i.jsx)("div",{className:"flex gap-2",children:tc?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e6,children:tp}),(0,i.jsx)(c.$n,{size:"sm",icon:"key",onClick:e8,children:tm})]}):(0,i.jsxs)(i.Fragment,{children:[!td&&"iflow"===r&&(0,i.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>E(!0),children:"Cookie"}),"codex"===r&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>L(!0),children:(0,N.Tl)("Bulk Add")}),"grok-cli"===r&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>H(!0),children:(0,N.Tl)("Bulk Add")}),(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:e7,children:td?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,i.jsxs)(i.Fragment,{children:[eZ&&(0,i.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,i.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,i.jsxs)("span",{children:["Total: ",eZ.total]}),(0,i.jsxs)("span",{children:["Completed: ",eZ.completed]}),(0,i.jsxs)("span",{children:["Passed: ",eZ.passed]}),(0,i.jsxs)("span",{children:["Failed: ",eZ.failed]}),eZ.stopped&&(0,i.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eF&&eG&&(0,i.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eG)?.name||eG]})]})}),x.length>0&&(0,i.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,i.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,i.jsx)("input",{type:"checkbox",checked:tM,onChange:()=>{tM?ey([]):ey(x.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),tB,!td&&(0,i.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,i.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>E(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===r&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>L(!0),title:(0,N.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,N.Tl)("Bulk Add")}),"grok-cli"===r&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>H(!0),title:(0,N.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,N.Tl)("Bulk Add")}),tc?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e6,className:"w-full sm:w-auto",children:tp}),(0,i.jsx)(c.$n,{size:"sm",icon:"key",onClick:e8,className:"w-full sm:w-auto",children:tm})]}):(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:e7,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),th&&(0,i.jsx)("select",{value:eA,onChange:e=>{var t;eT(t=e.target.value),tA(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:th.map(e=>(0,i.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!td&&(e=[...tl,...eR.filter(e=>!tl.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eU.includes(e)),(0,i.jsxs)("div",{className:"flex gap-2",children:[eU.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tj,children:"Active All"}),e.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tv(e),children:"Disable All"})]}))]}),!!ep&&(0,i.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:ep}),(()=>{let e,t,s;if(td)return(0,i.jsx)(I,{providerStorageAlias:tx,providerDisplayAlias:tf,modelAliases:ei,customModels:el,copied:e2,onCopy:e5,onSetAlias:t$,onDeleteAlias:tO,onAddCustomModel:e=>tP(e,"llm",tx),onDeleteCustomModel:e=>tI(e,"llm",tx),connections:x,isAnthropic:to});let a=[...tl,...eR.filter(e=>!tl.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),l=new Set(eU),n=a.filter(e=>!l.has(e.id)),o=a.filter(e=>l.has(e.id)),d=A({customModels:el,modelAliases:ei,providerAlias:tx,builtInModels:tl,type:"llm"});return(0,i.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,i.jsx)(O,{model:{id:e.id,name:e.name},fullModel:`${tf}/${e.id}`,alias:e.alias,copied:e2,onCopy:e5,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tI(e.id,"llm",tx):tO(e.alias)},testStatus:ed[e.id],onTest:x.length>0||ti?()=>tQ(e.id):void 0,isTesting:eu.has(e.id),isCustom:!0,isFree:!1,caps:u(`${r}/${e.id}`),thinkingSuffix:tu(e.id)},`${e.source}-${e.fullModel}`)),n.map(e=>{let t=`${tx}/${e.id}`,s=`${r}/${e.id}`,a=Object.entries(ei).find(([,e])=>e===t||e===s)?.[0];return(0,i.jsx)(O,{model:e,fullModel:`${tf}/${e.id}`,alias:a,copied:e2,onCopy:e5,onSetAlias:t=>t$(e.id,t,tx),onDeleteAlias:()=>tO(a),testStatus:ed[e.id],onTest:x.length>0||ti?()=>tQ(e.id):void 0,isTesting:eu.has(e.id),isFree:e.isFree,onDisable:()=>ty(e.id),caps:u(`${r}/${e.id}`),thinkingSuffix:tu(e.id)},e.id)}),(0,i.jsxs)("button",{onClick:()=>ef(!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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===r&&x.some(e=>!1!==e.isActive)&&(0,i.jsxs)("button",{onClick:tE,disabled:e0,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,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:e0?{animation:"spin 1s linear infinite"}:void 0,children:e0?"progress_activity":"download"}),e0?(0,N.Tl)("Fetching..."):(0,N.Tl)("Fetch Qoder Models")]}),eP.length>0&&(e=new Set([...Object.values(ei),...d.map(e=>e.fullModel)]),t=new Set(tl.map(e=>e.id)),0===(s=eP.filter(s=>!e.has(`${tx}/${s.id}`)&&!t.has(s.id))).length?null:(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,i.jsxs)("button",{onClick:async()=>{await tP(e.id,"llm",tx)},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,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,i.jsxs)("button",{onClick:()=>tb(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,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tH,"kiro"===r?(0,i.jsx)(c.Mh,{isOpen:T,providerInfo:e9,onSuccess:t_,onClose:()=>$(!1)}):"cursor"===r?(0,i.jsx)(c.G9,{isOpen:T,onSuccess:t_,onClose:()=>$(!1)}):"gitlab"===r?(0,i.jsx)(c.vj,{isOpen:T,providerInfo:e9,onSuccess:t_,onClose:()=>$(!1)}):(0,i.jsx)(c.LF,{isOpen:T,provider:r,providerInfo:e9,onSuccess:t_,onClose:()=>$(!1)}),"iflow"===r&&(0,i.jsx)(c.vE,{isOpen:P,onSuccess:()=>{tN(),E(!1)},onClose:()=>E(!1)}),(0,i.jsx)(U,{isOpen:D,provider:r,providerName:e9.name,isCompatible:td,isAnthropic:to,authType:e9?.authType,authHint:e9?.authHint,website:e9?.website,proxyPools:v,error:z,existingNames:x.map(e=>e.name).filter(Boolean),onSave:tU,onBulkDone:tN,onClose:()=>{J(""),_(!1)}}),(0,i.jsx)(c.wI,{isOpen:Q,connection:et,proxyPools:v,onSave:tq,onClose:()=>V(!1)}),td&&(0,i.jsx)(q,{isOpen:Z,node:y,onSave:tC,onClose:()=>X(!1),isAnthropic:to}),!td&&(0,i.jsx)(K,{isOpen:eh,providerAlias:tx,providerDisplayAlias:tf,onSave:async(e,t)=>{await tP(e,"llm",tx,t),ef(!1)},onClose:()=>ef(!1)}),"codex"===r&&(0,i.jsx)(M,{isOpen:F,onClose:()=>L(!1),onSuccess:tN}),"grok-cli"===r&&(0,i.jsx)(W,{isOpen:G,onClose:()=>H(!1),onSuccess:tN}),(0,i.jsx)(c.uo,{isOpen:eJ,onClose:()=>eM(!1),onConfirm:()=>{(window.localStorage.setItem(e3,"true"),eM(!1),tt)?e4():e8()},title:"Risk Notice",message:e9?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,i.jsx)(c.uo,{isOpen:!!ez,onClose:()=>eK(null),onConfirm:ez?.onConfirm,title:ez?.title||"Confirm",message:ez?.message,variant:"danger"})]})}}},e=>{e.O(0,[3277,5772,1321,705,5497,8441,3794,7358],()=>e(e.s=68241)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{11177:(e,t,r)=>{Promise.resolve().then(r.bind(r,29450))},29450:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>w});var s=r(95155),a=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),x=r.n(m),u=r(65921),h=r(38003);let f={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 b(){let[e,t]=(0,a.useState)(null),[r,l]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!1),[d,c]=(0,a.useState)(null),p=(0,a.useRef)(null),m=(0,u.i)(),x=(0,a.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,a.useEffect)(()=>{x();let e=setInterval(x,3e4);return()=>clearInterval(e)},[x]),(0,a.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 h=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 x()):m.error("Failed to clear cooldown")}catch{m.error("Failed to clear cooldown")}finally{c(null)}};if(r)return null;let b=e?.models||[],g=0===(e?.unavailableCount||b.filter(e=>"available"!==e.status).length),v={};return b.forEach(e=>{if("available"===e.status)return;let t=e.provider||"unknown";v[t]||(v[t]=[]),v[t].push(e)}),(0,s.jsx)("div",{className:"relative",ref:p,children:i&&(0,s.jsxs)("div",{className:"absolute top-full right-0 mt-2 w-80 bg-surface border border-border rounded-xl shadow-2xl z-50 overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:g?"#22c55e":"#f59e0b"},children:g?"verified":"warning"}),(0,s.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,s.jsx)("button",{onClick:x,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,s.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:g?(0,s.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,s.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(v).map(([e,t])=>(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:e}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let t=f[e.status]||f.unknown,r=d===`${e.provider}:${e.model}`;return(0,s.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:t.color},children:t.icon}),(0,s.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:e.model})]}),"cooldown"===e.status&&(0,s.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>h(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 g={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}},v=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function y({variant:e,isOpen:t,onClose:r,onCreated:l}){let i=g[e],o=()=>({name:"",prefix:"",...i.hasApiType?{apiType:"chat"}:{},baseUrl:i.defaultBaseUrl}),[d,c]=(0,a.useState)(o),[p,m]=(0,a.useState)(!1),[x,u]=(0,a.useState)(""),[h,f]=(0,a.useState)(""),[b,j]=(0,a.useState)(!1),[N,w]=(0,a.useState)(null);(0,a.useEffect)(()=>{i.hasApiType?c(e=>({...e,baseUrl:i.defaultBaseUrl})):t&&(w(null),u(""),f(""))},[i.hasApiType?d.apiType:t]);let k=async()=>{if(d.name.trim()&&d.prefix.trim()&&d.baseUrl.trim()){m(!0);try{let e=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})}),t=await e.json();e.ok&&(l(t.node),c(o()),u(""),w(null))}catch(e){console.log(`Error creating ${i.errorLabel} node:`,e)}finally{m(!1)}}},C=async()=>{j(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:d.baseUrl,apiKey:x,type:i.type,modelId:h.trim()||void 0})}),t=await e.json();w(t)}catch{w({valid:!1,error:"Network error"})}finally{j(!1)}};return(0,s.jsx)(n.aF,{isOpen:t,title:i.title,onClose:r,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.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,s.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,s.jsx)(n.l6,{label:"API Type",options:v,value:d.apiType,onChange:e=>c({...d,apiType:e.target.value})}),(0,s.jsx)(n.pd,{label:"Base URL",value:d.baseUrl,onChange:e=>c({...d,baseUrl:e.target.value}),placeholder:i.defaultBaseUrl,hint:i.baseUrlHint}),(0,s.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:x,onChange:e=>u(e.target.value)}),(0,s.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,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,s.jsx)(n.$n,{onClick:C,disabled:!x||b||!d.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:b?"Checking...":"Check"}),(()=>{if(!N)return null;let{valid:e,error:t,method:r}=N;return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===r&&(0,s.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,s.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)(n.$n,{onClick:k,fullWidth:!0,disabled:!d.name.trim()||!d.prefix.trim()||!d.baseUrl.trim()||p,children:p?"Creating...":"Create"}),(0,s.jsx)(n.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}y.propTypes={variant:i().oneOf(["openai","anthropic"]).isRequired,isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired};let j=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"inactive",label:"Inactive"},{value:"none",label:"No connection"}];function N(e,t,r){let a=[];if(e>0&&a.push((0,s.jsxs)(n.Ex,{variant:"success",size:"sm",dot:!0,children:[e," Connected"]},"connected")),t>0){let e=r?`${t} Error (${r})`:`${t} Error`;a.push((0,s.jsx)(n.Ex,{variant:"error",size:"sm",dot:!0,children:e},"error"))}return 0===a.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No connections"}):a}function w(){let e,t,[r,l]=(0,a.useState)([]),[i,o]=(0,a.useState)([]),[d,m]=(0,a.useState)(!0),[x,f]=(0,a.useState)(!1),[g,v]=(0,a.useState)(!1),[N,w]=(0,a.useState)(!1),[T,I]=(0,a.useState)(null),[E,$]=(0,a.useState)(null),[P,O]=(0,a.useState)("all"),R=(0,u.i)(),S=(0,h.C)(e=>e.query),U=(0,h.C)(e=>e.register),_=(0,h.C)(e=>e.unregister);(0,a.useEffect)(()=>(U("Search providers..."),()=>_()),[U,_]);let z=e=>!S.trim()||!!e&&e.toLowerCase().includes(S.trim().toLowerCase());(0,a.useEffect)(()=>{(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),r=await e.json(),s=await t.json();e.ok&&l(r.connections||[]),t.ok&&o(s.nodes||[])}catch(e){console.log("Error fetching data:",e)}finally{m(!1)}})()},[]);let q=(e,t)=>{let s=Array.isArray(t)?t:[t],a=r.filter(t=>t.provider===e&&s.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=a.filter(e=>{let t=l(e);return"active"===t||"success"===t}).length,n=a.filter(e=>{let t=l(e);return"error"===t||"expired"===t||"unavailable"===t}),o=n.length,d=a.length,c=d>0&&a.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 s=function(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}(e.lastError);if("401"===s||"403"===s)return"AUTH";if(s&&"ERR"!==s)return s;let a=(e.lastError||"").toLowerCase();return a.includes("runtime")||a.includes("not runnable")||a.includes("not installed")?"RUNTIME":a.includes("invalid api key")||a.includes("token invalid")||a.includes("revoked")||a.includes("unauthorized")?"AUTH":"ERR"}(p):null,errorTime:p?.lastErrorAt?function(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let r=Math.floor(t/60);if(r<24)return`${r}h ago`;let s=Math.floor(r/24);return`${s}d ago`}(p.lastErrorAt):null,allDisabled:c}},D=(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})(P,e,t),F=async(e,t,s)=>{let a=Array.isArray(t)?t:[t],i=t=>t.provider===e&&a.includes(t.authType),n=r.filter(i);l(e=>e.map(e=>i(e)?{...e,isActive:s}:e)),await Promise.allSettled(n.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},M=async(e,t=null)=>{if(!T){I("provider"===e?t: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})}),s=await r.json();if($(s),s.summary){let{passed:e,failed:t,total:r}=s.summary;0===t?R.success(`All ${r} tests passed`):R.warning(`${e}/${r} passed, ${t} failed`)}}catch(e){$({error:"Test request failed"}),R.error("Provider test failed")}finally{I(null)}}},L=i.filter(e=>"openai-compatible"===e.type).map(e=>({id:e.id,name:e.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:e.apiType})).filter(e=>z(e.name)&&D(q(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=>z(e.name)&&D(q(e.id,"apikey"))),H=(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"},J=(e=Object.entries(c.zN).filter(([e,t])=>!t.hidden&&z(t.name)&&D(q(e,H(t,e)),t.noAuth)),t="oauth",[...e].sort(([e,r],[s,a])=>{let l=r.priority??999,i=a.priority??999;if(l!==i)return l-i;let n=q(e,t),o=q(s,t),d=+(n.connected>0),c=+(o.connected>0);return d!==c?c-d:(r.name||"").localeCompare(a.name||"")})),B=Object.entries(p.IS).filter(([e,t])=>!t.hidden&&z(t.name)&&D(q(e,H(t,e)),t.noAuth)).sort(([,e],[,t])=>!!t.noAuth-!!e.noAuth),W=Object.entries(p.nJ).filter(([e,t])=>!t.hidden&&z(t.name)&&(t.serviceKinds??["llm"]).includes("llm")&&D(q(e,H(t,e)),t.noAuth)).sort(([e,t],[r,s])=>{let a=t.priority??999,l=s.priority??999;if(a!==l)return a-l;let i=!!s.noAuth-!!t.noAuth;if(0!==i)return i;let n=q(e,H(t,e)).connected>0?0:1,o=q(r,H(s,r)).connected>0?0:1;return n!==o?n-o:(t.name||"").localeCompare(s.name||"")}),Q=Object.entries(c.fg).filter(([e,t])=>!t.hidden&&(t.serviceKinds??["llm"]).includes("llm")&&z(t.name)&&D(q(e,"apikey"),t.noAuth)).sort(([e,t],[r,s])=>{let a=q(e,"apikey").total>0?0:1,l=q(r,"apikey").total>0?0:1;return a!==l?a-l:(t.name||"").localeCompare(s.name||"")}),X=!!S.trim()||"all"!==P,Z=X||x?Q:Q.slice(0,20),V=Q.length-20;if(d)return(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(n.Qv,{}),(0,s.jsx)(n.Qv,{})]});let Y=J.length>0||B.length>0||W.length>0||Q.length>0||L.length>0||K.length>0;return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,s.jsx)("div",{className:"flex items-center justify-end",children:(0,s.jsx)("select",{value:P,onChange:e=>O(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:j.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})}),!Y&&(0,s.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,s.jsx)("p",{className:"text-text-muted text-sm",children:"No providers match your search or filters"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["Custom Providers (OpenAI/Anthropic Compatible)"," "]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,s.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>w(!0),className:"w-full sm:w-auto",children:"Add Anthropic Compatible"}),(0,s.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>v(!0),className:"w-full !bg-white !text-black hover:!bg-gray-100 sm:w-auto",children:"Add OpenAI Compatible"})]})]}),0===L.length&&0===K.length?(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"extension"}),(0,s.jsx)("span",{children:"No custom providers — use buttons above to add OpenAI/Anthropic compatible endpoints"})]}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:[...L,...K].map(e=>(0,s.jsx)(C,{providerId:e.id,provider:e,stats:q(e.id,"apikey"),authType:"compatible",onToggle:t=>F(e.id,"apikey",t)},e.id))})]}),J.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"OAuth Providers"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)(b,{}),(0,s.jsxs)("button",{onClick:()=>M("oauth"),disabled:!!T,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"===T?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all OAuth connections","aria-label":"Test all OAuth connections",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"oauth"===T?" animate-spin":""}`,children:"play_arrow"}),"oauth"===T?"Testing...":"Test All"]})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:J.map(([e,t])=>{let r=H(t,e);return(0,s.jsx)(k,{providerId:e,provider:t,stats:q(e,r),authType:"oauth",onToggle:t=>F(e,r,t)},e)})})]}),(B.length>0||W.length>0)&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"Free Tier Providers"}),(0,s.jsxs)("button",{onClick:()=>M("free"),disabled:!!T,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"===T?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all Free connections","aria-label":"Test all Free provider connections",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"free"===T?" animate-spin":""}`,children:"play_arrow"}),"free"===T?"Testing...":"Test All"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:[B.map(([e,t])=>{let r=H(t,e);return(0,s.jsx)(k,{providerId:e,provider:t,stats:q(e,r),authType:"free",onToggle:t=>F(e,r,t)},e)}),W.map(([e,t])=>{let r=H(t,e);return(0,s.jsx)(C,{providerId:e,provider:t,stats:q(e,r),authType:Array.isArray(r)?r[0]??"apikey":r,onToggle:t=>F(e,r,t)},e)})]})]}),Q.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["API Key Providers"," "]}),(0,s.jsxs)("button",{onClick:()=>M("apikey"),disabled:!!T,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"===T?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all API Key connections","aria-label":"Test all API Key connections",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"apikey"===T?" animate-spin":""}`,children:"play_arrow"}),"apikey"===T?"Testing...":"Test All"]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:Z.map(([e,t])=>(0,s.jsx)(C,{providerId:e,provider:t,stats:q(e,"apikey"),authType:"apikey",onToggle:t=>F(e,"apikey",t)},e))}),!X&&!x&&V>0&&(0,s.jsxs)("button",{onClick:()=>f(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2.5 text-sm font-medium text-primary transition-colors hover:border-primary hover:bg-primary/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"}),"Show all ",Q.length," providers"]})]}),(0,s.jsx)(y,{variant:"openai",isOpen:g,onClose:()=>v(!1),onCreated:e=>{o(t=>[...t,e]),v(!1)}}),(0,s.jsx)(y,{variant:"anthropic",isOpen:N,onClose:()=>w(!1),onCreated:e=>{o(t=>[...t,e]),w(!1)}}),E&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>$(null),children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,s.jsxs)("div",{className:"relative bg-surface border border-border rounded-xl w-full max-w-[600px] max-h-[86vh] sm:max-h-[80vh] overflow-y-auto shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between px-5 py-3 border-b border-border bg-surface/95 backdrop-blur-sm rounded-t-xl",children:[(0,s.jsx)("h3",{className:"font-semibold",children:"Test Results"}),(0,s.jsx)("button",{onClick:()=>$(null),className:"p-1 rounded-lg hover:bg-bg text-text-muted hover:text-text-main transition-colors","aria-label":"Close test results",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,s.jsx)("div",{className:"p-5",children:(0,s.jsx)(A,{results:E})})]})]})]})}function k({providerId:e,provider:t,stats:r,authType:a,onToggle:l}){let{connected:i,error:d,errorCode:c,errorTime:p,allDisabled:m}=r,u=!!t.noAuth;return(0,s.jsx)(x(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,s.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${m?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,s.jsx)(o.A,{src:`/providers/${t.id}.png`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[32px] max-h-[32px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h3",{className:"truncate font-semibold",children:t.name}),(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:m?(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):u?(0,s.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:"Ready"}):(0,s.jsxs)(s.Fragment,{children:[N(i,d,c),p&&(0,s.jsx)("span",{className:"text-text-muted",children:p})]})})]})]}),(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:r.total>0&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!m)},children:(0,s.jsx)(n.lM,{size:"sm",checked:!m,onChange:()=>{},title:m?"Enable provider":"Disable provider"})})})]})})})}function C({providerId:e,provider:t,stats:r,authType:a,onToggle:l}){let{connected:i,error:c,errorCode:m,errorTime:u,allDisabled:h}=r,f=e.startsWith(p.JH),b=e.startsWith(p.DI);return(0,s.jsx)(x(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,s.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${h?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,s.jsx)(o.A,{src: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,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h3",{className:"truncate font-semibold",children:t.name}),(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:h?(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):(0,s.jsxs)(s.Fragment,{children:[N(i,c,m),f&&(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),b&&(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:"Messages"}),u&&(0,s.jsx)("span",{className:"text-text-muted",children:u})]})})]})]}),(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:r.total>0&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!h)},children:(0,s.jsx)(n.lM,{size:"sm",checked:!h,onChange:()=>{},title:h?"Enable provider":"Disable provider"})})})]})})})}function A({results:e}){if(e.error&&!e.results)return(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,s.jsx)("p",{className:"text-sm text-red-400",children:e.error})]});let{summary:t,mode:r}=e,a=e.results||[];return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,s.jsxs)("span",{className:"text-text-muted",children:[{oauth:"OAuth",free:"Free",apikey:"API Key",provider:"Provider",all:"All"}[r]||r," Test"]}),(0,s.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[t.passed," passed"]}),t.failed>0&&(0,s.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[t.failed," failed"]}),(0,s.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),a.map((e,t)=>(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-black/[0.03] px-3 py-2 text-xs dark:bg-white/[0.03] sm:flex-nowrap",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-emerald-500":"text-red-500"}`,children:e.valid?"check_circle":"error"}),(0,s.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,s.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,s.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,s.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[e.latencyMs,"ms"]}),(0,s.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${e.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===a.length&&(0,s.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:"No active connections found for this group."})]})}k.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},C.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string,apiType:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},A.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}}},e=>{e.O(0,[3277,1321,705,5497,8441,3794,7358],()=>e(e.s=11177)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{40869:(e,t,r)=>{"use strict";r.d(t,{default:()=>w});var a=r(95155),s=r(12115),i=r(57250),l=r(57294);function n({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:i=!1,onHideQuota:o=null}){let[d,c]=(0,s.useState)(1),x=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:(0,l.$L)(e)})),[e]),m=(0,s.useMemo)(()=>"remaining-asc"===r?[...x].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...x].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):x,[x,r]),u=Math.max(1,Math.ceil(m.length/10));if((0,s.useEffect)(()=>{c(1)},[r,e]),(0,s.useEffect)(()=>{c(e=>Math.min(e,u))},[u]),!e||0===e.length)return null;let p=m.slice((d-1)*10,10*d),h=0===m.length?0:(d-1)*10+1,b=Math.min(10*d,m.length),g=t?"py-1 px-1.5":"py-2 px-3",f=t?"text-[11px]":"text-sm",y=t?"text-[11px]":"text-sm",v=t?"text-[10px] leading-tight":"text-xs",k="function"==typeof o;return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[m.length," quota",m.length>1?"s":""]}),i&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"space-y-px",children:p.map(e=>{var r;let s=!0===e.unlimited,i=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},n=(0,l.mO)(e.resetAt),d=(0,l.sQ)(e.resetAt),c=!1!==e.recurring?`in ${n}`:`expires in ${n}`;return(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${g}`,children:[(0,a.jsxs)("div",{className:"flex w-36 min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:i.emoji}),(0,a.jsx)("span",{className:`${f} font-medium text-text-primary truncate`,children:e.name})]}),(0,a.jsxs)("div",{className:`min-w-0 flex-1 ${t?"space-y-1":"space-y-1.5"}`,children:[!s&&(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${i.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${i.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between gap-1 min-w-0 ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsx)("span",{className:"text-text-muted truncate",title:s?`${e.used.toLocaleString()} used \xb7 Unlimited`:`${e.used.toLocaleString()} / ${e.total>0?e.total.toLocaleString():"∞"}`,children:s?`${e.used.toLocaleString()} used \xb7 Unlimited`:`${e.used.toLocaleString()} / ${e.total>0?e.total.toLocaleString():"∞"}`}),(0,a.jsx)("span",{className:`font-medium ${s?"text-green-600 dark:text-green-400":i.text} shrink-0`,children:s?"Unlimited":`${e.remaining}%`})]})]}),(0,a.jsx)("div",{className:"min-w-0 shrink",children:"-"!==n||d?t?(0,a.jsx)("div",{className:`${y} text-text-primary font-medium truncate`,title:d||"",children:"-"!==n?c:d}):(0,a.jsxs)("div",{className:"min-w-0 space-y-0.5",children:["-"!==n&&(0,a.jsx)("div",{className:`${y} text-text-primary font-medium truncate`,children:c}),d&&(0,a.jsx)("div",{className:`${v} text-text-muted truncate`,children:d})]}):(0,a.jsx)("div",{className:`${y} text-text-muted italic`,children:"N/A"})}),k&&(0,a.jsx)("button",{type:"button",onClick:()=>o(e),className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5",title:"Hide this quota row","aria-label":`Hide quota ${e.name}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"visibility_off"})})]},`${e.name}-${e.index}`)})}),u>1&&(0,a.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Showing ",h,"-",b," of ",m.length]}),(0,a.jsxs)("span",{children:["Page ",d," / ",u]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>Math.max(1,e-1)),disabled:1===d,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>Math.min(u,e+1)),disabled:d===u,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var o=r(98542),d=r(97677),c=r(84588),x=r(92542),m=r(35497),u=r(88105),p=r(11017),h=r(11059);let b={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},g={claude:"claudeAutoPing",codex:"codexAutoPing"},f={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota."};function y(e){return 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}function v(e){let t=e.providerSpecificData?.region;if(t)return t;let r=e.providerSpecificData?.profileArn;return("string"==typeof r?r.split(":")[3]:"")||""}function k(e){if(!e)return"N/A";let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"N/A"}function w(){let{copied:e,copy:t}=(0,h.C)(),[r,w]=(0,s.useState)([]),[j,N]=(0,s.useState)({}),[C,S]=(0,s.useState)({}),[$,A]=(0,s.useState)({}),[E,P]=(0,s.useState)(!0),[T,D]=(0,s.useState)({claude:{},codex:{}}),[q,I]=(0,s.useState)(null),[_,L]=(0,s.useState)(!1),[M,F]=(0,s.useState)(!1),[U,z]=(0,s.useState)(60),[J,O]=(0,s.useState)(!0),[R,H]=(0,s.useState)(null),[W,G]=(0,s.useState)(null),[V,K]=(0,s.useState)(null),[B,Q]=(0,s.useState)(null),[Z,X]=(0,s.useState)(null),[Y,ee]=(0,s.useState)(!1),[et,er]=(0,s.useState)(null),[ea,es]=(0,s.useState)([]),[ei,el]=(0,s.useState)("all"),[en,eo]=(0,s.useState)([]),[ed,ec]=(0,s.useState)("all"),[ex,em]=(0,s.useState)("default"),[eu,ep]=(0,s.useState)({}),[eh,eb]=(0,s.useState)(!1),[eg,ef]=(0,s.useState)(!1),[ey,ev]=(0,s.useState)(!1),[ek,ew]=(0,s.useState)(1),[ej,eN]=(0,s.useState)(l.Wg),[eC,eS]=(0,s.useState)(String(l.Wg)),[e$,eA]=(0,s.useState)({page:1,pageSize:l.Wg,total:0,totalPages:1}),[eE,eP]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),eT=(0,s.useRef)(null),eD=(0,s.useRef)(null),eq=(0,s.useRef)(0),eI=(0,s.useCallback)(async(e=ek)=>{try{let t=new URLSearchParams({page:String(e),pageSize:String(ej),accountStatus:ed,sort:"provider"});"all"!==ei&&t.set("provider",ei);let r=await fetch(`/api/providers/client?${t.toString()}`);if(!r.ok)throw Error("Failed to fetch connections");let a=await r.json(),s=a.connections||[],i=(0,l.wi)(a.pagination,ej),n=(0,l.dE)(a.totals,s.length);return w(s),eo((0,l.Uh)(a.providerOptions)),eA(i),eP(n),ew((0,l.ZS)(a.pagination,e)),s}catch(e){return console.error("Error fetching connections:",e),w([]),eo([]),eA({page:1,pageSize:ej,total:0,totalPages:1}),eP({eligibleConnections:0,providerFilteredConnections:0}),[]}},[ed,eh,ek,ej,ei]),e_=(0,s.useCallback)(async(e,t,{force:r=!1}={})=>{S(t=>({...t,[e]:!0})),A(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let a=`/api/usage/${e}${r?"?force=1":""}`,s=await fetch(a);if(!s.ok){let r=(await s.json().catch(()=>({}))).error||s.statusText;if(404===s.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===s.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,r);let a={quotas:[],message:r};N(t=>({...t,[e]:a})),(0,l.fr)(e,a);return}throw Error(`HTTP ${s.status}: ${r}`)}let i=await s.json();console.log(`[ProviderLimits] Got quota for ${t}:`,i);let n={quotas:(0,l.W_)(t,i),plan:i.plan||null,message:i.message||null,raw:i};N(t=>({...t,[e]:n})),(0,l.fr)(e,n)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),A(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{S(t=>({...t,[e]:!1}))}},[]),eL=(0,s.useCallback)(async(e,t)=>{await e_(e,t,{force:!0}),I(new Date)},[e_]),eM=(0,s.useCallback)(async(e,t)=>{if("codex"===t&&!V){K(e),A(t=>({...t,[e]:null}));try{let r=await fetch(`/api/usage/${e}/codex-reset-credits`,{method:"POST"}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a.message||a.error||a.code||"Failed to reset Codex limit");await e_(e,t),I(new Date)}catch(t){A(r=>({...r,[e]:t.message||"Failed to reset Codex limit"}))}finally{K(null)}}},[e_,V]),eF=(0,s.useCallback)(async e=>{X({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||r.message||"Failed to load Codex reset credits");let a=Array.isArray(r.credits)?[...r.credits]:[];a.sort((e,t)=>{let r=e.expiresAt?new Date(e.expiresAt).getTime():1/0,a=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return r-a}),X({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){X({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),eU=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){H(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){N(t=>{let r={...t};return delete r[e],r}),S(t=>{let r={...t};return delete r[e],r}),A(t=>{let r={...t};return delete r[e],r});try{let t=(0,l.Ld)();t[e]&&(delete t[e],window.localStorage.setItem(l.AI,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await (0,l.Jp)(eI,ek)}}catch(e){console.error("Error deleting connection:",e)}finally{H(null)}}},[eI,ek]),ez=(0,s.useCallback)(async(e,t)=>{G(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(N(e=>({...e})),await (0,l.Jp)(eI,ek))}catch(e){console.error("Error updating connection status:",e)}finally{G(null)}},[eI,ek]),eJ=(0,s.useCallback)(async e=>{if(!et?.id)return;let t=et.id,r=et.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eI(),ee(!1),er(null),u.wb.includes(r)&&await e_(t,r))}catch(e){console.error("Error saving connection:",e)}},[et,eI,e_]);(0,s.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&es(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eO=(0,s.useCallback)(async(e=!1)=>{if(M)return;F(!0),z(60);let t=eq.current+=1,r=Math.round(l.w2/l.J_);try{let a=await eI(ek);S((0,l.ku)(a)),A(e=>(0,l.ED)(e,a)),N(e=>(0,l.ED)(e,a)),await Promise.all(a.filter(a=>e||"claude"!==a.provider||t%r==0).map(e=>e_(e.id,e.provider))),I(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{F(!1)}},[M,eI,e_,ek]);(0,s.useEffect)(()=>{(async()=>{O(!0);let e=await eI(ek);O(!1),S((0,l.ku)(e)),A(t=>(0,l.ED)(t,e)),N(t=>(0,l.ED)(t,e)),await Promise.all(e.map(e=>e_(e.id,e.provider))),I(new Date)})()},[eI,e_,ek]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(l.WA);P(null===e||"true"===e),L(!0)},[]),(0,s.useEffect)(()=>{_&&window.localStorage.setItem(l.WA,String(E))},[E,_]),(0,s.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>{D({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}}),ep(e?.quotaVisibility||{})}).catch(()=>{})},[]);let eR=(0,s.useCallback)(async(e,t,r)=>{let a=g[t];if(!a)return;let s={...T[t]||{},[e]:r};D({...T,[t]:s});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[a]||{},connections:s};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[a]:t})})}catch{D(T)}},[T]),eH=(0,s.useCallback)(async(e,t)=>{ep(e);try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:e})})).ok)throw Error("Failed to update quota visibility")}catch(e){console.error("Error updating quota visibility:",e),ep(t)}},[]),eW=(0,s.useCallback)((e,t)=>{let r=(0,l.Ih)(t);if(!e||!r)return;let a=eu[e]||{},s=new Set(a.hidden||[]);s.add(r),eH({...eu,[e]:{...a,hidden:[...s]}},eu)},[eu,eH]),eG=(0,s.useCallback)((e,t)=>{let r=(0,l.Ih)(t);if(!e||!r)return;let a=eu[e]||{},s=new Set(a.hidden||[]);s.delete(r),eH({...eu,[e]:{...a,hidden:[...s]}},eu)},[eu,eH]);(0,s.useEffect)(()=>{if(!_||!E){eT.current&&(clearInterval(eT.current),eT.current=null),eD.current&&(clearInterval(eD.current),eD.current=null);return}return eT.current=setInterval(()=>{eO()},l.J_),eD.current=setInterval(()=>{z(e=>e<=1?60:e-1)},1e3),()=>{eT.current&&clearInterval(eT.current),eD.current&&clearInterval(eD.current)}},[E,eO,_]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(eT.current&&(clearInterval(eT.current),eT.current=null),eD.current&&(clearInterval(eD.current),eD.current=null)):E&&_&&(eT.current=setInterval(()=>eO(),l.J_),eD.current=setInterval(()=>{z(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[E,eO,_]);let eV=(0,s.useMemo)(()=>(0,l.uf)(r,j,eh,ei,ex),[r,j,eh,ei,ex]),eK=e=>{let t=j[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&(0,l.$4)(e.used,e.total)<=l.fZ)},eB=(0,s.useCallback)(async(e,t)=>{if(e.length&&!ey){ev(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await (0,l.Jp)(eI,ek)}catch(e){console.error("Error bulk toggling connections:",e)}finally{ev(!1)}}},[ey,eI,ek]),eQ="all"===ei?"All providers":ei,eZ=eE.eligibleConnections>0,eX=eV.length>0,eY=(0,l.g5)(eE,ei,ed),e0=(0,l.kx)(e$),e1=!l.pT.includes(ej);return((0,l.Xr)(ej,e1),J||eZ)?J||eX?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>ef(e=>!e),className:"flex h-10 min-w-[116px] items-center justify-between gap-2 rounded-xl border border-black/10 bg-black/[0.02] px-3 text-sm text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10 sm:min-w-[180px]","aria-haspopup":"menu","aria-expanded":eg,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:["all"===ei?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(i.A,{src:`/providers/${ei}.png`,alt:ei,size:22,className:"size-[22px] rounded-md object-contain",fallbackText:ei.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:eQ})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),eg&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>ef(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-black/10 bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{(0,l.wU)(ei,"all")&&ew(1),el("all"),ef(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===ei?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===ei&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:en.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{(0,l.wU)(ei,e)&&ew(1),el(e),ef(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${ei===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)(i.A,{src:`/providers/${e}.png`,alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e}),ei===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:ed,onChange:e=>{let t=e.target.value;(0,l.wU)(ed,t)&&ew(1),ec(t)},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 accounts by status",children:l.AA.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===ei&&(0,a.jsx)("select",{value:ex,onChange:e=>em(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":"Sort Codex quotas by remaining",children:l.vF.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>eb(e=>!e),"aria-pressed":eh,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${eh?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{eB(eV.filter(e=>(e.isActive??!0)&&eK(e)).map(e=>e.id),!1)},disabled:ey,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{eB(eV.filter(e=>!(e.isActive??!0)&&!eK(e)).map(e=>e.id),!0)},disabled:ey,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:()=>P(e=>!e),className:"flex shrink-0 items-center gap-2 rounded-lg border border-black/10 px-3 py-2 transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:E?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${E?"text-primary":"text-text-muted"}`,children:E?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),E&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",U,"s)"]})]}),(0,a.jsx)(x.default,{variant:"secondary",size:"md",icon:"refresh",onClick:()=>eO(!0),disabled:M,loading:M,children:"Refresh All"})]})}),eh&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:eV.map(r=>{let s,x,u,h,k,w=j[r.id],N=C[r.id],S=$[r.id],A=!1===r.isActive,E="codex"===r.provider,P=Number.isFinite(x="number"==typeof(s=w?.raw?.resetCredits?.availableCount)?s:Number(s))?Math.max(0,x):0,D=V===r.id,q=R===r.id||W===r.id||D,I=w?.quotas||[],_=(0,l.dR)(r.provider,I,eu),L=(0,l.sL)(r.provider,I,eu),M="antigravity"===r.provider?(0,p._P)(w?.raw)||(0,p.fd)(r.accountType):null;return(0,a.jsxs)(c.default,{padding:"none",className:`min-w-0 ${A?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-4 py-3 border-b border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(i.A,{src:`/providers/${r.provider}.png`,alt:r.provider,size:32,className:"object-contain",fallbackText:r.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:r.provider}),"antigravity"===r.provider&&M&&(0,a.jsx)(m.Ex,{variant:"Ultra"===M?"warning":"Pro"===M?"primary":"Plus"===M?"success":"Free"===M?"info":"default",size:"sm",className:"text-[9px] px-1.5 py-0.5 shrink-0 font-bold uppercase",children:M})]}),(h="string"==typeof(u=r.email)&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(u)?r.email:r.name)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:h}):null,"kiro"===r.provider&&r.id&&(0,a.jsx)("p",{className:"text-[10px] text-text-muted/70 font-mono truncate",title:`Connection ID: ${r.id}`,children:r.id}),y(r)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:y(r)}):null,"kiro"===r.provider&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,a.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(k=r.providerSpecificData?.authMethod)&&b[k]?b[k]:"api_key"===r.authType?"API Key":"OAuth"}),v(r)&&(0,a.jsx)("span",{className:"rounded-full bg-blue-500/10 px-2 py-0.5 text-[10px] font-semibold text-blue-600 dark:text-blue-400",children:v(r)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${A?"bg-surface-2 text-text-muted":"active"===r.testStatus||"success"===r.testStatus?"bg-green-500/10 text-green-600 dark:text-green-400":"error"===r.testStatus||"expired"===r.testStatus||"unavailable"===r.testStatus?"bg-red-500/10 text-red-600 dark:text-red-400":"bg-surface-2 text-text-muted"}`,children:A?"disabled":r.testStatus||"unknown"}),r.providerSpecificData?.profileArn&&(0,a.jsxs)("button",{type:"button",onClick:()=>t(r.providerSpecificData.profileArn,r.id),title:r.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:e===r.id?"check":"content_copy"}),(0,a.jsx)("code",{className:"truncate font-mono",children:r.providerSpecificData.profileArn})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[E&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.default,{text:P>0?`Use one Codex reset credit. Available: ${P}`:"No Codex reset credits available",children:(0,a.jsxs)("button",{type:"button",onClick:()=>Q({connection:r,resetCreditCount:P}),disabled:P<=0||N||q,"aria-label":P>0?`Use one Codex reset credit. ${P} available.`:"No Codex reset credits available",className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${P>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-black/10 bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${D?"animate-spin":""}`,children:D?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:P})]})}),(0,a.jsx)(d.default,{text:"View Codex reset credit expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>eF(r),disabled:N||q,"aria-label":"View Codex reset credit expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-muted transition-colors hover:bg-black/5 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})})]}),g[r.provider]&&"oauth"===r.authType&&(0,a.jsx)(d.default,{text:f[r.provider],children:(0,a.jsx)("button",{type:"button",onClick:()=>eR(r.id,r.provider,T[r.provider]?.[r.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${T[r.provider]?.[r.id]===!0?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)(d.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>eL(r.id,r.provider),disabled:N||q,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${N?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(d.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>{er(r),ee(!0)},disabled:q,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(d.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>eU(r.id),disabled:q,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${R===r.id?"animate-pulse":""}`,children:"delete"})})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:r.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(o.default,{size:"sm",checked:r.isActive??!0,disabled:q,onChange:e=>ez(r.id,e)})})]})]})}),(0,a.jsxs)("div",{className:"px-3 py-3",children:[N?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):S?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:S})]}):w?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:w.message})}):(0,a.jsx)(n,{quotas:_,compact:!0,sortMode:"default",showSortLabel:"codex"===r.provider&&"default"!==ex,onHideQuota:e=>eW(r.provider,e)}),w?.message&&!S&&!N&&(0,a.jsx)("p",{className:"mt-2 px-1 text-[10px] leading-relaxed text-text-muted",children:w.message}),L.length>0&&(0,a.jsxs)("div",{className:"mt-2 flex min-w-0 items-center gap-1 border-t border-black/5 pt-2 text-[10px] text-text-muted dark:border-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px]",children:"visibility_off"}),(0,a.jsx)("span",{className:"shrink-0",children:"Hidden:"}),(0,a.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap pb-2",children:L.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>eG(r.provider,e),className:"shrink-0 rounded-md border border-black/10 px-1.5 py-0.5 transition-colors hover:bg-black/5 hover:text-text-primary dark:border-white/10 dark:hover:bg-white/5",title:"Show this quota row",children:e.name},(0,l.Ih)(e)))})]})]})]},r.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:e0}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:e1?"custom":String(ej),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(ew(1),eN(r),eS(String(r)))},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":"Accounts per page",children:[l.pT.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(l.b8),inputMode:"numeric",value:eC,onChange:e=>eS(e.target.value),onBlur:()=>{let e=Number.parseInt(eC,10);if(!Number.isFinite(e))return void eS(String(ej));let t=Math.min(l.b8,Math.max(1,e));ew(1),eN(t),eS(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eC,10);if(!Number.isFinite(t))return void eS(String(ej));let r=Math.min(l.b8,Math.max(1,t));ew(1),eN(r),eS(String(r))},className:"h-8 w-20 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":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",e$.page," / ",e$.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>ew(1),disabled:e$.page<=1||J||M,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>ew(e=>Math.max(1,e-1)),disabled:e$.page<=1||J||M,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>ew(e=>Math.min(e$.totalPages,e+1)),disabled:e$.page>=e$.totalPages||J||M,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>ew(e$.totalPages),disabled:e$.page>=e$.totalPages||J||M,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,a.jsx)(m.uo,{isOpen:!!B,onClose:()=>{V||Q(null)},onConfirm:async()=>{let e=B?.connection;e&&(await eM(e.id,e.provider),Q(null))},title:"Reset Codex limit?",message:`Use 1 Codex reset credit for ${(0,l.JJ)(B?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${B?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!V}),Z&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-4 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"w-full max-w-2xl overflow-hidden rounded-2xl border border-black/15 bg-white shadow-2xl ring-1 ring-black/10 dark:border-white/15 dark:bg-neutral-950 dark:ring-white/10",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-black/10 bg-black/[0.03] px-4 py-3 dark:border-white/10 dark:bg-white/[0.04]",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-text-primary",children:"Codex Reset Credit Expiry"}),(0,a.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:(0,l.JJ)(Z.connection)||"Codex account"})]}),(0,a.jsx)("button",{type:"button",onClick:()=>X(null),className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5","aria-label":"Close reset credit expiry modal",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,a.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-white p-4 dark:bg-neutral-950",children:Z.loading?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading reset credits..."]}):Z.error?(0,a.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300",children:Z.error}):Z.data?.credits?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl 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)("span",{children:[Z.data.credits.length," reset credit",1===Z.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[Z.data.availableCount??0," available"]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Granted At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:Z.data.credits.map((e,t)=>(0,a.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.status||"unknown"})}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:k(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:k(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:function(e){if(!e)return"N/A";let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t))return"N/A";if(t<=0)return"Expired";let r=Math.ceil(t/36e5),a=Math.floor(r/24),s=r%24;return a>0?`${a}d ${s}h`:`${s}h`}(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-8 text-center text-sm text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"No reset credit details returned for this account."})})]})}),(0,a.jsx)(m.wI,{isOpen:Y,connection:et,proxyPools:ea,onSave:eJ,onClose:()=>{ee(!1),er(null)}})]}):(0,a.jsx)(c.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:eY.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:eY.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:eY.description})]})}):(0,a.jsx)(c.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}},68818:(e,t,r)=>{Promise.resolve().then(r.bind(r,40869)),Promise.resolve().then(r.bind(r,25086))}},e=>{e.O(0,[3277,1321,705,5497,8198,8441,3794,7358],()=>e(e.s=68818)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i(95155),r=i(35497),n=i(11059);let a="decolua/9router",o="master",c="skills",d=`https://github.com/${a}`,l=`https://raw.githubusercontent.com/${a}/refs/heads/${o}/${c}`,m=`https://github.com/${a}/blob/${o}/${c}`,x=[{id:"9router",name:"9Router (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"9router-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"9router-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"9router-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"9router-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"9router-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"9router-web-search",name:"Web Search",description:"Web and X search via Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com / Xquik.",endpoint:"/v1/search",icon:"search"},{id:"9router-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function p(e){return`${l}/${e}/SKILL.md`}function h({value:e,label:t="Copy link"}){let{copied:i,copy:r}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>r(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?"Copied!":t]})}function u({skill:e}){var t;let i=p(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,s.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,s.jsx)(r.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,s.jsx)(r.Ex,{variant:"default",size:"sm",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,s.jsxs)("a",{href:(t=e.id,`${m}/${t}/SKILL.md`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[i,(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,s.jsx)(h,{value:i})]})}function b(){return(0,s.jsxs)("div",{className:"max-w-4xl mx-auto space-y-6",children:[(0,s.jsxs)(r.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted mb-2",children:"Paste this to your AI:"}),(0,s.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",p("9router")]})]}),(0,s.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,s.jsx)(u,{skill:e},e.id))}),(0,s.jsx)(r.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Browse source, README, and examples."})]}),(0,s.jsxs)("a",{href:`${d}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}},71815:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))}},e=>{e.O(0,[3277,1321,705,5497,8441,3794,7358],()=>e(e.s=71815)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{12335:(e,t,a)=>{Promise.resolve().then(a.bind(a,70323))},70323:(e,t,a)=>{"use strict";a.d(t,{default:()=>m});var s=a(95155),l=a(12115),r=a(35497),n=a(11059),i=a(73006);let o=["zh-CN","zh-TW"],c=[{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}],d=[{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"}];function m(){let[e,t]=(0,l.useState)(!0),[a,m]=(0,l.useState)(!1),[x,h]=(0,l.useState)("http://localhost:8787"),[p,u]=(0,l.useState)(3e3),[f,g]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[b,j]=(0,l.useState)(!1),[y,v]=(0,l.useState)(!1),[N,w]=(0,l.useState)(""),[k,C]=(0,l.useState)({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),[S,E]=(0,l.useState)([]),[P,T]=(0,l.useState)(!1),[$,I]=(0,l.useState)(""),[R,O]=(0,l.useState)(null),[M,L]=(0,l.useState)(""),[U,H]=(0,l.useState)(null),[_,A]=(0,l.useState)(!1),[D,F]=(0,l.useState)(!0),[B,J]=(0,l.useState)(!1),W=(0,l.useRef)(null),[z,G]=(0,l.useState)(!1),[K,X]=(0,l.useState)("full"),[q,Y]=(0,l.useState)(!1),[Q,Z]=(0,l.useState)("full"),[V,ee]=(0,l.useState)(!1),[et,ea]=(0,l.useState)(25e3),[es,el]=(0,l.useState)({installed:!1,installing:!1,running:!1,version:null,loading:!0}),[er,en]=(0,l.useState)(null),[ei,eo]=(0,l.useState)(!1),[ec,ed]=(0,l.useState)(!1),[em,ex]=(0,l.useState)(""),[eh,ep]=(0,l.useState)("en"),{copied:eu,copy:ef}=(0,n.C)();(0,l.useEffect)(()=>(ep((0,i.kk)()),(0,i.oQ)(()=>ep((0,i.kk)()))),[]);let eg=o.includes(eh),eb=eg?c:c.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.find(e=>e.id===K);e?.wenyan&&!eg&&(X("ultra"),ej({cavemanLevel:"ultra"}))},[eg,K]);let ej=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},ey=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},ev=async()=>{let e=x.trim()||"http://localhost:8787";h(e),await ej({headroomUrl:e}),eN()},eN=(0,l.useCallback)(async()=>{g(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();if(g({...t,loading:!1}),!t?.installed){C({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),E([]);return}try{let e=await fetch("/api/headroom/extras",{headers:{"Cache-Control":"no-store"}});if(!e.ok)throw Error("extras status failed");let t=await e.json();C(e=>({...e,version:t.version??null,extras:t.extras||{code:!1,ml:!1},available:t.available||["code","ml"],loading:!1})),E([])}catch{C({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),E([])}}catch{g({installed:!1,running:!1,python:null,loading:!1}),C({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),E([])}},[]),ew=(0,l.useCallback)(async()=>{w(""),v(!0);try{let e=await fetch("/api/headroom/start",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to start proxy");await eN()}catch(e){w(e.message)}finally{v(!1)}},[eN]),ek=(0,l.useCallback)(async()=>{v(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await eN()}finally{v(!1)}},[eN]),eC=(0,l.useCallback)(()=>{L(""),W.current&&clearInterval(W.current);let e=async()=>{try{let e=await fetch("/api/headroom/extras?log=1",{headers:{"Cache-Control":"no-store"}}),t=await e.json().catch(()=>({}));"string"==typeof t.log&&L(t.log)}catch{}};e(),W.current=setInterval(e,1500)},[]),eS=(0,l.useCallback)(()=>{W.current&&(clearInterval(W.current),W.current=null)},[]);(0,l.useEffect)(()=>()=>eS(),[eS]);let eE=(0,l.useCallback)(async()=>{if(0!==S.length){T(!0),I(""),eC();try{let e=await fetch("/api/headroom/extras",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:S})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Install failed");C(e=>({...e,version:t.version??e.version,extras:t.extras||e.extras})),E([])}catch(e){I(e.message)}finally{eS(),T(!1)}}},[S,eC,eS]),eP=(0,l.useCallback)(async e=>{O(e),I(""),eC();try{let t=await fetch("/api/headroom/extras",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:[e]})}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||"Remove failed");C(e=>({...e,version:a.version??e.version,extras:a.extras||e.extras}))}catch(e){I(e.message)}finally{eS(),O(null)}},[eC,eS]),eT=(0,l.useCallback)(()=>{if(0!==S.length){if(S.includes("ml"))return void H({title:"Install [ml]",message:"[ml] downloads ~1 GB (torch + huggingface-hub). Continue?",confirmText:"Install",variant:"primary",onConfirm:eE});eE()}},[S,eE]),e$=(0,l.useCallback)(e=>{H({title:`Remove [${e}]`,message:`Remove [${e}] and its packages?`,confirmText:"Remove",variant:"danger",onConfirm:()=>eP(e)})},[eP]),eI=(0,l.useCallback)(async(e,t)=>{if(I(""),"code"===e&&A(t),"ml"===e&&F(t),await ej({["code"===e?"headroomCodeAware":"headroomKompress"]:t}),f.running){J(!0);try{let e=await fetch("/api/headroom/restart",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Restart failed");await eN()}catch(e){I(e.message)}finally{J(!1)}}},[f.running,eN]),eR=(0,l.useCallback)(async()=>{el(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();el({...t,loading:!1}),"number"==typeof t.minChars&&ea(t.minChars)}catch{el({installed:!1,installing:!1,running:!1,version:null,loading:!1})}},[]),eO=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/pxpipe/health",{method:"POST"});en(await e.json())}catch(e){en({healthy:!1,checks:[],error:e.message})}},[]),eM=(0,l.useCallback)(async e=>{ex(""),ed(!0);try{let t=await fetch(`/api/pxpipe/${e}`,{method:"POST"}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||`PXPIPE ${e} failed`);await eR(),await eO()}catch(e){ex(e.message)}finally{ed(!1)}},[eR,eO]);(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let a=await e.json();t(!1!==a.rtkEnabled),m(!!a.headroomEnabled),h(a.headroomUrl||"http://localhost:8787"),"number"==typeof a.headroomTimeoutMs&&u(a.headroomTimeoutMs),A(!0===a.headroomCodeAware),F(!1!==a.headroomKompress),G(!!a.cavemanEnabled),X(a.cavemanLevel||"full"),Y(!!a.ponytailEnabled),Z(a.ponytailLevel||"full"),ee(!!a.pxpipeEnabled),"number"==typeof a.pxpipeMinChars&&ea(a.pxpipeMinChars),eN(),eR().then(eO)}}catch{}})()},[eN,eR,eO]);let eL=!!f.running,eU=f.loading?"Checking…":eL?"Running":!1===f.localUrl||f.installed?!1!==f.localUrl?"Stopped":"External":"Not installed",eH=!1!==f.localUrl,e_=!!f.canStart,eA=eH&&!!f.managedPid,eD=er?.healthy===!0,eF=es.loading?"Checking…":es.installing?"Installing…":es.installed?eD?"Healthy":es.running?"Running":"Stopped":"Not installed";return eD||es.running,(0,s.jsxs)("div",{className:"space-y-6 p-6",children:[(0,s.jsxs)(r.Zp,{id:"rtk",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,s.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,s.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,s.jsx)(r.lM,{checked:e,onChange:()=>ey(!e)})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-4 gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,s.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,s.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${eL?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:eU}),(0,s.jsx)("button",{type:"button",onClick:()=>j(!0),className:"text-xs text-primary underline hover:opacity-80",children:eL?"Manage":"Setup"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,s.jsx)(r.lM,{checked:a,onChange:()=>{var e;let t;return e=!a,void(h(t=x.trim()||"http://localhost:8787"),m(e),ej({headroomEnabled:e,headroomUrl:t}))}})]}),f.installed&&(0,s.jsxs)("div",{className:"mb-3 ml-1 pl-3 pb-4 border-l-2 border-border",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Compression extras",k.version?` \xb7 v${k.version}`:"",":"]}),k.available.map(e=>{let t=!!k.extras[e],a=S.includes(e),l="code"===e?"tree-sitter AST compression for code responses":"Kompress-v2 HF model for prose/agentic traces (~+1GB)";if(t){let t="code"===e?_:D;return(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs px-2 py-1 rounded border border-success/40 bg-success/5 text-text",title:l,children:[(0,s.jsx)(r.lM,{size:"sm",checked:t,disabled:B,onChange:()=>eI(e,!t)}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("button",{type:"button",onClick:()=>e$(e),disabled:R===e,className:"ml-1 text-error underline hover:opacity-80 disabled:opacity-50",title:`Uninstall [${e}]`,children:R===e?"Uninstalling…":"Uninstall"})]},e)}return(0,s.jsxs)("label",{className:`flex items-center gap-1.5 text-xs px-2 py-1 rounded border cursor-pointer transition-colors ${a?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:bg-surface-2"}`,title:l,children:[(0,s.jsx)("input",{type:"checkbox",className:"w-3 h-3",checked:a,onChange:()=>{E(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("span",{className:"opacity-70",children:"not installed"})]},e)}),S.length>0&&(0,s.jsx)("button",{onClick:eT,disabled:P,className:"text-xs px-2.5 py-1 rounded bg-primary text-white hover:opacity-90 disabled:opacity-50",children:P?"Installing…":`Install [proxy,${S.join(",")}]`})]}),$&&(0,s.jsx)("p",{className:"text-xs text-error mt-1",children:$}),B&&(0,s.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Restarting proxy…"}),(P||R)&&M&&(0,s.jsx)("pre",{className:"mt-2 max-h-32 overflow-auto rounded bg-surface-2 p-2 text-[10px] leading-tight text-text-muted whitespace-pre-wrap",children:M}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Installing adds the package; use ",(0,s.jsx)("code",{children:"on"}),"/",(0,s.jsx)("code",{children:"off"})," ","to activate it (restarts the proxy). Default install is"," ",(0,s.jsx)("code",{children:"[proxy]"})," only (SmartCrusher for JSON). Adding"," ",(0,s.jsx)("code",{children:"[code]"})," enables AST compression (Python/JS/TS/Go/Rust/Java/C/C++/Perl). Adding ",(0,s.jsx)("code",{children:"[ml]"})," ","enables the Kompress-v2 HF model for prose/agentic traces but adds ~1 GB (torch + huggingface-hub)."]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-4 border-t border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,s.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[z&&(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:eb.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;X(t=e.id),ej({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${K===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,s.jsx)("p",{className:"text-xs text-primary",children:c.find(e=>e.id===K)?.desc})]}),(0,s.jsx)(r.lM,{checked:z,onChange:()=>{var e;G(e=!z),ej({cavemanEnabled:e})}})]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,s.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[q&&(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:d.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;Z(t=e.id),ej({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${Q===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,s.jsx)("p",{className:"text-xs text-primary",children:d.find(e=>e.id===Q)?.desc})]}),(0,s.jsx)(r.lM,{checked:q,onChange:()=>{var e;Y(e=!q),ej({ponytailEnabled:e})}})]})]}),!1]}),(0,s.jsx)(r.aF,{isOpen:b,title:eL?"Headroom":"Setup Headroom",onClose:()=>j(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{children:"Status"}),(0,s.jsx)("span",{className:eL?"text-success":"text-warning",children:eU})]}),eL&&(0,s.jsx)("a",{href:"/api/headroom/proxy/dashboard",target:"_blank",rel:"noreferrer",className:"w-full rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Headroom Dashboard"}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,s.jsx)(r.pd,{value:x,onChange:e=>h(e.target.value),onBlur:ev,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a local proxy for Start/Stop, or an external Docker sidecar like http://headroom:8787."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Timeout (ms)"}),(0,s.jsx)(r.pd,{value:String(p),onChange:e=>u(e.target.value),onBlur:()=>{let e=Math.round(Number(p)),t=Number.isFinite(e)&&e>0?e:3e3;u(t),ej({headroomTimeoutMs:t})},placeholder:"3000",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Request timeout in milliseconds. Defaults to 3000 ms."})]}),eA?(0,s.jsx)(r.$n,{onClick:ek,variant:"ghost",fullWidth:!0,disabled:y,children:y?"Stopping…":"Stop Headroom"}):eL?(0,s.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):e_?(0,s.jsx)(r.$n,{onClick:ew,fullWidth:!0,disabled:y,children:y?"Starting…":"Start Headroom"}):eH?f.python?(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("pre",{className:"flex-1 rounded bg-black/5 dark:bg-white/5 p-2 text-xs font-mono overflow-x-auto",children:'pip install "headroom-ai[proxy]"'}),(0,s.jsx)(r.$n,{size:"sm",variant:"ghost",onClick:()=>ef('pip install "headroom-ai[proxy]"'),children:eu?"Copied":"Copy"})]})]}):(0,s.jsx)("p",{className:"text-sm text-warning",children:"Python ≥ 3.10 required for local managed mode. Install Python first, or use an external proxy URL."}):(0,s.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),N&&(0,s.jsx)("p",{className:"text-sm text-warning",children:N}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>eN(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>j(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(r.aF,{isOpen:!1,title:es.installed?"PXPIPE":"Setup PXPIPE",onClose:()=>eo(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Compress prompts using multimodal encoding. Runs in-process — no extra server or environment variables required."}),(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{children:"Status"}),(0,s.jsxs)("span",{className:eD||es.running?"text-success":"text-warning",children:[eF,es.version?` \xb7 v${es.version}`:""]})]}),er?.checks?.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 rounded border border-border p-3",children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-1",children:"Health check"}),er.checks.map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,s.jsxs)("span",{className:e.ok?"text-success":"text-warning",children:[e.ok?"●":"○"," ",e.label]}),e.detail&&(0,s.jsx)("span",{className:"text-text-muted font-mono truncate max-w-[50%]",children:e.detail})]},e.id)),er.error&&(0,s.jsx)("p",{className:"text-xs text-warning mt-1",children:er.error})]}),es.installed?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[es.running?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.$n,{onClick:()=>eM("restart"),variant:"ghost",disabled:ec,children:"Restart"}),(0,s.jsx)(r.$n,{onClick:()=>eM("stop"),variant:"ghost",disabled:ec,children:"Stop"})]}):(0,s.jsx)(r.$n,{onClick:()=>eM("start"),disabled:ec,children:ec?"Starting…":"Start"}),(0,s.jsx)(r.$n,{onClick:()=>eM("install"),variant:"ghost",disabled:ec,children:"Repair"}),(0,s.jsx)("a",{href:"/dashboard/pxpipe#logs",className:"col-span-2 rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Logs"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("p",{className:"text-sm text-warning",children:"PXPIPE is not installed."}),(0,s.jsx)(r.$n,{onClick:()=>eM("install"),fullWidth:!0,disabled:ec||es.installing,children:ec||es.installing?"Installing…":"Install"}),(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Installs the npm package ",(0,s.jsx)("code",{className:"font-mono",children:"pxpipe-proxy"})," into the 9Router data directory. May take a few minutes."]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Minimum prompt size (chars)"}),(0,s.jsx)(r.pd,{value:String(et),onChange:e=>ea(e.target.value),onBlur:()=>{let e=Math.max(0,Number(et)||25e3);ea(e),ej({pxpipeMinChars:e})},placeholder:"25000",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Requests smaller than this bypass PXPIPE and are sent as-is."})]}),em&&(0,s.jsx)("p",{className:"text-sm text-warning",children:em}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>eR().then(eO),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>eo(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(r.uo,{isOpen:!!U,onClose:()=>H(null),onConfirm:()=>{let e=U?.onConfirm;H(null),e?.()},title:U?.title,message:U?.message,confirmText:U?.confirmText,variant:U?.variant})]})}}},e=>{e.O(0,[3277,1321,705,5497,8441,3794,7358],()=>e(e.s=12335)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9305],{5940:(e,s,n)=>{Promise.resolve().then(n.bind(n,96748)),Promise.resolve().then(n.bind(n,2716)),Promise.resolve().then(n.bind(n,56319)),Promise.resolve().then(n.bind(n,56061)),Promise.resolve().then(n.bind(n,92542)),Promise.resolve().then(n.bind(n,29366)),Promise.resolve().then(n.bind(n,84588)),Promise.resolve().then(n.bind(n,97556)),Promise.resolve().then(n.bind(n,45455)),Promise.resolve().then(n.bind(n,30815)),Promise.resolve().then(n.bind(n,73579)),Promise.resolve().then(n.bind(n,92173)),Promise.resolve().then(n.bind(n,95088)),Promise.resolve().then(n.bind(n,24747)),Promise.resolve().then(n.bind(n,80752)),Promise.resolve().then(n.bind(n,23936)),Promise.resolve().then(n.bind(n,11910)),Promise.resolve().then(n.bind(n,61500)),Promise.resolve().then(n.bind(n,62899)),Promise.resolve().then(n.bind(n,94230)),Promise.resolve().then(n.bind(n,21931)),Promise.resolve().then(n.bind(n,91450)),Promise.resolve().then(n.bind(n,7648)),Promise.resolve().then(n.bind(n,25086)),Promise.resolve().then(n.bind(n,28815)),Promise.resolve().then(n.bind(n,28058)),Promise.resolve().then(n.bind(n,81127)),Promise.resolve().then(n.bind(n,72908)),Promise.resolve().then(n.bind(n,36548)),Promise.resolve().then(n.bind(n,4823)),Promise.resolve().then(n.bind(n,90882)),Promise.resolve().then(n.bind(n,51825)),Promise.resolve().then(n.bind(n,23615)),Promise.resolve().then(n.bind(n,28067)),Promise.resolve().then(n.bind(n,98)),Promise.resolve().then(n.bind(n,92622)),Promise.resolve().then(n.bind(n,21110)),Promise.resolve().then(n.bind(n,38587)),Promise.resolve().then(n.bind(n,98542)),Promise.resolve().then(n.bind(n,97677)),Promise.resolve().then(n.bind(n,10319))}},e=>{e.O(0,[3277,1321,705,5497,8441,3794,7358],()=>e(e.s=5940)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,383,387,501,513,516,543,552,649,675,747,748,836,907,931,948,992,997,999,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1545,1566,1644,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2179,2185,2198,2284,2296,2366,2499,2536,2560,2772,2785,2797,2802,2845,2919,2922,3025,3038,3079,3152,3323,3397,3472,3486,3519,3549,3562,3568,3648,3883,3888,4010,4061,4093,4245,4286,4310,4346,4422,4444,4527,4612,4648,4656,4664,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,5968,6089,6091,6102,6121,6215,6268,6319,6463,6478,6479,6529,6580,6594,6740,6743,6819,6835,6919,6934,6988,6996,7131,7158,7241,7311,7329,7429,7445,7473,7508,7520,7758,7824,7851,8026,8141,8167,8207,8246,8264,8453,8489,8573,8648,8736,8791,8814,8835,8870,8879,8948,8974,8975,9027,9036,9056,9069,9088,9141,9194,9199,9321,9369,9427,9461,9595,9606,9678,9709,9738,9884],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,383,387,501,513,516,543,552,649,675,747,748,836,907,931,948,992,997,999,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1545,1566,1644,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2179,2185,2198,2284,2296,2366,2499,2536,2560,2772,2785,2797,2802,2845,2919,2922,3025,3038,3079,3152,3323,3397,3472,3486,3519,3549,3562,3568,3648,3883,3888,4010,4061,4093,4245,4286,4310,4346,4422,4444,4527,4612,4648,4656,4664,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,5968,6089,6091,6102,6121,6215,6268,6319,6463,6478,6479,6529,6580,6594,6740,6743,6819,6835,6919,6934,6988,6996,7131,7158,7241,7311,7329,7429,7445,7473,7508,7520,7758,7824,7851,8026,8141,8167,8207,8246,8264,8453,8489,8573,8648,8736,8791,8814,8835,8870,8879,8948,8974,8975,9027,9036,9056,9069,9088,9141,9194,9199,9321,9369,9427,9461,9595,9606,9678,9709,9738,9884],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,383,387,501,513,516,543,552,649,675,747,748,836,907,931,948,992,997,999,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1545,1566,1644,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2179,2185,2198,2284,2296,2366,2499,2536,2560,2772,2785,2797,2802,2845,2919,2922,3025,3038,3079,3152,3323,3397,3472,3486,3519,3549,3562,3568,3648,3883,3888,4010,4061,4093,4245,4286,4310,4346,4422,4444,4527,4612,4648,4656,4664,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,5968,6089,6091,6102,6121,6215,6268,6319,6463,6478,6479,6529,6580,6594,6740,6743,6819,6835,6919,6934,6988,6996,7131,7158,7241,7311,7329,7429,7445,7473,7508,7520,7758,7824,7851,8026,8141,8167,8207,8246,8264,8453,8489,8573,8648,8736,8791,8814,8835,8870,8879,8948,8974,8975,9027,9036,9056,9069,9088,9141,9194,9199,9321,9369,9427,9461,9595,9606,9678,9709,9738,9884],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,383,387,501,513,516,543,552,649,675,747,748,836,907,931,948,992,997,999,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1545,1566,1644,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2179,2185,2198,2284,2296,2366,2499,2536,2560,2772,2785,2797,2802,2845,2919,2922,3025,3038,3079,3152,3323,3397,3472,3486,3519,3549,3562,3568,3648,3883,3888,4010,4061,4093,4245,4286,4310,4346,4422,4444,4527,4612,4648,4656,4664,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,5968,6089,6091,6102,6121,6215,6268,6319,6463,6478,6479,6529,6580,6594,6740,6743,6819,6835,6919,6934,6988,6996,7131,7158,7241,7311,7329,7429,7445,7473,7508,7520,7758,7824,7851,8026,8141,8167,8207,8246,8264,8453,8489,8573,8648,8736,8791,8814,8835,8870,8879,8948,8974,8975,9027,9036,9056,9069,9088,9141,9194,9199,9321,9369,9427,9461,9595,9606,9678,9709,9738,9884],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,383,387,501,513,516,543,552,649,675,747,748,836,907,931,948,992,997,999,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1545,1566,1644,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2179,2185,2198,2284,2296,2366,2499,2536,2560,2772,2785,2797,2802,2845,2919,2922,3025,3038,3079,3152,3323,3397,3472,3486,3519,3549,3562,3568,3648,3883,3888,4010,4061,4093,4245,4286,4310,4346,4422,4444,4527,4612,4648,4656,4664,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,5968,6089,6091,6102,6121,6215,6268,6319,6463,6478,6479,6529,6580,6594,6740,6743,6819,6835,6919,6934,6988,6996,7131,7158,7241,7311,7329,7429,7445,7473,7508,7520,7758,7824,7851,8026,8141,8167,8207,8246,8264,8453,8489,8573,8648,8736,8791,8814,8835,8870,8879,8948,8974,8975,9027,9036,9056,9069,9088,9141,9194,9199,9321,9369,9427,9461,9595,9606,9678,9709,9738,9884],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,383,387,501,513,516,543,552,649,675,747,748,836,907,931,948,992,997,999,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1545,1566,1644,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2179,2185,2198,2284,2296,2366,2499,2536,2560,2772,2785,2797,2802,2845,2919,2922,3025,3038,3079,3152,3323,3397,3472,3486,3519,3549,3562,3568,3648,3883,3888,4010,4061,4093,4245,4286,4310,4346,4422,4444,4527,4612,4648,4656,4664,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,5968,6089,6091,6102,6121,6215,6268,6319,6463,6478,6479,6529,6580,6594,6740,6743,6819,6835,6919,6934,6988,6996,7131,7158,7241,7311,7329,7429,7445,7473,7508,7520,7758,7824,7851,8026,8141,8167,8207,8246,8264,8453,8489,8573,8648,8736,8791,8814,8835,8870,8879,8948,8974,8975,9027,9036,9056,9069,9088,9141,9194,9199,9321,9369,9427,9461,9595,9606,9678,9709,9738,9884],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,383,387,501,513,516,543,552,649,675,747,748,836,907,931,948,992,997,999,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1545,1566,1644,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2179,2185,2198,2284,2296,2366,2499,2536,2560,2772,2785,2797,2802,2845,2919,2922,3025,3038,3079,3152,3323,3397,3472,3486,3519,3549,3562,3568,3648,3883,3888,4010,4061,4093,4245,4286,4310,4346,4422,4444,4527,4612,4648,4656,4664,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,5968,6089,6091,6102,6121,6215,6268,6319,6463,6478,6479,6529,6580,6594,6740,6743,6819,6835,6919,6934,6988,6996,7131,7158,7241,7311,7329,7429,7445,7473,7508,7520,7758,7824,7851,8026,8141,8167,8207,8246,8264,8453,8489,8573,8648,8736,8791,8814,8835,8870,8879,8948,8974,8975,9027,9036,9056,9069,9088,9141,9194,9199,9321,9369,9427,9461,9595,9606,9678,9709,9738,9884],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,383,387,501,513,516,543,552,649,675,747,748,836,907,931,948,992,997,999,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1545,1566,1644,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2179,2185,2198,2284,2296,2366,2499,2536,2560,2772,2785,2797,2802,2845,2919,2922,3025,3038,3079,3152,3323,3397,3472,3486,3519,3549,3562,3568,3648,3883,3888,4010,4061,4093,4245,4286,4310,4346,4422,4444,4527,4612,4648,4656,4664,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,5968,6089,6091,6102,6121,6215,6268,6319,6463,6478,6479,6529,6580,6594,6740,6743,6819,6835,6919,6934,6988,6996,7131,7158,7241,7311,7329,7429,7445,7473,7508,7520,7758,7824,7851,8026,8141,8167,8207,8246,8264,8453,8489,8573,8648,8736,8791,8814,8835,8870,8879,8948,8974,8975,9027,9036,9056,9069,9088,9141,9194,9199,9321,9369,9427,9461,9595,9606,9678,9709,9738,9884],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,383,387,501,513,516,543,552,649,675,747,748,836,907,931,948,992,997,999,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1545,1566,1644,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2179,2185,2198,2284,2296,2366,2499,2536,2560,2772,2785,2797,2802,2845,2919,2922,3025,3038,3079,3152,3323,3397,3472,3486,3519,3549,3562,3568,3648,3883,3888,4010,4061,4093,4245,4286,4310,4346,4422,4444,4527,4612,4648,4656,4664,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,5968,6089,6091,6102,6121,6215,6268,6319,6463,6478,6479,6529,6580,6594,6740,6743,6819,6835,6919,6934,6988,6996,7131,7158,7241,7311,7329,7429,7445,7473,7508,7520,7758,7824,7851,8026,8141,8167,8207,8246,8264,8453,8489,8573,8648,8736,8791,8814,8835,8870,8879,8948,8974,8975,9027,9036,9056,9069,9088,9141,9194,9199,9321,9369,9427,9461,9595,9606,9678,9709,9738,9884],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,383,387,501,513,516,543,552,649,675,747,748,836,907,931,948,992,997,999,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1545,1566,1644,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2179,2185,2198,2284,2296,2366,2499,2536,2560,2772,2785,2797,2802,2845,2919,2922,3025,3038,3079,3152,3323,3397,3472,3486,3519,3549,3562,3568,3648,3883,3888,4010,4061,4093,4245,4286,4310,4346,4422,4444,4527,4612,4648,4656,4664,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,5968,6089,6091,6102,6121,6215,6268,6319,6463,6478,6479,6529,6580,6594,6740,6743,6819,6835,6919,6934,6988,6996,7131,7158,7241,7311,7329,7429,7445,7473,7508,7520,7758,7824,7851,8026,8141,8167,8207,8246,8264,8453,8489,8573,8648,8736,8791,8814,8835,8870,8879,8948,8974,8975,9027,9036,9056,9069,9088,9141,9194,9199,9321,9369,9427,9461,9595,9606,9678,9709,9738,9884],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);