@rsalmn/extremerouter 0.8.7 → 0.8.8

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 (1027) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +15 -13
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/routes-manifest.json +14 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +3 -3
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  94. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  105. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  108. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  109. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  110. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  111. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  112. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  113. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  114. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  115. package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/breaker/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/breaker/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  136. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  138. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  142. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  154. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  156. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  160. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  162. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  164. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  166. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  168. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/combos/lab/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/combos/lab/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/combos/simulate/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/combos/simulate/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
  180. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  186. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/health/overview/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/health/overview/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  194. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +3 -3
  206. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  240. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  274. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js +2 -2
  288. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +2 -2
  296. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/capture/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/capture/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  342. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  344. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  348. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  350. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/smart-routing/active/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/smart-routing/active/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/smart-routing/history/route.js +2 -2
  366. package/app/.next-cli-build/server/app/api/smart-routing/history/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js +2 -2
  368. package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js +2 -2
  370. package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
  374. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  380. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  402. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  418. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  428. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/media/results/[id]/route.js +1 -0
  444. package/app/.next-cli-build/server/app/api/v1/media/results/[id]/route.js.nft.json +1 -0
  445. package/app/.next-cli-build/server/app/api/v1/media/results/[id]/route_client-reference-manifest.js +1 -0
  446. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/video/generations/route.js +1 -0
  465. package/app/.next-cli-build/server/app/api/v1/video/generations/route.js.nft.json +1 -0
  466. package/app/.next-cli-build/server/app/api/v1/video/generations/route_client-reference-manifest.js +1 -0
  467. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  469. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  472. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  474. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  475. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  478. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  480. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  482. package/app/.next-cli-build/server/app/callback.html +1 -1
  483. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  484. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  485. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  486. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  487. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  488. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  489. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  491. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -7
  495. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -7
  496. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  498. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  500. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  502. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  504. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  505. package/app/.next-cli-build/server/app/index.html +1 -1
  506. package/app/.next-cli-build/server/app/index.rsc +6 -6
  507. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  509. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  511. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  512. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  513. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  514. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  515. package/app/.next-cli-build/server/app/landing.html +1 -1
  516. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  517. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  518. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  519. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  520. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  521. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  522. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  523. package/app/.next-cli-build/server/app/login/page.js +2 -2
  524. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  525. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  526. package/app/.next-cli-build/server/app/login.html +1 -1
  527. package/app/.next-cli-build/server/app/login.rsc +7 -7
  528. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  529. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  530. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  531. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  532. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  534. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  535. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  536. package/app/.next-cli-build/server/app/page.js +2 -2
  537. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  538. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  539. package/app/.next-cli-build/server/app-paths-manifest.json +15 -13
  540. package/app/.next-cli-build/server/chunks/1194.js +1 -1
  541. package/app/.next-cli-build/server/chunks/1350.js +3 -3
  542. package/app/.next-cli-build/server/chunks/1411.js +1 -1
  543. package/app/.next-cli-build/server/chunks/1429.js +1 -1
  544. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  545. package/app/.next-cli-build/server/chunks/212.js +1 -1
  546. package/app/.next-cli-build/server/chunks/2436.js +1 -0
  547. package/app/.next-cli-build/server/chunks/3520.js +1 -1
  548. package/app/.next-cli-build/server/chunks/3552.js +1 -1
  549. package/app/.next-cli-build/server/chunks/4046.js +1 -1
  550. package/app/.next-cli-build/server/chunks/412.js +1 -1
  551. package/app/.next-cli-build/server/chunks/4161.js +1 -0
  552. package/app/.next-cli-build/server/chunks/4502.js +6 -6
  553. package/app/.next-cli-build/server/chunks/4828.js +1 -0
  554. package/app/.next-cli-build/server/chunks/{3841.js → 4987.js} +1 -1
  555. package/app/.next-cli-build/server/chunks/5050.js +2 -2
  556. package/app/.next-cli-build/server/chunks/5253.js +1 -1
  557. package/app/.next-cli-build/server/chunks/5330.js +9 -9
  558. package/app/.next-cli-build/server/chunks/5473.js +1 -1
  559. package/app/.next-cli-build/server/chunks/5604.js +1 -1
  560. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  561. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  562. package/app/.next-cli-build/server/chunks/5628.js +1 -1
  563. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  564. package/app/.next-cli-build/server/chunks/6007.js +10 -0
  565. package/app/.next-cli-build/server/chunks/6157.js +1 -0
  566. package/app/.next-cli-build/server/chunks/6182.js +1 -1
  567. package/app/.next-cli-build/server/chunks/6488.js +1 -1
  568. package/app/.next-cli-build/server/chunks/6777.js +1 -1
  569. package/app/.next-cli-build/server/chunks/7247.js +1 -0
  570. package/app/.next-cli-build/server/chunks/7765.js +2 -2
  571. package/app/.next-cli-build/server/chunks/809.js +1 -1
  572. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  573. package/app/.next-cli-build/server/chunks/8240.js +1 -0
  574. package/app/.next-cli-build/server/chunks/8266.js +1 -1
  575. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  576. package/app/.next-cli-build/server/chunks/8802.js +2 -2
  577. package/app/.next-cli-build/server/chunks/885.js +7 -7
  578. package/app/.next-cli-build/server/chunks/8851.js +3 -0
  579. package/app/.next-cli-build/server/chunks/8895.js +6 -6
  580. package/app/.next-cli-build/server/chunks/9715.js +1 -0
  581. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  582. package/app/.next-cli-build/server/middleware.js +3 -3
  583. package/app/.next-cli-build/server/pages/404.html +1 -1
  584. package/app/.next-cli-build/server/pages/500.html +1 -1
  585. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  586. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  587. package/app/.next-cli-build/static/chunks/1321-738b3efba6f43f03.js +1 -0
  588. package/app/.next-cli-build/static/chunks/5497-97801e653d366579.js +7 -0
  589. package/app/.next-cli-build/static/chunks/705-1b66113f1f9bdd89.js +1 -0
  590. package/app/.next-cli-build/static/chunks/9086-5e0c8ccb81f25cbb.js +1 -0
  591. package/app/.next-cli-build/static/chunks/{9622-d0f22be4f1ef8011.js → 9622-1dc5485471326b33.js} +1 -1
  592. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-3527fe022102a692.js → page-5da9d88aea0f0c4d.js} +1 -1
  593. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-fe59538aa4add719.js → page-af18b8bd5a604e31.js} +1 -1
  594. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-1849f671db0f9fe9.js → page-c933ec2b61961be3.js} +1 -1
  595. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-0e903eb34158c8a8.js → page-3b6ddb5ae1f382fc.js} +1 -1
  596. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-8406e79b31e512bb.js → page-6e960c6e7b31b9df.js} +1 -1
  597. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-81ef4c324f201832.js → page-dd4edb101f50cc0f.js} +1 -1
  598. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-f1add2aaae4a459c.js +1 -0
  599. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/{page-d71cb9f910cb5d13.js → page-2ac0245eea32c9aa.js} +1 -1
  600. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-94341b277cf27462.js → page-e0b2567bb9fe606d.js} +7 -7
  601. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-558f5601f8df1d4d.js → page-9da68f29ab52796d.js} +1 -1
  602. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-6effc5c0f2b1d72e.js → page-2c80d26d992e4bb2.js} +1 -1
  603. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-7cdd74503baa001a.js +1 -0
  604. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-95375c7b40f99306.js → page-ebc169fccd95e5d8.js} +1 -1
  605. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-4549c187375b9192.js → page-50b3f8c8ed3358f2.js} +1 -1
  606. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/{page-bb459e518dfa9f70.js → page-c4728000c2a09214.js} +1 -1
  607. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-86eaf12ef68c60ba.js +1 -0
  608. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/{page-625485e32264e15b.js → page-c43d594bf432dbb3.js} +1 -1
  609. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-09b1b5beae8435cd.js → page-8147c101767a32a1.js} +1 -1
  610. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-776433cfd87f123a.js → page-f20fce2b984f4ef3.js} +1 -1
  611. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-1f67fe5d69805df2.js → page-99b2fb0411fa61e4.js} +1 -1
  612. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-5d9d7d47216375ea.js → page-3231355c17df9913.js} +1 -1
  613. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-c561cab29785310a.js → page-c619835a47dd125d.js} +1 -1
  614. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-140fef4b235b4792.js → page-46f5c7b65b5bb9ad.js} +1 -1
  615. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-acf6cde3210c179a.js → page-fb7fe2c2ce8ee710.js} +1 -1
  616. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-c3ae0ab7f0d0634d.js → page-971ad40322c4940b.js} +1 -1
  617. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-cb12854a23416b01.js → page-33f472a9351a93f8.js} +1 -1
  618. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-52a5ff6e854d82e7.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-66efb163e888cd6b.js → layout-6605206f3a2e2db9.js} +1 -1
  620. package/app/.next-cli-build/static/chunks/app/_global-error/page-fe046df355b8d174.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-fe046df355b8d174.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-fe046df355b8d174.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-fe046df355b8d174.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-fe046df355b8d174.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-fe046df355b8d174.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-fe046df355b8d174.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-fe046df355b8d174.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-fe046df355b8d174.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/breaker/route-fe046df355b8d174.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/cache/route-fe046df355b8d174.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-fe046df355b8d174.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-fe046df355b8d174.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-fe046df355b8d174.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-fe046df355b8d174.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-fe046df355b8d174.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-fe046df355b8d174.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-fe046df355b8d174.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-fe046df355b8d174.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-fe046df355b8d174.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-fe046df355b8d174.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-fe046df355b8d174.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-fe046df355b8d174.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-fe046df355b8d174.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-fe046df355b8d174.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-fe046df355b8d174.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-fe046df355b8d174.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-fe046df355b8d174.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-fe046df355b8d174.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/combos/lab/route-fe046df355b8d174.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/combos/route-fe046df355b8d174.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/combos/simulate/route-fe046df355b8d174.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-fe046df355b8d174.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-fe046df355b8d174.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-fe046df355b8d174.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-fe046df355b8d174.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-fe046df355b8d174.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/health/overview/route-fe046df355b8d174.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-fe046df355b8d174.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/health/route-fe046df355b8d174.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-fe046df355b8d174.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/init/route-fe046df355b8d174.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-fe046df355b8d174.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/keys/route-fe046df355b8d174.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/locale/route-fe046df355b8d174.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-fe046df355b8d174.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-fe046df355b8d174.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-fe046df355b8d174.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-fe046df355b8d174.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-fe046df355b8d174.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-fe046df355b8d174.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-fe046df355b8d174.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-fe046df355b8d174.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-fe046df355b8d174.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-fe046df355b8d174.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-fe046df355b8d174.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-fe046df355b8d174.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/models/route-fe046df355b8d174.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/models/test/route-fe046df355b8d174.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-fe046df355b8d174.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-fe046df355b8d174.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-fe046df355b8d174.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-fe046df355b8d174.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-fe046df355b8d174.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-fe046df355b8d174.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/oauth/freebuff/import/route-fe046df355b8d174.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-fe046df355b8d174.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-fe046df355b8d174.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-fe046df355b8d174.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-fe046df355b8d174.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-fe046df355b8d174.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-fe046df355b8d174.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-fe046df355b8d174.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-fe046df355b8d174.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-fe046df355b8d174.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-fe046df355b8d174.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-fe046df355b8d174.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-fe046df355b8d174.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-fe046df355b8d174.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/oauth/zcode/import/route-fe046df355b8d174.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-fe046df355b8d174.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-fe046df355b8d174.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/pricing/route-fe046df355b8d174.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-fe046df355b8d174.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-fe046df355b8d174.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-fe046df355b8d174.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-fe046df355b8d174.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/felo-profile/route-fe046df355b8d174.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-fe046df355b8d174.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-fe046df355b8d174.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-fe046df355b8d174.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-fe046df355b8d174.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-fe046df355b8d174.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-fe046df355b8d174.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-fe046df355b8d174.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-fe046df355b8d174.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-fe046df355b8d174.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-fe046df355b8d174.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-fe046df355b8d174.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-fe046df355b8d174.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zai-profile/route-fe046df355b8d174.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-fe046df355b8d174.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/providers/capture/launch/route-fe046df355b8d174.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/providers/capture/route-fe046df355b8d174.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-fe046df355b8d174.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/launch/route-fe046df355b8d174.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/route-fe046df355b8d174.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-fe046df355b8d174.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/providers/route-fe046df355b8d174.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-fe046df355b8d174.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-fe046df355b8d174.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-fe046df355b8d174.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-fe046df355b8d174.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-fe046df355b8d174.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-fe046df355b8d174.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-fe046df355b8d174.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-fe046df355b8d174.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-fe046df355b8d174.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-fe046df355b8d174.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-fe046df355b8d174.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-fe046df355b8d174.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-fe046df355b8d174.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-fe046df355b8d174.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/settings/route-fe046df355b8d174.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-fe046df355b8d174.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/smart-routing/active/route-fe046df355b8d174.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/smart-routing/history/route-fe046df355b8d174.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/smart-routing/lab/route-fe046df355b8d174.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/smart-routing/stream/route-fe046df355b8d174.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-fe046df355b8d174.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-fe046df355b8d174.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/tags/route-fe046df355b8d174.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-fe046df355b8d174.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-fe046df355b8d174.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-fe046df355b8d174.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-fe046df355b8d174.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-fe046df355b8d174.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-fe046df355b8d174.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-fe046df355b8d174.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-fe046df355b8d174.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-fe046df355b8d174.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-fe046df355b8d174.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-fe046df355b8d174.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-fe046df355b8d174.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-fe046df355b8d174.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-fe046df355b8d174.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-fe046df355b8d174.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-fe046df355b8d174.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-fe046df355b8d174.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-fe046df355b8d174.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-fe046df355b8d174.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-fe046df355b8d174.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-fe046df355b8d174.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-fe046df355b8d174.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-fe046df355b8d174.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-fe046df355b8d174.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-fe046df355b8d174.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-fe046df355b8d174.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-fe046df355b8d174.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-fe046df355b8d174.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-fe046df355b8d174.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-fe046df355b8d174.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-fe046df355b8d174.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-fe046df355b8d174.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-fe046df355b8d174.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/v1/media/results/[id]/route-fe046df355b8d174.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-fe046df355b8d174.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-fe046df355b8d174.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-fe046df355b8d174.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-fe046df355b8d174.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-fe046df355b8d174.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-fe046df355b8d174.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-fe046df355b8d174.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/v1/route-fe046df355b8d174.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-fe046df355b8d174.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/v1/video/generations/route-fe046df355b8d174.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-fe046df355b8d174.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-fe046df355b8d174.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-fe046df355b8d174.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/version/route-fe046df355b8d174.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-fe046df355b8d174.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/version/update/route-fe046df355b8d174.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/{page-baf12d16760e9b90.js → page-cb505396f61fd853.js} +1 -1
  803. package/app/.next-cli-build/static/chunks/app/{layout-155acd4a482252b8.js → layout-43c49c1c04131398.js} +1 -1
  804. package/app/.next-cli-build/static/chunks/app/login/{page-089f2be5081e9c05.js → page-783218bde9da4df5.js} +1 -1
  805. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-fe046df355b8d174.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/page-fe046df355b8d174.js +1 -0
  807. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-fe046df355b8d174.js +1 -0
  808. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-fe046df355b8d174.js +1 -0
  809. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-fe046df355b8d174.js +1 -0
  810. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-fe046df355b8d174.js +1 -0
  811. package/app/.next-cli-build/static/css/4311ce5e9ab1213e.css +1 -0
  812. package/app/.next-cli-build/static/zahf-uMWnrDSCrrfcee0d/_buildManifest.js +1 -0
  813. package/app/package.json +1 -1
  814. package/app/public/favicon.svg +70 -8
  815. package/app/public/icons/icon-192.svg +73 -3
  816. package/app/public/icons/icon-512.svg +72 -3
  817. package/app/public/providers/xkiro.svg +11 -0
  818. package/app/public/vercel.svg +73 -1
  819. package/app/src/mitm/server.js +27 -27
  820. package/package.json +1 -1
  821. package/src/cli/tray/icon.ico +0 -0
  822. package/src/cli/tray/icon.png +0 -0
  823. package/app/.next-cli-build/server/chunks/1891.js +0 -10
  824. package/app/.next-cli-build/server/chunks/3735.js +0 -1
  825. package/app/.next-cli-build/server/chunks/5699.js +0 -1
  826. package/app/.next-cli-build/server/chunks/6878.js +0 -1
  827. package/app/.next-cli-build/server/chunks/7016.js +0 -3
  828. package/app/.next-cli-build/server/chunks/7410.js +0 -1
  829. package/app/.next-cli-build/server/chunks/7815.js +0 -1
  830. package/app/.next-cli-build/server/chunks/8048.js +0 -1
  831. package/app/.next-cli-build/static/BmLJ5bmQbpsF-jvZIwr9t/_buildManifest.js +0 -1
  832. package/app/.next-cli-build/static/chunks/1321-184fe0dd34faf680.js +0 -1
  833. package/app/.next-cli-build/static/chunks/2563-a547c8ef699e1791.js +0 -1
  834. package/app/.next-cli-build/static/chunks/5497-9caed03337b37e47.js +0 -7
  835. package/app/.next-cli-build/static/chunks/705-eaa2de0fd5964be4.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-72670cb4cac6b97d.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-05b05e6f6136829d.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-cc5141ff81040e89.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-55b0738c2d201462.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/_global-error/page-bf747ebfcd7e601c.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-bf747ebfcd7e601c.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-bf747ebfcd7e601c.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-bf747ebfcd7e601c.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-bf747ebfcd7e601c.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-bf747ebfcd7e601c.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-bf747ebfcd7e601c.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-bf747ebfcd7e601c.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-bf747ebfcd7e601c.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/breaker/route-bf747ebfcd7e601c.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/cache/route-bf747ebfcd7e601c.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-bf747ebfcd7e601c.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-bf747ebfcd7e601c.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-bf747ebfcd7e601c.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-bf747ebfcd7e601c.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-bf747ebfcd7e601c.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-bf747ebfcd7e601c.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-bf747ebfcd7e601c.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-bf747ebfcd7e601c.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-bf747ebfcd7e601c.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-bf747ebfcd7e601c.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-bf747ebfcd7e601c.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-bf747ebfcd7e601c.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-bf747ebfcd7e601c.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-bf747ebfcd7e601c.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-bf747ebfcd7e601c.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-bf747ebfcd7e601c.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-bf747ebfcd7e601c.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-bf747ebfcd7e601c.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/combos/lab/route-bf747ebfcd7e601c.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/combos/route-bf747ebfcd7e601c.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/combos/simulate/route-bf747ebfcd7e601c.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-bf747ebfcd7e601c.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-bf747ebfcd7e601c.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-bf747ebfcd7e601c.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-bf747ebfcd7e601c.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-bf747ebfcd7e601c.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/health/overview/route-bf747ebfcd7e601c.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-bf747ebfcd7e601c.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/health/route-bf747ebfcd7e601c.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-bf747ebfcd7e601c.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/init/route-bf747ebfcd7e601c.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-bf747ebfcd7e601c.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/keys/route-bf747ebfcd7e601c.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/locale/route-bf747ebfcd7e601c.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-bf747ebfcd7e601c.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-bf747ebfcd7e601c.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-bf747ebfcd7e601c.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-bf747ebfcd7e601c.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-bf747ebfcd7e601c.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-bf747ebfcd7e601c.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-bf747ebfcd7e601c.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-bf747ebfcd7e601c.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-bf747ebfcd7e601c.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-bf747ebfcd7e601c.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-bf747ebfcd7e601c.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-bf747ebfcd7e601c.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/models/route-bf747ebfcd7e601c.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/models/test/route-bf747ebfcd7e601c.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-bf747ebfcd7e601c.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-bf747ebfcd7e601c.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-bf747ebfcd7e601c.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-bf747ebfcd7e601c.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-bf747ebfcd7e601c.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-bf747ebfcd7e601c.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/oauth/freebuff/import/route-bf747ebfcd7e601c.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-bf747ebfcd7e601c.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-bf747ebfcd7e601c.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-bf747ebfcd7e601c.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-bf747ebfcd7e601c.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-bf747ebfcd7e601c.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-bf747ebfcd7e601c.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-bf747ebfcd7e601c.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-bf747ebfcd7e601c.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-bf747ebfcd7e601c.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-bf747ebfcd7e601c.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-bf747ebfcd7e601c.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-bf747ebfcd7e601c.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-bf747ebfcd7e601c.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/oauth/zcode/import/route-bf747ebfcd7e601c.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-bf747ebfcd7e601c.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-bf747ebfcd7e601c.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/pricing/route-bf747ebfcd7e601c.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-bf747ebfcd7e601c.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-bf747ebfcd7e601c.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-bf747ebfcd7e601c.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-bf747ebfcd7e601c.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/felo-profile/route-bf747ebfcd7e601c.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-bf747ebfcd7e601c.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-bf747ebfcd7e601c.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-bf747ebfcd7e601c.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-bf747ebfcd7e601c.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-bf747ebfcd7e601c.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-bf747ebfcd7e601c.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-bf747ebfcd7e601c.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-bf747ebfcd7e601c.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-bf747ebfcd7e601c.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-bf747ebfcd7e601c.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-bf747ebfcd7e601c.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-bf747ebfcd7e601c.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zai-profile/route-bf747ebfcd7e601c.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-bf747ebfcd7e601c.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/providers/capture/launch/route-bf747ebfcd7e601c.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/providers/capture/route-bf747ebfcd7e601c.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-bf747ebfcd7e601c.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/launch/route-bf747ebfcd7e601c.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/route-bf747ebfcd7e601c.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-bf747ebfcd7e601c.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/providers/route-bf747ebfcd7e601c.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-bf747ebfcd7e601c.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-bf747ebfcd7e601c.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-bf747ebfcd7e601c.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-bf747ebfcd7e601c.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-bf747ebfcd7e601c.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-bf747ebfcd7e601c.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-bf747ebfcd7e601c.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-bf747ebfcd7e601c.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-bf747ebfcd7e601c.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-bf747ebfcd7e601c.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-bf747ebfcd7e601c.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-bf747ebfcd7e601c.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-bf747ebfcd7e601c.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-bf747ebfcd7e601c.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/settings/route-bf747ebfcd7e601c.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-bf747ebfcd7e601c.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/smart-routing/active/route-bf747ebfcd7e601c.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/smart-routing/history/route-bf747ebfcd7e601c.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/smart-routing/lab/route-bf747ebfcd7e601c.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/smart-routing/stream/route-bf747ebfcd7e601c.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-bf747ebfcd7e601c.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-bf747ebfcd7e601c.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/tags/route-bf747ebfcd7e601c.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-bf747ebfcd7e601c.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-bf747ebfcd7e601c.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-bf747ebfcd7e601c.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-bf747ebfcd7e601c.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-bf747ebfcd7e601c.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-bf747ebfcd7e601c.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-bf747ebfcd7e601c.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-bf747ebfcd7e601c.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-bf747ebfcd7e601c.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-bf747ebfcd7e601c.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-bf747ebfcd7e601c.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-bf747ebfcd7e601c.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-bf747ebfcd7e601c.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-bf747ebfcd7e601c.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-bf747ebfcd7e601c.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-bf747ebfcd7e601c.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-bf747ebfcd7e601c.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-bf747ebfcd7e601c.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-bf747ebfcd7e601c.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-bf747ebfcd7e601c.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-bf747ebfcd7e601c.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-bf747ebfcd7e601c.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-bf747ebfcd7e601c.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-bf747ebfcd7e601c.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-bf747ebfcd7e601c.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-bf747ebfcd7e601c.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-bf747ebfcd7e601c.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-bf747ebfcd7e601c.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-bf747ebfcd7e601c.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-bf747ebfcd7e601c.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-bf747ebfcd7e601c.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-bf747ebfcd7e601c.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-bf747ebfcd7e601c.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-bf747ebfcd7e601c.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-bf747ebfcd7e601c.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-bf747ebfcd7e601c.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-bf747ebfcd7e601c.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-bf747ebfcd7e601c.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-bf747ebfcd7e601c.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-bf747ebfcd7e601c.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/v1/route-bf747ebfcd7e601c.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-bf747ebfcd7e601c.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-bf747ebfcd7e601c.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-bf747ebfcd7e601c.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-bf747ebfcd7e601c.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/version/route-bf747ebfcd7e601c.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-bf747ebfcd7e601c.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/version/update/route-bf747ebfcd7e601c.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-bf747ebfcd7e601c.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/page-bf747ebfcd7e601c.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-bf747ebfcd7e601c.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-bf747ebfcd7e601c.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-bf747ebfcd7e601c.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-bf747ebfcd7e601c.js +0 -1
  1026. package/app/.next-cli-build/static/css/8a8ea9ee79a01730.css +0 -1
  1027. /package/app/.next-cli-build/static/{BmLJ5bmQbpsF-jvZIwr9t → zahf-uMWnrDSCrrfcee0d}/_ssgManifest.js +0 -0
