@rabbi696/ezrouter 0.6.38 → 0.6.39

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 (922) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +5 -5
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ha/page.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ha/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ha/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +5 -5
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/models/page.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/models/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/models/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +7 -7
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  94. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  95. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  97. package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page.js +1 -1
  98. package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page_client-reference-manifest.js +1 -1
  100. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  106. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  108. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  109. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  110. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  111. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  113. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  114. package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  115. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  116. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  117. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  118. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  119. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  120. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +2 -2
  161. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/ha/resolve/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/ha/status/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/health/status/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/health/status/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/models/caps/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/models/enabled/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/models/enabled/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/models-dev/import/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/models-dev/import/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/models-dev/refresh/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/models-dev/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/models-dev/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/callback/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/commandcode/auto-import/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/opendesign/device/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/opendesign/device/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/quota/custom/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/quota/custom/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/quota/custom/test/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/quota/custom/test/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/routing-health/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/settings/provider-order/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/settings/provider-order/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  411. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  442. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  444. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  445. package/app/.next-cli-build/server/app/api/usage/models/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/usage/models/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  448. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  449. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  450. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  454. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  455. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  456. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  460. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
  474. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
  475. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
  478. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
  480. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  484. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  486. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  487. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  488. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  489. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  490. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  491. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  493. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  494. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  495. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  496. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  497. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  498. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  499. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  500. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  501. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  502. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  503. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  504. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  505. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  506. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  507. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  508. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  509. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  510. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  511. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  512. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  513. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  514. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  515. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  516. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  517. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  518. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  519. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  520. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  521. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  522. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  523. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  524. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  525. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  526. package/app/.next-cli-build/server/app/api/wakeup/route.js +1 -1
  527. package/app/.next-cli-build/server/app/api/wakeup/route.js.nft.json +1 -1
  528. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  529. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  530. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  531. package/app/.next-cli-build/server/app/callback.html +1 -1
  532. package/app/.next-cli-build/server/app/callback.rsc +3 -3
  533. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  534. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  536. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  537. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  539. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  540. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  541. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  542. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  543. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  545. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  546. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  548. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  549. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  550. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  551. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  552. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  553. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  555. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  556. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  557. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  558. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  559. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  560. package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  561. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  562. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  563. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  565. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  566. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  567. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  568. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
  570. package/app/.next-cli-build/server/app/dashboard/convoy.rsc +5 -5
  571. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
  572. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
  573. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  574. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  575. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +5 -5
  576. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +3 -3
  578. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +1 -1
  579. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  580. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  581. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  582. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  583. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  584. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  585. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  586. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  588. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  589. package/app/.next-cli-build/server/app/dashboard/ha.html +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/ha.rsc +4 -4
  591. package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk/dashboard/ha/__PAGE__.segment.rsc +1 -1
  592. package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk/dashboard/ha.segment.rsc +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  594. package/app/.next-cli-build/server/app/dashboard/ha.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  595. package/app/.next-cli-build/server/app/dashboard/ha.segments/_full.segment.rsc +4 -4
  596. package/app/.next-cli-build/server/app/dashboard/ha.segments/_head.segment.rsc +1 -1
  597. package/app/.next-cli-build/server/app/dashboard/ha.segments/_index.segment.rsc +3 -3
  598. package/app/.next-cli-build/server/app/dashboard/ha.segments/_tree.segment.rsc +1 -1
  599. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
  600. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +5 -5
  601. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
  602. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
  603. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  604. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  605. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  606. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +5 -5
  607. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
  608. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +3 -3
  609. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +1 -1
  610. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
  611. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +5 -5
  612. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
  613. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
  614. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  615. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  616. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  617. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +5 -5
  618. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
  619. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +3 -3
  620. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
  622. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +5 -5
  623. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
  624. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  625. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  626. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  627. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +5 -5
  628. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
  629. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +3 -3
  630. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +1 -1
  631. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  632. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  633. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  634. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  635. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  636. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  637. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  638. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  639. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  640. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  641. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  642. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  643. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  644. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  645. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  646. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  647. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  648. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  649. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  650. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  651. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  652. package/app/.next-cli-build/server/app/dashboard/models.html +1 -1
  653. package/app/.next-cli-build/server/app/dashboard/models.rsc +5 -5
  654. package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk/dashboard/models/__PAGE__.segment.rsc +2 -2
  655. package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk/dashboard/models.segment.rsc +1 -1
  656. package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  657. package/app/.next-cli-build/server/app/dashboard/models.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  658. package/app/.next-cli-build/server/app/dashboard/models.segments/_full.segment.rsc +5 -5
  659. package/app/.next-cli-build/server/app/dashboard/models.segments/_head.segment.rsc +1 -1
  660. package/app/.next-cli-build/server/app/dashboard/models.segments/_index.segment.rsc +3 -3
  661. package/app/.next-cli-build/server/app/dashboard/models.segments/_tree.segment.rsc +1 -1
  662. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  663. package/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  664. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  665. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  666. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  667. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  668. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  669. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  670. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  671. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  672. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  673. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  674. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  675. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  676. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  677. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  678. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  679. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  680. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  681. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  682. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  683. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  684. package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  685. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  686. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  687. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  688. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  689. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  690. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  691. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  692. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  693. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  694. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  695. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  696. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  697. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  698. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  699. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  700. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  701. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  702. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  703. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  704. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  705. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  706. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  707. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  708. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  709. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  710. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  711. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  712. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  713. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  714. package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  715. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  716. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  717. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  718. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  719. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  720. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  721. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  722. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  723. package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
  724. package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +5 -5
  725. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
  726. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
  727. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  728. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  729. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +5 -5
  730. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
  731. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +3 -3
  732. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +1 -1
  733. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  734. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  735. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  736. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  737. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  738. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  739. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  740. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  741. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  742. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  743. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  744. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  745. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  746. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  747. package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  748. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  749. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  750. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  751. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  752. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  753. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  754. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  755. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  756. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  757. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  758. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  759. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  760. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  761. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  762. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  763. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  764. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  765. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  766. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  767. package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  768. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  769. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  770. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  771. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  772. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  773. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  774. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  775. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  776. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  777. package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  778. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  779. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  780. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  781. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  782. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  783. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  784. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  785. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  786. package/app/.next-cli-build/server/app/dashboard/wakeup.html +1 -1
  787. package/app/.next-cli-build/server/app/dashboard/wakeup.rsc +4 -4
  788. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup/__PAGE__.segment.rsc +1 -1
  789. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup.segment.rsc +1 -1
  790. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  791. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  792. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_full.segment.rsc +4 -4
  793. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_head.segment.rsc +1 -1
  794. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_index.segment.rsc +3 -3
  795. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_tree.segment.rsc +1 -1
  796. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  797. package/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  798. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  799. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  800. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  801. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  802. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  803. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  804. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  805. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  806. package/app/.next-cli-build/server/app/index.html +1 -1
  807. package/app/.next-cli-build/server/app/index.rsc +3 -3
  808. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  809. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  810. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  811. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  812. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  813. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  814. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  815. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  816. package/app/.next-cli-build/server/app/landing.html +1 -1
  817. package/app/.next-cli-build/server/app/landing.rsc +3 -3
  818. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  819. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  820. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  821. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  822. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  823. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  824. package/app/.next-cli-build/server/app/login/page.js +1 -1
  825. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  826. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  827. package/app/.next-cli-build/server/app/login.html +1 -1
  828. package/app/.next-cli-build/server/app/login.rsc +4 -4
  829. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  830. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  831. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  832. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  833. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  834. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  835. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  836. package/app/.next-cli-build/server/app/page.js +1 -1
  837. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  838. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  839. package/app/.next-cli-build/server/app-paths-manifest.json +5 -5
  840. package/app/.next-cli-build/server/chunks/1253.js +1 -1
  841. package/app/.next-cli-build/server/chunks/1522.js +1 -1
  842. package/app/.next-cli-build/server/chunks/1596.js +244 -0
  843. package/app/.next-cli-build/server/chunks/1847.js +1 -1
  844. package/app/.next-cli-build/server/chunks/1923.js +1 -1
  845. package/app/.next-cli-build/server/chunks/2269.js +1 -1
  846. package/app/.next-cli-build/server/chunks/2807.js +1 -1
  847. package/app/.next-cli-build/server/chunks/2898.js +1 -1
  848. package/app/.next-cli-build/server/chunks/2937.js +1 -1
  849. package/app/.next-cli-build/server/chunks/2960.js +1 -0
  850. package/app/.next-cli-build/server/chunks/321.js +2 -2
  851. package/app/.next-cli-build/server/chunks/3547.js +1 -1
  852. package/app/.next-cli-build/server/chunks/369.js +31 -29
  853. package/app/.next-cli-build/server/chunks/412.js +1 -1
  854. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  855. package/app/.next-cli-build/server/chunks/4212.js +1 -1
  856. package/app/.next-cli-build/server/chunks/4646.js +1 -1
  857. package/app/.next-cli-build/server/chunks/4878.js +1 -1
  858. package/app/.next-cli-build/server/chunks/5044.js +29 -29
  859. package/app/.next-cli-build/server/chunks/5095.js +1 -1
  860. package/app/.next-cli-build/server/chunks/5461.js +1 -1
  861. package/app/.next-cli-build/server/chunks/5781.js +1 -1
  862. package/app/.next-cli-build/server/chunks/5941.js +1 -1
  863. package/app/.next-cli-build/server/chunks/6038.js +1 -1
  864. package/app/.next-cli-build/server/chunks/615.js +1 -1
  865. package/app/.next-cli-build/server/chunks/6172.js +1 -0
  866. package/app/.next-cli-build/server/chunks/6238.js +1 -0
  867. package/app/.next-cli-build/server/chunks/6247.js +1 -1
  868. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  869. package/app/.next-cli-build/server/chunks/6405.js +1 -1
  870. package/app/.next-cli-build/server/chunks/6558.js +1 -0
  871. package/app/.next-cli-build/server/chunks/6643.js +9 -0
  872. package/app/.next-cli-build/server/chunks/7047.js +5 -0
  873. package/app/.next-cli-build/server/chunks/7099.js +1 -1
  874. package/app/.next-cli-build/server/chunks/7302.js +1 -1
  875. package/app/.next-cli-build/server/chunks/7390.js +1 -0
  876. package/app/.next-cli-build/server/chunks/7547.js +2 -2
  877. package/app/.next-cli-build/server/chunks/7716.js +1 -1
  878. package/app/.next-cli-build/server/chunks/7791.js +1 -1
  879. package/app/.next-cli-build/server/chunks/795.js +1 -1
  880. package/app/.next-cli-build/server/chunks/7972.js +2 -2
  881. package/app/.next-cli-build/server/chunks/8129.js +1 -1
  882. package/app/.next-cli-build/server/chunks/8254.js +1 -0
  883. package/app/.next-cli-build/server/chunks/8306.js +1 -1
  884. package/app/.next-cli-build/server/chunks/8595.js +1 -1
  885. package/app/.next-cli-build/server/chunks/869.js +1 -1
  886. package/app/.next-cli-build/server/chunks/9013.js +1 -0
  887. package/app/.next-cli-build/server/chunks/9303.js +1 -1
  888. package/app/.next-cli-build/server/chunks/9485.js +1 -1
  889. package/app/.next-cli-build/server/chunks/9623.js +1 -1
  890. package/app/.next-cli-build/server/instrumentation.js +1 -1
  891. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  892. package/app/.next-cli-build/server/middleware.js +4 -4
  893. package/app/.next-cli-build/server/pages/404.html +1 -1
  894. package/app/.next-cli-build/server/pages/500.html +1 -1
  895. package/app/.next-cli-build/static/chunks/1321-eeb375c502dbb3c5.js +1 -0
  896. package/app/.next-cli-build/static/chunks/5497-1793b8b5349f48f8.js +17 -0
  897. package/app/.next-cli-build/static/chunks/801-000c65bead05e7c4.js +1 -0
  898. package/app/.next-cli-build/static/chunks/8105-20580523ec1fe595.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-7246616c24ede8fa.js → page-fc51d93ef1fa57e5.js} +12 -12
  900. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-0d946c1eaac6bc33.js → page-61f0f1acf8b46ffe.js} +1 -1
  901. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-e389e3a86bd28ebd.js +1 -0
  902. package/app/CHANGELOG.md +38 -0
  903. package/app/package.json +1 -1
  904. package/app/public/CHANGELOG.md +38 -0
  905. package/package.json +1 -1
  906. package/app/.next-cli-build/server/chunks/1390.js +0 -1
  907. package/app/.next-cli-build/server/chunks/169.js +0 -1
  908. package/app/.next-cli-build/server/chunks/3216.js +0 -1
  909. package/app/.next-cli-build/server/chunks/3378.js +0 -1
  910. package/app/.next-cli-build/server/chunks/4606.js +0 -1
  911. package/app/.next-cli-build/server/chunks/5187.js +0 -1
  912. package/app/.next-cli-build/server/chunks/656.js +0 -5
  913. package/app/.next-cli-build/server/chunks/7062.js +0 -5
  914. package/app/.next-cli-build/server/chunks/7225.js +0 -1
  915. package/app/.next-cli-build/server/chunks/7658.js +0 -248
  916. package/app/.next-cli-build/static/chunks/1321-ae4013f99085a326.js +0 -1
  917. package/app/.next-cli-build/static/chunks/5497-4ff55888b5e62f87.js +0 -17
  918. package/app/.next-cli-build/static/chunks/801-410b498dd92d55c0.js +0 -1
  919. package/app/.next-cli-build/static/chunks/8105-ced4e60d11786bd4.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-8c02c108699720b2.js +0 -1
  921. /package/app/.next-cli-build/static/{Rz3JABLEgmSs9rp5DsM9q → fYFaStfzlBB-WDPpZtzdy}/_buildManifest.js +0 -0
  922. /package/app/.next-cli-build/static/{Rz3JABLEgmSs9rp5DsM9q → fYFaStfzlBB-WDPpZtzdy}/_ssgManifest.js +0 -0