@@ -7,5 +7,5 @@ sk-key-only-auto-named`;function t({isOpen:a,provider:b,providerName:c,isCompati
7
7
  "idToken": "eyJhbGc...",
8
8
  "email": "user@example.com"
9
9
  }
10
- ]`;function x({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,o]=(0,e.useState)(null),p=()=>{h||(g(""),l(""),o(null),b())},q=async()=>{var a;let b;l(""),o(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){l(`${(0,n.Tl)("Invalid JSON")}: ${a.message}`);return}let e=Array.isArray(a=b)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null;if(!e||0===e.length)return void l((0,n.Tl)("No accounts found in input"));j(!0);try{let a=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),b=await a.json();if(!a.ok)return void l(b?.error||`Request failed: ${a.status}`);o(b),b.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,n.Tl)("Request failed"))}finally{j(!1)}},r=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(i.aF,{isOpen:a,title:(0,n.Tl)("Bulk Add Codex Accounts"),onClose:p,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,n.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:w,value:f,onChange:a=>g(a.target.value),disabled:h}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),m&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,n.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,n.Tl)("failed")}`:""]}),r.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:r.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(i.$n,{onClick:q,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,n.Tl)("Importing..."):(0,n.Tl)("Import All")}),(0,d.jsx)(i.$n,{onClick:p,variant:"ghost",fullWidth:!0,disabled:h,children:(0,n.Tl)("Close")})]})]})})}function y({providerId:a,hours:b=24}){let[c,f]=(0,e.useState)(null);if(!c)return(0,d.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-pulse",children:"monitor_heart"}),"Loading health timeline..."]});if(0===c.length||c.every(a=>0===a.ok&&0===a.err))return(0,d.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"monitor_heart"}),"No request history yet."]});let g=c.length,h=c.reduce((a,b)=>a+b.ok+b.err,0),i=c.reduce((a,b)=>a+b.err,0),j=Math.max(...c.map(a=>a.ok+a.err),1),k=Math.max(...c.map(a=>a.latency),1),l=Math.max(6*g,120),m=Math.max(l/g-1,2),n=c.filter(a=>a.latency>0).map((a,b)=>{let c=b/Math.max(g-1,1)*l,d=32-a.latency/k*19.2-2;return`${c.toFixed(1)},${d.toFixed(1)}`}),o=n.length>1?`M${n.join(" L")}`:"",p=h>0?Math.round((h-i)/h*100):null;return(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Health (24h)"}),null!==p&&(0,d.jsxs)("span",{className:`text-[10px] font-bold ${p>=90?"text-success":p>=70?"text-warning":"text-danger"}`,children:[p,"% success \xb7 ",h," requests \xb7 ",i," errors"]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-text-muted",children:[(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block size-2 rounded-sm bg-success"})," OK"]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block size-2 rounded-sm bg-danger"})," Error"]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block h-0.5 w-3 bg-info"})," Latency"]})]})]}),(0,d.jsxs)("svg",{width:l,height:32,className:"overflow-visible",children:[c.map((a,b)=>{let c=l/g*b;if(0===a.ok+a.err)return null;let e=a.ok/j*32,f=a.err/j*32;return(0,d.jsxs)("g",{children:[(0,d.jsx)("rect",{x:c,y:32-e-f,width:m,height:f,rx:.5,className:"fill-danger/60"}),(0,d.jsx)("rect",{x:c,y:32-e,width:m,height:e,rx:.5,className:"fill-success/60"})]},b)}),o&&(0,d.jsx)("path",{d:o,fill:"none",strokeWidth:1,className:"stroke-info",strokeDasharray:"2 2"})]})]})}x.propTypes={isOpen:q().bool.isRequired,onClose:q().func.isRequired,onSuccess:q().func};var z=c(82214),A=c(81220);function B({providerInfo:a,providerId:b,connections:c,modelCount:e,headerIconPath:f,headerImgError:g,setHeaderImgError:i}){let j=a.notice?.apiKeyUrl||a.notice?.signupUrl||a.website,k=[a.authModes?a.authModes.includes("oauth")&&a.authModes.includes("apikey")?"OAuth + API Key":"oauth"===a.authModes[0]?"OAuth":"cookie"===a.authModes[0]?"Cookie":"API Key":"oauth"===a.authType?"OAuth":"cookie"===a.authType?"Cookie":"API Key"];c.length>0&&k.push(`${c.length} connection${1===c.length?"":"s"}`),e>0&&k.push(`${e} model${1===e?"":"s"}`);let l=a.color||"#6366f1";return(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(h(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-primary",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"mt-4 flex min-w-0 items-center gap-4",children:[(0,d.jsx)("div",{className:"flex size-14 shrink-0 items-center justify-center rounded-xl",style:{backgroundColor:`${l}15`},children:g?(0,d.jsx)("span",{className:"text-base font-bold",style:{color:l},children:a.textIcon||a.id?.slice(0,2).toUpperCase()}):(0,d.jsx)(A.default,{src:f,alt:a.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>i(!0)})}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight text-text-main",children:a.name}),j&&(0,d.jsxs)("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),a.notice?.apiKeyUrl?"Get API Key":"Sign up"]}),"moonshot"===b&&(0,d.jsxs)("a",{href:"https://www.kimi.com/activities/viral-referral/share?scenario=invite&from=share_poster&invitation_code=BPGXZR",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded-full bg-primary/12 px-3 py-1 text-xs font-semibold text-primary ring-1 ring-primary/20 transition-colors hover:bg-primary/20",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"celebration"}),"Get KIMI K3 For Free"]})]}),(0,d.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs text-text-muted",children:k.map((a,b)=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-2",children:[b>0&&(0,d.jsx)("span",{className:"text-text-muted/40",children:"\xb7"}),a]},b))})]})]}),a.deprecated&&(0,d.jsxs)("div",{className:"mt-4 flex items-start gap-2 rounded-lg border border-yellow-500/30 bg-yellow-500/10 px-3 py-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined mt-0.5 shrink-0 text-[16px] text-yellow-500",children:"warning"}),(0,d.jsx)("p",{className:"text-xs leading-relaxed text-red-600 dark:text-yellow-400",children:a.deprecationNotice})]}),a.notice?.text&&!a.deprecated&&(0,d.jsxs)("div",{className:"mt-4 flex flex-col gap-2 rounded-lg border border-info/30 bg-info/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[16px] text-info",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-info",children:a.notice.text}),a.notice.apiKeyUrl&&(0,d.jsx)("a",{href:a.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 →"})]})]})}var C=c(71404);function D({title:a,icon:b,count:c,defaultExpanded:f=!0,actions:g=null,children:h,className:i}){let[j,k]=(0,e.useState)(f);return(0,d.jsxs)("div",{className:(0,C.cn)("overflow-hidden rounded-panel border border-border-subtle bg-panel shadow-[var(--shadow-soft)]",i),children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 px-4 py-3",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>k(a=>!a),className:"flex min-w-0 items-center gap-2 text-left","aria-expanded":j,children:[b&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted",children:b}),(0,d.jsx)("h2",{className:"truncate text-sm font-semibold text-text-main",children:a}),null!=c&&(0,d.jsx)("span",{className:"shrink-0 rounded-full bg-black/5 px-1.5 py-0.5 text-[10px] font-bold tabular-nums text-text-muted dark:bg-white/10",children:c}),(0,d.jsx)("span",{className:(0,C.cn)("material-symbols-outlined text-[18px] text-text-muted transition-transform",j&&"rotate-180"),children:"expand_more"})]}),g&&(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-1.5",children:g})]}),j&&(0,d.jsx)("div",{className:"border-t border-border-subtle",children:h})]})}var E=c(74875);function F({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function G({connection:a,proxyPools:b,isOAuth:c,isFirst:f,isLast:g,onMoveUp:h,onMoveDown:j,onToggleActive:k,onUpdateProxy:l,onEdit:m,onDelete:n,oneByOneStatus:o=null,autoPing:p=null}){let[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),u=(0,e.useRef)(null),v=new Map((b||[]).map(a=>[a.id,a])),w=a.providerSpecificData?.proxyPoolId||null,x=w?v.get(w):null,y=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,z=!!w||y,A=x?`Pool: ${x.name}`:w?`Pool: ${w} (inactive/missing)`:y?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",B=p?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",C="";if(x?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=x?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);C=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{C=b}}let D=x?.noProxy||a.providerSpecificData?.connectionNoProxy||"",H="default";x?.isActive===!0?H="success":(w||y)&&(H="error");let I=async a=>{t(!0);try{await l("__none__"===a?null:a)}finally{t(!1),r(!1)}},J=a.authType||(c?"oauth":"apikey"),K="oauth"===J,L="cookie"===J,M=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(K?"OAuth Account":L?"Cookie Account":"API Key"),N=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[O,P]=(0,e.useState)(!1),Q=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,R="unavailable"!==a.testStatus||O?a.testStatus:"active",S=()=>o?"queued"===o.state?"queued":"testing"===o.state?"testing":"success"===o.state?"success":"failed"===o.state?o.error?`failed: ${o.error}`:"failed":null:null;return(0,d.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:h,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:j,disabled:g,className:`p-0.5 rounded ${g?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:L?"cookie":K?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:M}),N&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:N}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(i.Ex,{variant:(0,E.g)(a.isActive,R),size:"sm",dot:!0,children:!1===a.isActive?"disabled":R||"Unknown"}),(0,d.jsx)(i.Ex,{variant:"default",size:"sm",children:K?"OAuth":L?"Cookie":"API Key"}),z&&(0,d.jsx)(i.Ex,{variant:H,size:"sm",children:"Proxy"}),O&&!1!==a.isActive&&(0,d.jsx)(F,{until:Q}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),S()&&(0,d.jsx)(i.Ex,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:S()})]}),z&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:A,children:A}),C&&(0,d.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:C}),D&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:D,children:["no_proxy: ",D]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,d.jsxs)("div",{className:"relative",ref:u,children:[(0,d.jsxs)("button",{onClick:()=>r(a=>!a),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${z?"text-primary":"text-text-muted hover:text-primary"}`,disabled:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),q&&(0,d.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,d.jsx)("button",{onClick:()=>I("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,d.jsx)("button",{onClick:()=>I(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),p&&(0,d.jsx)(i.m_,{text:B,children:(0,d.jsxs)("button",{onClick:()=>p.onToggle(!p.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${p.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(i.lM,{size:"sm",checked:a.isActive??!0,onChange:k,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}F.propTypes={until:q().string.isRequired},G.propTypes={connection:q().shape({id:q().string,name:q().string,email:q().string,displayName:q().string,modelLockUntil:q().string,testStatus:q().string,isActive:q().bool,lastError:q().string,priority:q().number,globalPriority:q().number}).isRequired,proxyPools:q().arrayOf(q().shape({id:q().string,name:q().string,proxyUrl:q().string,noProxy:q().string,isActive:q().bool})),isOAuth:q().bool.isRequired,isFirst:q().bool.isRequired,isLast:q().bool.isRequired,onMoveUp:q().func.isRequired,onMoveDown:q().func.isRequired,onToggleActive:q().func.isRequired,onUpdateProxy:q().func,onEdit:q().func.isRequired,onDelete:q().func.isRequired,oneByOneStatus:q().shape({state:q().string,error:q().string}),autoPing:q().shape({on:q().bool,onToggle:q().func,provider:q().string})};let H={healthy:{variant:"success",label:"Pool healthy",icon:"shield"},degraded:{variant:"warning",label:"Pool degraded",icon:"warning"},exhausted:{variant:"error",label:"Pool exhausted",icon:"error"}};function I({providerId:a}){let[b,c]=(0,e.useState)(null);if(!b||!b.hasPool)return null;let f=H[b.status]||H.healthy;return(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",title:"Admin-provided shared key pool. Keys are hidden; only counts are shown.",children:[(0,d.jsx)(i.Ex,{variant:f.variant,size:"sm",icon:f.icon,children:f.label}),(0,d.jsxs)(i.Ex,{variant:"info",size:"sm",icon:"key",children:[b.total," pool keys"]}),(0,d.jsxs)(i.Ex,{variant:"success",size:"sm",icon:"check_circle",children:[b.available," available"]}),b.rateLimited>0&&(0,d.jsxs)(i.Ex,{variant:"warning",size:"sm",icon:"schedule",children:[b.rateLimited," cooling"]})]})}function J({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(null),[h,j]=(0,e.useState)(!0);return h?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[b.image?(0,d.jsx)("img",{src:b.image,alt:b.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"Z"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[b.isGuest?(0,d.jsx)(i.Ex,{variant:"warning",size:"sm",icon:"person",children:"Guest — GLM-4.7 only"}):(0,d.jsx)(i.Ex,{variant:"success",size:"sm",icon:"check_circle",children:"Signed in"}),(0,d.jsx)("span",{className:"text-[11px] text-text-muted",children:"Z.ai web session"})]})]})]}):f?(0,d.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2 text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"badge"}),(0,d.jsx)("span",{className:"min-w-0",children:f})]}):null}function K({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);if(f)return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!b)return null;let h=b.expires?new Date(b.expires):null,j=h?Math.ceil((h.getTime()-Date.now())/864e5):null,k=null!==j&&j<=3;return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[b.image?(0,d.jsx)("img",{src:b.image,alt:b.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"F"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),h&&(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px] text-text-muted",children:"schedule"}),(0,d.jsxs)("span",{className:"text-[11px] text-text-muted",children:["Session expires ",h.toLocaleDateString()]}),null!==j&&(0,d.jsxs)(i.Ex,{variant:k?"warning":"success",size:"sm",children:[j,"d left"]})]})]})]})}function L({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(null),[h,j]=(0,e.useState)(!0);return h?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[b.image?(0,d.jsx)("img",{src:b.image,alt:b.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"F"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),b.uid&&(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[(0,d.jsx)(i.Ex,{variant:"info",size:"sm",children:"Felo"}),(0,d.jsxs)("span",{className:"text-[11px] text-text-muted",children:["UID: ",b.uid]})]})]})]}):f?(0,d.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2 text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"badge"}),(0,d.jsx)("span",{className:"min-w-0",children:f})]}):null}function M({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);if(f)return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!b?.profile&&!b?.balance)return null;let{profile:h,balance:j}=b;return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[h?.image?(0,d.jsx)("img",{src:h.image,alt:h.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:h?.name?.charAt(0)?.toUpperCase()||"v"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:h?.name||"User"}),h?.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:h.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[h?.plan&&(0,d.jsx)(i.Ex,{variant:"v0-free"===h.plan?"default":"primary",size:"sm",children:"v0-free"===h.plan?"Free":h.plan}),h?.teamName&&(0,d.jsx)("span",{className:"truncate text-[11px] text-text-muted",children:h.teamName})]})]}),j&&(0,d.jsxs)("div",{className:"flex shrink-0 flex-col items-end",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"bolt"}),(0,d.jsx)("span",{className:"font-mono text-sm font-bold text-text-main",children:j.remaining}),(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:["/",j.total||"?"]})]}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"credits left"})]})]})}function N({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[b.image?(0,d.jsx)("img",{src:b.image,alt:b.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"Q"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[b.channelId&&(0,d.jsxs)(i.Ex,{variant:"info",size:"sm",children:["Region: ",b.channelId]}),b.uid&&(0,d.jsxs)("span",{className:"text-[11px] text-text-muted",children:["UID: ",b.uid]})]})]})]}):null}function O({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"I"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[b.plan&&(0,d.jsx)(i.Ex,{variant:"FREE"===b.plan?"default":"primary",size:"sm",children:b.plan}),!1===b.isActive&&(0,d.jsx)(i.Ex,{variant:"danger",size:"sm",children:"Inactive"})]})]})]}):null}function P({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"1M"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:"1min.ai"}),b.plan&&(0,d.jsx)(i.Ex,{variant:"primary",size:"sm",children:b.plan})]}),null!=b.credits&&(0,d.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Credits: ",Number(b.credits).toLocaleString(void 0,{maximumFractionDigits:2})]})]})]}):null}function Q({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"1M"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:"1min.ai (API)"}),b.plan&&(0,d.jsx)(i.Ex,{variant:"primary",size:"sm",children:b.plan})]}),null!=b.credits&&(0,d.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Credits: ",Number(b.credits).toLocaleString(void 0,{maximumFractionDigits:2})]})]})]}):null}function R({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"AG"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:"Agnes"}),b.username&&(0,d.jsxs)(i.Ex,{variant:"primary",size:"sm",children:["@",b.username]})]}),null!=b.credits&&(0,d.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Credits: ",Number(b.credits).toLocaleString()]})]})]}):null}function S({connectionId:a,cookie:b,currentPlan:c="free",onPlanChanged:f}){let g,[h,j]=(0,e.useState)([]),[k,l]=(0,e.useState)(c),[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null);g=String(b||"").match(/ctoken=([^;]+)/),g?.[1];let u=async b=>{let d=b.target.value;l(d),r(!0),t(null);try{if(!(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{zenmuxPlan:d}})})).ok)throw Error("Failed to save plan");f?.(d)}catch(a){t(a.message),l(c)}finally{r(!1)}},v=m&&m===k;return 0===h.length?(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,d.jsx)("select",{value:k,onChange:u,disabled:!0,className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-muted [-webkit-appearance:none] [-moz-appearance:none]",children:(0,d.jsxs)("option",{value:k,children:[k," (loading…)"]})})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("select",{value:k,onChange:u,disabled:q,title:"Select your ZenMux subscription plan. Models from this plan will be available.",className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 disabled:opacity-50",children:h.map(a=>(0,d.jsxs)("option",{value:a.planKey,children:[a.name," (",a.modelCount," models",a.price>0?`, $${a.price}/mo`:", free",")"]},a.planKey))}),(0,d.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"})})]}),o&&(0,d.jsx)(i.Ex,{variant:"info",size:"sm",children:"Detecting…"}),v&&!o&&(0,d.jsx)(i.Ex,{variant:"success",size:"sm",icon:"check_circle",dot:!0,children:"Auto-detected"}),q&&(0,d.jsx)(i.Ex,{variant:"info",size:"sm",children:"Saving…"}),s&&(0,d.jsx)(i.Ex,{variant:"error",size:"sm",icon:"error",children:s})]}),(0,d.jsx)("p",{className:"text-[11px] text-text-muted",children:m?`Plan auto-detected from your ctoken: ${m}. You can override manually if needed.`:"Select your ZenMux subscription plan. Models available depend on your plan."})]})}let T=[{key:"now",label:"Now",desc:"Real-time streaming — no waiting",savings:"0%"},{key:"soon",label:"Soon",desc:"Short delay, small discount",savings:"~10%"},{key:"later",label:"Later",desc:"~15 min wait, ~50% cheaper",savings:"~50%"},{key:"anytime",label:"Anytime",desc:"Best-effort, up to 65% cheaper",savings:"up to 65%"}];function U({connectionId:a,currentWindow:b="now",onWindowChanged:c}){let[f,g]=(0,e.useState)(b),[h,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(null),m=async d=>{let e=d.target.value;g(e),j(!0),l(null);try{if(!(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{completionWindow:e}})})).ok)throw Error("Failed to save window");c?.(e)}catch(a){l(a.message),g(b)}finally{j(!1)}},n=T.find(a=>a.key===f)||T[0],o="now"!==f;return(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Completion Window"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("select",{value:f,onChange:m,disabled:h,title:"Pick a completion window. Longer windows cost less but wait longer.",className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 disabled:opacity-50",children:T.map(a=>(0,d.jsxs)("option",{value:a.key,children:[a.label," (",a.savings," off)"]},a.key))}),(0,d.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"})})]}),o&&(0,d.jsx)(i.Ex,{variant:"info",size:"sm",icon:"schedule",dot:!0,children:"Async"}),h&&(0,d.jsx)(i.Ex,{variant:"info",size:"sm",children:"Saving…"}),k&&(0,d.jsx)(i.Ex,{variant:"error",size:"sm",icon:"error",children:k})]}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted",children:[n.desc,o&&" — results polled automatically with keep-alive heartbeats."]})]})}var V=c(50585);function W({providerId:a,isOAuth:b,isCompatible:c,isFreeNoAuth:e,hasDualAuthModes:f,oauthConnectionLabel:g,apiKeyConnectionLabel:h,thinkingConfig:j,AUTO_PING_SETTINGS_KEYS:k,connections:l,proxyPools:m,selectedConnectionIds:o,selectedConnections:p,allSelected:q,oneByOneRunning:r,oneByOneStopping:s,oneByOneCurrentConnectionId:t,oneByOneResults:u,oneByOneSummary:v,providerStrategy:w,providerStickyLimit:x,thinkingMode:y,autoPing:z,showBulkProxyModal:A,bulkUpdatingProxy:B,activePools:C,selectedProxySummary:D,handleSwapPriority:E,handleUpdateConnectionStatus:F,handleDelete:H,handleBulkDelete:T,handleRunOneByOneTest:X,handleStopOneByOneTest:Y,handleRoundRobinToggle:Z,handleStickyLimitChange:$,handleThinkingModeChange:_,handleAutoPingConnection:aa,triggerOAuthConnection:ab,triggerApiKeyConnection:ac,triggerAddConnection:ad,toggleSelectConnection:ae,toggleSelectAllConnections:af,openBulkProxyModal:ag,closeBulkProxyModal:ah,applyProxyAssignments:ai,handleApplySinglePool:aj,handleApplyOneToOne:ak,fetchConnections:al,setSelectedConnection:am,setShowEditModal:an,setShowBulkProxyModal:ao,setShowIFlowCookieModal:ap,setShowBulkImportCodex:aq,setConnections:ar}){return e?(0,d.jsx)(V.default,{providerId:a}):(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 border-b border-border-subtle px-4 py-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Connections"}),l.length>0&&(0,d.jsx)("span",{className:"rounded-full bg-black/5 px-1.5 py-0.5 text-[10px] font-bold tabular-nums text-text-muted dark:bg-white/10",children:l.length})]}),(0,d.jsx)(I,{providerId:a}),"zai-web"===a&&l.length>0&&(0,d.jsx)(J,{connectionId:l[0].id}),"felo-web"===a&&l.length>0&&(0,d.jsx)(L,{connectionId:l[0].id}),"freebuff-web"===a&&l.length>0&&(0,d.jsx)(K,{connectionId:l[0].id}),"v0-vercel-web"===a&&l.length>0&&(0,d.jsx)(M,{connectionId:l[0].id}),"qwencloud"===a&&l.length>0&&(0,d.jsx)(N,{connectionId:l[0].id}),"inxorastudio-web"===a&&l.length>0&&(0,d.jsx)(O,{connectionId:l[0].id}),"1min"===a&&l.length>0&&(0,d.jsx)(P,{connectionId:l[0].id}),"1min-api"===a&&l.length>0&&(0,d.jsx)(Q,{connectionId:l[0].id}),"agnes-web"===a&&l.length>0&&(0,d.jsx)(R,{connectionId:l[0].id})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[l.length>0&&m.length>0&&(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:ag,children:"Apply Proxy"}),l.length>0&&o.length>0&&(0,d.jsxs)(i.$n,{size:"sm",variant:"danger",icon:"delete",onClick:T,children:["Delete (",o.length,")"]}),l.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:r?"progress_activity":"sync",onClick:X,disabled:r,className:r?"animate-pulse":"",children:r?"Testing...":"Test All"}),r&&(0,d.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:Y,disabled:s,children:s?"Stopping":"Stop"})]}),j&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Thinking"}),(0,d.jsx)("select",{value:y,onChange:a=>_(a.target.value),className:"h-7 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03]",children:j.options.map(a=>(0,d.jsx)("option",{value:a,children:a.charAt(0).toUpperCase()+a.slice(1)},a))})]}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Round Robin"}),(0,d.jsx)(i.lM,{checked:"round-robin"===w,onChange:Z}),"round-robin"===w&&(0,d.jsx)("input",{type:"number",min:1,value:x,onChange:a=>$(a.target.value),placeholder:"1",className:"w-12 rounded-lg border border-border bg-black/[0.02] px-1.5 py-0.5 text-xs text-text-primary outline-none dark:border-white/10 dark:bg-white/[0.03]",title:"Sticky limit (requests per account before rotating)"})]}),"zenmux-free"===a&&l.length>0&&(0,d.jsx)(S,{connectionId:l[0].id,cookie:l[0].apiKey||"",currentPlan:l[0].providerSpecificData?.zenmuxPlan||"free",onPlanChanged:al}),"marathon"===a&&l.length>0&&(0,d.jsx)(U,{connectionId:l[0].id,currentWindow:l[0].providerSpecificData?.completionWindow||"now",onWindowChanged:al})]})]}),0===l.length?(0,d.jsxs)("div",{className:"flex flex-col items-center gap-3 px-4 py-8 text-center",children:[(0,d.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-primary/10 text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:b?"lock":"key"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium text-text-main",children:"No connections yet"}),f&&(0,d.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Choose ",g," or ",h]})]}),(0,d.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ab,children:g}),(0,d.jsx)(i.$n,{size:"sm",icon:"key",onClick:ac,children:h})]}):(0,d.jsxs)(d.Fragment,{children:[!c&&"iflow"===a&&(0,d.jsx)(i.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>ap(!0),children:"Cookie"}),"codex"===a&&(0,d.jsx)(i.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>aq(!0),children:(0,n.Tl)("Bulk Add")}),(0,d.jsx)(i.$n,{size:"sm",icon:"add",onClick:ad,children:c?"Add API Key":"iflow"===a?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)("div",{className:"flex flex-col",children:[v&&(0,d.jsxs)("div",{className:"border-b border-border-subtle px-4 py-2.5",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"checklist"}),(0,d.jsxs)("span",{className:"font-medium text-text-main",children:[v.completed,"/",v.total]})]}),v.passed>0&&(0,d.jsxs)("span",{className:"text-success",children:["✓ ",v.passed]}),v.failed>0&&(0,d.jsxs)("span",{className:"text-danger",children:["✗ ",v.failed]}),v.stopped&&(0,d.jsx)("span",{className:"text-warning",children:"Stopped"}),r&&t&&(0,d.jsxs)("span",{className:"truncate text-text-muted",children:["Testing: ",l.find(a=>a.id===t)?.name||t]})]}),v.total>0&&(0,d.jsx)("div",{className:"mt-1.5 h-1 overflow-hidden rounded-full bg-surface-2",children:(0,d.jsx)("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${v.completed/v.total*100}%`}})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle px-4 py-2",children:[(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:q,onChange:af,className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]}),o.length>0&&(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:[o.length," selected"]})]}),(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-border-subtle",children:l.map((c,e)=>{let f;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-2 sm:pl-3",children:(0,d.jsx)("input",{type:"checkbox",checked:(f=c.id,o.includes(f)),onChange:()=>ae(c.id),className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"min-w-0 flex-1",children:(0,d.jsx)(G,{connection:c,proxyPools:m,isOAuth:b,isFirst:0===e,isLast:e===l.length-1,onMoveUp:()=>E(e,e-1),onMoveDown:()=>E(e,e+1),onToggleActive:a=>F(c.id,a),autoPing:k[a]&&"oauth"===c.authType?{on:!0===z.connections[c.id],onToggle:a=>aa(c.id,a),provider:a}:null,onUpdateProxy:async a=>{try{(await fetch(`/api/providers/${c.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a||null})})).ok&&ar(b=>b.map(b=>b.id===c.id?{...b,providerSpecificData:{...b.providerSpecificData,proxyPoolId:a||null}}:b))}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{am(c),an(!0)},onDelete:()=>H(c.id),oneByOneStatus:u[c.id]||null})})]},c.id)})}),!c&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-border-subtle px-4 py-3",children:["iflow"===a&&(0,d.jsx)(i.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>ap(!0),children:"Cookie"}),"codex"===a&&(0,d.jsx)(i.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>aq(!0),children:(0,n.Tl)("Bulk Add")}),f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ab,children:g}),(0,d.jsx)(i.$n,{size:"sm",icon:"key",onClick:ac,children:h})]}):(0,d.jsx)(i.$n,{size:"sm",icon:"add",onClick:ad,children:"Add"})]})]}),(0,d.jsx)(i.aF,{isOpen:A,onClose:ah,title:`Apply Proxy (${l.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[D&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:D}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("button",{onClick:ak,disabled:B||0===C.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"sync_alt"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,d.jsxs)("button",{onClick:()=>aj(null),disabled:B,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"link_off"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),m.map(a=>(0,d.jsxs)("button",{onClick:()=>aj(a.id),disabled:B||!0!==a.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"lan"}),(0,d.jsx)("span",{className:"truncate text-sm text-text-main",children:a.name}),!0!==a.isActive&&(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},a.id))]}),B&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,d.jsx)(i.$n,{onClick:ah,variant:"ghost",fullWidth:!0,disabled:B,children:"Cancel"})]})})]})}let X=[{value:"auto",label:"Auto",hint:"No override"},{value:"none",label:"Off",hint:"Disable thinking"},{value:"minimal",label:"Minimal",hint:"512 tokens"},{value:"low",label:"Low",hint:"1,024 tokens"},{value:"medium",label:"Medium",hint:"8,192 tokens"},{value:"high",label:"High",hint:"24,576 tokens"},{value:"xhigh",label:"X-High",hint:"32,768 tokens"},{value:"max",label:"Max",hint:"128,000 tokens"}];function Y({caps:a,selectedLevel:b,onSelect:c}){let[f,g]=(0,e.useState)(!1),h=(0,e.useRef)(null),i=a?.thinkingLevels,j=X.filter(b=>"auto"===b.value||(i?i.includes(b.value):"none"===b.value?a?.thinkingCanDisable!==!1:"max"!==b.value||a?.thinkingMaxEffort===!0)),k=j.find(a=>a.value===b)||j[0];return(0,d.jsxs)("div",{className:"relative",ref:h,children:[(0,d.jsx)("button",{onClick:()=>g(a=>!a),title:`Thinking: ${k.label}${k.hint?` (${k.hint})`:""}`,className:`rounded p-0.5 transition-colors ${"auto"!==b?"text-primary":"text-text-muted hover:bg-sidebar hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"psychology"})}),f&&(0,d.jsxs)("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[140px] rounded-lg border border-border bg-panel shadow-[var(--shadow-warm)]",children:[(0,d.jsx)("div",{className:"px-2 py-1.5 border-b border-border-subtle",children:(0,d.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-text-muted",children:"Thinking Level"})}),j.map(a=>(0,d.jsxs)("button",{onClick:()=>{c(a.value),g(!1)},className:`flex w-full items-center justify-between gap-2 px-2.5 py-1.5 text-xs transition-colors hover:bg-sidebar ${a.value===b?"text-primary font-semibold":"text-text-main"}`,children:[(0,d.jsx)("span",{children:a.label}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:a.hint})]},a.value))]})]})}function Z({model:a,fullModel:b,alias:c,copied:f,onCopy:g,testStatus:h,isCustom:j,isFree:k,onDeleteAlias:l,onTest:m,isTesting:n,onDisable:o,caps:p}){let[q,r]=(0,e.useState)("auto"),s="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0,t=!!p?.reasoning,u="auto"!==q&&"none"!==q?`${b}(${q})`:"none"===q?`${b}(none)`:b;return(0,d.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:s?{color:s}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:u}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,d.jsx)(i.nh,{caps:p,colorOverride:"text-text-muted/70",size:12})]})]}),t&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)(Y,{caps:p,selectedLevel:q,onSelect:r}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:"Thinking"})]}),m&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:m,disabled:n,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${n?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:n?{animation:"spin 1s linear infinite"}:void 0,children:n?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:n?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>g(u,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:f===`model-${a.id}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:f===`model-${a.id}`?"Copied!":"Copy"})]}),j?(0,d.jsx)("button",{onClick:l,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):o?(0,d.jsx)("button",{onClick:o,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function $({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:d=[],type:e="llm",includeLegacyAliases:f=!0}){let g=new Set(d.map(a=>a.id)),h=new Set,i=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(e&&a!==e||g.has(b.id))continue;let d=`${c}/${b.id}`;h.has(d)||(h.add(d),i.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a}))}if(!f)return i;let j=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(j))continue;let b=c.slice(j.length);!b||g.has(b)||h.has(c)||(h.add(c),i.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:e||"llm"}))}return i}Z.propTypes={model:q().shape({id:q().string.isRequired}).isRequired,fullModel:q().string.isRequired,alias:q().string,copied:q().string,onCopy:q().func.isRequired,testStatus:q().oneOf(["ok","error"]),isCustom:q().bool,isFree:q().bool,onDeleteAlias:q().func,onTest:q().func,isTesting:q().bool,onDisable:q().func,caps:q().object};var _=c(86629);function aa({modelId:a,fullModel:b,copied:c,onCopy:e,onDeleteAlias:f,onTest:g,testStatus:h,isTesting:i}){let j="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:j?{color:j}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c===`model-${a}`?"Copied!":"Copy"})]}),g&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:g,disabled:i,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:i?{animation:"spin 1s linear infinite"}:void 0,children:i?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function ab({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:j,onAddCustomModel:k,onDeleteCustomModel:l,connections:m,isAnthropic:n}){let[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)({}),y=async b=>{if(!u){v(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();x(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{x(a=>({...a,[b]:"error"}))}finally{v(null)}}},z=$({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),A=z.length>20,B=(0,e.useRef)(null),[C,D]=(0,e.useState)(0),[E,F]=(0,e.useState)(480),G=(0,e.useMemo)(()=>{let a=Array(z.length),b=0;for(let c=0;c<z.length;c++)a[c]=b,b+=66;return{offsets:a,total:b}},[z.length]),{start:H,end:I}=(0,e.useMemo)(()=>(0,_.$7)(G.offsets,G.total,C,E,4),[G,C,E]),J=(0,e.useCallback)(a=>D(a.currentTarget.scrollTop),[]),K=Math.min(H,z.length),L=Math.min(I,z.length-1),M=K>=z.length?G.total:G.offsets[K],N=L+1<z.length?Math.max(0,G.total-G.offsets[L+1]):0,O=async()=>{if(!o.trim()||q)return;let a=o.trim();if(z.some(b=>b.id===a))return void alert("Model already exists for this provider.");r(!0);try{await k(a),p("")}catch(a){console.log("Error adding model:",a)}finally{r(!1)}},P=async()=>{if(s)return;let a=m.find(a=>!1!==a.isActive);if(a){t(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void alert("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(z.some(a=>a.id===b)||(await k(b),e+=1))}0===e&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{t(!1)}}},Q=m.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",n?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:o,onChange:a=>p(a.target.value),onKeyDown:a=>"Enter"===a.key&&O(),placeholder:n?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,d.jsx)(i.$n,{size:"sm",icon:"add",onClick:O,disabled:!o.trim()||q,children:q?"Adding...":"Add"}),(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"download",onClick:P,disabled:!Q||s,children:s?"Importing...":"Import from /models"})]}),!Q&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),z.length>0&&(0,d.jsxs)("div",{ref:A?B:void 0,onScroll:A?J:void 0,className:A?"max-h-[480px] overflow-y-auto flex flex-col gap-3 pr-1":"flex flex-col gap-3",children:[A&&M>0&&(0,d.jsx)("div",{style:{height:M},"aria-hidden":!0}),z.slice(K,L+1).map(({id:c,alias:e,source:f})=>(0,d.jsx)(aa,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):j(e),onTest:m.length>0?()=>y(c):void 0,testStatus:w[c],isTesting:u===c},`${f}-${a}/${c}`)),A&&N>0&&(0,d.jsx)("div",{style:{height:N},"aria-hidden":!0})]})]})}function ac({providerId:a,isCompatible:b,isAnthropicCompatible:c,isFreeNoAuth:e,providerStorageAlias:f,providerDisplayAlias:g,models:h,kiloFreeModels:l,modelAliases:m,customModels:o,disabledModelIds:p,modelTestResults:q,testingModelIds:r,testingAllModels:s,modelsTestError:t,modelSearchQuery:u,connections:v,suggestedModels:w,importingQoderModels:x,copied:y,getCaps:z,copy:A,handleTestModel:B,handleTestAllModels:C,handleDisableModel:D,handleEnableModel:E,handleDisableAll:F,handleEnableAll:G,handleSetAlias:H,handleDeleteAlias:I,handleAddCustomModel:J,handleDeleteCustomModel:K,handleImportQoderModels:L,setModelSearchQuery:M,setShowAddCustomModel:N}){let O,P,Q;if(b)return(0,d.jsx)("div",{className:"px-4 py-3",children:(0,d.jsx)(ab,{providerStorageAlias:f,providerDisplayAlias:g,modelAliases:m,customModels:o,copied:y,onCopy:A,onSetAlias:H,onDeleteAlias:I,onAddCustomModel:a=>J(a,"llm",f),onDeleteCustomModel:a=>K(a,"llm",f),connections:v,isAnthropic:c})});let R=[...h,...l.filter(a=>!h.some(b=>b.id===a.id))].filter(a=>{let b=(0,k.CP)(a);return!b||"llm"===b}),S=new Set(p),T=R.filter(a=>!S.has(a.id)),U=R.filter(a=>S.has(a.id)),V=$({customModels:o,modelAliases:m,providerAlias:f,builtInModels:h,type:"llm"}),W=u.trim().toLowerCase(),X=(a,b="")=>!W||a.toLowerCase().includes(W)||String(b).toLowerCase().includes(W),Y=T.filter(a=>X(a.id,a.name)),_=V.filter(a=>X(a.id,a.name)),aa=R.map(a=>a.id).filter(a=>!p.includes(a)),ad=aa.filter(a=>!W||a.toLowerCase().includes(W));return(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border-subtle px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[p.length>0&&(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:G,children:"Active All"}),aa.length>0&&(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>F(aa),children:"Disable All"}),(v.length>0||e)&&ad.length>0&&(0,d.jsx)(i.$n,{size:"sm",variant:"primary",icon:s?"progress_activity":"play_arrow",onClick:()=>C(ad),disabled:s,className:s?"animate-pulse":"",children:s?"Testing...":`Test All (${ad.length})`})]}),(0,d.jsx)("div",{className:"sm:w-56",children:(0,d.jsx)(i.pd,{type:"search",placeholder:"Search models...",value:u,onChange:a=>M(a.target.value),className:"w-full"})})]}),(0,d.jsxs)("div",{className:"px-4 py-3",children:[j.Q2[a]?.capabilities?.toolUse===!1&&(0,d.jsxs)("div",{className:"mb-3 flex items-start gap-2 rounded-lg border border-warning/20 bg-warning/[0.04] px-3 py-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"info"}),(0,d.jsxs)("p",{className:"text-[11px] leading-relaxed text-text-muted",children:["Cookie-based provider — these models run through a browser chat endpoint and"," ",(0,d.jsx)("span",{className:"font-medium text-text-main",children:"cannot execute tool/function calls"}),"."," ","Smart Routing combos will exclude them from tool-calling pools and use them only for research intents."]})]}),!!t&&(0,d.jsx)("p",{className:"mb-3 break-words text-xs text-danger",children:t}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:[_.map(b=>(0,d.jsx)(Z,{model:{id:b.id,name:b.name},fullModel:`${g}/${b.id}`,alias:b.alias,copied:y,onCopy:A,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===b.source?K(b.id,"llm",f):I(b.alias)},testStatus:q[b.id],onTest:v.length>0||e?()=>B(b.id):void 0,isTesting:r.has(b.id),isCustom:!0,isFree:!1,caps:z(`${a}/${b.id}`)},`${b.source}-${b.fullModel}`)),Y.map(b=>{let c=`${f}/${b.id}`,h=`${a}/${b.id}`,i=Object.entries(m).find(([,a])=>a===c||a===h)?.[0];return(0,d.jsx)(Z,{model:b,fullModel:`${g}/${b.id}`,alias:i,copied:y,onCopy:A,onSetAlias:a=>H(b.id,a,f),onDeleteAlias:()=>I(i),testStatus:q[b.id],onTest:v.length>0||e?()=>B(b.id):void 0,isTesting:r.has(b.id),isFree:b.isFree,onDisable:()=>D(b.id),caps:z(`${a}/${b.id}`)},b.id)})]}),u.trim()&&0===Y.length&&0===_.length&&(0,d.jsxs)("p",{className:"w-full py-4 text-center text-sm text-text-muted",children:["No models match “",u,"”"]}),(0,d.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,d.jsxs)("button",{onClick:()=>N(!0),className:"flex items-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",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===a&&v.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:L,disabled:x,className:"flex items-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-info transition-colors hover:border-blue-500 hover:bg-blue-500/5 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:x?{animation:"spin 1s linear infinite"}:void 0,children:x?"progress_activity":"download"}),x?(0,n.Tl)("Fetching..."):(0,n.Tl)("Fetch Qoder Models")]})]}),w.length>0&&(O=new Set([...Object.values(m),...V.map(a=>a.fullModel)]),P=new Set(h.map(a=>a.id)),0===(Q=w.filter(a=>!O.has(`${f}/${a.id}`)&&!P.has(a.id))).length?null:(0,d.jsxs)("div",{className:"mt-3 w-full",children:[(0,d.jsx)("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-text-muted",children:"Suggested free models"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:Q.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await J(a.id,"llm",f)},className:"flex items-center gap-1 rounded-lg border border-border px-2.5 py-1.5 text-xs text-text-muted transition-colors hover:border-primary/40 hover:bg-primary/5 hover:text-primary",title:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),U.length>0&&(0,d.jsxs)("div",{className:"mt-3 w-full",children:[(0,d.jsxs)("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-text-muted",children:["Disabled (",U.length,")"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:U.map(a=>(0,d.jsxs)("button",{onClick:()=>E(a.id),className:"flex items-center gap-1 rounded-lg border border-dashed border-border px-2.5 py-1.5 text-xs text-text-muted transition-colors hover:border-primary/40 hover:bg-primary/5 hover:text-primary",title:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})]})}ab.propTypes={providerStorageAlias:q().string.isRequired,providerDisplayAlias:q().string.isRequired,modelAliases:q().object.isRequired,customModels:q().arrayOf(q().object),copied:q().string,onCopy:q().func.isRequired,onDeleteAlias:q().func.isRequired,onAddCustomModel:q().func.isRequired,onDeleteCustomModel:q().func.isRequired,connections:q().arrayOf(q().shape({id:q().string,isActive:q().bool})).isRequired,isAnthropic:q().bool};let ad={claude:"claudeAutoPing",codex:"codexAutoPing"};function ae(){let a=(0,f.useParams)(),b=(0,f.useRouter)(),c=a.id,{getCaps:g}=(0,m.y)(),{markSeen:p}=(0,z.P)("providers"),[q,r]=(0,e.useState)([]),[s,w]=(0,e.useState)(!0),[A,C]=(0,e.useState)(null),[E,F]=(0,e.useState)([]),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)(""),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(!1),[X,Y]=(0,e.useState)(null),[Z,$]=(0,e.useState)({}),[_,aa]=(0,e.useState)([]),[ab,ae]=(0,e.useState)(!1),[af,ag]=(0,e.useState)({}),[ah,ai]=(0,e.useState)(""),[aj,ak]=(0,e.useState)(()=>new Set),[al,am]=(0,e.useState)(""),[an,ao]=(0,e.useState)(!1),[ap,aq]=(0,e.useState)(!1),[ar,as]=(0,e.useState)([]),[at,au]=(0,e.useState)("__none__"),[av,aw]=(0,e.useState)(!1),[ax,ay]=(0,e.useState)(null),[az,aA]=(0,e.useState)(""),[aB,aC]=(0,e.useState)("auto"),[aD,aE]=(0,e.useState)({enabled:!1,connections:{}}),[aF,aG]=(0,e.useState)([]),[aH,aI]=(0,e.useState)([]),[aJ,aK]=(0,e.useState)([]),[aL,aM]=(0,e.useState)(null),[aN,aO]=(0,e.useState)(!1),[aP,aQ]=(0,e.useState)(!1),[aR,aS]=(0,e.useState)(!1),[aT,aU]=(0,e.useState)(null),[aV,aW]=(0,e.useState)({}),[aX,aY]=(0,e.useState)(null),aZ=(0,e.useRef)(!1),[a$,a_]=(0,e.useState)(!1),{copied:a0,copy:a1}=(0,l.C)(),a2=["1min","qwen-web"],a3=()=>{H(!0)},a4=()=>{a8||a2.includes(c)?a3():(N(""),L(!0))},a5=()=>{N(""),L(!0)},a6=A?{id:A.id,name:A.name||("anthropic-compatible"===A.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===A.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===A.type?"AC":"OC",apiType:A.apiType,baseUrl:A.baseUrl,type:A.type}:j.zN[c]||j.fg[c]||j.IS[c]||j.nJ[c]||j.br[c],a7=a6?.authModes||[],a8=(!!j.zN[c]||!!j.IS[c]||a7.includes("oauth"))&&a6?.hasOAuth!==!1,a9=!!j.fg[c]||a7.includes("apikey")||a6?.hasOAuth===!1,ba=!!j.IS[c]?.noAuth,bb=(0,k.KC)(c),bc=(0,j.wG)(c),bd=(0,j.mq)(c),be=(0,j.gb)(c),bf=bd||be,bg=!bf&&a8&&a9,bh="xai"===c?"Grok Build OAuth":"OAuth",bi="xai"===c?"xAI API Key":"API Key",bj=j.Q2[c]?.thinkingConfig||j.s9.extended,bk=bf?c:bc,bl=bf?A?.prefix||c:bc,bm=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bk)}`,{cache:"no-store"}),b=await a.json();a.ok&&aK(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bk]),bn=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bk,ids:[a]})})).ok&&await bm()}catch(a){console.log("Error disabling model:",a)}},bo=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bk)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bm()}catch(a){console.log("Error enabling model:",a)}},bp=async a=>{a.length&&aM({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aM(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bk,ids:a})})).ok&&await bm()}catch(a){console.log("Error disabling all models:",a)}}})},bq=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bk)}`,{method:"DELETE"})).ok&&await bm()}catch(a){console.log("Error enabling all models:",a)}},br=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&$(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bs=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&aa(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),bt=(0,e.useCallback)(async()=>{try{let[a,b,d,e]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),f=await a.json(),g=await b.json(),h=await d.json(),i=e.ok?await e.json():{};if(a.ok){let a=(f.connections||[]).filter(a=>a.provider===c);r(a)}d.ok&&F(h.proxyPools||[]);let j=(i.providerStrategies||{})[c]||{};ay(j.fallbackStrategy||null),aA(null!=j.stickyRoundRobinLimit?String(j.stickyRoundRobinLimit):"1");let k=(i.providerThinking||{})[c]||{};aC(k.mode||"auto");let l=ad[c],m=l&&i[l]||{};if(aE({enabled:!0===m.enabled,connections:m.connections||{}}),b.ok){let a=(g.nodes||[]).find(a=>a.id===c)||null;if(!a&&bf)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===c)||null))break}C(a)}}catch(a){console.log("Error fetching connections:",a)}finally{w(!1)}},[c,bf]),bu=async a=>{try{let b=await fetch(`/api/provider-nodes/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),d=await b.json();b.ok&&(C(d.node),await bt(),T(!1))}catch(a){console.log("Error updating provider node:",a)}},bv=async(a,b)=>{try{let d=await fetch("/api/settings",{cache:"no-store"}),e=(d.ok?await d.json():{}).providerStrategies||{},f={};a&&(f.fallbackStrategy=a),"round-robin"===a&&""!==b&&(f.stickyRoundRobinLimit=Number(b)||3);let g={...e};0===Object.keys(f).length?delete g[c]:g[c]=f,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:g})})}catch(a){console.log("Error saving provider strategy:",a)}},bw=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),d={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?d[c]={mode:a}:delete d[c],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:d})})}catch(a){console.log("Error saving thinking config:",a)}},bx=async a=>{let b=ad[c];if(b){aE(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},by=async(a,b,c=bc)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await br();else{let b=await a.json();alert(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bz=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await br()}catch(a){console.log("Error deleting alias:",a)}},bA=async(a,b="llm",c=bk)=>{try{let d=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b})});if(d.ok)await bs();else{let a=await d.json();alert(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},bB=async(a,b="llm",c=bk)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bs()}catch(a){console.log("Error deleting custom model:",a)}},bC=async()=>{if(a$)return;let a=q.find(a=>!1!==a.isActive);if(!a)return void alert((0,n.Tl)("Please add an active Qoder connection first"));a_(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,n.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,n.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;if(!b)continue;let c=b.replace(/^qoder\//,"");_.some(a=>a.providerAlias===bk&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values(Z).includes(`${bk}/${c}`)||(await bA(c,"llm",bk),e+=1)}0===e?alert((0,n.Tl)("All models already exist, no new models added")):alert((0,n.Tl)("Successfully added")+` ${e} `+(0,n.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),alert((0,n.Tl)("Error fetching models")+": "+a.message)}finally{a_(!1)}},bD=async()=>{if(aP||0===q.length)return;let a=Object.fromEntries(q.map(a=>[a.id,{state:"queued",error:null}]));aZ.current=!1,aQ(!0),aS(!1),aU(null),aW(a),aY({total:q.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<q.length;a+=1){if(aZ.current){aY({total:q.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=q[a];aU(d.id),aW(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,aW(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,aW(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}aY({total:q.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<q.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{aU(null),aQ(!1),aS(!1),aZ.current=!1}},bE=async a=>{aM({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aM(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&r(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bF=()=>{bt(),H(!1)},bG=async a=>{N("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:c,...a})}),d=null;try{d=await b.json()}catch{d=null}if(b.ok){await bt(),L(!1);return}N(d?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),N("Failed to save connection")}},bH=async a=>{try{(await fetch(`/api/providers/${X.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bt(),R(!1))}catch(a){console.log("Error updating connection:",a)}},bI=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&r(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},bJ=async(a,b)=>{let c=[...q];[c[a],c[b]]=[c[b],c[a]],r(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){console.log("Error swapping priority:",a),await bt()}},bK=q.filter(a=>ar.includes(a.id)),bL=q.length>0&&ar.length===q.length,bM=(()=>{if(0===bK.length)return"";let a=new Set(bK.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return"All selected currently unbound";let c=E.find(a=>a.id===b);return`All selected currently bound to ${c?.name||b}`}return"Selected connections have mixed proxy bindings"})(),bN=async a=>{aw(!0);try{let b=0;for(let{connectionId:c,proxyPoolId:d}of a)try{(await fetch(`/api/providers/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:d})})).ok||(b+=1)}catch(a){console.log("Error applying proxy for",c,a),b+=1}b>0&&alert(`Updated with ${b} failed request(s).`),await bt(),V(!1)}finally{aw(!1)}},bO=E.filter(a=>!0===a.isActive),bP=async a=>{if(!aj.has(a)){ak(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bk}/${a}`})}),c=await b.json();ag(b=>({...b,[a]:c.ok?"ok":"error"})),ai(c.ok?"":c.error||"Model not reachable")}catch{ag(b=>({...b,[a]:"error"})),ai("Network error")}finally{ak(b=>{let c=new Set(b);return c.delete(a),c})}}},bQ=async a=>{an||0===a.length||(ao(!0),ai(""),await Promise.all(a.map(a=>bP(a))),ao(!1))};if(s)return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,d.jsx)(i.Qv,{}),(0,d.jsx)(i.Qv,{})]});if(!a6)return(0,d.jsxs)("div",{className:"py-20 text-center",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"mt-4 inline-block text-primary",children:"Back to Providers"})]});let bR=(0,o.k)(a6.id,a6.apiType);return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,d.jsx)(B,{providerInfo:a6,providerId:c,connections:q,modelCount:bb.length,headerIconPath:bR,headerImgError:ab,setHeaderImgError:ae}),"kimi-desktop"===c&&(0,d.jsx)(i.P1,{}),bf&&A&&(0,d.jsx)(i.Zp,{children:(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:be?"Anthropic Compatible":"OpenAI Compatible"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[be?"Messages API":"responses"===A.apiType?"Responses API":"Chat Completions"," \xb7 ",(A.baseUrl||"").replace(/\/$/,""),"/",be?"messages":"responses"===A.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>{N(""),L(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>T(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:()=>{aM({title:"Delete Compatible Node",message:`Delete this ${be?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aM(null);try{(await fetch(`/api/provider-nodes/${c}`,{method:"DELETE"})).ok&&b.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),(0,d.jsx)(D,{title:"Connections",icon:"cable",count:q.length,defaultExpanded:!0,children:(0,d.jsx)(W,{providerId:c,isOAuth:a8,isCompatible:bf,isFreeNoAuth:ba,hasDualAuthModes:bg,oauthConnectionLabel:bh,apiKeyConnectionLabel:bi,thinkingConfig:bj,AUTO_PING_SETTINGS_KEYS:ad,connections:q,proxyPools:E,selectedConnectionIds:ar,selectedConnections:bK,allSelected:bL,oneByOneRunning:aP,oneByOneStopping:aR,oneByOneCurrentConnectionId:aT,oneByOneResults:aV,oneByOneSummary:aX,providerStrategy:ax,providerStickyLimit:az,thinkingMode:aB,autoPing:aD,showBulkProxyModal:U,bulkUpdatingProxy:av,activePools:bO,selectedProxySummary:bM,handleSwapPriority:bJ,handleUpdateConnectionStatus:bI,handleDelete:bE,handleBulkDelete:()=>{let a=ar.length;0!==a&&aM({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aM(null);let a=0,b=[...ar];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}r(a=>a.filter(a=>!b.includes(a.id))),as([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},handleRunOneByOneTest:bD,handleStopOneByOneTest:()=>{aP&&(aZ.current=!0,aS(!0))},handleRoundRobinToggle:a=>{let b=a?"round-robin":null,c=a?az||"1":az;a&&!az&&aA("1"),ay(b),bv(b,c)},handleStickyLimitChange:a=>{aA(a),bv("round-robin",a)},handleThinkingModeChange:a=>{aC(a),bw(a)},handleAutoPingConnection:(a,b)=>{bx({...aD,connections:{...aD.connections,[a]:b}})},triggerOAuthConnection:a4,triggerApiKeyConnection:a5,triggerAddConnection:()=>{a8||a2.includes(c)?a4():a5()},toggleSelectConnection:a=>{as(b=>b.includes(a)?b.filter(b=>b!==a):[...b,a])},toggleSelectAllConnections:()=>{bL?as([]):as(q.map(a=>a.id))},openBulkProxyModal:()=>{if(0===bK.length)return;let a=[...new Set(bK.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"))];au(1===a.length?a[0]:"__none__"),V(!0)},closeBulkProxyModal:()=>{av||V(!1)},applyProxyAssignments:bN,handleApplySinglePool:a=>bN(q.map(b=>({connectionId:b.id,proxyPoolId:a}))),handleApplyOneToOne:()=>{let a=E.filter(a=>!0===a.isActive);return 0===a.length?void alert("No active proxy pools available."):bN(q.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},fetchConnections:bt,setSelectedConnection:Y,setShowEditModal:R,setShowBulkProxyModal:V,setShowIFlowCookieModal:J,setShowBulkImportCodex:P,setConnections:r})}),(0,d.jsx)(D,{title:"Health",icon:"monitoring",defaultExpanded:!1,children:(0,d.jsx)("div",{className:"px-4 py-3",children:(0,d.jsx)(y,{providerId:c})})}),(0,d.jsx)(D,{title:"Models",icon:"apps",count:bb.length,defaultExpanded:!0,children:(0,d.jsx)(ac,{providerId:c,isCompatible:bf,isAnthropicCompatible:be,isFreeNoAuth:ba,providerStorageAlias:bk,providerDisplayAlias:bl,models:bb,kiloFreeModels:aH,modelAliases:Z,customModels:_,disabledModelIds:aJ,modelTestResults:af,testingModelIds:aj,testingAllModels:an,modelsTestError:ah,modelSearchQuery:al,connections:q,suggestedModels:aF,importingQoderModels:a$,copied:a0,getCaps:g,copy:a1,handleTestModel:bP,handleTestAllModels:bQ,handleDisableModel:bn,handleEnableModel:bo,handleDisableAll:bp,handleEnableAll:bq,handleSetAlias:by,handleDeleteAlias:bz,handleAddCustomModel:bA,handleDeleteCustomModel:bB,handleImportQoderModels:bC,setModelSearchQuery:am,setShowAddCustomModel:aq})}),"kiro"===c?(0,d.jsx)(i.Mh,{isOpen:G,providerInfo:a6,onSuccess:bF,onClose:()=>H(!1)}):"cursor"===c?(0,d.jsx)(i.G9,{isOpen:G,onSuccess:bF,onClose:()=>H(!1)}):"1min"===c?(0,d.jsx)(i.CG,{isOpen:G,onSuccess:bF,onClose:()=>H(!1)}):"qwen-web"===c?(0,d.jsx)(i.F8,{isOpen:G,onSuccess:bF,onClose:()=>H(!1)}):"wp-studio"===c?(0,d.jsx)(i.V1,{isOpen:G,onSuccess:bF,onClose:()=>H(!1)}):"zed"===c?(0,d.jsx)(i.TE,{isOpen:G,onSuccess:bF,onClose:()=>H(!1)}):"kimi-desktop"===c?(0,d.jsx)(i.QT,{isOpen:G,onSuccess:bF,onClose:()=>H(!1)}):"gitlab"===c?(0,d.jsx)(i.vj,{isOpen:G,providerInfo:a6,onSuccess:bF,onClose:()=>H(!1)}):(0,d.jsx)(i.LF,{isOpen:G,provider:c,providerInfo:a6,onSuccess:bF,onClose:()=>H(!1)}),"iflow"===c&&(0,d.jsx)(i.vE,{isOpen:I,onSuccess:()=>{bt(),J(!1)},onClose:()=>J(!1)}),(0,d.jsx)(t,{isOpen:K,provider:c,providerName:a6.name,isCompatible:bf,isAnthropic:be,authType:a6?.authType,authHint:a6?.authHint,website:a6?.website,proxyPools:E,error:M,onSave:bG,onBulkDone:bt,onClose:()=>{N(""),L(!1)}}),(0,d.jsx)(i.wI,{isOpen:Q,connection:X,proxyPools:E,onSave:bH,onClose:()=>R(!1)}),bf&&(0,d.jsx)(u,{isOpen:S,node:A,onSave:bu,onClose:()=>T(!1),isAnthropic:be}),!bf&&(0,d.jsx)(v,{isOpen:ap,providerAlias:bk,providerDisplayAlias:bl,onSave:async a=>{await bA(a,"llm",bk),aq(!1)},onClose:()=>aq(!1)}),"codex"===c&&(0,d.jsx)(x,{isOpen:O,onClose:()=>P(!1),onSuccess:bt}),(0,d.jsx)(i.uo,{isOpen:aN,onClose:()=>aO(!1),onConfirm:()=>{(aO(!1),a8)?a3():a5()},title:"Risk Notice",message:a6?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(i.uo,{isOpen:!!aL,onClose:()=>aM(null),onConfirm:aL?.onConfirm,title:aL?.title||"Confirm",message:aL?.message,variant:"danger"})]})}},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},80099:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},83997:a=>{"use strict";a.exports=require("tty")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},90573:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(14965),o=c(63747),p=c(24235),q=c(23938),r=c(261),s=c(66758),t=c(77243),u=c(26713),v=c(37527),w=c(22820),x=c(88216),y=c(47929),z=c(79551),A=c(71797),B=c(89125),C=c(86439),D=c(77068),E=c(27269),F=c(37525),G=c(61287),H=c(81494),I=c(70722),J=c(70753),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,93110)),"/home/runner/work/ExtremeRouter/ExtremeRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,30508)),"/home/runner/work/ExtremeRouter/ExtremeRouter/src/app/(dashboard)/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,50385)),"/home/runner/work/ExtremeRouter/ExtremeRouter/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next-cli-build",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/(dashboard)/dashboard/providers/[id]/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(95726).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
11
- see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},91645:a=>{"use strict";a.exports=require("net")},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/ExtremeRouter/ExtremeRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/ExtremeRouter/ExtremeRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7774,1260,6935,4013,5573,319,6482,8e3,6591,1220,7815,5050,5604,7765,8266,3552,212,809,4957,1891,4109,885,9365,5330,8895,4046,6182,6457,8271,8802,6777,412,3520],()=>b(b.s=90573));module.exports=c})();
10
+ ]`;function x({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,o]=(0,e.useState)(null),p=()=>{h||(g(""),l(""),o(null),b())},q=async()=>{var a;let b;l(""),o(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){l(`${(0,n.Tl)("Invalid JSON")}: ${a.message}`);return}let e=Array.isArray(a=b)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null;if(!e||0===e.length)return void l((0,n.Tl)("No accounts found in input"));j(!0);try{let a=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),b=await a.json();if(!a.ok)return void l(b?.error||`Request failed: ${a.status}`);o(b),b.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,n.Tl)("Request failed"))}finally{j(!1)}},r=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(i.aF,{isOpen:a,title:(0,n.Tl)("Bulk Add Codex Accounts"),onClose:p,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,n.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:w,value:f,onChange:a=>g(a.target.value),disabled:h}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),m&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,n.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,n.Tl)("failed")}`:""]}),r.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:r.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(i.$n,{onClick:q,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,n.Tl)("Importing..."):(0,n.Tl)("Import All")}),(0,d.jsx)(i.$n,{onClick:p,variant:"ghost",fullWidth:!0,disabled:h,children:(0,n.Tl)("Close")})]})]})})}function y({providerId:a,hours:b=24}){let[c,f]=(0,e.useState)(null);if(!c)return(0,d.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-pulse",children:"monitor_heart"}),"Loading health timeline..."]});if(0===c.length||c.every(a=>0===a.ok&&0===a.err))return(0,d.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"monitor_heart"}),"No request history yet."]});let g=c.length,h=c.reduce((a,b)=>a+b.ok+b.err,0),i=c.reduce((a,b)=>a+b.err,0),j=Math.max(...c.map(a=>a.ok+a.err),1),k=Math.max(...c.map(a=>a.latency),1),l=Math.max(6*g,120),m=Math.max(l/g-1,2),n=c.filter(a=>a.latency>0).map((a,b)=>{let c=b/Math.max(g-1,1)*l,d=32-a.latency/k*19.2-2;return`${c.toFixed(1)},${d.toFixed(1)}`}),o=n.length>1?`M${n.join(" L")}`:"",p=h>0?Math.round((h-i)/h*100):null;return(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Health (24h)"}),null!==p&&(0,d.jsxs)("span",{className:`text-[10px] font-bold ${p>=90?"text-success":p>=70?"text-warning":"text-danger"}`,children:[p,"% success \xb7 ",h," requests \xb7 ",i," errors"]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-text-muted",children:[(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block size-2 rounded-sm bg-success"})," OK"]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block size-2 rounded-sm bg-danger"})," Error"]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block h-0.5 w-3 bg-info"})," Latency"]})]})]}),(0,d.jsxs)("svg",{width:l,height:32,className:"overflow-visible",children:[c.map((a,b)=>{let c=l/g*b;if(0===a.ok+a.err)return null;let e=a.ok/j*32,f=a.err/j*32;return(0,d.jsxs)("g",{children:[(0,d.jsx)("rect",{x:c,y:32-e-f,width:m,height:f,rx:.5,className:"fill-danger/60"}),(0,d.jsx)("rect",{x:c,y:32-e,width:m,height:e,rx:.5,className:"fill-success/60"})]},b)}),o&&(0,d.jsx)("path",{d:o,fill:"none",strokeWidth:1,className:"stroke-info",strokeDasharray:"2 2"})]})]})}x.propTypes={isOpen:q().bool.isRequired,onClose:q().func.isRequired,onSuccess:q().func};var z=c(82214),A=c(81220);function B({providerInfo:a,providerId:b,connections:c,modelCount:e,headerIconPath:f,headerImgError:g,setHeaderImgError:i}){let j=a.notice?.apiKeyUrl||a.notice?.signupUrl||a.website,k=[a.authModes?a.authModes.includes("oauth")&&a.authModes.includes("apikey")?"OAuth + API Key":"oauth"===a.authModes[0]?"OAuth":"cookie"===a.authModes[0]?"Cookie":"API Key":"oauth"===a.authType?"OAuth":"cookie"===a.authType?"Cookie":"API Key"];c.length>0&&k.push(`${c.length} connection${1===c.length?"":"s"}`),e>0&&k.push(`${e} model${1===e?"":"s"}`);let l=a.color||"#6366f1";return(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(h(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-primary",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"mt-4 flex min-w-0 items-center gap-4",children:[(0,d.jsx)("div",{className:"flex size-14 shrink-0 items-center justify-center rounded-xl",style:{backgroundColor:`${l}15`},children:g?(0,d.jsx)("span",{className:"text-base font-bold",style:{color:l},children:a.textIcon||a.id?.slice(0,2).toUpperCase()}):(0,d.jsx)(A.default,{src:f,alt:a.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>i(!0)})}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight text-text-main",children:a.name}),j&&(0,d.jsxs)("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),a.notice?.apiKeyUrl?"Get API Key":"Sign up"]}),"moonshot"===b&&(0,d.jsxs)("a",{href:"https://www.kimi.com/activities/viral-referral/share?scenario=invite&from=share_poster&invitation_code=BPGXZR",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded-full bg-primary/12 px-3 py-1 text-xs font-semibold text-primary ring-1 ring-primary/20 transition-colors hover:bg-primary/20",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"celebration"}),"Get KIMI K3 For Free"]})]}),(0,d.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs text-text-muted",children:k.map((a,b)=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-2",children:[b>0&&(0,d.jsx)("span",{className:"text-text-muted/40",children:"\xb7"}),a]},b))})]})]}),a.deprecated&&(0,d.jsxs)("div",{className:"mt-4 flex items-start gap-2 rounded-lg border border-yellow-500/30 bg-yellow-500/10 px-3 py-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined mt-0.5 shrink-0 text-[16px] text-yellow-500",children:"warning"}),(0,d.jsx)("p",{className:"text-xs leading-relaxed text-red-600 dark:text-yellow-400",children:a.deprecationNotice})]}),a.notice?.text&&!a.deprecated&&(0,d.jsxs)("div",{className:"mt-4 flex flex-col gap-2 rounded-lg border border-info/30 bg-info/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[16px] text-info",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-info",children:a.notice.text}),a.notice.apiKeyUrl&&(0,d.jsx)("a",{href:a.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 →"})]})]})}var C=c(71404);function D({title:a,icon:b,count:c,defaultExpanded:f=!0,actions:g=null,children:h,className:i}){let[j,k]=(0,e.useState)(f);return(0,d.jsxs)("div",{className:(0,C.cn)("overflow-hidden rounded-panel border border-border-subtle bg-panel shadow-[var(--shadow-soft)]",i),children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 px-4 py-3",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>k(a=>!a),className:"flex min-w-0 items-center gap-2 text-left","aria-expanded":j,children:[b&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted",children:b}),(0,d.jsx)("h2",{className:"truncate text-sm font-semibold text-text-main",children:a}),null!=c&&(0,d.jsx)("span",{className:"shrink-0 rounded-full bg-black/5 px-1.5 py-0.5 text-[10px] font-bold tabular-nums text-text-muted dark:bg-white/10",children:c}),(0,d.jsx)("span",{className:(0,C.cn)("material-symbols-outlined text-[18px] text-text-muted transition-transform",j&&"rotate-180"),children:"expand_more"})]}),g&&(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-1.5",children:g})]}),j&&(0,d.jsx)("div",{className:"border-t border-border-subtle",children:h})]})}var E=c(74875);function F({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function G({connection:a,proxyPools:b,isOAuth:c,isFirst:f,isLast:g,onMoveUp:h,onMoveDown:j,onToggleActive:k,onUpdateProxy:l,onEdit:m,onDelete:n,oneByOneStatus:o=null,autoPing:p=null}){let[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),u=(0,e.useRef)(null),v=new Map((b||[]).map(a=>[a.id,a])),w=a.providerSpecificData?.proxyPoolId||null,x=w?v.get(w):null,y=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,z=!!w||y,A=x?`Pool: ${x.name}`:w?`Pool: ${w} (inactive/missing)`:y?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",B=p?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",C="";if(x?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=x?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);C=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{C=b}}let D=x?.noProxy||a.providerSpecificData?.connectionNoProxy||"",H="default";x?.isActive===!0?H="success":(w||y)&&(H="error");let I=async a=>{t(!0);try{await l("__none__"===a?null:a)}finally{t(!1),r(!1)}},J=a.authType||(c?"oauth":"apikey"),K="oauth"===J,L="cookie"===J,M=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(K?"OAuth Account":L?"Cookie Account":"API Key"),N=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[O,P]=(0,e.useState)(!1),Q=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,R="unavailable"!==a.testStatus||O?a.testStatus:"active",S=()=>o?"queued"===o.state?"queued":"testing"===o.state?"testing":"success"===o.state?"success":"failed"===o.state?o.error?`failed: ${o.error}`:"failed":null:null;return(0,d.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:h,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:j,disabled:g,className:`p-0.5 rounded ${g?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:L?"cookie":K?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:M}),N&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:N}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(i.Ex,{variant:(0,E.g)(a.isActive,R),size:"sm",dot:!0,children:!1===a.isActive?"disabled":R||"Unknown"}),(0,d.jsx)(i.Ex,{variant:"default",size:"sm",children:K?"OAuth":L?"Cookie":"API Key"}),z&&(0,d.jsx)(i.Ex,{variant:H,size:"sm",children:"Proxy"}),O&&!1!==a.isActive&&(0,d.jsx)(F,{until:Q}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),S()&&(0,d.jsx)(i.Ex,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:S()})]}),z&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:A,children:A}),C&&(0,d.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:C}),D&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:D,children:["no_proxy: ",D]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,d.jsxs)("div",{className:"relative",ref:u,children:[(0,d.jsxs)("button",{onClick:()=>r(a=>!a),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${z?"text-primary":"text-text-muted hover:text-primary"}`,disabled:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),q&&(0,d.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,d.jsx)("button",{onClick:()=>I("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,d.jsx)("button",{onClick:()=>I(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),p&&(0,d.jsx)(i.m_,{text:B,children:(0,d.jsxs)("button",{onClick:()=>p.onToggle(!p.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${p.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(i.lM,{size:"sm",checked:a.isActive??!0,onChange:k,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}F.propTypes={until:q().string.isRequired},G.propTypes={connection:q().shape({id:q().string,name:q().string,email:q().string,displayName:q().string,modelLockUntil:q().string,testStatus:q().string,isActive:q().bool,lastError:q().string,priority:q().number,globalPriority:q().number}).isRequired,proxyPools:q().arrayOf(q().shape({id:q().string,name:q().string,proxyUrl:q().string,noProxy:q().string,isActive:q().bool})),isOAuth:q().bool.isRequired,isFirst:q().bool.isRequired,isLast:q().bool.isRequired,onMoveUp:q().func.isRequired,onMoveDown:q().func.isRequired,onToggleActive:q().func.isRequired,onUpdateProxy:q().func,onEdit:q().func.isRequired,onDelete:q().func.isRequired,oneByOneStatus:q().shape({state:q().string,error:q().string}),autoPing:q().shape({on:q().bool,onToggle:q().func,provider:q().string})};let H={healthy:{variant:"success",label:"Pool healthy",icon:"shield"},degraded:{variant:"warning",label:"Pool degraded",icon:"warning"},exhausted:{variant:"error",label:"Pool exhausted",icon:"error"}};function I({providerId:a}){let[b,c]=(0,e.useState)(null);if(!b||!b.hasPool)return null;let f=H[b.status]||H.healthy;return(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",title:"Admin-provided shared key pool. Keys are hidden; only counts are shown.",children:[(0,d.jsx)(i.Ex,{variant:f.variant,size:"sm",icon:f.icon,children:f.label}),(0,d.jsxs)(i.Ex,{variant:"info",size:"sm",icon:"key",children:[b.total," pool keys"]}),(0,d.jsxs)(i.Ex,{variant:"success",size:"sm",icon:"check_circle",children:[b.available," available"]}),b.rateLimited>0&&(0,d.jsxs)(i.Ex,{variant:"warning",size:"sm",icon:"schedule",children:[b.rateLimited," cooling"]})]})}function J({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(null),[h,j]=(0,e.useState)(!0);return h?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[b.image?(0,d.jsx)("img",{src:b.image,alt:b.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"Z"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[b.isGuest?(0,d.jsx)(i.Ex,{variant:"warning",size:"sm",icon:"person",children:"Guest — GLM-4.7 only"}):(0,d.jsx)(i.Ex,{variant:"success",size:"sm",icon:"check_circle",children:"Signed in"}),(0,d.jsx)("span",{className:"text-[11px] text-text-muted",children:"Z.ai web session"})]})]})]}):f?(0,d.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2 text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"badge"}),(0,d.jsx)("span",{className:"min-w-0",children:f})]}):null}function K({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);if(f)return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!b)return null;let h=b.expires?new Date(b.expires):null,j=h?Math.ceil((h.getTime()-Date.now())/864e5):null,k=null!==j&&j<=3;return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[b.image?(0,d.jsx)("img",{src:b.image,alt:b.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"F"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),h&&(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px] text-text-muted",children:"schedule"}),(0,d.jsxs)("span",{className:"text-[11px] text-text-muted",children:["Session expires ",h.toLocaleDateString()]}),null!==j&&(0,d.jsxs)(i.Ex,{variant:k?"warning":"success",size:"sm",children:[j,"d left"]})]})]})]})}function L({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(null),[h,j]=(0,e.useState)(!0);return h?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[b.image?(0,d.jsx)("img",{src:b.image,alt:b.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"F"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),b.uid&&(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[(0,d.jsx)(i.Ex,{variant:"info",size:"sm",children:"Felo"}),(0,d.jsxs)("span",{className:"text-[11px] text-text-muted",children:["UID: ",b.uid]})]})]})]}):f?(0,d.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2 text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"badge"}),(0,d.jsx)("span",{className:"min-w-0",children:f})]}):null}function M({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);if(f)return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!b?.profile&&!b?.balance)return null;let{profile:h,balance:j}=b;return(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[h?.image?(0,d.jsx)("img",{src:h.image,alt:h.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:h?.name?.charAt(0)?.toUpperCase()||"v"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:h?.name||"User"}),h?.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:h.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[h?.plan&&(0,d.jsx)(i.Ex,{variant:"v0-free"===h.plan?"default":"primary",size:"sm",children:"v0-free"===h.plan?"Free":h.plan}),h?.teamName&&(0,d.jsx)("span",{className:"truncate text-[11px] text-text-muted",children:h.teamName})]})]}),j&&(0,d.jsxs)("div",{className:"flex shrink-0 flex-col items-end",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"bolt"}),(0,d.jsx)("span",{className:"font-mono text-sm font-bold text-text-main",children:j.remaining}),(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:["/",j.total||"?"]})]}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"credits left"})]})]})}function N({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[b.image?(0,d.jsx)("img",{src:b.image,alt:b.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"Q"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[b.channelId&&(0,d.jsxs)(i.Ex,{variant:"info",size:"sm",children:["Region: ",b.channelId]}),b.uid&&(0,d.jsxs)("span",{className:"text-[11px] text-text-muted",children:["UID: ",b.uid]})]})]})]}):null}function O({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:b.name?.charAt(0)?.toUpperCase()||"I"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:b.name}),b.email&&(0,d.jsx)("span",{className:"truncate text-xs text-text-muted",children:b.email})]}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[b.plan&&(0,d.jsx)(i.Ex,{variant:"FREE"===b.plan?"default":"primary",size:"sm",children:b.plan}),!1===b.isActive&&(0,d.jsx)(i.Ex,{variant:"danger",size:"sm",children:"Inactive"})]})]})]}):null}function P({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"1M"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:"1min.ai"}),b.plan&&(0,d.jsx)(i.Ex,{variant:"primary",size:"sm",children:b.plan})]}),null!=b.credits&&(0,d.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Credits: ",Number(b.credits).toLocaleString(void 0,{maximumFractionDigits:2})]})]})]}):null}function Q({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"1M"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:"1min.ai (API)"}),b.plan&&(0,d.jsx)(i.Ex,{variant:"primary",size:"sm",children:b.plan})]}),null!=b.credits&&(0,d.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Credits: ",Number(b.credits).toLocaleString(void 0,{maximumFractionDigits:2})]})]})]}):null}function R({connectionId:a}){let[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(!0);return f?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,d.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):b?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:"AG"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:"Agnes"}),b.username&&(0,d.jsxs)(i.Ex,{variant:"primary",size:"sm",children:["@",b.username]})]}),null!=b.credits&&(0,d.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Credits: ",Number(b.credits).toLocaleString()]})]})]}):null}function S({connectionId:a,cookie:b,currentPlan:c="free",onPlanChanged:f}){let g,[h,j]=(0,e.useState)([]),[k,l]=(0,e.useState)(c),[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null);g=String(b||"").match(/ctoken=([^;]+)/),g?.[1];let u=async b=>{let d=b.target.value;l(d),r(!0),t(null);try{if(!(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{zenmuxPlan:d}})})).ok)throw Error("Failed to save plan");f?.(d)}catch(a){t(a.message),l(c)}finally{r(!1)}},v=m&&m===k;return 0===h.length?(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,d.jsx)("select",{value:k,onChange:u,disabled:!0,className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-muted [-webkit-appearance:none] [-moz-appearance:none]",children:(0,d.jsxs)("option",{value:k,children:[k," (loading…)"]})})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("select",{value:k,onChange:u,disabled:q,title:"Select your ZenMux subscription plan. Models from this plan will be available.",className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 disabled:opacity-50",children:h.map(a=>(0,d.jsxs)("option",{value:a.planKey,children:[a.name," (",a.modelCount," models",a.price>0?`, $${a.price}/mo`:", free",")"]},a.planKey))}),(0,d.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"})})]}),o&&(0,d.jsx)(i.Ex,{variant:"info",size:"sm",children:"Detecting…"}),v&&!o&&(0,d.jsx)(i.Ex,{variant:"success",size:"sm",icon:"check_circle",dot:!0,children:"Auto-detected"}),q&&(0,d.jsx)(i.Ex,{variant:"info",size:"sm",children:"Saving…"}),s&&(0,d.jsx)(i.Ex,{variant:"error",size:"sm",icon:"error",children:s})]}),(0,d.jsx)("p",{className:"text-[11px] text-text-muted",children:m?`Plan auto-detected from your ctoken: ${m}. You can override manually if needed.`:"Select your ZenMux subscription plan. Models available depend on your plan."})]})}let T=[{key:"now",label:"Now",desc:"Real-time streaming — no waiting",savings:"0%"},{key:"soon",label:"Soon",desc:"Short delay, small discount",savings:"~10%"},{key:"later",label:"Later",desc:"~15 min wait, ~50% cheaper",savings:"~50%"},{key:"anytime",label:"Anytime",desc:"Best-effort, up to 65% cheaper",savings:"up to 65%"}];function U({connectionId:a,currentWindow:b="now",onWindowChanged:c}){let[f,g]=(0,e.useState)(b),[h,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(null),m=async d=>{let e=d.target.value;g(e),j(!0),l(null);try{if(!(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{completionWindow:e}})})).ok)throw Error("Failed to save window");c?.(e)}catch(a){l(a.message),g(b)}finally{j(!1)}},n=T.find(a=>a.key===f)||T[0],o="now"!==f;return(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Completion Window"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("select",{value:f,onChange:m,disabled:h,title:"Pick a completion window. Longer windows cost less but wait longer.",className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 disabled:opacity-50",children:T.map(a=>(0,d.jsxs)("option",{value:a.key,children:[a.label," (",a.savings," off)"]},a.key))}),(0,d.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"})})]}),o&&(0,d.jsx)(i.Ex,{variant:"info",size:"sm",icon:"schedule",dot:!0,children:"Async"}),h&&(0,d.jsx)(i.Ex,{variant:"info",size:"sm",children:"Saving…"}),k&&(0,d.jsx)(i.Ex,{variant:"error",size:"sm",icon:"error",children:k})]}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted",children:[n.desc,o&&" — results polled automatically with keep-alive heartbeats."]})]})}var V=c(50585);function W({providerId:a,isOAuth:b,isCompatible:c,isFreeNoAuth:e,hasDualAuthModes:f,oauthConnectionLabel:g,apiKeyConnectionLabel:h,thinkingConfig:j,AUTO_PING_SETTINGS_KEYS:k,connections:l,proxyPools:m,selectedConnectionIds:o,selectedConnections:p,allSelected:q,oneByOneRunning:r,oneByOneStopping:s,oneByOneCurrentConnectionId:t,oneByOneResults:u,oneByOneSummary:v,providerStrategy:w,providerStickyLimit:x,thinkingMode:y,autoPing:z,showBulkProxyModal:A,bulkUpdatingProxy:B,activePools:C,selectedProxySummary:D,handleSwapPriority:E,handleUpdateConnectionStatus:F,handleDelete:H,handleBulkDelete:T,handleRunOneByOneTest:X,handleStopOneByOneTest:Y,handleRoundRobinToggle:Z,handleStickyLimitChange:$,handleThinkingModeChange:_,handleAutoPingConnection:aa,triggerOAuthConnection:ab,triggerApiKeyConnection:ac,triggerAddConnection:ad,toggleSelectConnection:ae,toggleSelectAllConnections:af,openBulkProxyModal:ag,closeBulkProxyModal:ah,applyProxyAssignments:ai,handleApplySinglePool:aj,handleApplyOneToOne:ak,fetchConnections:al,setSelectedConnection:am,setShowEditModal:an,setShowBulkProxyModal:ao,setShowIFlowCookieModal:ap,setShowBulkImportCodex:aq,setConnections:ar}){return e?(0,d.jsx)(V.default,{providerId:a}):(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 border-b border-border-subtle px-4 py-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Connections"}),l.length>0&&(0,d.jsx)("span",{className:"rounded-full bg-black/5 px-1.5 py-0.5 text-[10px] font-bold tabular-nums text-text-muted dark:bg-white/10",children:l.length})]}),(0,d.jsx)(I,{providerId:a}),"zai-web"===a&&l.length>0&&(0,d.jsx)(J,{connectionId:l[0].id}),"felo-web"===a&&l.length>0&&(0,d.jsx)(L,{connectionId:l[0].id}),"freebuff-web"===a&&l.length>0&&(0,d.jsx)(K,{connectionId:l[0].id}),"v0-vercel-web"===a&&l.length>0&&(0,d.jsx)(M,{connectionId:l[0].id}),"qwencloud"===a&&l.length>0&&(0,d.jsx)(N,{connectionId:l[0].id}),"inxorastudio-web"===a&&l.length>0&&(0,d.jsx)(O,{connectionId:l[0].id}),"1min"===a&&l.length>0&&(0,d.jsx)(P,{connectionId:l[0].id}),"1min-api"===a&&l.length>0&&(0,d.jsx)(Q,{connectionId:l[0].id}),"agnes-web"===a&&l.length>0&&(0,d.jsx)(R,{connectionId:l[0].id})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[l.length>0&&m.length>0&&(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:ag,children:"Apply Proxy"}),l.length>0&&o.length>0&&(0,d.jsxs)(i.$n,{size:"sm",variant:"danger",icon:"delete",onClick:T,children:["Delete (",o.length,")"]}),l.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:r?"progress_activity":"sync",onClick:X,disabled:r,className:r?"animate-pulse":"",children:r?"Testing...":"Test All"}),r&&(0,d.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:Y,disabled:s,children:s?"Stopping":"Stop"})]}),j&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Thinking"}),(0,d.jsx)("select",{value:y,onChange:a=>_(a.target.value),className:"h-7 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03]",children:j.options.map(a=>(0,d.jsx)("option",{value:a,children:a.charAt(0).toUpperCase()+a.slice(1)},a))})]}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Round Robin"}),(0,d.jsx)(i.lM,{checked:"round-robin"===w,onChange:Z}),"round-robin"===w&&(0,d.jsx)("input",{type:"number",min:1,value:x,onChange:a=>$(a.target.value),placeholder:"1",className:"w-12 rounded-lg border border-border bg-black/[0.02] px-1.5 py-0.5 text-xs text-text-primary outline-none dark:border-white/10 dark:bg-white/[0.03]",title:"Sticky limit (requests per account before rotating)"})]}),"zenmux-free"===a&&l.length>0&&(0,d.jsx)(S,{connectionId:l[0].id,cookie:l[0].apiKey||"",currentPlan:l[0].providerSpecificData?.zenmuxPlan||"free",onPlanChanged:al}),"marathon"===a&&l.length>0&&(0,d.jsx)(U,{connectionId:l[0].id,currentWindow:l[0].providerSpecificData?.completionWindow||"now",onWindowChanged:al})]})]}),0===l.length?(0,d.jsxs)("div",{className:"flex flex-col items-center gap-3 px-4 py-8 text-center",children:[(0,d.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-primary/10 text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:b?"lock":"key"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium text-text-main",children:"No connections yet"}),f&&(0,d.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["Choose ",g," or ",h]})]}),(0,d.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ab,children:g}),(0,d.jsx)(i.$n,{size:"sm",icon:"key",onClick:ac,children:h})]}):(0,d.jsxs)(d.Fragment,{children:[!c&&"iflow"===a&&(0,d.jsx)(i.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>ap(!0),children:"Cookie"}),"codex"===a&&(0,d.jsx)(i.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>aq(!0),children:(0,n.Tl)("Bulk Add")}),(0,d.jsx)(i.$n,{size:"sm",icon:"add",onClick:ad,children:c?"Add API Key":"iflow"===a?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)("div",{className:"flex flex-col",children:[v&&(0,d.jsxs)("div",{className:"border-b border-border-subtle px-4 py-2.5",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"checklist"}),(0,d.jsxs)("span",{className:"font-medium text-text-main",children:[v.completed,"/",v.total]})]}),v.passed>0&&(0,d.jsxs)("span",{className:"text-success",children:["✓ ",v.passed]}),v.failed>0&&(0,d.jsxs)("span",{className:"text-danger",children:["✗ ",v.failed]}),v.stopped&&(0,d.jsx)("span",{className:"text-warning",children:"Stopped"}),r&&t&&(0,d.jsxs)("span",{className:"truncate text-text-muted",children:["Testing: ",l.find(a=>a.id===t)?.name||t]})]}),v.total>0&&(0,d.jsx)("div",{className:"mt-1.5 h-1 overflow-hidden rounded-full bg-surface-2",children:(0,d.jsx)("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${v.completed/v.total*100}%`}})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle px-4 py-2",children:[(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:q,onChange:af,className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]}),o.length>0&&(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:[o.length," selected"]})]}),(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-border-subtle",children:l.map((c,e)=>{let f;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-2 sm:pl-3",children:(0,d.jsx)("input",{type:"checkbox",checked:(f=c.id,o.includes(f)),onChange:()=>ae(c.id),className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"min-w-0 flex-1",children:(0,d.jsx)(G,{connection:c,proxyPools:m,isOAuth:b,isFirst:0===e,isLast:e===l.length-1,onMoveUp:()=>E(e,e-1),onMoveDown:()=>E(e,e+1),onToggleActive:a=>F(c.id,a),autoPing:k[a]&&"oauth"===c.authType?{on:!0===z.connections[c.id],onToggle:a=>aa(c.id,a),provider:a}:null,onUpdateProxy:async a=>{try{(await fetch(`/api/providers/${c.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a||null})})).ok&&ar(b=>b.map(b=>b.id===c.id?{...b,providerSpecificData:{...b.providerSpecificData,proxyPoolId:a||null}}:b))}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{am(c),an(!0)},onDelete:()=>H(c.id),oneByOneStatus:u[c.id]||null})})]},c.id)})}),!c&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-border-subtle px-4 py-3",children:["iflow"===a&&(0,d.jsx)(i.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>ap(!0),children:"Cookie"}),"codex"===a&&(0,d.jsx)(i.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>aq(!0),children:(0,n.Tl)("Bulk Add")}),f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ab,children:g}),(0,d.jsx)(i.$n,{size:"sm",icon:"key",onClick:ac,children:h})]}):(0,d.jsx)(i.$n,{size:"sm",icon:"add",onClick:ad,children:"Add"})]})]}),(0,d.jsx)(i.aF,{isOpen:A,onClose:ah,title:`Apply Proxy (${l.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[D&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:D}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("button",{onClick:ak,disabled:B||0===C.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"sync_alt"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,d.jsxs)("button",{onClick:()=>aj(null),disabled:B,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"link_off"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),m.map(a=>(0,d.jsxs)("button",{onClick:()=>aj(a.id),disabled:B||!0!==a.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"lan"}),(0,d.jsx)("span",{className:"truncate text-sm text-text-main",children:a.name}),!0!==a.isActive&&(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},a.id))]}),B&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,d.jsx)(i.$n,{onClick:ah,variant:"ghost",fullWidth:!0,disabled:B,children:"Cancel"})]})})]})}let X=[{value:"auto",label:"Auto",hint:"No override"},{value:"none",label:"Off",hint:"Disable thinking"},{value:"minimal",label:"Minimal",hint:"512 tokens"},{value:"low",label:"Low",hint:"1,024 tokens"},{value:"medium",label:"Medium",hint:"8,192 tokens"},{value:"high",label:"High",hint:"24,576 tokens"},{value:"xhigh",label:"X-High",hint:"32,768 tokens"},{value:"max",label:"Max",hint:"128,000 tokens"}];function Y({caps:a,selectedLevel:b,onSelect:c}){let[f,g]=(0,e.useState)(!1),h=(0,e.useRef)(null),i=a?.thinkingLevels,j=X.filter(b=>"auto"===b.value||(i?i.includes(b.value):"none"===b.value?a?.thinkingCanDisable!==!1:"max"!==b.value||a?.thinkingMaxEffort===!0)),k=j.find(a=>a.value===b)||j[0];return(0,d.jsxs)("div",{className:"relative",ref:h,children:[(0,d.jsx)("button",{onClick:()=>g(a=>!a),title:`Thinking: ${k.label}${k.hint?` (${k.hint})`:""}`,className:`rounded p-0.5 transition-colors ${"auto"!==b?"text-primary":"text-text-muted hover:bg-sidebar hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"psychology"})}),f&&(0,d.jsxs)("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[140px] rounded-lg border border-border bg-panel shadow-[var(--shadow-warm)]",children:[(0,d.jsx)("div",{className:"px-2 py-1.5 border-b border-border-subtle",children:(0,d.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-text-muted",children:"Thinking Level"})}),j.map(a=>(0,d.jsxs)("button",{onClick:()=>{c(a.value),g(!1)},className:`flex w-full items-center justify-between gap-2 px-2.5 py-1.5 text-xs transition-colors hover:bg-sidebar ${a.value===b?"text-primary font-semibold":"text-text-main"}`,children:[(0,d.jsx)("span",{children:a.label}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:a.hint})]},a.value))]})]})}function Z({model:a,fullModel:b,alias:c,copied:f,onCopy:g,testStatus:h,isCustom:j,isFree:k,onDeleteAlias:l,onTest:m,isTesting:n,onDisable:o,caps:p}){let[q,r]=(0,e.useState)("auto"),s="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0,t=!!p?.reasoning,u="auto"!==q&&"none"!==q?`${b}(${q})`:"none"===q?`${b}(none)`:b;return(0,d.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:s?{color:s}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:u}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,d.jsx)(i.nh,{caps:p,colorOverride:"text-text-muted/70",size:12})]})]}),t&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)(Y,{caps:p,selectedLevel:q,onSelect:r}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:"Thinking"})]}),m&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:m,disabled:n,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${n?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:n?{animation:"spin 1s linear infinite"}:void 0,children:n?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:n?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>g(u,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:f===`model-${a.id}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:f===`model-${a.id}`?"Copied!":"Copy"})]}),j?(0,d.jsx)("button",{onClick:l,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):o?(0,d.jsx)("button",{onClick:o,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function $({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:d=[],type:e="llm",includeLegacyAliases:f=!0}){let g=new Set(d.map(a=>a.id)),h=new Set,i=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(e&&a!==e||g.has(b.id))continue;let d=`${c}/${b.id}`;h.has(d)||(h.add(d),i.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a}))}if(!f)return i;let j=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(j))continue;let b=c.slice(j.length);!b||g.has(b)||h.has(c)||(h.add(c),i.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:e||"llm"}))}return i}Z.propTypes={model:q().shape({id:q().string.isRequired}).isRequired,fullModel:q().string.isRequired,alias:q().string,copied:q().string,onCopy:q().func.isRequired,testStatus:q().oneOf(["ok","error"]),isCustom:q().bool,isFree:q().bool,onDeleteAlias:q().func,onTest:q().func,isTesting:q().bool,onDisable:q().func,caps:q().object};var _=c(86629);function aa({modelId:a,fullModel:b,copied:c,onCopy:e,onDeleteAlias:f,onTest:g,testStatus:h,isTesting:i}){let j="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:j?{color:j}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c===`model-${a}`?"Copied!":"Copy"})]}),g&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:g,disabled:i,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:i?{animation:"spin 1s linear infinite"}:void 0,children:i?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function ab({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:j,onAddCustomModel:k,onDeleteCustomModel:l,connections:m,isAnthropic:n}){let[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)({}),y=async b=>{if(!u){v(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();x(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{x(a=>({...a,[b]:"error"}))}finally{v(null)}}},z=$({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),A=z.length>20,B=(0,e.useRef)(null),[C,D]=(0,e.useState)(0),[E,F]=(0,e.useState)(480),G=(0,e.useMemo)(()=>{let a=Array(z.length),b=0;for(let c=0;c<z.length;c++)a[c]=b,b+=66;return{offsets:a,total:b}},[z.length]),{start:H,end:I}=(0,e.useMemo)(()=>(0,_.$7)(G.offsets,G.total,C,E,4),[G,C,E]),J=(0,e.useCallback)(a=>D(a.currentTarget.scrollTop),[]),K=Math.min(H,z.length),L=Math.min(I,z.length-1),M=K>=z.length?G.total:G.offsets[K],N=L+1<z.length?Math.max(0,G.total-G.offsets[L+1]):0,O=async()=>{if(!o.trim()||q)return;let a=o.trim();if(z.some(b=>b.id===a))return void alert("Model already exists for this provider.");r(!0);try{await k(a),p("")}catch(a){console.log("Error adding model:",a)}finally{r(!1)}},P=async()=>{if(s)return;let a=m.find(a=>!1!==a.isActive);if(a){t(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void alert("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(z.some(a=>a.id===b)||(await k(b),e+=1))}0===e&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{t(!1)}}},Q=m.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",n?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:o,onChange:a=>p(a.target.value),onKeyDown:a=>"Enter"===a.key&&O(),placeholder:n?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,d.jsx)(i.$n,{size:"sm",icon:"add",onClick:O,disabled:!o.trim()||q,children:q?"Adding...":"Add"}),(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"download",onClick:P,disabled:!Q||s,children:s?"Importing...":"Import from /models"})]}),!Q&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),z.length>0&&(0,d.jsxs)("div",{ref:A?B:void 0,onScroll:A?J:void 0,className:A?"max-h-[480px] overflow-y-auto flex flex-col gap-3 pr-1":"flex flex-col gap-3",children:[A&&M>0&&(0,d.jsx)("div",{style:{height:M},"aria-hidden":!0}),z.slice(K,L+1).map(({id:c,alias:e,source:f})=>(0,d.jsx)(aa,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):j(e),onTest:m.length>0?()=>y(c):void 0,testStatus:w[c],isTesting:u===c},`${f}-${a}/${c}`)),A&&N>0&&(0,d.jsx)("div",{style:{height:N},"aria-hidden":!0})]})]})}function ac({providerId:a,isCompatible:b,isAnthropicCompatible:c,isFreeNoAuth:e,providerStorageAlias:f,providerDisplayAlias:g,models:h,kiloFreeModels:l,modelAliases:m,customModels:o,disabledModelIds:p,modelTestResults:q,testingModelIds:r,testingAllModels:s,modelsTestError:t,modelSearchQuery:u,connections:v,suggestedModels:w,importingQoderModels:x,copied:y,getCaps:z,copy:A,handleTestModel:B,handleTestAllModels:C,handleDisableModel:D,handleEnableModel:E,handleDisableAll:F,handleEnableAll:G,handleSetAlias:H,handleDeleteAlias:I,handleAddCustomModel:J,handleDeleteCustomModel:K,handleImportQoderModels:L,setModelSearchQuery:M,setShowAddCustomModel:N}){let O,P,Q;if(b)return(0,d.jsx)("div",{className:"px-4 py-3",children:(0,d.jsx)(ab,{providerStorageAlias:f,providerDisplayAlias:g,modelAliases:m,customModels:o,copied:y,onCopy:A,onSetAlias:H,onDeleteAlias:I,onAddCustomModel:a=>J(a,"llm",f),onDeleteCustomModel:a=>K(a,"llm",f),connections:v,isAnthropic:c})});let R=[...h,...l.filter(a=>!h.some(b=>b.id===a.id))].filter(a=>{let b=(0,k.CP)(a);return!b||"llm"===b}),S=new Set(p),T=R.filter(a=>!S.has(a.id)),U=R.filter(a=>S.has(a.id)),V=$({customModels:o,modelAliases:m,providerAlias:f,builtInModels:h,type:"llm"}),W=u.trim().toLowerCase(),X=(a,b="")=>!W||a.toLowerCase().includes(W)||String(b).toLowerCase().includes(W),Y=T.filter(a=>X(a.id,a.name)),_=V.filter(a=>X(a.id,a.name)),aa=R.map(a=>a.id).filter(a=>!p.includes(a)),ad=aa.filter(a=>!W||a.toLowerCase().includes(W));return(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border-subtle px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[p.length>0&&(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:G,children:"Active All"}),aa.length>0&&(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>F(aa),children:"Disable All"}),(v.length>0||e)&&ad.length>0&&(0,d.jsx)(i.$n,{size:"sm",variant:"primary",icon:s?"progress_activity":"play_arrow",onClick:()=>C(ad),disabled:s,className:s?"animate-pulse":"",children:s?"Testing...":`Test All (${ad.length})`})]}),(0,d.jsx)("div",{className:"sm:w-56",children:(0,d.jsx)(i.pd,{type:"search",placeholder:"Search models...",value:u,onChange:a=>M(a.target.value),className:"w-full"})})]}),(0,d.jsxs)("div",{className:"px-4 py-3",children:[j.Q2[a]?.capabilities?.toolUse===!1&&(0,d.jsxs)("div",{className:"mb-3 flex items-start gap-2 rounded-lg border border-warning/20 bg-warning/[0.04] px-3 py-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"info"}),(0,d.jsxs)("p",{className:"text-[11px] leading-relaxed text-text-muted",children:["Cookie-based provider — these models run through a browser chat endpoint and"," ",(0,d.jsx)("span",{className:"font-medium text-text-main",children:"cannot execute tool/function calls"}),"."," ","Smart Routing combos will exclude them from tool-calling pools and use them only for research intents."]})]}),!!t&&(0,d.jsx)("p",{className:"mb-3 break-words text-xs text-danger",children:t}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:[_.map(b=>(0,d.jsx)(Z,{model:{id:b.id,name:b.name},fullModel:`${g}/${b.id}`,alias:b.alias,copied:y,onCopy:A,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===b.source?K(b.id,"llm",f):I(b.alias)},testStatus:q[b.id],onTest:v.length>0||e?()=>B(b.id):void 0,isTesting:r.has(b.id),isCustom:!0,isFree:!1,caps:z(`${a}/${b.id}`)},`${b.source}-${b.fullModel}`)),Y.map(b=>{let c=`${f}/${b.id}`,h=`${a}/${b.id}`,i=Object.entries(m).find(([,a])=>a===c||a===h)?.[0];return(0,d.jsx)(Z,{model:b,fullModel:`${g}/${b.id}`,alias:i,copied:y,onCopy:A,onSetAlias:a=>H(b.id,a,f),onDeleteAlias:()=>I(i),testStatus:q[b.id],onTest:v.length>0||e?()=>B(b.id):void 0,isTesting:r.has(b.id),isFree:b.isFree,onDisable:()=>D(b.id),caps:z(`${a}/${b.id}`)},b.id)})]}),u.trim()&&0===Y.length&&0===_.length&&(0,d.jsxs)("p",{className:"w-full py-4 text-center text-sm text-text-muted",children:["No models match “",u,"”"]}),(0,d.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,d.jsxs)("button",{onClick:()=>N(!0),className:"flex items-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",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===a&&v.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:L,disabled:x,className:"flex items-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-info transition-colors hover:border-blue-500 hover:bg-blue-500/5 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:x?{animation:"spin 1s linear infinite"}:void 0,children:x?"progress_activity":"download"}),x?(0,n.Tl)("Fetching..."):(0,n.Tl)("Fetch Qoder Models")]})]}),w.length>0&&(O=new Set([...Object.values(m),...V.map(a=>a.fullModel)]),P=new Set(h.map(a=>a.id)),0===(Q=w.filter(a=>!O.has(`${f}/${a.id}`)&&!P.has(a.id))).length?null:(0,d.jsxs)("div",{className:"mt-3 w-full",children:[(0,d.jsx)("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-text-muted",children:"Suggested free models"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:Q.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await J(a.id,"llm",f)},className:"flex items-center gap-1 rounded-lg border border-border px-2.5 py-1.5 text-xs text-text-muted transition-colors hover:border-primary/40 hover:bg-primary/5 hover:text-primary",title:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),U.length>0&&(0,d.jsxs)("div",{className:"mt-3 w-full",children:[(0,d.jsxs)("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-text-muted",children:["Disabled (",U.length,")"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:U.map(a=>(0,d.jsxs)("button",{onClick:()=>E(a.id),className:"flex items-center gap-1 rounded-lg border border-dashed border-border px-2.5 py-1.5 text-xs text-text-muted transition-colors hover:border-primary/40 hover:bg-primary/5 hover:text-primary",title:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})]})}ab.propTypes={providerStorageAlias:q().string.isRequired,providerDisplayAlias:q().string.isRequired,modelAliases:q().object.isRequired,customModels:q().arrayOf(q().object),copied:q().string,onCopy:q().func.isRequired,onDeleteAlias:q().func.isRequired,onAddCustomModel:q().func.isRequired,onDeleteCustomModel:q().func.isRequired,connections:q().arrayOf(q().shape({id:q().string,isActive:q().bool})).isRequired,isAnthropic:q().bool};let ad={claude:"claudeAutoPing",codex:"codexAutoPing"};function ae(){let a=(0,f.useParams)(),b=(0,f.useRouter)(),c=a.id,{getCaps:g}=(0,m.y)(),{markSeen:p}=(0,z.P)("providers"),[q,r]=(0,e.useState)([]),[s,w]=(0,e.useState)(!0),[A,C]=(0,e.useState)(null),[E,F]=(0,e.useState)([]),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)(""),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(!1),[X,Y]=(0,e.useState)(null),[Z,$]=(0,e.useState)({}),[_,aa]=(0,e.useState)([]),[ab,ae]=(0,e.useState)(!1),[af,ag]=(0,e.useState)({}),[ah,ai]=(0,e.useState)(""),[aj,ak]=(0,e.useState)(()=>new Set),[al,am]=(0,e.useState)(""),[an,ao]=(0,e.useState)(!1),[ap,aq]=(0,e.useState)(!1),[ar,as]=(0,e.useState)([]),[at,au]=(0,e.useState)("__none__"),[av,aw]=(0,e.useState)(!1),[ax,ay]=(0,e.useState)(null),[az,aA]=(0,e.useState)(""),[aB,aC]=(0,e.useState)("auto"),[aD,aE]=(0,e.useState)({enabled:!1,connections:{}}),[aF,aG]=(0,e.useState)([]),[aH,aI]=(0,e.useState)([]),[aJ,aK]=(0,e.useState)([]),[aL,aM]=(0,e.useState)(null),[aN,aO]=(0,e.useState)(!1),[aP,aQ]=(0,e.useState)(!1),[aR,aS]=(0,e.useState)(!1),[aT,aU]=(0,e.useState)(null),[aV,aW]=(0,e.useState)({}),[aX,aY]=(0,e.useState)(null),aZ=(0,e.useRef)(!1),[a$,a_]=(0,e.useState)(!1),{copied:a0,copy:a1}=(0,l.C)(),a2=["1min","qwen-web"],a3=()=>{H(!0)},a4=()=>{a8||a2.includes(c)?a3():(N(""),L(!0))},a5=()=>{N(""),L(!0)},a6=A?{id:A.id,name:A.name||("anthropic-compatible"===A.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===A.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===A.type?"AC":"OC",apiType:A.apiType,baseUrl:A.baseUrl,type:A.type}:j.zN[c]||j.fg[c]||j.IS[c]||j.nJ[c]||j.br[c],a7=a6?.authModes||[],a8=(!!j.zN[c]||!!j.IS[c]||a7.includes("oauth"))&&a6?.hasOAuth!==!1,a9=!!j.fg[c]||a7.includes("apikey")||a6?.hasOAuth===!1,ba=!!j.IS[c]?.noAuth,bb=(0,k.KC)(c),bc=(0,j.wG)(c),bd=(0,j.mq)(c),be=(0,j.gb)(c),bf=bd||be,bg=!bf&&a8&&a9,bh="xai"===c?"Grok Build OAuth":"OAuth",bi="xai"===c?"xAI API Key":"API Key",bj=j.Q2[c]?.thinkingConfig||j.s9.extended,bk=bf?c:bc,bl=bf?A?.prefix||c:bc,bm=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bk)}`,{cache:"no-store"}),b=await a.json();a.ok&&aK(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bk]),bn=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bk,ids:[a]})})).ok&&await bm()}catch(a){console.log("Error disabling model:",a)}},bo=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bk)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bm()}catch(a){console.log("Error enabling model:",a)}},bp=async a=>{a.length&&aM({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aM(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bk,ids:a})})).ok&&await bm()}catch(a){console.log("Error disabling all models:",a)}}})},bq=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bk)}`,{method:"DELETE"})).ok&&await bm()}catch(a){console.log("Error enabling all models:",a)}},br=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&$(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bs=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&aa(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),bt=(0,e.useCallback)(async()=>{try{let[a,b,d,e]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),f=await a.json(),g=await b.json(),h=await d.json(),i=e.ok?await e.json():{};if(a.ok){let a=(f.connections||[]).filter(a=>a.provider===c);r(a)}d.ok&&F(h.proxyPools||[]);let j=(i.providerStrategies||{})[c]||{};ay(j.fallbackStrategy||null),aA(null!=j.stickyRoundRobinLimit?String(j.stickyRoundRobinLimit):"1");let k=(i.providerThinking||{})[c]||{};aC(k.mode||"auto");let l=ad[c],m=l&&i[l]||{};if(aE({enabled:!0===m.enabled,connections:m.connections||{}}),b.ok){let a=(g.nodes||[]).find(a=>a.id===c)||null;if(!a&&bf)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===c)||null))break}C(a)}}catch(a){console.log("Error fetching connections:",a)}finally{w(!1)}},[c,bf]),bu=async a=>{try{let b=await fetch(`/api/provider-nodes/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),d=await b.json();b.ok&&(C(d.node),await bt(),T(!1))}catch(a){console.log("Error updating provider node:",a)}},bv=async(a,b)=>{try{let d=await fetch("/api/settings",{cache:"no-store"}),e=(d.ok?await d.json():{}).providerStrategies||{},f={};a&&(f.fallbackStrategy=a),"round-robin"===a&&""!==b&&(f.stickyRoundRobinLimit=Number(b)||3);let g={...e};0===Object.keys(f).length?delete g[c]:g[c]=f,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:g})})}catch(a){console.log("Error saving provider strategy:",a)}},bw=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),d={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?d[c]={mode:a}:delete d[c],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:d})})}catch(a){console.log("Error saving thinking config:",a)}},bx=async a=>{let b=ad[c];if(b){aE(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},by=async(a,b,c=bc)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await br();else{let b=await a.json();alert(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bz=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await br()}catch(a){console.log("Error deleting alias:",a)}},bA=async(a,b="llm",c=bk)=>{try{let d=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b})});if(d.ok)await bs();else{let a=await d.json();alert(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},bB=async(a,b="llm",c=bk)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bs()}catch(a){console.log("Error deleting custom model:",a)}},bC=async()=>{if(a$)return;let a=q.find(a=>!1!==a.isActive);if(!a)return void alert((0,n.Tl)("Please add an active Qoder connection first"));a_(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,n.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,n.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;if(!b)continue;let c=b.replace(/^qoder\//,"");_.some(a=>a.providerAlias===bk&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values(Z).includes(`${bk}/${c}`)||(await bA(c,"llm",bk),e+=1)}0===e?alert((0,n.Tl)("All models already exist, no new models added")):alert((0,n.Tl)("Successfully added")+` ${e} `+(0,n.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),alert((0,n.Tl)("Error fetching models")+": "+a.message)}finally{a_(!1)}},bD=async()=>{if(aP||0===q.length)return;let a=Object.fromEntries(q.map(a=>[a.id,{state:"queued",error:null}]));aZ.current=!1,aQ(!0),aS(!1),aU(null),aW(a),aY({total:q.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<q.length;a+=1){if(aZ.current){aY({total:q.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=q[a];aU(d.id),aW(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,aW(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,aW(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}aY({total:q.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<q.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{aU(null),aQ(!1),aS(!1),aZ.current=!1}},bE=async a=>{aM({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aM(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&r(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bF=()=>{bt(),H(!1)},bG=async a=>{N("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:c,...a})}),d=null;try{d=await b.json()}catch{d=null}if(b.ok){await bt(),L(!1);return}N(d?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),N("Failed to save connection")}},bH=async a=>{try{(await fetch(`/api/providers/${X.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bt(),R(!1))}catch(a){console.log("Error updating connection:",a)}},bI=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&r(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},bJ=async(a,b)=>{let c=[...q];[c[a],c[b]]=[c[b],c[a]],r(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){console.log("Error swapping priority:",a),await bt()}},bK=q.filter(a=>ar.includes(a.id)),bL=q.length>0&&ar.length===q.length,bM=(()=>{if(0===bK.length)return"";let a=new Set(bK.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return"All selected currently unbound";let c=E.find(a=>a.id===b);return`All selected currently bound to ${c?.name||b}`}return"Selected connections have mixed proxy bindings"})(),bN=async a=>{aw(!0);try{let b=0;for(let{connectionId:c,proxyPoolId:d}of a)try{(await fetch(`/api/providers/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:d})})).ok||(b+=1)}catch(a){console.log("Error applying proxy for",c,a),b+=1}b>0&&alert(`Updated with ${b} failed request(s).`),await bt(),V(!1)}finally{aw(!1)}},bO=E.filter(a=>!0===a.isActive),bP=async a=>{if(!aj.has(a)){ak(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bk}/${a}`})}),c=await b.json();ag(b=>({...b,[a]:c.ok?"ok":"error"})),ai(c.ok?"":c.error||"Model not reachable")}catch{ag(b=>({...b,[a]:"error"})),ai("Network error")}finally{ak(b=>{let c=new Set(b);return c.delete(a),c})}}},bQ=async a=>{an||0===a.length||(ao(!0),ai(""),await Promise.all(a.map(a=>bP(a))),ao(!1))};if(s)return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,d.jsx)(i.Qv,{}),(0,d.jsx)(i.Qv,{})]});if(!a6)return(0,d.jsxs)("div",{className:"py-20 text-center",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"mt-4 inline-block text-primary",children:"Back to Providers"})]});let bR=(0,o.k)(a6.id,a6.apiType);return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,d.jsx)(B,{providerInfo:a6,providerId:c,connections:q,modelCount:bb.length,headerIconPath:bR,headerImgError:ab,setHeaderImgError:ae}),"kimi-desktop"===c&&(0,d.jsx)(i.P1,{}),bf&&A&&(0,d.jsx)(i.Zp,{children:(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:be?"Anthropic Compatible":"OpenAI Compatible"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[be?"Messages API":"responses"===A.apiType?"Responses API":"Chat Completions"," \xb7 ",(A.baseUrl||"").replace(/\/$/,""),"/",be?"messages":"responses"===A.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>{N(""),L(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>T(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:()=>{aM({title:"Delete Compatible Node",message:`Delete this ${be?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aM(null);try{(await fetch(`/api/provider-nodes/${c}`,{method:"DELETE"})).ok&&b.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),(0,d.jsx)(D,{title:"Connections",icon:"cable",count:q.length,defaultExpanded:!0,children:(0,d.jsx)(W,{providerId:c,isOAuth:a8,isCompatible:bf,isFreeNoAuth:ba,hasDualAuthModes:bg,oauthConnectionLabel:bh,apiKeyConnectionLabel:bi,thinkingConfig:bj,AUTO_PING_SETTINGS_KEYS:ad,connections:q,proxyPools:E,selectedConnectionIds:ar,selectedConnections:bK,allSelected:bL,oneByOneRunning:aP,oneByOneStopping:aR,oneByOneCurrentConnectionId:aT,oneByOneResults:aV,oneByOneSummary:aX,providerStrategy:ax,providerStickyLimit:az,thinkingMode:aB,autoPing:aD,showBulkProxyModal:U,bulkUpdatingProxy:av,activePools:bO,selectedProxySummary:bM,handleSwapPriority:bJ,handleUpdateConnectionStatus:bI,handleDelete:bE,handleBulkDelete:()=>{let a=ar.length;0!==a&&aM({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aM(null);let a=0,b=[...ar];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}r(a=>a.filter(a=>!b.includes(a.id))),as([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},handleRunOneByOneTest:bD,handleStopOneByOneTest:()=>{aP&&(aZ.current=!0,aS(!0))},handleRoundRobinToggle:a=>{let b=a?"round-robin":null,c=a?az||"1":az;a&&!az&&aA("1"),ay(b),bv(b,c)},handleStickyLimitChange:a=>{aA(a),bv("round-robin",a)},handleThinkingModeChange:a=>{aC(a),bw(a)},handleAutoPingConnection:(a,b)=>{bx({...aD,connections:{...aD.connections,[a]:b}})},triggerOAuthConnection:a4,triggerApiKeyConnection:a5,triggerAddConnection:()=>{a8||a2.includes(c)?a4():a5()},toggleSelectConnection:a=>{as(b=>b.includes(a)?b.filter(b=>b!==a):[...b,a])},toggleSelectAllConnections:()=>{bL?as([]):as(q.map(a=>a.id))},openBulkProxyModal:()=>{if(0===bK.length)return;let a=[...new Set(bK.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"))];au(1===a.length?a[0]:"__none__"),V(!0)},closeBulkProxyModal:()=>{av||V(!1)},applyProxyAssignments:bN,handleApplySinglePool:a=>bN(q.map(b=>({connectionId:b.id,proxyPoolId:a}))),handleApplyOneToOne:()=>{let a=E.filter(a=>!0===a.isActive);return 0===a.length?void alert("No active proxy pools available."):bN(q.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},fetchConnections:bt,setSelectedConnection:Y,setShowEditModal:R,setShowBulkProxyModal:V,setShowIFlowCookieModal:J,setShowBulkImportCodex:P,setConnections:r})}),(0,d.jsx)(D,{title:"Health",icon:"monitoring",defaultExpanded:!1,children:(0,d.jsx)("div",{className:"px-4 py-3",children:(0,d.jsx)(y,{providerId:c})})}),(0,d.jsx)(D,{title:"Models",icon:"apps",count:bb.length,defaultExpanded:!0,children:(0,d.jsx)(ac,{providerId:c,isCompatible:bf,isAnthropicCompatible:be,isFreeNoAuth:ba,providerStorageAlias:bk,providerDisplayAlias:bl,models:bb,kiloFreeModels:aH,modelAliases:Z,customModels:_,disabledModelIds:aJ,modelTestResults:af,testingModelIds:aj,testingAllModels:an,modelsTestError:ah,modelSearchQuery:al,connections:q,suggestedModels:aF,importingQoderModels:a$,copied:a0,getCaps:g,copy:a1,handleTestModel:bP,handleTestAllModels:bQ,handleDisableModel:bn,handleEnableModel:bo,handleDisableAll:bp,handleEnableAll:bq,handleSetAlias:by,handleDeleteAlias:bz,handleAddCustomModel:bA,handleDeleteCustomModel:bB,handleImportQoderModels:bC,setModelSearchQuery:am,setShowAddCustomModel:aq})}),"kiro"===c?(0,d.jsx)(i.Mh,{isOpen:G,providerInfo:a6,onSuccess:bF,onClose:()=>H(!1)}):"cursor"===c?(0,d.jsx)(i.G9,{isOpen:G,onSuccess:bF,onClose:()=>H(!1)}):"1min"===c?(0,d.jsx)(i.CG,{isOpen:G,onSuccess:bF,onClose:()=>H(!1)}):"qwen-web"===c?(0,d.jsx)(i.F8,{isOpen:G,onSuccess:bF,onClose:()=>H(!1)}):"wp-studio"===c?(0,d.jsx)(i.V1,{isOpen:G,onSuccess:bF,onClose:()=>H(!1)}):"zed"===c?(0,d.jsx)(i.TE,{isOpen:G,onSuccess:bF,onClose:()=>H(!1)}):"kimi-desktop"===c?(0,d.jsx)(i.QT,{isOpen:G,onSuccess:bF,onClose:()=>H(!1)}):"gitlab"===c?(0,d.jsx)(i.vj,{isOpen:G,providerInfo:a6,onSuccess:bF,onClose:()=>H(!1)}):(0,d.jsx)(i.LF,{isOpen:G,provider:c,providerInfo:a6,onSuccess:bF,onClose:()=>H(!1)}),"iflow"===c&&(0,d.jsx)(i.vE,{isOpen:I,onSuccess:()=>{bt(),J(!1)},onClose:()=>J(!1)}),(0,d.jsx)(t,{isOpen:K,provider:c,providerName:a6.name,isCompatible:bf,isAnthropic:be,authType:a6?.authType,authHint:a6?.authHint,website:a6?.website,proxyPools:E,error:M,onSave:bG,onBulkDone:bt,onClose:()=>{N(""),L(!1)}}),(0,d.jsx)(i.wI,{isOpen:Q,connection:X,proxyPools:E,onSave:bH,onClose:()=>R(!1)}),bf&&(0,d.jsx)(u,{isOpen:S,node:A,onSave:bu,onClose:()=>T(!1),isAnthropic:be}),!bf&&(0,d.jsx)(v,{isOpen:ap,providerAlias:bk,providerDisplayAlias:bl,onSave:async a=>{await bA(a,"llm",bk),aq(!1)},onClose:()=>aq(!1)}),"codex"===c&&(0,d.jsx)(x,{isOpen:O,onClose:()=>P(!1),onSuccess:bt}),(0,d.jsx)(i.uo,{isOpen:aN,onClose:()=>aO(!1),onConfirm:()=>{(aO(!1),a8)?a3():a5()},title:"Risk Notice",message:a6?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(i.uo,{isOpen:!!aL,onClose:()=>aM(null),onConfirm:aL?.onConfirm,title:aL?.title||"Confirm",message:aL?.message,variant:"danger"})]})}},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77183:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(14965),o=c(63747),p=c(24235),q=c(23938),r=c(261),s=c(66758),t=c(77243),u=c(26713),v=c(37527),w=c(22820),x=c(88216),y=c(47929),z=c(79551),A=c(71797),B=c(89125),C=c(86439),D=c(77068),E=c(27269),F=c(37525),G=c(61287),H=c(81494),I=c(70722),J=c(70753),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,93110)),"/home/runner/work/ExtremeRouter/ExtremeRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,30508)),"/home/runner/work/ExtremeRouter/ExtremeRouter/src/app/(dashboard)/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,50385)),"/home/runner/work/ExtremeRouter/ExtremeRouter/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next-cli-build",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/(dashboard)/dashboard/providers/[id]/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(95726).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
11
+ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},80099:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},83997:a=>{"use strict";a.exports=require("tty")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/ExtremeRouter/ExtremeRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/ExtremeRouter/ExtremeRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7774,1260,6935,4013,5573,319,6482,8e3,6591,1220,2436,5050,5604,7765,8266,3552,212,809,4957,6007,4109,885,9365,5330,8895,4046,6182,6457,8271,8802,6777,412,3520],()=>b(b.s=77183));module.exports=c})();