@@ -27,4 +27,4 @@ pt-only-auto-named`:es,[eo,ed]=(0,i.useState)("single"),[ec,em]=(0,i.useState)("
27
27
  ]`;function eg(e){let t,a=e.trim();if(!a)return[];try{t=JSON.parse(a)}catch(e){try{let e=a;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 ey({isOpen:e,onClose:t,onSuccess:a}){let[r,l]=(0,i.useState)(""),[n,o]=(0,i.useState)(!1),[d,m]=(0,i.useState)(""),[u,p]=(0,i.useState)(null),[h,x]=(0,i.useState)(!1),[f,g]=(0,i.useState)(null),y=(0,i.useRef)(null),b=()=>{n||(l(""),m(""),p(null),g(null),x(!1),t())},v=async e=>{if(!e||0===e.length)return;m("");let t=Array.from(e).filter(e=>e.name.endsWith(".json")||"application/json"===e.type||""===e.type);if(0===t.length)return void m((0,$.Tl)("Please select valid .json files"));try{let e=[];for(let a of t){let t=await a.text(),s=eg(t);Array.isArray(s)?e.push(...s):s&&e.push(s)}if(0===e.length)return void m((0,$.Tl)("No accounts found in selected files"));l(JSON.stringify(e,null,2)),g({filesCount:t.length,accountsCount:e.length})}catch(e){m(`${(0,$.Tl)("Error reading files")}: ${e.message}`)}},j=async()=>{let e;m(""),p(null);try{e=eg(r)}catch(e){m(`${(0,$.Tl)("Invalid JSON")}: ${e.message}`);return}if(!e||0===e.length)return void m((0,$.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})}),s=await t.json();if(!t.ok)return void m(s?.error||`Request failed: ${t.status}`);p(s),s.success>0&&"function"==typeof a&&a()}catch(e){m(e.message||(0,$.Tl)("Request failed"))}finally{o(!1)}},w=u?.results?.filter(e=>!e.ok)||[];return(0,s.jsx)(c.aF,{isOpen:e,title:(0,$.Tl)("Bulk Add Grok CLI Accounts"),onClose:b,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,$.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,s.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,s.jsx)(c.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>y.current?.click(),disabled:n,children:(0,$.Tl)("Upload JSON Files")})]}),(0,s.jsxs)("div",{onDragOver:e=>{e.preventDefault(),x(!0)},onDragLeave:e=>{e.preventDefault(),x(!1)},onDrop:e=>{e.preventDefault(),x(!1),e.dataTransfer?.files?.length>0&&v(e.dataTransfer.files)},className:`relative rounded border transition-colors ${h?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,s.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:ef,value:r,onChange:e=>{l(e.target.value),g(null)},disabled:n}),h&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,s.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,$.Tl)("Drop .json files here")})]})]}),f&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,s.jsxs)("span",{children:[(0,$.Tl)("Loaded")," ",f.accountsCount," ",(0,$.Tl)("account(s) from")," ",f.filesCount," ",(0,$.Tl)("file(s)")]})]}),d&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),u&&u.failed>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",u.failed," ",(0,$.Tl)("failed")]}),w.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:w.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.$n,{onClick:j,fullWidth:!0,disabled:n||!r.trim(),children:n?(0,$.Tl)("Importing..."):(0,$.Tl)("Import All")}),(0,s.jsx)(c.$n,{onClick:b,variant:"ghost",fullWidth:!0,disabled:n,children:(0,$.Tl)("Close")})]})]})})}let eb="__none__";function ev({isOpen:e,onClose:t,providerId:a,providerName:r,isAnthropic:l=!1,existingNames:n=[],proxyPools:o=[],onSuccess:d}){let[m,u]=(0,i.useState)(""),[p,h]=(0,i.useState)(r||"Key"),[x,f]=(0,i.useState)(l?"claude-3-5-sonnet-latest":"gpt-4o-mini"),[g,y]=(0,i.useState)(eb),[b,v]=(0,i.useState)(!1),[j,w]=(0,i.useState)(!1),[k,N]=(0,i.useState)(null),[C,S]=(0,i.useState)(null),T=()=>{j||(u(""),h(r||"Key"),f(l?"claude-3-5-sonnet-latest":"gpt-4o-mini"),y(eb),v(!1),N(null),S(null),t())},A=async()=>{if(j)return;let e=et(m);if(!e.length)return;let t=p.trim()||r||"Key",s=x.trim(),i=ea(e,n,{defaultBaseName:t,defaultModel:s||void 0});if(!i.length)return;w(!0),S(null),N({current:0,total:i.length});let l=0,o=0,c=[];for(let e=0;e<i.length;e++){let t=i[e];N({current:e+1,total:i.length});let r=!1;if(b)try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:a,apiKey:t.apiKey})});r=!!(await e.json().catch(()=>({}))).valid}catch{r=!1}try{let e={provider:a,apiKey:t.apiKey,name:t.name,priority:1,defaultModel:s||void 0,proxyPoolId:g!==eb?g:null,testStatus:b&&r?"active":"unknown",...t.providerSpecificData?{providerSpecificData:t.providerSpecificData}:{}},i=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(i.ok)l++;else{o++;let e=await i.json().catch(()=>({}));e?.error&&c.push(`${t.name}: ${e.error}`)}}catch(e){o++,c.push(`${t.name}: ${e.message||"Network error"}`)}}w(!1),S({success:l,failed:o,errors:c.slice(0,5)}),l>0&&"function"==typeof d&&d()},O=et(m).length;return(0,s.jsx)(c.aF,{isOpen:e,title:`${(0,$.Tl)("Bulk Add API Keys")} - ${r||a}`,onClose:T,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,$.Tl)("Paste multiple API keys (one per line, or comma-separated). You can also use name|apiKey format.")}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2.5 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:`sk-key-1
28
28
  sk-key-2
29
29
  # or with custom name:
30
- Primary|sk-key-3`,value:m,onChange:e=>u(e.target.value),disabled:j}),O>0&&(0,s.jsxs)("span",{className:"text-right text-xs text-text-muted",children:[O," ",1===O?"key detected":"keys detected"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,s.jsx)(c.pd,{label:(0,$.Tl)("Name Prefix"),value:p,onChange:e=>h(e.target.value),placeholder:r||"Key",disabled:j}),(0,s.jsx)(c.pd,{label:(0,$.Tl)("Default Model"),value:x,onChange:e=>f(e.target.value),placeholder:l?"claude-3-5-sonnet-latest":"gpt-4o-mini",disabled:j})]}),o&&o.length>0&&(0,s.jsx)(c.l6,{label:(0,$.Tl)("Proxy Pool"),value:g,onChange:e=>y(e.target.value),options:[{value:eb,label:(0,$.Tl)("None")},...o.map(e=>({value:e.id,label:e.name}))],disabled:j}),(0,s.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-accent/20 bg-sidebar/50 p-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-text-main",children:(0,$.Tl)("Test connections during import")}),(0,s.jsx)("span",{className:"text-xs text-text-muted",children:(0,$.Tl)("Validates each key before saving. Disable for faster bulk imports.")})]}),(0,s.jsx)(c.lM,{checked:b,onChange:v,disabled:j})]}),j&&k&&(0,s.jsxs)("div",{className:"flex flex-col gap-1.5 rounded-lg border border-primary/20 bg-primary/5 p-3",children:[(0,s.jsxs)("div",{className:"flex justify-between text-xs text-text-main",children:[(0,s.jsx)("span",{children:(0,$.Tl)("Importing keys...")}),(0,s.jsxs)("span",{children:[k.current," / ",k.total]})]}),(0,s.jsx)("div",{className:"w-full bg-accent/20 rounded-full h-1.5 overflow-hidden",children:(0,s.jsx)("div",{className:"bg-primary h-1.5 rounded-full transition-all duration-200",style:{width:`${Math.round(k.current/k.total*100)}%`}})})]}),C&&(0,s.jsxs)("div",{className:`rounded-lg p-3 text-sm font-medium border ${C.failed>0?"border-yellow-500/30 bg-yellow-500/10 text-yellow-500 dark:text-yellow-400":"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400"}`,children:[(0,s.jsxs)("div",{children:["✓ ",C.success," ",(0,$.Tl)("added successfully"),C.failed>0&&`, ✗ ${C.failed} ${(0,$.Tl)("failed")}`]}),C.errors?.length>0&&(0,s.jsx)("ul",{className:"mt-2 list-disc list-inside text-xs font-normal opacity-90",children:C.errors.map((e,t)=>(0,s.jsx)("li",{children:e},t))})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,s.jsx)(c.$n,{onClick:A,fullWidth:!0,disabled:j||0===O,icon:j?void 0:"playlist_add",children:j?`${(0,$.Tl)("Adding")} (${k?.current||0}/${k?.total||0})...`:`${(0,$.Tl)("Add All Keys")} (${O})`}),(0,s.jsx)(c.$n,{onClick:T,variant:"ghost",fullWidth:!0,disabled:j,children:C?(0,$.Tl)("Close"):(0,$.Tl)("Cancel")})]})]})})}ev.propTypes={isOpen:R().bool.isRequired,onClose:R().func.isRequired,providerId:R().string.isRequired,providerName:R().string,isAnthropic:R().bool,existingNames:R().arrayOf(R().string),proxyPools:R().array,onSuccess:R().func};var ej=a(65921);let ew=["host","content-length","content-type","connection","transfer-encoding","authorization","cookie"],ek=/^[A-Za-z0-9-]+$/;function eN({providerId:e}){let t=(0,ej.i)(),[a,r]=(0,i.useState)(!1),[l,n]=(0,i.useState)([{name:"",value:""}]),[o,d]=(0,i.useState)({}),[m,u]=(0,i.useState)(!1),[p,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let t=!1;return fetch(`/api/providers/${e}/overrides`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{if(t||!e)return;let a=e.builtinHeaders||{},s=Object.entries({...a,...e.headers||{}}).map(([e,t])=>({name:e,value:t}));d(a),n(s.length?s:[{name:"",value:""}]),u(Object.keys(e.headers||{}).length>0)}).catch(()=>{}),()=>{t=!0}},[e]);let x=(e,t,a)=>{n(s=>s.map((s,i)=>i===e?{...s,[t]:a}:s))},f=(0,i.useCallback)(async()=>{let a={};for(let e of l.filter(e=>e.name.trim())){let s=e.name.trim();if(!ek.test(s))return void t.error(`Invalid header name: ${s}`);if(ew.includes(s.toLowerCase()))return void t.error(`Header ${s} cannot be overridden`);if(s in a)return void t.error(`Duplicate header name: ${s}`);e.value!==o[s]&&(a[s]=e.value)}h(!0);try{let s=await fetch(`/api/providers/${e}/overrides`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({headers:a})});if(!s.ok){let e=await s.json().catch(()=>({}));t.error(e.error||"Failed to save");return}u(Object.keys(a).length>0),t.success("Custom headers saved")}finally{h(!1)}},[l,o,e,t]);return 0!==Object.keys(o).length||m?(0,s.jsxs)(c.Zp,{padding:"xs",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>r(e=>!e),className:"flex w-full items-center justify-between text-left",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"tune"}),(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Custom Headers"}),m&&(0,s.jsx)(c.Ex,{variant:"success",size:"sm",children:"Active"})]}),(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:a?"expand_less":"expand_more"})]}),a&&(0,s.jsxs)("div",{className:"mt-3 border-t border-border pt-3",children:[(0,s.jsx)("div",{className:"flex flex-col gap-2",children:l.map((e,t)=>{let a=e.name.trim()in o&&e.value!==o[e.name.trim()];return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{value:e.name,onChange:e=>x(t,"name",e.target.value),placeholder:"Header-Name",spellCheck:!1,className:"w-44 rounded-md border border-border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none"}),(0,s.jsx)("input",{value:e.value,onChange:e=>x(t,"value",e.target.value),placeholder:"Value",spellCheck:!1,title:a?"Overridden":e.name.trim()in o?"Registry default":"",className:`min-w-0 flex-1 rounded-md border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none ${a?"border-amber-400/60":"border-border"}`}),(0,s.jsx)("button",{type:"button",title:"Remove header",onClick:()=>n(e=>e.length>1?e.filter((e,a)=>a!==t):[{name:"",value:""}]),className:"shrink-0 text-text-muted hover:text-red-500",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]},t)})}),(0,s.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>n(e=>[...e,{name:"",value:""}]),className:"flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add header"]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:p,onClick:()=>{n(Object.entries(o).map(([e,t])=>({name:e,value:t})))},className:"rounded-md border border-border px-3 py-1.5 text-xs hover:bg-black/[0.03] dark:hover:bg-white/[0.03] disabled:opacity-50",children:"Reset"}),(0,s.jsx)("button",{type:"button",disabled:p,onClick:f,className:"rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-white hover:opacity-90 disabled:opacity-50",children:p?"Saving...":"Save"})]})]})]})]}):null}eN.propTypes={providerId:R().string.isRequired};var eC=a(97132);function eS({providerId:e,onConnected:t,size:a="sm"}){let[r,l]=(0,i.useState)(!1),[n,o]=(0,i.useState)(""),d=async()=>{l(!0),o("");try{let a=await fetch(`/api/oauth/${e}/lease-connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),s=await a.json().catch(()=>({}));if(!a.ok)return void o(s.error||"Could not reach the MiniMax Code desktop app");"function"==typeof t&&t()}catch(e){o(e?.message||"Could not reach the MiniMax Code desktop app")}finally{l(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:a,icon:"desktop_windows",variant:"secondary",disabled:r,onClick:d,title:(0,$.Tl)("Borrow the signed-in MiniMax Code desktop app's login — no second sign-in, refresh stays with the desktop app"),children:r?(0,$.Tl)("Connecting..."):(0,$.Tl)("Use Desktop App")}),n&&(0,s.jsx)("p",{className:"w-full text-xs text-red-500 break-words",children:n})]})}eS.propTypes={providerId:R().string.isRequired,onConnected:R().func,size:R().oneOf(["sm","md","lg"])};var eT=a(93195);let eA=new Set(["minimax-code","minimax-code-global"]),e$=[{value:"fill-first",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate"},{value:"cache-affinity",label:"Cache Affinity — prompt cache sticky"}],eO=new Set(["cursor","zed","commandcode","claude"]),eP={claude:"claudeAutoPing",codex:"codexAutoPing",antigravity:"antigravityAutoPing"},eI=[{value:"auto",label:"Retry: Auto"},{value:"15",label:"Retry: 15s"},{value:"30",label:"Retry: 30s"},{value:"60",label:"Retry: 1m"},{value:"120",label:"Retry: 2m"},{value:"300",label:"Retry: 5m"},{value:"600",label:"Retry: 10m"},{value:"1800",label:"Retry: 30m"},{value:"3600",label:"Retry: 1h"}];function eE(e){return new Promise(t=>setTimeout(t,e))}function eM(){let e,t,a,l,p,h,x,f=(0,r.useParams)(),g=(0,r.useRouter)(),y=f.id,{getCaps:b}=(0,A.yU)(),[v,j]=(0,i.useState)([]),[w,k]=(0,i.useState)(1),[N,C]=(0,i.useState)(10),[O,M]=(0,i.useState)(!0),[R,D]=(0,i.useState)(null),[_,U]=(0,i.useState)([]),[K,J]=(0,i.useState)(!1),[H,B]=(0,i.useState)(!1),[W,G]=(0,i.useState)(!1),[V,Q]=(0,i.useState)(!1),[X,Y]=(0,i.useState)(""),[et,ea]=(0,i.useState)(!1),[es,ei]=(0,i.useState)(!1),[er,el]=(0,i.useState)(!1),[eo,ed]=(0,i.useState)(!1),[ec,eu]=(0,i.useState)(!1),[eh,ef]=(0,i.useState)(!1),[eg,eb]=(0,i.useState)(!1),[ej,ew]=(0,i.useState)(null),[ek,eM]=(0,i.useState)({}),[eR,eD]=(0,i.useState)([]),[e_,eq]=(0,i.useState)(!1),[ez,eU]=(0,i.useState)(!1),[eF,eL]=(0,i.useState)({}),[eK,eJ]=(0,i.useState)(""),[eH,eB]=(0,i.useState)(()=>new Set),[eW,eG]=(0,i.useState)(!1),[eV,eQ]=(0,i.useState)([]),[eZ,eX]=(0,i.useState)("__none__"),[eY,e0]=(0,i.useState)(!1),[e1,e5]=(0,i.useState)(null),[e2,e3]=(0,i.useState)("fill-first"),[e4,e6]=(0,i.useState)(""),[e8,e9]=(0,i.useState)("auto"),[e7,te]=(0,i.useState)("auto"),[tt,ta]=(0,i.useState)(""),[ts,ti]=(0,i.useState)({enabled:!1,connections:{},schedules:{}}),[tr,tl]=(0,i.useState)(null),[tn,to]=(0,i.useState)([]),[td,tc]=(0,i.useState)([]),[tm,tu]=(0,i.useState)(null),[tp,th]=(0,i.useState)([]),[tx,tf]=(0,i.useState)([]),[tg,ty]=(0,i.useState)([]),[tb,tv]=(0,i.useState)(!1),[tj,tw]=(0,i.useState)(null),[tk,tN]=(0,i.useState)(!1),[tC,tS]=(0,i.useState)(!1),[tT,tA]=(0,i.useState)(!1),[t$,tO]=(0,i.useState)(null),[tP,tI]=(0,i.useState)({}),[tE,tM]=(0,i.useState)(null),tR=(0,i.useRef)(!1),[tD,t_]=(0,i.useState)(!1),[tq,tz]=(0,i.useState)(!1),[tU,tF]=(0,i.useState)(!1),[tL,tK]=(0,i.useState)(!1),[tJ,tH]=(0,i.useState)(null),[tB,tW]=(0,i.useState)(!1),[tG,tV]=(0,i.useState)(!1),[tQ,tZ]=(0,i.useState)(null),[tX,tY]=(0,i.useState)(!1),[t0,t1]=(0,i.useState)(!1),[t5,t2]=(0,i.useState)(null),[t3,t4]=(0,i.useState)({}),[t6,t8]=(0,i.useState)(null),t9=(0,i.useRef)(!1),{copied:t7,copy:ae}=(0,T.C)(),at="ag_risk_confirmed",aa=()=>{J(!0)},as=()=>{"antigravity"===y&&"true"!==window.localStorage.getItem(at)?tN(!0):"xiaomi-mimo"===y?B(!0):ao?aa():(Y(""),Q(!0))},ai=()=>{Y(""),Q(!0)},ar=()=>{ao?as():ai()},al=R?{id:R.id,name:R.name||("anthropic-compatible"===R.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===R.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===R.type?"AC":"OC",apiType:R.apiType,baseUrl:R.baseUrl,type:R.type}:m.zN[y]||m.fg[y]||m.IS[y]||m.nJ[y]||m.br[y],an=al?.authModes||[],ao=!!m.zN[y]||!!m.IS[y]||an.includes("oauth"),ad=!!m.fg[y]||an.includes("apikey"),ac=!!m.IS[y]?.noAuth,am=(0,u.KC)(y),au=eO.has(y)&&td.length>0?td:(0,I.N)(am,eR,(0,m.wG)(y)),ap=(0,m.wG)(y),ah=(0,m.mq)(y),ax=(0,m.gb)(y),af=ah||ax,ag=!af&&ao&&ad,ay="xai"===y?"Grok Build OAuth":"grok-cli"===y?"Grok CLI Device Login":"kimi"===y?"Kimi Coding OAuth":"OAuth",ab="xai"===y?"xAI API Key":"kimi"===y?"Kimi API Key":"qoder"===y||"qoder-cn"===y?"PAT":"API Key",av=e=>{if(!e8||"auto"===e8)return null;let t=S(y,e);return t&&t.includes(e8)?e8:null},aj=af?y:ap,aw=(()=>{let e=new Set,t=new Set,a=a=>{if(!a||t.has(a))return;t.add(a);let s=S(y,a);s&&s.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of au)a(e.id);for(let e of tp)a(e.id);for(let e of eR)e.providerAlias===aj&&"llm"===(e.kind||e.type||"llm")&&a(e.id);return e.size?["auto",...e]:null})(),ak=af?R?.prefix||y:ap,aN=(()=>{let e=new Set;for(let t of au)e.add(t.id);for(let t of tp)e.add(t.id);for(let t of eR)t.providerAlias===aj&&"llm"===(t.kind||t.type||"llm")&&e.add(t.id);for(let t of Object.values(ek))"string"==typeof t&&t.startsWith(`${aj}/`)&&e.add(t.slice(aj.length+1));return e})(),aC=(0,i.useMemo)(()=>(0,I.R)({customModels:eR,modelAliases:ek,providerAlias:aj,builtInModels:au,type:"llm"}),[eR,ek,aj,au]),aS=(0,i.useMemo)(()=>{let e=[...au,...tp.filter(e=>!au.some(t=>t.id===e.id))].filter(e=>{let t=(0,u.CP)(e);return!t||"llm"===t}),t=new Set(e.map(e=>e.id));return[...e,...aC.filter(e=>!t.has(e.id))]},[au,tp,aC]),aT=(0,i.useMemo)(()=>new Set(tx),[tx]),aA=(0,i.useMemo)(()=>aS.filter(e=>!aT.has(e.id)),[aS,aT]),a$=(0,i.useMemo)(()=>aA.map(e=>e.id),[aA]),aO=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(aj)}`,{cache:"no-store"}),t=await e.json(),a=e.ok&&t.ids||[];if(y&&y!==aj)try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(y)}`,{cache:"no-store"}),t=await e.json();e.ok&&Array.isArray(t.ids)&&t.ids.length>0&&(a=[...new Set([...a,...t.ids])])}catch{}tf(a)}catch(e){console.log("Error fetching disabled models:",e)}},[aj,y]),aP=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/enabled?providerAlias=${encodeURIComponent(aj)}`,{cache:"no-store"}),t=await e.json();e.ok&&ty(t.ids||[])}catch(e){console.log("Error fetching enabled models:",e)}},[aj]),aI=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:aj,ids:[e]})})).ok&&await aO()}catch(e){console.log("Error disabling model:",e)}},aE=async e=>{try{let t=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(aj)}&id=${encodeURIComponent(e)}`,{method:"DELETE"});y&&y!==aj&&await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(y)}&id=${encodeURIComponent(e)}`,{method:"DELETE"}),t.ok&&await aO()}catch(e){console.log("Error enabling model:",e)}},aM=async e=>{e.length&&tw({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{tw(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:aj,ids:e})})).ok&&await aO()}catch(e){console.log("Error disabling all models:",e)}}})},aR=async e=>{e.length&&tw({title:(0,$.Tl)("Disable Failed Models"),message:`${e.length} model(s) failed testing. Disable them?`,onConfirm:async()=>{tw(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:aj,ids:e})})).ok&&await aO()}catch(e){console.log("Error disabling failed models:",e)}}})},aD=async()=>{tx.length&&tw({title:"Active All Models",message:`Active all ${tx.length} disabled model(s)?`,onConfirm:async()=>{tw(null);try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(aj)}`,{method:"DELETE"});y&&y!==aj&&await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(y)}`,{method:"DELETE"}),e.ok&&await aO()}catch(e){console.log("Error enabling all models:",e)}}})},a_=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&eM(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),aq=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&eD(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===y&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&th(e.models)}).catch(()=>{})},[y]);let az=(0,i.useCallback)(async()=>{try{let[e,t,a,s]=await Promise.all([fetch(`/api/providers?provider=${encodeURIComponent(y)}`,{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"})]),i=await e.json(),r=await t.json(),l=await a.json(),n=s.ok?await s.json():{};e.ok&&j(i.connections||[]),a.ok&&U(l.proxyPools||[]);let o=(n.providerStrategies||{})[y]||{};e5(o.fallbackStrategy||null),e3("round-robin"===n.fallbackStrategy?"round-robin":"fill-first"),e6(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1");let d=(n.providerThinking||{})[y]||{};e9(d.mode||"auto");let c=(n.retryDelayByProvider||{})[y];te(null!=c&&"auto"!==c?String(c):"auto");let m=(n.rpmByProvider||{})[y];ta(null!=m?String(m):"");let u=eP[y],p=u&&n[u]||{};if(ti({enabled:!0===p.enabled,connections:p.connections||{},schedules:p.schedules||{}}),tW(!0===n.codexFastMode),t.ok){let e=(r.nodes||[]).find(e=>e.id===y)||null;if(!e&&af)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===y)||null))break}D(e)}}catch(e){console.log("Error fetching connections:",e)}finally{M(!1)}},[y,af]),aU=async e=>{try{let t=await fetch(`/api/provider-nodes/${y}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(D(a.node),await az(),ef(!1))}catch(e){console.log("Error updating provider node:",e)}},aF=async(e,t)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),s=(a.ok?await a.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let r={...s};0===Object.keys(i).length?delete r[y]:r[y]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:r})})}catch(e){console.log("Error saving provider strategy:",e)}},aL=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?a[y]={mode:e}:delete a[y],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:a})})}catch(e){console.log("Error saving thinking config:",e)}},aK=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).retryDelayByProvider||{}};e&&"auto"!==e?a[y]=Number(e):delete a[y],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({retryDelayByProvider:a})})}catch(e){console.log("Error saving retry delay:",e)}},aJ=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).rpmByProvider||{}},s=String(e??"").trim();""===s?delete a[y]:a[y]=Math.max(0,Number(s)||0),await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rpmByProvider:a})})}catch(e){console.log("Error saving RPM limit:",e)}},aH=async e=>{let t=eP[y];if(t){ti(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)}}},aB=async e=>{tW(e),tV(!0),tZ(null);try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({codexFastMode:e})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to update fast mode setting")}}catch(t){console.log("Error saving codex fast mode setting:",t),tW(!e),tZ(t.message||"Failed to update fast mode setting")}finally{tV(!1)}};(0,i.useEffect)(()=>{az(),a_(),aq(),aO(),aP()},[az,a_,aq,aO,aP]),(0,i.useEffect)(()=>{if(!eO.has(y))return void tc([]);let e=v.find(e=>!1!==e.isActive);if(!e?.id){tc([]),"zed"===y&&tu(null);return}let t=!1;return"zed"===y&&tu(null),fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json().catch(()=>null)})).then(({ok:e,data:a})=>{if(!t){if(e&&Array.isArray(a?.models)&&a.models.length>0){tc(a.models),"zed"===y&&a?.warning&&tu(a.warning);return}"zed"===y&&(tc([]),tu(a?.warning||a?.error||"Zed returned no live models."))}}).catch(()=>{t||"zed"!==y||(tc([]),tu("Failed to reach the Zed model catalog."))}),()=>{t=!0}},[y,v]),(0,i.useEffect)(()=>{let e=(m.zN[y]||m.fg[y]||m.IS[y]||m.nJ[y])?.modelsFetcher;e&&P(e,y).then(to)},[y]);let aW=v.find(e=>!1!==e.isActive)?.id||null,aG=tJ===aW&&null!==aW;(0,i.useEffect)(()=>{if(!aW)return;let e=!1;return fetch(`/api/providers/${aW}/models?check=1`).then(e=>e.json()).then(t=>{e||tH(!0===t.supported?aW:null)}).catch(()=>{}),()=>{e=!0}},[aW]);let aV=async(e,t,a=ap)=>{let s=`${a}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await a_();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},aQ=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await a_()}catch(e){console.log("Error deleting alias:",e)}},aZ=async(e,t="llm",a=aj,s,i)=>{try{let r=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:a,id:e,type:t,...s?{caps:s}:{},...i?{transport:i}:{}})}),l=await r.json().catch(()=>({}));r.ok?(!1===l.added&&alert("Model already exists (duplicate). Check built-in or custom list."),await aq(),window.dispatchEvent(new CustomEvent("customModelChanged"))):alert(l.error||"Failed to add custom model")}catch(e){console.log("Error adding custom model:",e),alert(e.message||"Failed to add custom model")}},aX=async(e,t="llm",a=aj)=>{try{let s=new URLSearchParams({providerAlias:a,id:e,type:t});(await fetch(`/api/models/custom?${s}`,{method:"DELETE"})).ok&&(await aq(),tx.includes(e)&&(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(a)}&id=${encodeURIComponent(e)}`,{method:"DELETE"}),y&&y!==a&&await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(y)}&id=${encodeURIComponent(e)}`,{method:"DELETE"}),await aO()),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},aY=async()=>{if(tD)return;let e=v.find(e=>!1!==e.isActive);if(!e)return void alert((0,$.Tl)("Please add an active Qoder connection first"));t_(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||(0,$.Tl)("Failed to fetch models"));let s=a.models||[];if(0===s.length)return void alert((0,$.Tl)("No models returned"));if("qoder"===y||"qoder-cn"===y){for(let e of s){let t=e.id?.replace(/^(qoder-cn|qoder)\//,"");if(!t)continue;let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:aj,id:t,type:"llm",name:e.name||t})});if(!a.ok){let e=await a.json();throw Error(e.error||"Failed to save model")}}await aq(),window.dispatchEvent(new CustomEvent("customModelChanged")),alert((0,$.Tl)("Successfully updated")+` ${s.length} `+(0,$.Tl)("models"));return}let i=0;for(let e of s){let t=e.id||e.name;if(!t)continue;let a=t.replace(/^(qoder-cn|qoder)\//,"");eR.some(e=>e.providerAlias===aj&&e.id===a&&"llm"===(e.kind||e.type||"llm"))||Object.values(ek).includes(`${aj}/${a}`)||(await aZ(a,"llm",aj),i+=1)}0===i?alert((0,$.Tl)("All models already exist, no new models added")):alert((0,$.Tl)("Successfully added")+` ${i} `+(0,$.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,$.Tl)("Error fetching models")+": "+e.message)}finally{t_(!1)}},a0=async()=>{if(tq)return;let e=v.find(e=>!1!==e.isActive);if(!e)return void alert((0,$.Tl)("Please add an active Cline connection first"));tz(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||(0,$.Tl)("Failed to fetch models"));let s=a.models||[];if(0===s.length)return void alert((0,$.Tl)("No models returned"));let i=0;for(let e of s){let t=e.id||e.name;t&&(eR.some(e=>e.providerAlias===aj&&e.id===t&&"llm"===(e.kind||e.type||"llm"))||Object.values(ek).includes(`${aj}/${t}`)||(await aZ(t,"llm",aj),i+=1))}0===i?alert((0,$.Tl)("All models already exist, no new models added")):alert((0,$.Tl)("Successfully added")+` ${i} `+(0,$.Tl)("models"))}catch(e){console.log("Error importing Cline models:",e),alert((0,$.Tl)("Error fetching models")+": "+e.message)}finally{tz(!1)}},a1=async()=>{if(tC||0===v.length)return;let e=Object.fromEntries(v.map(e=>[e.id,{state:"queued",error:null}]));tR.current=!1,tS(!0),tA(!1),tO(null),tI(e),tM({total:v.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,a=0;try{for(let e=0;e<v.length;e+=1){if(tR.current){tM({total:v.length,completed:e,passed:t,failed:a,stopped:!0});break}let s=v[e];tO(s.id),tI(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${s.id}/test`,{method:"POST"}),i=await e.json(),r=!!i.valid;r?t+=1:a+=1,tI(e=>({...e,[s.id]:{state:r?"success":"failed",error:r?null:i.error||null}}))}catch(e){a+=1,tI(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}tM({total:v.length,completed:e+1,passed:t,failed:a,stopped:!1}),e<v.length-1&&await eE(1e3)}}finally{tO(null),tS(!1),tA(!1),tR.current=!1}},a5=async()=>{if(tX)return;if(!v.some(e=>!1!==e.isActive)&&!ac)return void alert((0,$.Tl)("No active connection available for testing"));let e=[...au,...tp.filter(e=>!au.some(t=>t.id===e.id))].filter(e=>{let t=(0,u.CP)(e);return!t||"llm"===t}),t=new Set(tx),a=e.filter(e=>!t.has(e.id));if(0===a.length)return void alert((0,$.Tl)("No enabled models to test"));t9.current=!1,tY(!0),t1(!1),t2(null),t4({}),t8({total:a.length,completed:0,passed:0,failed:0,stopped:!1});let s=0,i=0,r=[];try{for(let e=0;e<a.length;e+=1){if(t9.current){t8({total:a.length,completed:e,passed:s,failed:i,stopped:!0});break}let t=a[e];t2(t.id),t4(e=>({...e,[t.id]:{state:"testing",error:null}}));try{let e=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${aj}/${t.id}`})}),a=await e.json(),l=e.ok&&!0===a.ok;l?s+=1:(i+=1,r.push(t.id)),t4(e=>({...e,[t.id]:{state:l?"passed":"failed",error:l?null:a.error||"Model not reachable"}})),eL(e=>({...e,[t.id]:l?"ok":"error"})),eJ(l?"":a.error||"Model not reachable")}catch(e){i+=1,r.push(t.id),t4(a=>({...a,[t.id]:{state:"failed",error:e.message||"Test failed"}})),eL(e=>({...e,[t.id]:"error"})),eJ(e.message||"Network error")}t8({total:a.length,completed:e+1,passed:s,failed:i,stopped:!1}),e<a.length-1&&await eE(1e3)}}finally{let e=t9.current;t2(null),tY(!1),t1(!1),t9.current=!1,r.length>0?tw({title:(0,$.Tl)("Disable Failed Models"),message:`${r.length} model(s) failed testing. Disable them?`,onConfirm:async()=>{tw(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:aj,ids:r})})).ok&&await aO()}catch(e){console.log("Error disabling failed models:",e)}}}):e||alert((0,$.Tl)("All models passed testing!"))}},a2=async e=>{tw({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{tw(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&j(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},a3=()=>{az(),J(!1)},a4=async e=>{Y("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:y,...e})}),a=null;try{a=await t.json()}catch{a=null}if(t.ok)return await az(),!0;Y(a?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),Y("Failed to save connection")}return!1},a6=async e=>{try{(await fetch(`/api/providers/${ej.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await az(),eu(!1))}catch(e){console.log("Error updating connection:",e)}},a8=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&j(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("Error updating connection status:",e)}},a9=async(e,t)=>{let a=await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{fastMode:t}})}),s=await a.json();if(!a.ok)throw Error(s.error||"Failed to save fast mode");j(a=>a.map(a=>a.id===e?{...a,providerSpecificData:{...a.providerSpecificData,fastMode:t}}:a))},a7=async(e,t)=>{let a=[...v];[a[e],a[t]]=[a[t],a[e]],j(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await az()}},se=v.filter(e=>eV.includes(e.id));(0,i.useEffect)(()=>{eQ(e=>e.filter(e=>v.some(t=>t.id===e)))},[v]),(()=>{if(0===se.length)return;let e=new Set(se.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let a=_.find(e=>e.id===t);return a?.name}})();let st=()=>{eY||eb(!1)},sa=async e=>{e0(!0);try{let t=0;for(let{connectionId:a,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",a,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await az(),eb(!1)}finally{e0(!1)}},ss=e=>sa(v.map(t=>({connectionId:t.id,proxyPoolId:e}))),{currentPage:si,items:sr,start:sl}=function(e=[],t=1,a=10){let s=Array.isArray(e)?e:[],i=Number.isFinite(a)&&a>=1?Math.floor(a):10,r=s.length,l=Math.max(1,Math.ceil(r/i)),n=Math.floor(Number(t)),o=Math.min(Number.isFinite(n)&&n>0?n:1,l),d=(o-1)*i,c=s.slice(d,d+i);return{currentPage:o,totalPages:l,totalItems:r,start:d,items:c,pageSize:i}}(v,w,N),sn=new Set(sr.map(e=>e.id)),so=sr.length>0&&sr.every(e=>eV.includes(e.id)),sd=(0,s.jsxs)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:[sr.map((e,t)=>{let a,i=sl+t;return(0,s.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,s.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,s.jsx)("input",{type:"checkbox",checked:(a=e.id,eV.includes(a)),onChange:()=>{var t;return t=e.id,void eQ(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,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(Z,{connection:e,proxyPools:_,isOAuth:ao,isFirst:0===i,isLast:i===v.length-1,onMoveUp:()=>a7(i,i-1),onMoveDown:()=>a7(i,i+1),onToggleActive:t=>a8(e.id,t),fastMode:al?.fastMode?{on:e.providerSpecificData?.fastMode===!0,onToggle:t=>a9(e.id,t)}:null,autoPing:eP[y]&&"oauth"===e.authType?{isActive:!0===ts.connections[e.id]||ts.schedules?.[e.id]?.enabled===!0,reactiveOn:!0===ts.connections[e.id],provider:y,scheduleOn:ts.schedules?.[e.id]?.enabled===!0,scheduleSummary:(0,eT.JW)(ts.schedules?.[e.id]).join(" / "),onConfigure:()=>tl(e)}: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&&j(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:{...a.providerSpecificData,proxyPoolId:t||null}}:a))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{ew(e),eu(!0)},onReconnect:()=>{"iflow"===y?G(!0):J(!0)},onDelete:()=>a2(e.id),oneByOneStatus:tP[e.id]||null})})]},e.id)}),v.length>10&&(0,s.jsx)(c.dK,{currentPage:si,pageSize:N,totalItems:v.length,onPageChange:k,onPageSizeChange:e=>{C(e),k(1)},allowCustomPageSize:!0,maxPageSize:200})]}),sc=_.filter(e=>!0===e.isActive),sm=(0,s.jsx)(c.aF,{isOpen:eg,onClose:st,title:`Apply Proxy (${v.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=_.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):sa(v.map((t,a)=>({connectionId:t.id,proxyPoolId:e[a%e.length].id})))},disabled:eY||0===sc.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,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>ss(null),disabled:eY,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,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),_.map(e=>(0,s.jsxs)("button",{onClick:()=>ss(e.id),disabled:eY||!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,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eY&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(c.$n,{onClick:st,variant:"ghost",fullWidth:!0,disabled:eY,children:"Cancel"})]})}),su=async e=>{if(!eH.has(e)){eB(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${aj}/${e}`})}),a=await t.json();eL(t=>({...t,[e]:a.ok?"ok":"error"})),eJ(a.ok?"":a.error||"Model not reachable")}catch{eL(t=>({...t,[e]:"error"})),eJ("Network error")}finally{eB(t=>{let a=new Set(t);return a.delete(e),a})}}};if(O)return(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(c.Qv,{}),(0,s.jsx)(c.Qv,{})]});if(!al)return(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let sp=()=>{let e=sh();return e?!ez&&(0,d.HY)(al.id)||e:(0,d.HY)(al.id)},sh=()=>ah&&al.apiType?"responses"===al.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ax?"/providers/anthropic-m.png":null;return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${al.color}15`},children:e_||!sp()?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:al.color},children:al.textIcon||al.id.slice(0,2).toUpperCase()}):(0,s.jsx)(o.default,{src:sp(),alt:al.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{((0,d.Kw)(al.id),sh()&&!ez)?eU(!0):eq(!0)},loading:"lazy",decoding:"async"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:al.name}),(al.notice?.apiKeyUrl||al.notice?.signupUrl||al.website)&&(0,s.jsxs)("a",{href:al.notice?.apiKeyUrl||al.notice?.signupUrl||al.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),al.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,s.jsxs)("p",{className:"text-text-muted",children:[v.length," connection",1===v.length?"":"s"]})]}),(0,s.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[(0,s.jsx)("span",{className:"hidden text-xs text-text-muted sm:inline",children:"RPM / account"}),(0,s.jsx)("input",{type:"number",min:"0",value:tt,placeholder:String(m.W[y]||0),onChange:e=>ta(e.target.value),onBlur:e=>aJ(e.target.value),title:"Max requests per minute per account. Accounts over the cap are skipped before a request is sent, so the provider never sees a 429. Blank = provider default, 0 = unlimited.",className:"w-16 rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none"}),(0,s.jsx)("span",{className:"hidden text-xs text-text-muted sm:inline",children:"Retry delay"}),(0,s.jsx)("select",{value:e7,onChange:e=>{var t;te(t=e.target.value),aK(t)},title:"Cooldown after a rate-limit/error when the provider reports no reset time of its own. Auto = honor the provider's reported delay, else built-in backoff.",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:eI.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]})]})]}),al.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:al.deprecationNotice})]}),al.notice?.text&&!al.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:al.notice.text}),al.notice.apiKeyUrl&&(0,s.jsx)("a",{href:al.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 →"})]}),af&&R&&(0,s.jsx)(c.Zp,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:ax?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[ax?"Messages API":"responses"===R.apiType?"Responses API":"Chat Completions"," \xb7 ",(R.baseUrl||"").replace(/\/$/,""),"/",ax?"messages":"responses"===R.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{Y(""),Q(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(c.$n,{size:"sm",icon:"download",variant:"secondary",onClick:()=>ei(!0),className:"w-full sm:w-auto",children:"Export Keys"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"playlist_add",onClick:()=>ed(!0),className:"w-full sm:w-auto",children:(0,$.Tl)("Bulk Add")}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ef(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{tw({title:"Delete Compatible Node",message:`Delete this ${ax?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{tw(null);try{(await fetch(`/api/provider-nodes/${y}`,{method:"DELETE"})).ok&&g.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),ac?(0,s.jsx)(c.gw,{providerId:y}):(0,s.jsxs)(c.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[v.length>0&&_.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>eb(!0),children:"Apply Proxy"}),v.length>0&&(0,s.jsxs)(s.Fragment,{children:[eV.length>0&&(0,s.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eV.length;0!==e&&tw({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{tw(null);let e=0,t=[...eV];for(let a of t)try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}j(e=>e.filter(e=>!t.includes(e.id))),eQ([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eV.length,")"]}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:a1,disabled:tC,children:tC?"Testing Connection One-by-One...":"Test Connection One-by-One"}),tC&&(0,s.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{tC&&(tR.current=!0,tA(!0))},disabled:tT,children:tT?"Stopping...":"Stop"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Strategy"}),(0,s.jsx)("div",{className:"w-[230px]",children:(0,s.jsx)(c.l6,{options:e$,value:e1||e2,onChange:e=>{var t;let a,s,i;return a=(t=e.target.value)===e2?null:t,i=(s="round-robin"===t)?e4||"1":e4,void(s&&!e4&&e6("1"),e5(a),aF(a,i))},selectClassName:"py-1.5 text-xs"})}),"round-robin"===(e1||e2)&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:e4,onChange:e=>{var t;e6(t=e.target.value),aF("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"})]})]}),"codex"===y&&(0,s.jsx)(c.lM,{checked:tB,onChange:aB,disabled:tG,label:"Fast inference",description:"Use the priority tier for Codex models (all accounts). Per-account override lives on each connection row and quota card."}),"codex"===y&&tQ&&(0,s.jsx)("span",{className:"text-xs text-red-500",role:"alert",children:tQ})]})]}),(0,s.jsxs)("p",{className:"mb-4 -mt-1 text-xs text-text-muted",children:["Tip: pin requests to a specific account by sending the ",(0,s.jsx)("code",{children:"x-connection-id"})," request header with a connection ID — click the ID chip on a connection to copy it. When the pinned account is unavailable, EzRouter falls back to the other accounts automatically."]}),0===v.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:ao?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),ag&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",ay," or ",ab,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:ag?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:as,children:ay}),(0,s.jsx)(c.$n,{size:"sm",icon:"key",onClick:ai,children:ab})]}):(0,s.jsxs)(s.Fragment,{children:[!af&&eA.has(y)&&(0,s.jsx)(eS,{providerId:y,onConnected:az}),!af&&"iflow"===y&&(0,s.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>G(!0),children:"Cookie"}),"codex"===y&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ea(!0),children:(0,$.Tl)("Bulk Add")}),"grok-cli"===y&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>el(!0),children:(0,$.Tl)("Bulk Add")}),af&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ed(!0),children:(0,$.Tl)("Bulk Add")}),(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:ar,children:af?"Add API Key":"iflow"===y?"OAuth":"Add Connection"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[tE&&(0,s.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,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:["Total: ",tE.total]}),(0,s.jsxs)("span",{children:["Completed: ",tE.completed]}),(0,s.jsxs)("span",{children:["Passed: ",tE.passed]}),(0,s.jsxs)("span",{children:["Failed: ",tE.failed]}),tE.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),tC&&t$&&(0,s.jsxs)("span",{children:["Running: ",v.find(e=>e.id===t$)?.name||t$]})]})}),v.length>0&&(0,s.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,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,s.jsx)("input",{type:"checkbox",checked:so,onChange:()=>{so?eQ(e=>e.filter(e=>!sn.has(e))):eQ(e=>{let t=new Set(e);for(let e of sn)t.add(e);return[...t]})},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),sd,af&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:[(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ed(!0),className:"w-full sm:w-auto",children:(0,$.Tl)("Bulk Add")}),(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:ar,className:"w-full sm:w-auto",children:"Add API Key"})]}),!af&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:[eA.has(y)&&(0,s.jsx)(eS,{providerId:y,onConnected:az}),"iflow"===y&&(0,s.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>G(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===y&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ea(!0),title:(0,$.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,$.Tl)("Bulk Add")}),"grok-cli"===y&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>el(!0),title:(0,$.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,$.Tl)("Bulk Add")}),v.length>0&&(0,s.jsx)(c.$n,{size:"sm",icon:"download",variant:"secondary",onClick:()=>ei(!0),className:"w-full sm:w-auto",children:"Export Keys"}),ag?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:as,className:"w-full sm:w-auto",children:ay}),(0,s.jsx)(c.$n,{size:"sm",icon:"key",onClick:ai,className:"w-full sm:w-auto",children:ab})]}):(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:ar,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,s.jsx)(eN,{providerId:y}),(0,s.jsxs)(c.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),aw&&(0,s.jsx)("select",{value:e8,onChange:e=>{var t;e9(t=e.target.value),aL(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:aw.map(e=>(0,s.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!af&&(e=a$.filter(e=>t3[e]?.state==="failed"||"error"===eF[e]),t=tx.some(e=>{let t=aS.find(t=>t.id===e);return t?E(t):E({id:e})}),a=a$.length>0||t,(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"redeem",onClick:()=>{if(0===aS.filter(e=>E(e)).length)return void alert("No free models found for this provider (no models with 'free' in name/id).");let e=aA.filter(e=>!E(e)).map(e=>e.id),t=tx.filter(e=>{let t=aS.find(t=>t.id===e);return t?E(t):E({id:e})});0===e.length&&0===t.length?alert("Only free models are currently active."):tw({title:"Free Only",message:`Disable ${e.length} non-free model(s)${t.length>0?` and restore ${t.length} free model(s)`:""}?`,onConfirm:async()=>{tw(null);try{e.length>0&&await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:aj,ids:e})}),t.length>0&&(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(aj)}&ids=${encodeURIComponent(t.join(","))}`,{method:"DELETE"}),y&&y!==aj&&await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(y)}&ids=${encodeURIComponent(t.join(","))}`,{method:"DELETE"})),await aO()}catch(e){console.log("Error filtering free models:",e)}}})},title:"Disable all models without 'free' in their name",children:"Free Only"}),tx.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:aD,children:"Active All"}),e.length>0&&(0,s.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"block",onClick:()=>aR(e),children:[(0,$.Tl)("Disable Failed")," (",e.length,")"]}),a$.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:tX?"secondary":"primary",icon:tX?"stop":"play_circle",onClick:tX?()=>{tX&&(t9.current=!0,t1(!0))}:a5,disabled:!v.some(e=>!1!==e.isActive)&&!ac,className:"flex items-center gap-1.5",children:tX?t0?(0,$.Tl)("Stopping..."):(0,$.Tl)("Testing..."):(0,$.Tl)("Test All")}),a$.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>aM(a$),children:"Disable All"})]}))]}),!!eK&&(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:eK}),/RegionError|hosted in China|regionNotAllowed/i.test(eK)&&(p=(l="string"==typeof eK?eK:JSON.stringify(eK)).match(/https:\/\/opencode\.ai\/workspace\/[^\s"')]+/),h=l.match(/wrk_[0-9A-Za-z]+/),x=p?p[0].endsWith("/go")?p[0]:`${p[0]}/go`:h?`https://opencode.ai/workspace/${h[0]}/go`:"https://opencode.ai",(0,s.jsx)("div",{className:"mt-1.5",children:(0,s.jsxs)("a",{href:x,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md bg-amber-500/10 px-2 py-0.5 text-xs font-medium text-amber-600 hover:bg-amber-500/20 dark:text-amber-400 transition-colors",children:[(0,s.jsx)("span",{children:"Allow China-hosted models"}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"open_in_new"})]})}))]}),"zed"===y&&!!tm&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:tm}),(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("button",{onClick:()=>tv(!0),className:"flex items-center gap-1.5 rounded-lg border border-border px-3 py-1.5 text-xs text-text-main transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"visibility"}),"Visible models",tg.length>0?` (${tg.length})`:""]}),(0,s.jsx)("span",{className:"text-[11px] text-text-muted",children:tg.length>0?`Only these ${tg.length} models are exposed on /v1/models`:"All models are exposed on /v1/models"})]}),(()=>{let e,t,a;if(af)return(0,s.jsx)(F,{providerStorageAlias:aj,providerDisplayAlias:ak,modelAliases:ek,customModels:eR,copied:t7,onCopy:ae,onSetAlias:aV,onDeleteAlias:aQ,onAddCustomModel:e=>aZ(e,"llm",aj),onDeleteCustomModel:e=>aX(e,"llm",aj),connections:v,isAnthropic:ax,onModelsChanged:aq,importSupported:aG});let i=[...au,...tp.filter(e=>!au.some(t=>t.id===e.id))].filter(e=>{let t=(0,u.CP)(e);return!t||"llm"===t}).filter(e=>!aT.has(e.id)),r=aC.filter(e=>!aT.has(e.id));return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r.map(e=>(0,s.jsx)(q,{model:{id:e.id,name:e.name},fullModel:`${ak}/${e.id}`,alias:e.alias,copied:t7,onCopy:ae,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?aX(e.id,"llm",aj):aQ(e.alias)},onDisable:()=>aI(e.id),testStatus:eF[e.id],onTest:v.length>0||ac?()=>su(e.id):void 0,isTesting:eH.has(e.id),isCustom:!0,isFree:E(e),caps:b(`${y}/${e.id}`),thinkingSuffix:av(e.id)},`${e.source}-${e.fullModel}`)),i.map(e=>{let t=e.id.startsWith(`${aj}/`)?e.id.slice(aj.length+1):e.id,a=`${aj}/${t}`,i=`${y}/${t}`,r=Object.entries(ek).find(([,e])=>e===a||e===i)?.[0];return(0,s.jsx)(q,{model:e,fullModel:`${ak}/${t}`,alias:r,copied:t7,onCopy:ae,onSetAlias:e=>aV(t,e,aj),onDeleteAlias:()=>aQ(r),testStatus:eF[t]||eF[e.id],onTest:v.length>0||ac?()=>su(t):void 0,isTesting:eH.has(t)||eH.has(e.id),isFree:e.isFree||E(e),onDisable:()=>aI(t),caps:b(`${y}/${t}`),thinkingSuffix:av(t)},e.id)}),(0,s.jsxs)("button",{onClick:()=>eG(!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,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),("qoder"===y||"qoder-cn"===y)&&v.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:aY,disabled:tD,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,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:tD?{animation:"spin 1s linear infinite"}:void 0,children:tD?"progress_activity":"download"}),tD?(0,$.Tl)("Fetching..."):(0,$.Tl)("Fetch Qoder Models")]}),("cline"===y||"clinepass"===y)&&v.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:a0,disabled:tq,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,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:tq?{animation:"spin 1s linear infinite"}:void 0,children:tq?"progress_activity":"download"}),tq?(0,$.Tl)("Fetching..."):(0,$.Tl)("Import from /models")]}),aG&&aW&&!["qoder","qoder-cn","cline","clinepass"].includes(y)&&(0,s.jsxs)("button",{onClick:()=>tK(!0),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",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"download"}),(0,$.Tl)("Import Models")]}),tn.length>0&&(e=new Set([...Object.values(ek),...aC.map(e=>e.fullModel)]),t=new Set(au.map(e=>e.id)),0===(a=tn.filter(a=>{let s=a.id.replace(/^nous\//,"");return!e.has(`${aj}/${s}`)&&!t.has(s)&&!t.has(a.id)})).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"nous"===y?(0,$.Tl)("Suggested models (≥200k context):"):(0,$.Tl)("Suggested free models (≥200k context):")}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>{let t=e.id.replace(/^nous\//,"");return(0,s.jsxs)("button",{onClick:async()=>{await aZ(t,"llm",aj)},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,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),t.split("/").pop()]},e.id)})})]})),tx.length>0&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",tx.length,"):"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:tx.map(e=>{let t=aS.find(t=>t.id===e);return(0,s.jsxs)("button",{onClick:()=>aE(e),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,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),t?.name&&t.name!==e?`${e} (${t.name})`:e]},e)})})]})]})})()]}),sm,"kiro"===y?(0,s.jsx)(c.Mh,{isOpen:K,providerInfo:al,onSuccess:a3,onClose:()=>J(!1)}):"cursor"===y?(0,s.jsx)(c.G9,{isOpen:K,onSuccess:a3,onClose:()=>J(!1)}):"zed"===y?(0,s.jsx)(c.TE,{isOpen:K,providerInfo:al,onSuccess:a3,onClose:()=>J(!1)}):"gitlab"===y?(0,s.jsx)(c.vj,{isOpen:K,providerInfo:al,onSuccess:a3,onClose:()=>J(!1)}):(0,s.jsx)(c.LF,{isOpen:K,provider:y,providerInfo:al,onSuccess:a3,onClose:()=>J(!1)}),(0,s.jsx)(c.LH,{isOpen:H,onSuccess:a3,onClose:()=>B(!1)}),"iflow"===y&&(0,s.jsx)(c.vE,{isOpen:W,onSuccess:()=>{az(),G(!1)},onClose:()=>G(!1)}),V&&(0,s.jsx)(en,{isOpen:V,provider:y,providerName:al.name,isCompatible:af,isAnthropic:ax,authType:al?.authType,authHint:al?.authHint,website:al?.website,proxyPools:_,error:X,existingNames:v.map(e=>e.name).filter(Boolean),onSave:a4,onBulkDone:az,onClose:()=>{Y(""),Q(!1)}}),(0,s.jsx)(ee,{isOpen:es,providerId:y,providerName:al.name,onClose:()=>ei(!1)}),(0,s.jsx)(c.wI,{isOpen:ec,connection:ej,proxyPools:_,onSave:a6,onClose:()=>eu(!1)}),af&&(0,s.jsx)(ev,{isOpen:eo,onClose:()=>ed(!1),providerId:y,providerName:al?.name||y,isAnthropic:ax,existingNames:v.map(e=>e.name).filter(Boolean),proxyPools:_,onSuccess:az}),af&&(0,s.jsx)(em,{isOpen:eh,node:R,onSave:aU,onClose:()=>ef(!1),isAnthropic:ax}),!af&&(0,s.jsx)(ep,{isOpen:eW,providerAlias:aj,providerDisplayAlias:ak,onSave:async(e,t,a,s)=>{await aZ(e,t,aj,a,s),eG(!1)},onClose:()=>eG(!1)}),tb&&(0,s.jsx)(L,{isOpen:!0,onClose:()=>tv(!1),providerId:y,providerAlias:aj,connections:v,customModels:eR,disabledModelIds:tx,onSaved:e=>{ty(e),aO()}}),(0,s.jsx)(z,{isOpen:tL,onClose:()=>tK(!1),connectionId:aW,providerStorageAlias:aj,existingIds:aN,onImported:aq}),"codex"===y&&(0,s.jsx)(ex,{isOpen:et,onClose:()=>ea(!1),onSuccess:az}),"grok-cli"===y&&(0,s.jsx)(ey,{isOpen:er,onClose:()=>el(!1),onSuccess:az}),tr&&(0,s.jsx)(eC.A,{isOpen:!!tr,onClose:()=>tl(null),connection:tr,reactive:!0===ts.connections[tr.id],schedule:ts.schedules?.[tr.id]||null,onSave:e=>((e,{reactive:t,schedule:a})=>{aH({...ts,connections:{...ts.connections,[e]:t},schedules:{...ts.schedules,[e]:a}})})(tr.id,e)}),(0,s.jsx)(c.uo,{isOpen:tk,onClose:()=>tN(!1),onConfirm:()=>{(window.localStorage.setItem(at,"true"),tN(!1),ao)?aa():ai()},title:"Risk Notice",message:al?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(c.uo,{isOpen:!!tj,onClose:()=>tw(null),onConfirm:tj?.onConfirm,title:tj?.title||"Confirm",message:tj?.message,variant:"danger"})]})}},14558:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(95155),i=a(12115),r=a(97677);function l({connectionId:e,disabled:t=!1,onComplete:a}){let[n,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)(null);async function m(){if(!n){if(d)return void c(null);o(!0);try{let t=await fetch("/api/wakeup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ping",connectionId:e})}),s=await t.json();if(!t.ok)throw Error(s.error||"Ping failed.");c(s),a&&Promise.resolve(a()).catch(()=>{})}catch(e){c({status:"failed",message:e.message})}finally{o(!1)}}}let u=n?"Pinging…":d?`${d.message} Click to reset.`:"Ping now — sends a small request. Consumes quota; does not change Auto-Ping.",p=d?"succeeded"===d.status?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400":"text-text-muted hover:text-primary";return(0,s.jsx)(r.default,{text:u,children:(0,s.jsx)("button",{type:"button",onClick:m,disabled:n||t&&!d,"aria-label":u,"aria-busy":n,className:`flex h-8 w-8 items-center justify-center rounded-lg ${p} hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50`,children:(0,s.jsx)("span",{"aria-hidden":"true",style:{fontSize:n?20:32},className:`material-symbols-outlined ${n?"animate-spin":""}`,children:n?"progress_activity":"play_arrow"})})})}},25871:(e,t,a)=>{"use strict";a.d(t,{G:()=>n,e:()=>d});var s=a(12115);let i=null,r=null,l="pricingChanged";function n(){i=null,window.dispatchEvent(new CustomEvent(l))}function o(){return i?Promise.resolve(i):r||(r=fetch("/api/pricing").then(async e=>{if(!e.ok)throw Error(`pricing ${e.status}`);return e.json()}).then(e=>i=e||{}).catch(()=>({})).finally(()=>{r=null}))}function d(){let[e,t]=(0,s.useState)(()=>i||{});return(0,s.useEffect)(()=>{let e=!0;o().then(a=>{e&&t(a)});let a=()=>{o().then(a=>{e&&t(a)})};return window.addEventListener(l,a),()=>{e=!1,window.removeEventListener(l,a)}},[]),{getPricing:(0,s.useCallback)((t,a)=>t&&a&&e[t]?.[a]||null,[e])}}},64827:(e,t,a)=>{"use strict";function s(e){if(!e)return null;let t=null,a=Date.now();for(let[s,i]of Object.entries(e)){if(!s.startsWith("modelLock_")||!i)continue;let e=new Date(i).getTime();e<=a||(!t||e<t)&&(t=e)}return t?new Date(t).toISOString():null}a.d(t,{kJ:()=>s}),a(10904)},85295:(e,t,a)=>{Promise.resolve().then(a.bind(a,12040))},93195:(e,t,a)=>{"use strict";function s(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}a.d(t,{JW:()=>o,Vm:()=>s,fB:()=>r,gy:()=>i,nz:()=>l});let i={anchor:"09:30",timezone:s(),windowHours:5,slotsPerDay:3};function r(e){let t=/^(\d{1,2}):(\d{2})$/.exec(String(e||"").trim());if(!t)return null;let a=Number(t[1]),s=Number(t[2]);return a>23||s>59?null:{hour:a,minute:s}}function l(e){return Math.max(1,Math.floor(24/e))}function n(e,t,a,s){let i="number"==typeof e?e:Number(e);return Number.isFinite(i)?Math.min(s,Math.max(a,i)):t}function o(e){let t=function(e){if(!e||!0!==e.enabled)return null;let t=r(e.anchor)||r(i.anchor),a=`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}`,s=!function(e){if(!e||"string"!=typeof e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return!1}}(e.timezone)?i.timezone:e.timezone,o=n(e.windowHours,i.windowHours,.5,24),d=Math.round(n(e.slotsPerDay,i.slotsPerDay,1,l(o)));return{enabled:!0,anchor:a,timezone:s,windowHours:o,slotsPerDay:d}}(e);if(!t)return[];let{hour:a,minute:s}=r(t.anchor),o=60*a+s;return Array.from({length:t.slotsPerDay},(e,a)=>{let s=Math.round(o+a*t.windowHours*60)%1440;return`${String(Math.floor(s/60)).padStart(2,"0")}:${String(s%60).padStart(2,"0")}`})}},93725:(e,t,a)=>{"use strict";function s(e){return"number"!=typeof e||!Number.isFinite(e)||e<=0?null:e>=1e6?`${+(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:String(e)}function i(e){if("number"!=typeof e||!Number.isFinite(e))return null;if(0===e)return"0";let t=Math.abs(e);return(t>=1?e.toFixed(2):t>=.01?e.toFixed(3):e.toFixed(4)).replace(/\.?0+$/,"")}function r(e,t){let a=[],r=s(e?.contextWindow);r&&a.push(`${r} ctx`);let l=s(e?.maxOutput);l&&a.push(`${l} out`);let n=i(t?.input),o=i(t?.output);return(null!==n||null!==o)&&a.push(`$${n??"?"}/$${o??"?"}`),a.length>0?a.join(" \xb7 "):null}a.d(t,{M4:()=>r})},97132:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var s=a(95155),i=a(12115),r=a(14051),l=a.n(r),n=a(35497),o=a(31474),d=a(93195);let c=[{value:"off",label:"Off",icon:"block"},{value:"reset",label:"On reset",icon:"bolt"},{value:"schedule",label:"Schedule",icon:"schedule"}];function m({isOpen:e,onClose:t,onSave:a,connection:r,reactive:l=!1,schedule:u=null}){let[p,h]=(0,i.useState)(()=>({mode:u?.enabled===!0?"schedule":!0===l?"reset":"off",anchor:u?.anchor||d.gy.anchor,timezone:(0,d.Vm)(),windowHours:String(u?.windowHours??d.gy.windowHours),slotsPerDay:String(u?.slotsPerDay??d.gy.slotsPerDay)})),x=Number(p.windowHours),f=Number(p.slotsPerDay),g=!!(0,d.fB)(p.anchor),y=Number.isFinite(x)&&x>=.5&&x<=24,b=y?(0,d.nz)(x):24,v=Number.isInteger(f)&&f>=1&&f<=b,j=g&&y&&v,w="schedule"!==p.mode||j,k=j?(0,d.JW)({enabled:!0,...p,windowHours:x,slotsPerDay:f}):[],N=k.length&&y?(()=>{let{hour:e,minute:t}=(0,d.fB)(p.anchor),a=Math.round(60*e+t+f*x*60)%1440;return`${String(Math.floor(a/60)).padStart(2,"0")}:${String(a%60).padStart(2,"0")}`})():"",C=e=>h(t=>({...t,...e}));return(0,s.jsx)(n.aF,{isOpen:e,onClose:t,title:"Auto-ping settings",size:"lg",footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.$n,{variant:"secondary",onClick:t,children:"Cancel"}),(0,s.jsx)(n.$n,{onClick:()=>{w&&(a({reactive:"reset"===p.mode,schedule:"schedule"===p.mode?{enabled:!0,anchor:p.anchor,timezone:p.timezone,windowHours:x,slotsPerDay:f}:{enabled:!1}}),t())},disabled:!w,children:"Save"})]}),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Configure automated quota pings",r?.name?` for ${r.name}`:""," — pick one mode."]}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-1 rounded-[10px] bg-surface-2 p-1",children:c.map(e=>{let t=p.mode===e.value;return(0,s.jsxs)("button",{type:"button",onClick:()=>C({mode:e.value}),className:(0,o.cn)("flex h-9 items-center justify-center gap-1.5 rounded-[8px] px-3 text-sm font-medium transition-all",t?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[15px] leading-none",children:e.icon}),(0,s.jsx)("span",{children:e.label})]},e.value)})}),"reset"===p.mode&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Pings right after the 5h quota window resets, so a new window starts immediately."}),"schedule"===p.mode&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Pings at fixed local times so the 5h windows align with your workday."}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[(0,s.jsx)(n.pd,{label:"Anchor time",type:"time",value:p.anchor,onChange:e=>C({anchor:e.target.value}),error:g?"":"Use HH:MM",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,s.jsx)(n.pd,{label:"Window (hours)",type:"number",min:"0.5",max:"24",step:"0.5",value:p.windowHours,onChange:e=>C({windowHours:e.target.value}),error:y?"":"0.5 – 24",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,s.jsx)(n.pd,{label:"Pings per day",type:"number",min:"1",max:String(b),step:"1",value:p.slotsPerDay,onChange:e=>C({slotsPerDay:e.target.value}),error:v?"":`1 – ${b}`,hint:v?`Max ${b}`:"",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"})]}),k.length>0&&(0,s.jsxs)("div",{className:"rounded-[10px] bg-surface-2 px-3 py-2.5",children:[(0,s.jsxs)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:["Daily slots (",p.timezone,")"]}),(0,s.jsx)("p",{className:"mt-1 text-sm font-medium text-text-main",children:k.join(" → ")}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Covers ",k[0]," – ",N,", then pauses until ",k[0]," next day."]})]})]})]})})}m.propTypes={isOpen:l().bool.isRequired,onClose:l().func.isRequired,onSave:l().func.isRequired,connection:l().object,reactive:l().bool,schedule:l().object}}},e=>{e.O(0,[763,5772,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=85295)),_N_E=e.O()}]);
30
+ Primary|sk-key-3`,value:m,onChange:e=>u(e.target.value),disabled:j}),O>0&&(0,s.jsxs)("span",{className:"text-right text-xs text-text-muted",children:[O," ",1===O?"key detected":"keys detected"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,s.jsx)(c.pd,{label:(0,$.Tl)("Name Prefix"),value:p,onChange:e=>h(e.target.value),placeholder:r||"Key",disabled:j}),(0,s.jsx)(c.pd,{label:(0,$.Tl)("Default Model"),value:x,onChange:e=>f(e.target.value),placeholder:l?"claude-3-5-sonnet-latest":"gpt-4o-mini",disabled:j})]}),o&&o.length>0&&(0,s.jsx)(c.l6,{label:(0,$.Tl)("Proxy Pool"),value:g,onChange:e=>y(e.target.value),options:[{value:eb,label:(0,$.Tl)("None")},...o.map(e=>({value:e.id,label:e.name}))],disabled:j}),(0,s.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-accent/20 bg-sidebar/50 p-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-text-main",children:(0,$.Tl)("Test connections during import")}),(0,s.jsx)("span",{className:"text-xs text-text-muted",children:(0,$.Tl)("Validates each key before saving. Disable for faster bulk imports.")})]}),(0,s.jsx)(c.lM,{checked:b,onChange:v,disabled:j})]}),j&&k&&(0,s.jsxs)("div",{className:"flex flex-col gap-1.5 rounded-lg border border-primary/20 bg-primary/5 p-3",children:[(0,s.jsxs)("div",{className:"flex justify-between text-xs text-text-main",children:[(0,s.jsx)("span",{children:(0,$.Tl)("Importing keys...")}),(0,s.jsxs)("span",{children:[k.current," / ",k.total]})]}),(0,s.jsx)("div",{className:"w-full bg-accent/20 rounded-full h-1.5 overflow-hidden",children:(0,s.jsx)("div",{className:"bg-primary h-1.5 rounded-full transition-all duration-200",style:{width:`${Math.round(k.current/k.total*100)}%`}})})]}),C&&(0,s.jsxs)("div",{className:`rounded-lg p-3 text-sm font-medium border ${C.failed>0?"border-yellow-500/30 bg-yellow-500/10 text-yellow-500 dark:text-yellow-400":"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400"}`,children:[(0,s.jsxs)("div",{children:["✓ ",C.success," ",(0,$.Tl)("added successfully"),C.failed>0&&`, ✗ ${C.failed} ${(0,$.Tl)("failed")}`]}),C.errors?.length>0&&(0,s.jsx)("ul",{className:"mt-2 list-disc list-inside text-xs font-normal opacity-90",children:C.errors.map((e,t)=>(0,s.jsx)("li",{children:e},t))})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,s.jsx)(c.$n,{onClick:A,fullWidth:!0,disabled:j||0===O,icon:j?void 0:"playlist_add",children:j?`${(0,$.Tl)("Adding")} (${k?.current||0}/${k?.total||0})...`:`${(0,$.Tl)("Add All Keys")} (${O})`}),(0,s.jsx)(c.$n,{onClick:T,variant:"ghost",fullWidth:!0,disabled:j,children:C?(0,$.Tl)("Close"):(0,$.Tl)("Cancel")})]})]})})}ev.propTypes={isOpen:R().bool.isRequired,onClose:R().func.isRequired,providerId:R().string.isRequired,providerName:R().string,isAnthropic:R().bool,existingNames:R().arrayOf(R().string),proxyPools:R().array,onSuccess:R().func};var ej=a(65921);let ew=["host","content-length","content-type","connection","transfer-encoding","authorization","cookie"],ek=/^[A-Za-z0-9-]+$/;function eN({providerId:e}){let t=(0,ej.i)(),[a,r]=(0,i.useState)(!1),[l,n]=(0,i.useState)([{name:"",value:""}]),[o,d]=(0,i.useState)({}),[m,u]=(0,i.useState)(!1),[p,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let t=!1;return fetch(`/api/providers/${e}/overrides`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{if(t||!e)return;let a=e.builtinHeaders||{},s=Object.entries({...a,...e.headers||{}}).map(([e,t])=>({name:e,value:t}));d(a),n(s.length?s:[{name:"",value:""}]),u(Object.keys(e.headers||{}).length>0)}).catch(()=>{}),()=>{t=!0}},[e]);let x=(e,t,a)=>{n(s=>s.map((s,i)=>i===e?{...s,[t]:a}:s))},f=(0,i.useCallback)(async()=>{let a={};for(let e of l.filter(e=>e.name.trim())){let s=e.name.trim();if(!ek.test(s))return void t.error(`Invalid header name: ${s}`);if(ew.includes(s.toLowerCase()))return void t.error(`Header ${s} cannot be overridden`);if(s in a)return void t.error(`Duplicate header name: ${s}`);e.value!==o[s]&&(a[s]=e.value)}h(!0);try{let s=await fetch(`/api/providers/${e}/overrides`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({headers:a})});if(!s.ok){let e=await s.json().catch(()=>({}));t.error(e.error||"Failed to save");return}u(Object.keys(a).length>0),t.success("Custom headers saved")}finally{h(!1)}},[l,o,e,t]);return 0!==Object.keys(o).length||m?(0,s.jsxs)(c.Zp,{padding:"xs",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>r(e=>!e),className:"flex w-full items-center justify-between text-left",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"tune"}),(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Custom Headers"}),m&&(0,s.jsx)(c.Ex,{variant:"success",size:"sm",children:"Active"})]}),(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:a?"expand_less":"expand_more"})]}),a&&(0,s.jsxs)("div",{className:"mt-3 border-t border-border pt-3",children:[(0,s.jsx)("div",{className:"flex flex-col gap-2",children:l.map((e,t)=>{let a=e.name.trim()in o&&e.value!==o[e.name.trim()];return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{value:e.name,onChange:e=>x(t,"name",e.target.value),placeholder:"Header-Name",spellCheck:!1,className:"w-44 rounded-md border border-border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none"}),(0,s.jsx)("input",{value:e.value,onChange:e=>x(t,"value",e.target.value),placeholder:"Value",spellCheck:!1,title:a?"Overridden":e.name.trim()in o?"Registry default":"",className:`min-w-0 flex-1 rounded-md border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none ${a?"border-amber-400/60":"border-border"}`}),(0,s.jsx)("button",{type:"button",title:"Remove header",onClick:()=>n(e=>e.length>1?e.filter((e,a)=>a!==t):[{name:"",value:""}]),className:"shrink-0 text-text-muted hover:text-red-500",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]},t)})}),(0,s.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>n(e=>[...e,{name:"",value:""}]),className:"flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add header"]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:p,onClick:()=>{n(Object.entries(o).map(([e,t])=>({name:e,value:t})))},className:"rounded-md border border-border px-3 py-1.5 text-xs hover:bg-black/[0.03] dark:hover:bg-white/[0.03] disabled:opacity-50",children:"Reset"}),(0,s.jsx)("button",{type:"button",disabled:p,onClick:f,className:"rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-white hover:opacity-90 disabled:opacity-50",children:p?"Saving...":"Save"})]})]})]})]}):null}eN.propTypes={providerId:R().string.isRequired};var eC=a(97132);function eS({providerId:e,onConnected:t,size:a="sm"}){let[r,l]=(0,i.useState)(!1),[n,o]=(0,i.useState)(""),d=async()=>{l(!0),o("");try{let a=await fetch(`/api/oauth/${e}/lease-connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),s=await a.json().catch(()=>({}));if(!a.ok)return void o(s.error||"Could not reach the MiniMax Code desktop app");"function"==typeof t&&t()}catch(e){o(e?.message||"Could not reach the MiniMax Code desktop app")}finally{l(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:a,icon:"desktop_windows",variant:"secondary",disabled:r,onClick:d,title:(0,$.Tl)("Borrow the signed-in MiniMax Code desktop app's login — no second sign-in, refresh stays with the desktop app"),children:r?(0,$.Tl)("Connecting..."):(0,$.Tl)("Use Desktop App")}),n&&(0,s.jsx)("p",{className:"w-full text-xs text-red-500 break-words",children:n})]})}eS.propTypes={providerId:R().string.isRequired,onConnected:R().func,size:R().oneOf(["sm","md","lg"])};var eT=a(93195);let eA=new Set(["minimax-code","minimax-code-global"]),e$=[{value:"fill-first",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate"},{value:"cache-affinity",label:"Cache Affinity — prompt cache sticky"}],eO=new Set(["cursor","zed","commandcode","claude","antigravity"]),eP={claude:"claudeAutoPing",codex:"codexAutoPing",antigravity:"antigravityAutoPing"},eI=[{value:"auto",label:"Retry: Auto"},{value:"15",label:"Retry: 15s"},{value:"30",label:"Retry: 30s"},{value:"60",label:"Retry: 1m"},{value:"120",label:"Retry: 2m"},{value:"300",label:"Retry: 5m"},{value:"600",label:"Retry: 10m"},{value:"1800",label:"Retry: 30m"},{value:"3600",label:"Retry: 1h"}];function eE(e){return new Promise(t=>setTimeout(t,e))}function eM(){let e,t,a,l,p,h,x,f=(0,r.useParams)(),g=(0,r.useRouter)(),y=f.id,{getCaps:b}=(0,A.yU)(),[v,j]=(0,i.useState)([]),[w,k]=(0,i.useState)(1),[N,C]=(0,i.useState)(10),[O,M]=(0,i.useState)(!0),[R,D]=(0,i.useState)(null),[_,U]=(0,i.useState)([]),[K,J]=(0,i.useState)(!1),[H,B]=(0,i.useState)(!1),[W,G]=(0,i.useState)(!1),[V,Q]=(0,i.useState)(!1),[X,Y]=(0,i.useState)(""),[et,ea]=(0,i.useState)(!1),[es,ei]=(0,i.useState)(!1),[er,el]=(0,i.useState)(!1),[eo,ed]=(0,i.useState)(!1),[ec,eu]=(0,i.useState)(!1),[eh,ef]=(0,i.useState)(!1),[eg,eb]=(0,i.useState)(!1),[ej,ew]=(0,i.useState)(null),[ek,eM]=(0,i.useState)({}),[eR,eD]=(0,i.useState)([]),[e_,eq]=(0,i.useState)(!1),[ez,eU]=(0,i.useState)(!1),[eF,eL]=(0,i.useState)({}),[eK,eJ]=(0,i.useState)(""),[eH,eB]=(0,i.useState)(()=>new Set),[eW,eG]=(0,i.useState)(!1),[eV,eQ]=(0,i.useState)([]),[eZ,eX]=(0,i.useState)("__none__"),[eY,e0]=(0,i.useState)(!1),[e1,e5]=(0,i.useState)(null),[e2,e3]=(0,i.useState)("fill-first"),[e4,e6]=(0,i.useState)(""),[e8,e9]=(0,i.useState)("auto"),[e7,te]=(0,i.useState)("auto"),[tt,ta]=(0,i.useState)(""),[ts,ti]=(0,i.useState)({enabled:!1,connections:{},schedules:{}}),[tr,tl]=(0,i.useState)(null),[tn,to]=(0,i.useState)([]),[td,tc]=(0,i.useState)([]),[tm,tu]=(0,i.useState)(null),[tp,th]=(0,i.useState)([]),[tx,tf]=(0,i.useState)([]),[tg,ty]=(0,i.useState)([]),[tb,tv]=(0,i.useState)(!1),[tj,tw]=(0,i.useState)(null),[tk,tN]=(0,i.useState)(!1),[tC,tS]=(0,i.useState)(!1),[tT,tA]=(0,i.useState)(!1),[t$,tO]=(0,i.useState)(null),[tP,tI]=(0,i.useState)({}),[tE,tM]=(0,i.useState)(null),tR=(0,i.useRef)(!1),[tD,t_]=(0,i.useState)(!1),[tq,tz]=(0,i.useState)(!1),[tU,tF]=(0,i.useState)(!1),[tL,tK]=(0,i.useState)(!1),[tJ,tH]=(0,i.useState)(null),[tB,tW]=(0,i.useState)(!1),[tG,tV]=(0,i.useState)(!1),[tQ,tZ]=(0,i.useState)(null),[tX,tY]=(0,i.useState)(!1),[t0,t1]=(0,i.useState)(!1),[t5,t2]=(0,i.useState)(null),[t3,t4]=(0,i.useState)({}),[t6,t8]=(0,i.useState)(null),t9=(0,i.useRef)(!1),{copied:t7,copy:ae}=(0,T.C)(),at="ag_risk_confirmed",aa=()=>{J(!0)},as=()=>{"antigravity"===y&&"true"!==window.localStorage.getItem(at)?tN(!0):"xiaomi-mimo"===y?B(!0):ao?aa():(Y(""),Q(!0))},ai=()=>{Y(""),Q(!0)},ar=()=>{ao?as():ai()},al=R?{id:R.id,name:R.name||("anthropic-compatible"===R.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===R.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===R.type?"AC":"OC",apiType:R.apiType,baseUrl:R.baseUrl,type:R.type}:m.zN[y]||m.fg[y]||m.IS[y]||m.nJ[y]||m.br[y],an=al?.authModes||[],ao=!!m.zN[y]||!!m.IS[y]||an.includes("oauth"),ad=!!m.fg[y]||an.includes("apikey"),ac=!!m.IS[y]?.noAuth,am=(0,u.KC)(y),au=eO.has(y)&&td.length>0?td:(0,I.N)(am,eR,(0,m.wG)(y)),ap=(0,m.wG)(y),ah=(0,m.mq)(y),ax=(0,m.gb)(y),af=ah||ax,ag=!af&&ao&&ad,ay="xai"===y?"Grok Build OAuth":"grok-cli"===y?"Grok CLI Device Login":"kimi"===y?"Kimi Coding OAuth":"OAuth",ab="xai"===y?"xAI API Key":"kimi"===y?"Kimi API Key":"qoder"===y||"qoder-cn"===y?"PAT":"API Key",av=e=>{if(!e8||"auto"===e8)return null;let t=S(y,e);return t&&t.includes(e8)?e8:null},aj=af?y:ap,aw=(()=>{let e=new Set,t=new Set,a=a=>{if(!a||t.has(a))return;t.add(a);let s=S(y,a);s&&s.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of au)a(e.id);for(let e of tp)a(e.id);for(let e of eR)e.providerAlias===aj&&"llm"===(e.kind||e.type||"llm")&&a(e.id);return e.size?["auto",...e]:null})(),ak=af?R?.prefix||y:ap,aN=(()=>{let e=new Set;for(let t of au)e.add(t.id);for(let t of tp)e.add(t.id);for(let t of eR)t.providerAlias===aj&&"llm"===(t.kind||t.type||"llm")&&e.add(t.id);for(let t of Object.values(ek))"string"==typeof t&&t.startsWith(`${aj}/`)&&e.add(t.slice(aj.length+1));return e})(),aC=(0,i.useMemo)(()=>(0,I.R)({customModels:eR,modelAliases:ek,providerAlias:aj,builtInModels:au,type:"llm"}),[eR,ek,aj,au]),aS=(0,i.useMemo)(()=>{let e=[...au,...tp.filter(e=>!au.some(t=>t.id===e.id))].filter(e=>{let t=(0,u.CP)(e);return!t||"llm"===t}),t=new Set(e.map(e=>e.id));return[...e,...aC.filter(e=>!t.has(e.id))]},[au,tp,aC]),aT=(0,i.useMemo)(()=>new Set(tx),[tx]),aA=(0,i.useMemo)(()=>aS.filter(e=>!aT.has(e.id)),[aS,aT]),a$=(0,i.useMemo)(()=>aA.map(e=>e.id),[aA]),aO=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(aj)}`,{cache:"no-store"}),t=await e.json(),a=e.ok&&t.ids||[];if(y&&y!==aj)try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(y)}`,{cache:"no-store"}),t=await e.json();e.ok&&Array.isArray(t.ids)&&t.ids.length>0&&(a=[...new Set([...a,...t.ids])])}catch{}tf(a)}catch(e){console.log("Error fetching disabled models:",e)}},[aj,y]),aP=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/enabled?providerAlias=${encodeURIComponent(aj)}`,{cache:"no-store"}),t=await e.json();e.ok&&ty(t.ids||[])}catch(e){console.log("Error fetching enabled models:",e)}},[aj]),aI=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:aj,ids:[e]})})).ok&&await aO()}catch(e){console.log("Error disabling model:",e)}},aE=async e=>{try{let t=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(aj)}&id=${encodeURIComponent(e)}`,{method:"DELETE"});y&&y!==aj&&await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(y)}&id=${encodeURIComponent(e)}`,{method:"DELETE"}),t.ok&&await aO()}catch(e){console.log("Error enabling model:",e)}},aM=async e=>{e.length&&tw({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{tw(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:aj,ids:e})})).ok&&await aO()}catch(e){console.log("Error disabling all models:",e)}}})},aR=async e=>{e.length&&tw({title:(0,$.Tl)("Disable Failed Models"),message:`${e.length} model(s) failed testing. Disable them?`,onConfirm:async()=>{tw(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:aj,ids:e})})).ok&&await aO()}catch(e){console.log("Error disabling failed models:",e)}}})},aD=async()=>{tx.length&&tw({title:"Active All Models",message:`Active all ${tx.length} disabled model(s)?`,onConfirm:async()=>{tw(null);try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(aj)}`,{method:"DELETE"});y&&y!==aj&&await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(y)}`,{method:"DELETE"}),e.ok&&await aO()}catch(e){console.log("Error enabling all models:",e)}}})},a_=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&eM(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),aq=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&eD(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===y&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&th(e.models)}).catch(()=>{})},[y]);let az=(0,i.useCallback)(async()=>{try{let[e,t,a,s]=await Promise.all([fetch(`/api/providers?provider=${encodeURIComponent(y)}`,{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"})]),i=await e.json(),r=await t.json(),l=await a.json(),n=s.ok?await s.json():{};e.ok&&j(i.connections||[]),a.ok&&U(l.proxyPools||[]);let o=(n.providerStrategies||{})[y]||{};e5(o.fallbackStrategy||null),e3("round-robin"===n.fallbackStrategy?"round-robin":"fill-first"),e6(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1");let d=(n.providerThinking||{})[y]||{};e9(d.mode||"auto");let c=(n.retryDelayByProvider||{})[y];te(null!=c&&"auto"!==c?String(c):"auto");let m=(n.rpmByProvider||{})[y];ta(null!=m?String(m):"");let u=eP[y],p=u&&n[u]||{};if(ti({enabled:!0===p.enabled,connections:p.connections||{},schedules:p.schedules||{}}),tW(!0===n.codexFastMode),t.ok){let e=(r.nodes||[]).find(e=>e.id===y)||null;if(!e&&af)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===y)||null))break}D(e)}}catch(e){console.log("Error fetching connections:",e)}finally{M(!1)}},[y,af]),aU=async e=>{try{let t=await fetch(`/api/provider-nodes/${y}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(D(a.node),await az(),ef(!1))}catch(e){console.log("Error updating provider node:",e)}},aF=async(e,t)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),s=(a.ok?await a.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let r={...s};0===Object.keys(i).length?delete r[y]:r[y]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:r})})}catch(e){console.log("Error saving provider strategy:",e)}},aL=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?a[y]={mode:e}:delete a[y],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:a})})}catch(e){console.log("Error saving thinking config:",e)}},aK=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).retryDelayByProvider||{}};e&&"auto"!==e?a[y]=Number(e):delete a[y],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({retryDelayByProvider:a})})}catch(e){console.log("Error saving retry delay:",e)}},aJ=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).rpmByProvider||{}},s=String(e??"").trim();""===s?delete a[y]:a[y]=Math.max(0,Number(s)||0),await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rpmByProvider:a})})}catch(e){console.log("Error saving RPM limit:",e)}},aH=async e=>{let t=eP[y];if(t){ti(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)}}},aB=async e=>{tW(e),tV(!0),tZ(null);try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({codexFastMode:e})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to update fast mode setting")}}catch(t){console.log("Error saving codex fast mode setting:",t),tW(!e),tZ(t.message||"Failed to update fast mode setting")}finally{tV(!1)}};(0,i.useEffect)(()=>{az(),a_(),aq(),aO(),aP()},[az,a_,aq,aO,aP]),(0,i.useEffect)(()=>{if(!eO.has(y))return void tc([]);let e=v.find(e=>!1!==e.isActive);if(!e?.id){tc([]),"zed"===y&&tu(null);return}let t=!1;return"zed"===y&&tu(null),fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json().catch(()=>null)})).then(({ok:e,data:a})=>{if(!t){if(e&&Array.isArray(a?.models)&&a.models.length>0){tc(a.models),"zed"===y&&a?.warning&&tu(a.warning);return}"zed"===y&&(tc([]),tu(a?.warning||a?.error||"Zed returned no live models."))}}).catch(()=>{t||"zed"!==y||(tc([]),tu("Failed to reach the Zed model catalog."))}),()=>{t=!0}},[y,v]),(0,i.useEffect)(()=>{let e=(m.zN[y]||m.fg[y]||m.IS[y]||m.nJ[y])?.modelsFetcher;e&&P(e,y).then(to)},[y]);let aW=v.find(e=>!1!==e.isActive)?.id||null,aG=tJ===aW&&null!==aW;(0,i.useEffect)(()=>{if(!aW)return;let e=!1;return fetch(`/api/providers/${aW}/models?check=1`).then(e=>e.json()).then(t=>{e||tH(!0===t.supported?aW:null)}).catch(()=>{}),()=>{e=!0}},[aW]);let aV=async(e,t,a=ap)=>{let s=`${a}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await a_();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},aQ=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await a_()}catch(e){console.log("Error deleting alias:",e)}},aZ=async(e,t="llm",a=aj,s,i)=>{try{let r=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:a,id:e,type:t,...s?{caps:s}:{},...i?{transport:i}:{}})}),l=await r.json().catch(()=>({}));r.ok?(!1===l.added&&alert("Model already exists (duplicate). Check built-in or custom list."),await aq(),window.dispatchEvent(new CustomEvent("customModelChanged"))):alert(l.error||"Failed to add custom model")}catch(e){console.log("Error adding custom model:",e),alert(e.message||"Failed to add custom model")}},aX=async(e,t="llm",a=aj)=>{try{let s=new URLSearchParams({providerAlias:a,id:e,type:t});(await fetch(`/api/models/custom?${s}`,{method:"DELETE"})).ok&&(await aq(),tx.includes(e)&&(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(a)}&id=${encodeURIComponent(e)}`,{method:"DELETE"}),y&&y!==a&&await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(y)}&id=${encodeURIComponent(e)}`,{method:"DELETE"}),await aO()),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},aY=async()=>{if(tD)return;let e=v.find(e=>!1!==e.isActive);if(!e)return void alert((0,$.Tl)("Please add an active Qoder connection first"));t_(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||(0,$.Tl)("Failed to fetch models"));let s=a.models||[];if(0===s.length)return void alert((0,$.Tl)("No models returned"));if("qoder"===y||"qoder-cn"===y){for(let e of s){let t=e.id?.replace(/^(qoder-cn|qoder)\//,"");if(!t)continue;let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:aj,id:t,type:"llm",name:e.name||t})});if(!a.ok){let e=await a.json();throw Error(e.error||"Failed to save model")}}await aq(),window.dispatchEvent(new CustomEvent("customModelChanged")),alert((0,$.Tl)("Successfully updated")+` ${s.length} `+(0,$.Tl)("models"));return}let i=0;for(let e of s){let t=e.id||e.name;if(!t)continue;let a=t.replace(/^(qoder-cn|qoder)\//,"");eR.some(e=>e.providerAlias===aj&&e.id===a&&"llm"===(e.kind||e.type||"llm"))||Object.values(ek).includes(`${aj}/${a}`)||(await aZ(a,"llm",aj),i+=1)}0===i?alert((0,$.Tl)("All models already exist, no new models added")):alert((0,$.Tl)("Successfully added")+` ${i} `+(0,$.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,$.Tl)("Error fetching models")+": "+e.message)}finally{t_(!1)}},a0=async()=>{if(tq)return;let e=v.find(e=>!1!==e.isActive);if(!e)return void alert((0,$.Tl)("Please add an active Cline connection first"));tz(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||(0,$.Tl)("Failed to fetch models"));let s=a.models||[];if(0===s.length)return void alert((0,$.Tl)("No models returned"));let i=0;for(let e of s){let t=e.id||e.name;t&&(eR.some(e=>e.providerAlias===aj&&e.id===t&&"llm"===(e.kind||e.type||"llm"))||Object.values(ek).includes(`${aj}/${t}`)||(await aZ(t,"llm",aj),i+=1))}0===i?alert((0,$.Tl)("All models already exist, no new models added")):alert((0,$.Tl)("Successfully added")+` ${i} `+(0,$.Tl)("models"))}catch(e){console.log("Error importing Cline models:",e),alert((0,$.Tl)("Error fetching models")+": "+e.message)}finally{tz(!1)}},a1=async()=>{if(tC||0===v.length)return;let e=Object.fromEntries(v.map(e=>[e.id,{state:"queued",error:null}]));tR.current=!1,tS(!0),tA(!1),tO(null),tI(e),tM({total:v.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,a=0;try{for(let e=0;e<v.length;e+=1){if(tR.current){tM({total:v.length,completed:e,passed:t,failed:a,stopped:!0});break}let s=v[e];tO(s.id),tI(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${s.id}/test`,{method:"POST"}),i=await e.json(),r=!!i.valid;r?t+=1:a+=1,tI(e=>({...e,[s.id]:{state:r?"success":"failed",error:r?null:i.error||null}}))}catch(e){a+=1,tI(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}tM({total:v.length,completed:e+1,passed:t,failed:a,stopped:!1}),e<v.length-1&&await eE(1e3)}}finally{tO(null),tS(!1),tA(!1),tR.current=!1}},a5=async()=>{if(tX)return;if(!v.some(e=>!1!==e.isActive)&&!ac)return void alert((0,$.Tl)("No active connection available for testing"));let e=[...au,...tp.filter(e=>!au.some(t=>t.id===e.id))].filter(e=>{let t=(0,u.CP)(e);return!t||"llm"===t}),t=new Set(tx),a=e.filter(e=>!t.has(e.id));if(0===a.length)return void alert((0,$.Tl)("No enabled models to test"));t9.current=!1,tY(!0),t1(!1),t2(null),t4({}),t8({total:a.length,completed:0,passed:0,failed:0,stopped:!1});let s=0,i=0,r=[];try{for(let e=0;e<a.length;e+=1){if(t9.current){t8({total:a.length,completed:e,passed:s,failed:i,stopped:!0});break}let t=a[e];t2(t.id),t4(e=>({...e,[t.id]:{state:"testing",error:null}}));try{let e=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${aj}/${t.id}`})}),a=await e.json(),l=e.ok&&!0===a.ok;l?s+=1:(i+=1,r.push(t.id)),t4(e=>({...e,[t.id]:{state:l?"passed":"failed",error:l?null:a.error||"Model not reachable"}})),eL(e=>({...e,[t.id]:l?"ok":"error"})),eJ(l?"":a.error||"Model not reachable")}catch(e){i+=1,r.push(t.id),t4(a=>({...a,[t.id]:{state:"failed",error:e.message||"Test failed"}})),eL(e=>({...e,[t.id]:"error"})),eJ(e.message||"Network error")}t8({total:a.length,completed:e+1,passed:s,failed:i,stopped:!1}),e<a.length-1&&await eE(1e3)}}finally{let e=t9.current;t2(null),tY(!1),t1(!1),t9.current=!1,r.length>0?tw({title:(0,$.Tl)("Disable Failed Models"),message:`${r.length} model(s) failed testing. Disable them?`,onConfirm:async()=>{tw(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:aj,ids:r})})).ok&&await aO()}catch(e){console.log("Error disabling failed models:",e)}}}):e||alert((0,$.Tl)("All models passed testing!"))}},a2=async e=>{tw({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{tw(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&j(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},a3=()=>{az(),J(!1)},a4=async e=>{Y("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:y,...e})}),a=null;try{a=await t.json()}catch{a=null}if(t.ok)return await az(),!0;Y(a?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),Y("Failed to save connection")}return!1},a6=async e=>{try{(await fetch(`/api/providers/${ej.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await az(),eu(!1))}catch(e){console.log("Error updating connection:",e)}},a8=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&j(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("Error updating connection status:",e)}},a9=async(e,t)=>{let a=await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{fastMode:t}})}),s=await a.json();if(!a.ok)throw Error(s.error||"Failed to save fast mode");j(a=>a.map(a=>a.id===e?{...a,providerSpecificData:{...a.providerSpecificData,fastMode:t}}:a))},a7=async(e,t)=>{let a=[...v];[a[e],a[t]]=[a[t],a[e]],j(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await az()}},se=v.filter(e=>eV.includes(e.id));(0,i.useEffect)(()=>{eQ(e=>e.filter(e=>v.some(t=>t.id===e)))},[v]),(()=>{if(0===se.length)return;let e=new Set(se.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let a=_.find(e=>e.id===t);return a?.name}})();let st=()=>{eY||eb(!1)},sa=async e=>{e0(!0);try{let t=0;for(let{connectionId:a,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",a,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await az(),eb(!1)}finally{e0(!1)}},ss=e=>sa(v.map(t=>({connectionId:t.id,proxyPoolId:e}))),{currentPage:si,items:sr,start:sl}=function(e=[],t=1,a=10){let s=Array.isArray(e)?e:[],i=Number.isFinite(a)&&a>=1?Math.floor(a):10,r=s.length,l=Math.max(1,Math.ceil(r/i)),n=Math.floor(Number(t)),o=Math.min(Number.isFinite(n)&&n>0?n:1,l),d=(o-1)*i,c=s.slice(d,d+i);return{currentPage:o,totalPages:l,totalItems:r,start:d,items:c,pageSize:i}}(v,w,N),sn=new Set(sr.map(e=>e.id)),so=sr.length>0&&sr.every(e=>eV.includes(e.id)),sd=(0,s.jsxs)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:[sr.map((e,t)=>{let a,i=sl+t;return(0,s.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,s.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,s.jsx)("input",{type:"checkbox",checked:(a=e.id,eV.includes(a)),onChange:()=>{var t;return t=e.id,void eQ(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,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(Z,{connection:e,proxyPools:_,isOAuth:ao,isFirst:0===i,isLast:i===v.length-1,onMoveUp:()=>a7(i,i-1),onMoveDown:()=>a7(i,i+1),onToggleActive:t=>a8(e.id,t),fastMode:al?.fastMode?{on:e.providerSpecificData?.fastMode===!0,onToggle:t=>a9(e.id,t)}:null,autoPing:eP[y]&&"oauth"===e.authType?{isActive:!0===ts.connections[e.id]||ts.schedules?.[e.id]?.enabled===!0,reactiveOn:!0===ts.connections[e.id],provider:y,scheduleOn:ts.schedules?.[e.id]?.enabled===!0,scheduleSummary:(0,eT.JW)(ts.schedules?.[e.id]).join(" / "),onConfigure:()=>tl(e)}: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&&j(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:{...a.providerSpecificData,proxyPoolId:t||null}}:a))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{ew(e),eu(!0)},onReconnect:()=>{"iflow"===y?G(!0):J(!0)},onDelete:()=>a2(e.id),oneByOneStatus:tP[e.id]||null})})]},e.id)}),v.length>10&&(0,s.jsx)(c.dK,{currentPage:si,pageSize:N,totalItems:v.length,onPageChange:k,onPageSizeChange:e=>{C(e),k(1)},allowCustomPageSize:!0,maxPageSize:200})]}),sc=_.filter(e=>!0===e.isActive),sm=(0,s.jsx)(c.aF,{isOpen:eg,onClose:st,title:`Apply Proxy (${v.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=_.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):sa(v.map((t,a)=>({connectionId:t.id,proxyPoolId:e[a%e.length].id})))},disabled:eY||0===sc.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,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>ss(null),disabled:eY,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,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),_.map(e=>(0,s.jsxs)("button",{onClick:()=>ss(e.id),disabled:eY||!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,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eY&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(c.$n,{onClick:st,variant:"ghost",fullWidth:!0,disabled:eY,children:"Cancel"})]})}),su=async e=>{if(!eH.has(e)){eB(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${aj}/${e}`})}),a=await t.json();eL(t=>({...t,[e]:a.ok?"ok":"error"})),eJ(a.ok?"":a.error||"Model not reachable")}catch{eL(t=>({...t,[e]:"error"})),eJ("Network error")}finally{eB(t=>{let a=new Set(t);return a.delete(e),a})}}};if(O)return(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(c.Qv,{}),(0,s.jsx)(c.Qv,{})]});if(!al)return(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let sp=()=>{let e=sh();return e?!ez&&(0,d.HY)(al.id)||e:(0,d.HY)(al.id)},sh=()=>ah&&al.apiType?"responses"===al.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ax?"/providers/anthropic-m.png":null;return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${al.color}15`},children:e_||!sp()?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:al.color},children:al.textIcon||al.id.slice(0,2).toUpperCase()}):(0,s.jsx)(o.default,{src:sp(),alt:al.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{((0,d.Kw)(al.id),sh()&&!ez)?eU(!0):eq(!0)},loading:"lazy",decoding:"async"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:al.name}),(al.notice?.apiKeyUrl||al.notice?.signupUrl||al.website)&&(0,s.jsxs)("a",{href:al.notice?.apiKeyUrl||al.notice?.signupUrl||al.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),al.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,s.jsxs)("p",{className:"text-text-muted",children:[v.length," connection",1===v.length?"":"s"]})]}),(0,s.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[(0,s.jsx)("span",{className:"hidden text-xs text-text-muted sm:inline",children:"RPM / account"}),(0,s.jsx)("input",{type:"number",min:"0",value:tt,placeholder:String(m.W[y]||0),onChange:e=>ta(e.target.value),onBlur:e=>aJ(e.target.value),title:"Max requests per minute per account. Accounts over the cap are skipped before a request is sent, so the provider never sees a 429. Blank = provider default, 0 = unlimited.",className:"w-16 rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none"}),(0,s.jsx)("span",{className:"hidden text-xs text-text-muted sm:inline",children:"Retry delay"}),(0,s.jsx)("select",{value:e7,onChange:e=>{var t;te(t=e.target.value),aK(t)},title:"Cooldown after a rate-limit/error when the provider reports no reset time of its own. Auto = honor the provider's reported delay, else built-in backoff.",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:eI.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]})]})]}),al.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:al.deprecationNotice})]}),al.notice?.text&&!al.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:al.notice.text}),al.notice.apiKeyUrl&&(0,s.jsx)("a",{href:al.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 →"})]}),af&&R&&(0,s.jsx)(c.Zp,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:ax?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[ax?"Messages API":"responses"===R.apiType?"Responses API":"Chat Completions"," \xb7 ",(R.baseUrl||"").replace(/\/$/,""),"/",ax?"messages":"responses"===R.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{Y(""),Q(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(c.$n,{size:"sm",icon:"download",variant:"secondary",onClick:()=>ei(!0),className:"w-full sm:w-auto",children:"Export Keys"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"playlist_add",onClick:()=>ed(!0),className:"w-full sm:w-auto",children:(0,$.Tl)("Bulk Add")}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ef(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{tw({title:"Delete Compatible Node",message:`Delete this ${ax?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{tw(null);try{(await fetch(`/api/provider-nodes/${y}`,{method:"DELETE"})).ok&&g.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),ac?(0,s.jsx)(c.gw,{providerId:y}):(0,s.jsxs)(c.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[v.length>0&&_.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>eb(!0),children:"Apply Proxy"}),v.length>0&&(0,s.jsxs)(s.Fragment,{children:[eV.length>0&&(0,s.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eV.length;0!==e&&tw({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{tw(null);let e=0,t=[...eV];for(let a of t)try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}j(e=>e.filter(e=>!t.includes(e.id))),eQ([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eV.length,")"]}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:a1,disabled:tC,children:tC?"Testing Connection One-by-One...":"Test Connection One-by-One"}),tC&&(0,s.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{tC&&(tR.current=!0,tA(!0))},disabled:tT,children:tT?"Stopping...":"Stop"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Strategy"}),(0,s.jsx)("div",{className:"w-[230px]",children:(0,s.jsx)(c.l6,{options:e$,value:e1||e2,onChange:e=>{var t;let a,s,i;return a=(t=e.target.value)===e2?null:t,i=(s="round-robin"===t)?e4||"1":e4,void(s&&!e4&&e6("1"),e5(a),aF(a,i))},selectClassName:"py-1.5 text-xs"})}),"round-robin"===(e1||e2)&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:e4,onChange:e=>{var t;e6(t=e.target.value),aF("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"})]})]}),"codex"===y&&(0,s.jsx)(c.lM,{checked:tB,onChange:aB,disabled:tG,label:"Fast inference",description:"Use the priority tier for Codex models (all accounts). Per-account override lives on each connection row and quota card."}),"codex"===y&&tQ&&(0,s.jsx)("span",{className:"text-xs text-red-500",role:"alert",children:tQ})]})]}),(0,s.jsxs)("p",{className:"mb-4 -mt-1 text-xs text-text-muted",children:["Tip: pin requests to a specific account by sending the ",(0,s.jsx)("code",{children:"x-connection-id"})," request header with a connection ID — click the ID chip on a connection to copy it. When the pinned account is unavailable, EzRouter falls back to the other accounts automatically."]}),0===v.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:ao?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),ag&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",ay," or ",ab,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:ag?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:as,children:ay}),(0,s.jsx)(c.$n,{size:"sm",icon:"key",onClick:ai,children:ab})]}):(0,s.jsxs)(s.Fragment,{children:[!af&&eA.has(y)&&(0,s.jsx)(eS,{providerId:y,onConnected:az}),!af&&"iflow"===y&&(0,s.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>G(!0),children:"Cookie"}),"codex"===y&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ea(!0),children:(0,$.Tl)("Bulk Add")}),"grok-cli"===y&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>el(!0),children:(0,$.Tl)("Bulk Add")}),af&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ed(!0),children:(0,$.Tl)("Bulk Add")}),(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:ar,children:af?"Add API Key":"iflow"===y?"OAuth":"Add Connection"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[tE&&(0,s.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,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:["Total: ",tE.total]}),(0,s.jsxs)("span",{children:["Completed: ",tE.completed]}),(0,s.jsxs)("span",{children:["Passed: ",tE.passed]}),(0,s.jsxs)("span",{children:["Failed: ",tE.failed]}),tE.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),tC&&t$&&(0,s.jsxs)("span",{children:["Running: ",v.find(e=>e.id===t$)?.name||t$]})]})}),v.length>0&&(0,s.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,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,s.jsx)("input",{type:"checkbox",checked:so,onChange:()=>{so?eQ(e=>e.filter(e=>!sn.has(e))):eQ(e=>{let t=new Set(e);for(let e of sn)t.add(e);return[...t]})},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),sd,af&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:[(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ed(!0),className:"w-full sm:w-auto",children:(0,$.Tl)("Bulk Add")}),(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:ar,className:"w-full sm:w-auto",children:"Add API Key"})]}),!af&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:[eA.has(y)&&(0,s.jsx)(eS,{providerId:y,onConnected:az}),"iflow"===y&&(0,s.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>G(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===y&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ea(!0),title:(0,$.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,$.Tl)("Bulk Add")}),"grok-cli"===y&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>el(!0),title:(0,$.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,$.Tl)("Bulk Add")}),v.length>0&&(0,s.jsx)(c.$n,{size:"sm",icon:"download",variant:"secondary",onClick:()=>ei(!0),className:"w-full sm:w-auto",children:"Export Keys"}),ag?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:as,className:"w-full sm:w-auto",children:ay}),(0,s.jsx)(c.$n,{size:"sm",icon:"key",onClick:ai,className:"w-full sm:w-auto",children:ab})]}):(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:ar,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,s.jsx)(eN,{providerId:y}),(0,s.jsxs)(c.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),aw&&(0,s.jsx)("select",{value:e8,onChange:e=>{var t;e9(t=e.target.value),aL(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:aw.map(e=>(0,s.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!af&&(e=a$.filter(e=>t3[e]?.state==="failed"||"error"===eF[e]),t=tx.some(e=>{let t=aS.find(t=>t.id===e);return t?E(t):E({id:e})}),a=a$.length>0||t,(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"redeem",onClick:()=>{if(0===aS.filter(e=>E(e)).length)return void alert("No free models found for this provider (no models with 'free' in name/id).");let e=aA.filter(e=>!E(e)).map(e=>e.id),t=tx.filter(e=>{let t=aS.find(t=>t.id===e);return t?E(t):E({id:e})});0===e.length&&0===t.length?alert("Only free models are currently active."):tw({title:"Free Only",message:`Disable ${e.length} non-free model(s)${t.length>0?` and restore ${t.length} free model(s)`:""}?`,onConfirm:async()=>{tw(null);try{e.length>0&&await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:aj,ids:e})}),t.length>0&&(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(aj)}&ids=${encodeURIComponent(t.join(","))}`,{method:"DELETE"}),y&&y!==aj&&await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(y)}&ids=${encodeURIComponent(t.join(","))}`,{method:"DELETE"})),await aO()}catch(e){console.log("Error filtering free models:",e)}}})},title:"Disable all models without 'free' in their name",children:"Free Only"}),tx.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:aD,children:"Active All"}),e.length>0&&(0,s.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"block",onClick:()=>aR(e),children:[(0,$.Tl)("Disable Failed")," (",e.length,")"]}),a$.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:tX?"secondary":"primary",icon:tX?"stop":"play_circle",onClick:tX?()=>{tX&&(t9.current=!0,t1(!0))}:a5,disabled:!v.some(e=>!1!==e.isActive)&&!ac,className:"flex items-center gap-1.5",children:tX?t0?(0,$.Tl)("Stopping..."):(0,$.Tl)("Testing..."):(0,$.Tl)("Test All")}),a$.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>aM(a$),children:"Disable All"})]}))]}),!!eK&&(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:eK}),/RegionError|hosted in China|regionNotAllowed/i.test(eK)&&(p=(l="string"==typeof eK?eK:JSON.stringify(eK)).match(/https:\/\/opencode\.ai\/workspace\/[^\s"')]+/),h=l.match(/wrk_[0-9A-Za-z]+/),x=p?p[0].endsWith("/go")?p[0]:`${p[0]}/go`:h?`https://opencode.ai/workspace/${h[0]}/go`:"https://opencode.ai",(0,s.jsx)("div",{className:"mt-1.5",children:(0,s.jsxs)("a",{href:x,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md bg-amber-500/10 px-2 py-0.5 text-xs font-medium text-amber-600 hover:bg-amber-500/20 dark:text-amber-400 transition-colors",children:[(0,s.jsx)("span",{children:"Allow China-hosted models"}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"open_in_new"})]})}))]}),"zed"===y&&!!tm&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:tm}),(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("button",{onClick:()=>tv(!0),className:"flex items-center gap-1.5 rounded-lg border border-border px-3 py-1.5 text-xs text-text-main transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"visibility"}),"Visible models",tg.length>0?` (${tg.length})`:""]}),(0,s.jsx)("span",{className:"text-[11px] text-text-muted",children:tg.length>0?`Only these ${tg.length} models are exposed on /v1/models`:"All models are exposed on /v1/models"})]}),(()=>{let e,t,a;if(af)return(0,s.jsx)(F,{providerStorageAlias:aj,providerDisplayAlias:ak,modelAliases:ek,customModels:eR,copied:t7,onCopy:ae,onSetAlias:aV,onDeleteAlias:aQ,onAddCustomModel:e=>aZ(e,"llm",aj),onDeleteCustomModel:e=>aX(e,"llm",aj),connections:v,isAnthropic:ax,onModelsChanged:aq,importSupported:aG});let i=[...au,...tp.filter(e=>!au.some(t=>t.id===e.id))].filter(e=>{let t=(0,u.CP)(e);return!t||"llm"===t}).filter(e=>!aT.has(e.id)),r=aC.filter(e=>!aT.has(e.id));return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r.map(e=>(0,s.jsx)(q,{model:{id:e.id,name:e.name},fullModel:`${ak}/${e.id}`,alias:e.alias,copied:t7,onCopy:ae,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?aX(e.id,"llm",aj):aQ(e.alias)},onDisable:()=>aI(e.id),testStatus:eF[e.id],onTest:v.length>0||ac?()=>su(e.id):void 0,isTesting:eH.has(e.id),isCustom:!0,isFree:E(e),caps:b(`${y}/${e.id}`),thinkingSuffix:av(e.id)},`${e.source}-${e.fullModel}`)),i.map(e=>{let t=e.id.startsWith(`${aj}/`)?e.id.slice(aj.length+1):e.id,a=`${aj}/${t}`,i=`${y}/${t}`,r=Object.entries(ek).find(([,e])=>e===a||e===i)?.[0];return(0,s.jsx)(q,{model:e,fullModel:`${ak}/${t}`,alias:r,copied:t7,onCopy:ae,onSetAlias:e=>aV(t,e,aj),onDeleteAlias:()=>aQ(r),testStatus:eF[t]||eF[e.id],onTest:v.length>0||ac?()=>su(t):void 0,isTesting:eH.has(t)||eH.has(e.id),isFree:e.isFree||E(e),onDisable:()=>aI(t),caps:b(`${y}/${t}`),thinkingSuffix:av(t)},e.id)}),(0,s.jsxs)("button",{onClick:()=>eG(!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,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),("qoder"===y||"qoder-cn"===y)&&v.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:aY,disabled:tD,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,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:tD?{animation:"spin 1s linear infinite"}:void 0,children:tD?"progress_activity":"download"}),tD?(0,$.Tl)("Fetching..."):(0,$.Tl)("Fetch Qoder Models")]}),("cline"===y||"clinepass"===y)&&v.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:a0,disabled:tq,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,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:tq?{animation:"spin 1s linear infinite"}:void 0,children:tq?"progress_activity":"download"}),tq?(0,$.Tl)("Fetching..."):(0,$.Tl)("Import from /models")]}),aG&&aW&&!["qoder","qoder-cn","cline","clinepass"].includes(y)&&(0,s.jsxs)("button",{onClick:()=>tK(!0),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",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"download"}),(0,$.Tl)("Import Models")]}),tn.length>0&&(e=new Set([...Object.values(ek),...aC.map(e=>e.fullModel)]),t=new Set(au.map(e=>e.id)),0===(a=tn.filter(a=>{let s=a.id.replace(/^nous\//,"");return!e.has(`${aj}/${s}`)&&!t.has(s)&&!t.has(a.id)})).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"nous"===y?(0,$.Tl)("Suggested models (≥200k context):"):(0,$.Tl)("Suggested free models (≥200k context):")}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>{let t=e.id.replace(/^nous\//,"");return(0,s.jsxs)("button",{onClick:async()=>{await aZ(t,"llm",aj)},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,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),t.split("/").pop()]},e.id)})})]})),tx.length>0&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",tx.length,"):"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:tx.map(e=>{let t=aS.find(t=>t.id===e);return(0,s.jsxs)("button",{onClick:()=>aE(e),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,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),t?.name&&t.name!==e?`${e} (${t.name})`:e]},e)})})]})]})})()]}),sm,"kiro"===y?(0,s.jsx)(c.Mh,{isOpen:K,providerInfo:al,onSuccess:a3,onClose:()=>J(!1)}):"cursor"===y?(0,s.jsx)(c.G9,{isOpen:K,onSuccess:a3,onClose:()=>J(!1)}):"zed"===y?(0,s.jsx)(c.TE,{isOpen:K,providerInfo:al,onSuccess:a3,onClose:()=>J(!1)}):"gitlab"===y?(0,s.jsx)(c.vj,{isOpen:K,providerInfo:al,onSuccess:a3,onClose:()=>J(!1)}):(0,s.jsx)(c.LF,{isOpen:K,provider:y,providerInfo:al,onSuccess:a3,onClose:()=>J(!1)}),(0,s.jsx)(c.LH,{isOpen:H,onSuccess:a3,onClose:()=>B(!1)}),"iflow"===y&&(0,s.jsx)(c.vE,{isOpen:W,onSuccess:()=>{az(),G(!1)},onClose:()=>G(!1)}),V&&(0,s.jsx)(en,{isOpen:V,provider:y,providerName:al.name,isCompatible:af,isAnthropic:ax,authType:al?.authType,authHint:al?.authHint,website:al?.website,proxyPools:_,error:X,existingNames:v.map(e=>e.name).filter(Boolean),onSave:a4,onBulkDone:az,onClose:()=>{Y(""),Q(!1)}}),(0,s.jsx)(ee,{isOpen:es,providerId:y,providerName:al.name,onClose:()=>ei(!1)}),(0,s.jsx)(c.wI,{isOpen:ec,connection:ej,proxyPools:_,onSave:a6,onClose:()=>eu(!1)}),af&&(0,s.jsx)(ev,{isOpen:eo,onClose:()=>ed(!1),providerId:y,providerName:al?.name||y,isAnthropic:ax,existingNames:v.map(e=>e.name).filter(Boolean),proxyPools:_,onSuccess:az}),af&&(0,s.jsx)(em,{isOpen:eh,node:R,onSave:aU,onClose:()=>ef(!1),isAnthropic:ax}),!af&&(0,s.jsx)(ep,{isOpen:eW,providerAlias:aj,providerDisplayAlias:ak,onSave:async(e,t,a,s)=>{await aZ(e,t,aj,a,s),eG(!1)},onClose:()=>eG(!1)}),tb&&(0,s.jsx)(L,{isOpen:!0,onClose:()=>tv(!1),providerId:y,providerAlias:aj,connections:v,customModels:eR,disabledModelIds:tx,onSaved:e=>{ty(e),aO()}}),(0,s.jsx)(z,{isOpen:tL,onClose:()=>tK(!1),connectionId:aW,providerStorageAlias:aj,existingIds:aN,onImported:aq}),"codex"===y&&(0,s.jsx)(ex,{isOpen:et,onClose:()=>ea(!1),onSuccess:az}),"grok-cli"===y&&(0,s.jsx)(ey,{isOpen:er,onClose:()=>el(!1),onSuccess:az}),tr&&(0,s.jsx)(eC.A,{isOpen:!!tr,onClose:()=>tl(null),connection:tr,reactive:!0===ts.connections[tr.id],schedule:ts.schedules?.[tr.id]||null,onSave:e=>((e,{reactive:t,schedule:a})=>{aH({...ts,connections:{...ts.connections,[e]:t},schedules:{...ts.schedules,[e]:a}})})(tr.id,e)}),(0,s.jsx)(c.uo,{isOpen:tk,onClose:()=>tN(!1),onConfirm:()=>{(window.localStorage.setItem(at,"true"),tN(!1),ao)?aa():ai()},title:"Risk Notice",message:al?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(c.uo,{isOpen:!!tj,onClose:()=>tw(null),onConfirm:tj?.onConfirm,title:tj?.title||"Confirm",message:tj?.message,variant:"danger"})]})}},14558:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(95155),i=a(12115),r=a(97677);function l({connectionId:e,disabled:t=!1,onComplete:a}){let[n,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)(null);async function m(){if(!n){if(d)return void c(null);o(!0);try{let t=await fetch("/api/wakeup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ping",connectionId:e})}),s=await t.json();if(!t.ok)throw Error(s.error||"Ping failed.");c(s),a&&Promise.resolve(a()).catch(()=>{})}catch(e){c({status:"failed",message:e.message})}finally{o(!1)}}}let u=n?"Pinging…":d?`${d.message} Click to reset.`:"Ping now — sends a small request. Consumes quota; does not change Auto-Ping.",p=d?"succeeded"===d.status?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400":"text-text-muted hover:text-primary";return(0,s.jsx)(r.default,{text:u,children:(0,s.jsx)("button",{type:"button",onClick:m,disabled:n||t&&!d,"aria-label":u,"aria-busy":n,className:`flex h-8 w-8 items-center justify-center rounded-lg ${p} hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50`,children:(0,s.jsx)("span",{"aria-hidden":"true",style:{fontSize:n?20:32},className:`material-symbols-outlined ${n?"animate-spin":""}`,children:n?"progress_activity":"play_arrow"})})})}},25871:(e,t,a)=>{"use strict";a.d(t,{G:()=>n,e:()=>d});var s=a(12115);let i=null,r=null,l="pricingChanged";function n(){i=null,window.dispatchEvent(new CustomEvent(l))}function o(){return i?Promise.resolve(i):r||(r=fetch("/api/pricing").then(async e=>{if(!e.ok)throw Error(`pricing ${e.status}`);return e.json()}).then(e=>i=e||{}).catch(()=>({})).finally(()=>{r=null}))}function d(){let[e,t]=(0,s.useState)(()=>i||{});return(0,s.useEffect)(()=>{let e=!0;o().then(a=>{e&&t(a)});let a=()=>{o().then(a=>{e&&t(a)})};return window.addEventListener(l,a),()=>{e=!1,window.removeEventListener(l,a)}},[]),{getPricing:(0,s.useCallback)((t,a)=>t&&a&&e[t]?.[a]||null,[e])}}},64827:(e,t,a)=>{"use strict";function s(e){if(!e)return null;let t=null,a=Date.now();for(let[s,i]of Object.entries(e)){if(!s.startsWith("modelLock_")||!i)continue;let e=new Date(i).getTime();e<=a||(!t||e<t)&&(t=e)}return t?new Date(t).toISOString():null}a.d(t,{kJ:()=>s}),a(10904)},85295:(e,t,a)=>{Promise.resolve().then(a.bind(a,12040))},93195:(e,t,a)=>{"use strict";function s(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}a.d(t,{JW:()=>o,Vm:()=>s,fB:()=>r,gy:()=>i,nz:()=>l});let i={anchor:"09:30",timezone:s(),windowHours:5,slotsPerDay:3};function r(e){let t=/^(\d{1,2}):(\d{2})$/.exec(String(e||"").trim());if(!t)return null;let a=Number(t[1]),s=Number(t[2]);return a>23||s>59?null:{hour:a,minute:s}}function l(e){return Math.max(1,Math.floor(24/e))}function n(e,t,a,s){let i="number"==typeof e?e:Number(e);return Number.isFinite(i)?Math.min(s,Math.max(a,i)):t}function o(e){let t=function(e){if(!e||!0!==e.enabled)return null;let t=r(e.anchor)||r(i.anchor),a=`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}`,s=!function(e){if(!e||"string"!=typeof e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return!1}}(e.timezone)?i.timezone:e.timezone,o=n(e.windowHours,i.windowHours,.5,24),d=Math.round(n(e.slotsPerDay,i.slotsPerDay,1,l(o)));return{enabled:!0,anchor:a,timezone:s,windowHours:o,slotsPerDay:d}}(e);if(!t)return[];let{hour:a,minute:s}=r(t.anchor),o=60*a+s;return Array.from({length:t.slotsPerDay},(e,a)=>{let s=Math.round(o+a*t.windowHours*60)%1440;return`${String(Math.floor(s/60)).padStart(2,"0")}:${String(s%60).padStart(2,"0")}`})}},93725:(e,t,a)=>{"use strict";function s(e){return"number"!=typeof e||!Number.isFinite(e)||e<=0?null:e>=1e6?`${+(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:String(e)}function i(e){if("number"!=typeof e||!Number.isFinite(e))return null;if(0===e)return"0";let t=Math.abs(e);return(t>=1?e.toFixed(2):t>=.01?e.toFixed(3):e.toFixed(4)).replace(/\.?0+$/,"")}function r(e,t){let a=[],r=s(e?.contextWindow);r&&a.push(`${r} ctx`);let l=s(e?.maxOutput);l&&a.push(`${l} out`);let n=i(t?.input),o=i(t?.output);return(null!==n||null!==o)&&a.push(`$${n??"?"}/$${o??"?"}`),a.length>0?a.join(" \xb7 "):null}a.d(t,{M4:()=>r})},97132:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var s=a(95155),i=a(12115),r=a(14051),l=a.n(r),n=a(35497),o=a(31474),d=a(93195);let c=[{value:"off",label:"Off",icon:"block"},{value:"reset",label:"On reset",icon:"bolt"},{value:"schedule",label:"Schedule",icon:"schedule"}];function m({isOpen:e,onClose:t,onSave:a,connection:r,reactive:l=!1,schedule:u=null}){let[p,h]=(0,i.useState)(()=>({mode:u?.enabled===!0?"schedule":!0===l?"reset":"off",anchor:u?.anchor||d.gy.anchor,timezone:(0,d.Vm)(),windowHours:String(u?.windowHours??d.gy.windowHours),slotsPerDay:String(u?.slotsPerDay??d.gy.slotsPerDay)})),x=Number(p.windowHours),f=Number(p.slotsPerDay),g=!!(0,d.fB)(p.anchor),y=Number.isFinite(x)&&x>=.5&&x<=24,b=y?(0,d.nz)(x):24,v=Number.isInteger(f)&&f>=1&&f<=b,j=g&&y&&v,w="schedule"!==p.mode||j,k=j?(0,d.JW)({enabled:!0,...p,windowHours:x,slotsPerDay:f}):[],N=k.length&&y?(()=>{let{hour:e,minute:t}=(0,d.fB)(p.anchor),a=Math.round(60*e+t+f*x*60)%1440;return`${String(Math.floor(a/60)).padStart(2,"0")}:${String(a%60).padStart(2,"0")}`})():"",C=e=>h(t=>({...t,...e}));return(0,s.jsx)(n.aF,{isOpen:e,onClose:t,title:"Auto-ping settings",size:"lg",footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.$n,{variant:"secondary",onClick:t,children:"Cancel"}),(0,s.jsx)(n.$n,{onClick:()=>{w&&(a({reactive:"reset"===p.mode,schedule:"schedule"===p.mode?{enabled:!0,anchor:p.anchor,timezone:p.timezone,windowHours:x,slotsPerDay:f}:{enabled:!1}}),t())},disabled:!w,children:"Save"})]}),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Configure automated quota pings",r?.name?` for ${r.name}`:""," — pick one mode."]}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-1 rounded-[10px] bg-surface-2 p-1",children:c.map(e=>{let t=p.mode===e.value;return(0,s.jsxs)("button",{type:"button",onClick:()=>C({mode:e.value}),className:(0,o.cn)("flex h-9 items-center justify-center gap-1.5 rounded-[8px] px-3 text-sm font-medium transition-all",t?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[15px] leading-none",children:e.icon}),(0,s.jsx)("span",{children:e.label})]},e.value)})}),"reset"===p.mode&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Pings right after the 5h quota window resets, so a new window starts immediately."}),"schedule"===p.mode&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Pings at fixed local times so the 5h windows align with your workday."}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[(0,s.jsx)(n.pd,{label:"Anchor time",type:"time",value:p.anchor,onChange:e=>C({anchor:e.target.value}),error:g?"":"Use HH:MM",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,s.jsx)(n.pd,{label:"Window (hours)",type:"number",min:"0.5",max:"24",step:"0.5",value:p.windowHours,onChange:e=>C({windowHours:e.target.value}),error:y?"":"0.5 – 24",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,s.jsx)(n.pd,{label:"Pings per day",type:"number",min:"1",max:String(b),step:"1",value:p.slotsPerDay,onChange:e=>C({slotsPerDay:e.target.value}),error:v?"":`1 – ${b}`,hint:v?`Max ${b}`:"",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"})]}),k.length>0&&(0,s.jsxs)("div",{className:"rounded-[10px] bg-surface-2 px-3 py-2.5",children:[(0,s.jsxs)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:["Daily slots (",p.timezone,")"]}),(0,s.jsx)("p",{className:"mt-1 text-sm font-medium text-text-main",children:k.join(" → ")}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Covers ",k[0]," – ",N,", then pauses until ",k[0]," next day."]})]})]})]})})}m.propTypes={isOpen:l().bool.isRequired,onClose:l().func.isRequired,onSave:l().func.isRequired,connection:l().object,reactive:l().bool,schedule:l().object}}},e=>{e.O(0,[763,5772,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=85295)),_N_E=e.O()}]);