@techysy/10router 1.0.3 → 1.0.4

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 (924) hide show
  1. package/README.md +9 -0
  2. package/README.zh-CN.md +2 -0
  3. package/app/.next-cli-build/BUILD_ID +1 -1
  4. package/app/.next-cli-build/app-path-routes-manifest.json +5 -4
  5. package/app/.next-cli-build/build-manifest.json +2 -2
  6. package/app/.next-cli-build/prerender-manifest.json +17 -17
  7. package/app/.next-cli-build/routes-manifest.json +6 -0
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  78. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  86. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  87. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  88. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  89. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  90. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  91. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
  92. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  93. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +2 -2
  106. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  118. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  124. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  136. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/providers/[id]/json-models/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/providers/[id]/json-models/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  266. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  268. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  272. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  274. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  276. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  278. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  280. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  282. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  284. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  286. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  288. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -0
  290. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -0
  291. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route_client-reference-manifest.js +1 -0
  292. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  307. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  329. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  403. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  405. package/app/.next-cli-build/server/app/callback.html +1 -1
  406. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  407. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  408. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  409. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  410. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  411. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  412. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  413. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  414. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  416. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  417. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
  418. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  419. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  420. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  421. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  422. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
  423. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  424. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  425. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  427. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  428. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  429. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  430. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  431. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  432. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
  433. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  434. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  435. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  436. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  437. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
  438. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  439. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  440. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  442. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
  443. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  444. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  445. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  447. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
  448. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  449. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  450. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  452. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
  453. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  454. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  455. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  456. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  457. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
  458. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  459. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  460. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  461. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
  462. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
  463. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
  464. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  465. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  466. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  467. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
  468. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  469. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  470. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  471. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  474. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  475. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  476. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  478. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  479. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  480. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
  481. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  482. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  483. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  485. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
  486. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  487. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  488. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  489. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  490. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
  491. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  492. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  493. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  495. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
  496. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  497. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  498. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  499. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  500. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  501. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  502. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  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 +5 -5
  507. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  508. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  509. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  510. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  511. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  512. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  513. package/app/.next-cli-build/server/app/landing.html +1 -1
  514. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  515. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  516. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  517. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +6 -6
  518. package/app/.next-cli-build/server/app/login/page.js +1 -1
  519. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  520. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  521. package/app/.next-cli-build/server/app/login.html +1 -1
  522. package/app/.next-cli-build/server/app/login.rsc +6 -6
  523. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  524. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
  526. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  527. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  528. package/app/.next-cli-build/server/app/page.js +1 -1
  529. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  530. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  531. package/app/.next-cli-build/server/app-paths-manifest.json +5 -4
  532. package/app/.next-cli-build/server/chunks/112.js +1 -1
  533. package/app/.next-cli-build/server/chunks/1129.js +4 -0
  534. package/app/.next-cli-build/server/chunks/1377.js +1 -1
  535. package/app/.next-cli-build/server/chunks/2283.js +1 -1
  536. package/app/.next-cli-build/server/chunks/318.js +1 -1
  537. package/app/.next-cli-build/server/chunks/3212.js +1 -1
  538. package/app/.next-cli-build/server/chunks/4037.js +1 -1
  539. package/app/.next-cli-build/server/chunks/412.js +5 -5
  540. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  541. package/app/.next-cli-build/server/chunks/4452.js +1 -0
  542. package/app/.next-cli-build/server/chunks/5448.js +13 -0
  543. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  544. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  545. package/app/.next-cli-build/server/chunks/5781.js +6 -0
  546. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  547. package/app/.next-cli-build/server/chunks/615.js +1 -1
  548. package/app/.next-cli-build/server/chunks/6832.js +1 -1
  549. package/app/.next-cli-build/server/chunks/7419.js +1 -0
  550. package/app/.next-cli-build/server/chunks/7914.js +1 -0
  551. package/app/.next-cli-build/server/chunks/8123.js +1 -0
  552. package/app/.next-cli-build/server/chunks/8185.js +1 -1
  553. package/app/.next-cli-build/server/chunks/827.js +1 -1
  554. package/app/.next-cli-build/server/chunks/869.js +1 -1
  555. package/app/.next-cli-build/server/chunks/8847.js +1 -1
  556. package/app/.next-cli-build/server/chunks/8895.js +2 -2
  557. package/app/.next-cli-build/server/chunks/8936.js +1 -0
  558. package/app/.next-cli-build/server/chunks/915.js +1 -1
  559. package/app/.next-cli-build/server/chunks/9703.js +17 -0
  560. package/app/.next-cli-build/server/instrumentation.js +1 -1
  561. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  562. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  563. package/app/.next-cli-build/server/middleware.js +4 -4
  564. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  565. package/app/.next-cli-build/server/pages/404.html +1 -1
  566. package/app/.next-cli-build/server/pages/500.html +1 -1
  567. package/app/.next-cli-build/static/AFIMSU-vh_yXimJozqVPF/_buildManifest.js +1 -0
  568. package/app/.next-cli-build/static/chunks/1321-ba0a9ba95063bed9.js +1 -0
  569. package/app/.next-cli-build/static/chunks/5497-17b531f18a6a3a3c.js +7 -0
  570. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-1049c48c632926aa.js +1 -0
  571. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-90106fd2380ae2f8.js +1 -0
  572. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-928e8fa95cccfc03.js +14 -0
  573. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-bccad1d38f846812.js +1 -0
  574. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-06eae6b008e60652.js → page-06dd8e4a0a6a89ac.js} +1 -1
  575. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-19ac7c0fa9dd6792.js +1 -0
  576. package/app/.next-cli-build/static/chunks/app/_global-error/page-7c4d396dcbcd6a83.js +1 -0
  577. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-7c4d396dcbcd6a83.js +1 -0
  578. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-7c4d396dcbcd6a83.js +1 -0
  579. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-7c4d396dcbcd6a83.js +1 -0
  580. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-7c4d396dcbcd6a83.js +1 -0
  581. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-7c4d396dcbcd6a83.js +1 -0
  582. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-7c4d396dcbcd6a83.js +1 -0
  583. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-7c4d396dcbcd6a83.js +1 -0
  584. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-7c4d396dcbcd6a83.js +1 -0
  585. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-7c4d396dcbcd6a83.js +1 -0
  586. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-7c4d396dcbcd6a83.js +1 -0
  587. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-7c4d396dcbcd6a83.js +1 -0
  588. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-7c4d396dcbcd6a83.js +1 -0
  589. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-7c4d396dcbcd6a83.js +1 -0
  590. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-7c4d396dcbcd6a83.js +1 -0
  591. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-7c4d396dcbcd6a83.js +1 -0
  592. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-7c4d396dcbcd6a83.js +1 -0
  593. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-7c4d396dcbcd6a83.js +1 -0
  594. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-7c4d396dcbcd6a83.js +1 -0
  595. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-7c4d396dcbcd6a83.js +1 -0
  596. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-7c4d396dcbcd6a83.js +1 -0
  597. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-7c4d396dcbcd6a83.js +1 -0
  598. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-7c4d396dcbcd6a83.js +1 -0
  599. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-7c4d396dcbcd6a83.js +1 -0
  600. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-7c4d396dcbcd6a83.js +1 -0
  601. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-7c4d396dcbcd6a83.js +1 -0
  602. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-7c4d396dcbcd6a83.js +1 -0
  603. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-7c4d396dcbcd6a83.js +1 -0
  604. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-7c4d396dcbcd6a83.js +1 -0
  605. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-7c4d396dcbcd6a83.js +1 -0
  606. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-7c4d396dcbcd6a83.js +1 -0
  607. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-7c4d396dcbcd6a83.js +1 -0
  608. package/app/.next-cli-build/static/chunks/app/api/combos/route-7c4d396dcbcd6a83.js +1 -0
  609. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-7c4d396dcbcd6a83.js +1 -0
  610. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-7c4d396dcbcd6a83.js +1 -0
  611. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-7c4d396dcbcd6a83.js +1 -0
  612. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-7c4d396dcbcd6a83.js +1 -0
  613. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-7c4d396dcbcd6a83.js +1 -0
  614. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-7c4d396dcbcd6a83.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/api/health/route-7c4d396dcbcd6a83.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/api/init/route-7c4d396dcbcd6a83.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-7c4d396dcbcd6a83.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/api/keys/route-7c4d396dcbcd6a83.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/api/locale/route-7c4d396dcbcd6a83.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-7c4d396dcbcd6a83.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-7c4d396dcbcd6a83.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-7c4d396dcbcd6a83.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-7c4d396dcbcd6a83.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-7c4d396dcbcd6a83.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-7c4d396dcbcd6a83.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-7c4d396dcbcd6a83.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-7c4d396dcbcd6a83.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-7c4d396dcbcd6a83.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-7c4d396dcbcd6a83.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-7c4d396dcbcd6a83.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/models/route-7c4d396dcbcd6a83.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/models/test/route-7c4d396dcbcd6a83.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-7c4d396dcbcd6a83.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-7c4d396dcbcd6a83.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-7c4d396dcbcd6a83.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-7c4d396dcbcd6a83.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-7c4d396dcbcd6a83.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-7c4d396dcbcd6a83.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-7c4d396dcbcd6a83.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-7c4d396dcbcd6a83.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-7c4d396dcbcd6a83.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-7c4d396dcbcd6a83.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-7c4d396dcbcd6a83.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-7c4d396dcbcd6a83.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-7c4d396dcbcd6a83.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/pricing/route-7c4d396dcbcd6a83.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-7c4d396dcbcd6a83.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-7c4d396dcbcd6a83.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-7c4d396dcbcd6a83.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/json-models/route-7c4d396dcbcd6a83.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-7c4d396dcbcd6a83.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-7c4d396dcbcd6a83.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-7c4d396dcbcd6a83.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-7c4d396dcbcd6a83.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-7c4d396dcbcd6a83.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-7c4d396dcbcd6a83.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/providers/route-7c4d396dcbcd6a83.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-7c4d396dcbcd6a83.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-7c4d396dcbcd6a83.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-7c4d396dcbcd6a83.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-7c4d396dcbcd6a83.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-7c4d396dcbcd6a83.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-7c4d396dcbcd6a83.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-7c4d396dcbcd6a83.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-7c4d396dcbcd6a83.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-7c4d396dcbcd6a83.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-7c4d396dcbcd6a83.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-7c4d396dcbcd6a83.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-7c4d396dcbcd6a83.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-7c4d396dcbcd6a83.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-7c4d396dcbcd6a83.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-7c4d396dcbcd6a83.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-7c4d396dcbcd6a83.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-7c4d396dcbcd6a83.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-7c4d396dcbcd6a83.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-7c4d396dcbcd6a83.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-7c4d396dcbcd6a83.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-7c4d396dcbcd6a83.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/settings/route-7c4d396dcbcd6a83.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-7c4d396dcbcd6a83.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/tags/route-7c4d396dcbcd6a83.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-7c4d396dcbcd6a83.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-7c4d396dcbcd6a83.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-7c4d396dcbcd6a83.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-7c4d396dcbcd6a83.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-7c4d396dcbcd6a83.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-7c4d396dcbcd6a83.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-7c4d396dcbcd6a83.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-7c4d396dcbcd6a83.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-7c4d396dcbcd6a83.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-7c4d396dcbcd6a83.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-7c4d396dcbcd6a83.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-7c4d396dcbcd6a83.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-7c4d396dcbcd6a83.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-7c4d396dcbcd6a83.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-7c4d396dcbcd6a83.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-7c4d396dcbcd6a83.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-7c4d396dcbcd6a83.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-7c4d396dcbcd6a83.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-7c4d396dcbcd6a83.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-7c4d396dcbcd6a83.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-7c4d396dcbcd6a83.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-7c4d396dcbcd6a83.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-7c4d396dcbcd6a83.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-7c4d396dcbcd6a83.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-7c4d396dcbcd6a83.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-7c4d396dcbcd6a83.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-7c4d396dcbcd6a83.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-7c4d396dcbcd6a83.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-7c4d396dcbcd6a83.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-7c4d396dcbcd6a83.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-7c4d396dcbcd6a83.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-7c4d396dcbcd6a83.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-7c4d396dcbcd6a83.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-7c4d396dcbcd6a83.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-7c4d396dcbcd6a83.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-7c4d396dcbcd6a83.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-7c4d396dcbcd6a83.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/v1/route-7c4d396dcbcd6a83.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-7c4d396dcbcd6a83.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-7c4d396dcbcd6a83.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-7c4d396dcbcd6a83.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-7c4d396dcbcd6a83.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-7c4d396dcbcd6a83.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-7c4d396dcbcd6a83.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-7c4d396dcbcd6a83.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-7c4d396dcbcd6a83.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/version/route-7c4d396dcbcd6a83.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-7c4d396dcbcd6a83.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/version/update/route-7c4d396dcbcd6a83.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/landing/page-abe5fbd51346146f.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/layout-034acae46f56c420.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-7c4d396dcbcd6a83.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/page-7c4d396dcbcd6a83.js +1 -0
  735. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-7c4d396dcbcd6a83.js +1 -0
  736. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-7c4d396dcbcd6a83.js +1 -0
  737. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-7c4d396dcbcd6a83.js +1 -0
  738. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-7c4d396dcbcd6a83.js +1 -0
  739. package/app/.next-cli-build/static/css/744832b960884f40.css +1 -0
  740. package/app/custom-server.js +28 -0
  741. package/app/package.json +66 -66
  742. package/app/public/i18n/changelog/en.md +82 -0
  743. package/app/public/i18n/changelog/zh-CN.md +82 -0
  744. package/app/public/i18n/changelog/zh-TW.md +82 -0
  745. package/app/public/i18n/literals/zh-CN.json +40 -2
  746. package/app/public/i18n/literals/zh-TW.json +74 -2
  747. package/app/public/providers/gorouter.svg +1 -0
  748. package/app/public/providers/tabiauto.svg +1 -0
  749. package/package.json +52 -52
  750. package/app/.next-cli-build/server/chunks/2025.js +0 -1
  751. package/app/.next-cli-build/server/chunks/4386.js +0 -1
  752. package/app/.next-cli-build/server/chunks/5247.js +0 -21
  753. package/app/.next-cli-build/static/chunks/1321-7ef9eda3d4dedfc6.js +0 -1
  754. package/app/.next-cli-build/static/chunks/5497-5f24f11ab3e1b1e8.js +0 -7
  755. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-4c2913c05df65ebd.js +0 -1
  756. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-2c5b3e38eb81630b.js +0 -1
  757. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-a87782e5ec684a62.js +0 -14
  758. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-e8de8502d304d4b9.js +0 -1
  759. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-96efba495d45a263.js +0 -1
  760. package/app/.next-cli-build/static/chunks/app/_global-error/page-83c347ffe7fd763e.js +0 -1
  761. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-83c347ffe7fd763e.js +0 -1
  762. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-83c347ffe7fd763e.js +0 -1
  763. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-83c347ffe7fd763e.js +0 -1
  764. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-83c347ffe7fd763e.js +0 -1
  765. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-83c347ffe7fd763e.js +0 -1
  766. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-83c347ffe7fd763e.js +0 -1
  767. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-83c347ffe7fd763e.js +0 -1
  768. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-83c347ffe7fd763e.js +0 -1
  769. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-83c347ffe7fd763e.js +0 -1
  770. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-83c347ffe7fd763e.js +0 -1
  771. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-83c347ffe7fd763e.js +0 -1
  772. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-83c347ffe7fd763e.js +0 -1
  773. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-83c347ffe7fd763e.js +0 -1
  774. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-83c347ffe7fd763e.js +0 -1
  775. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-83c347ffe7fd763e.js +0 -1
  776. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-83c347ffe7fd763e.js +0 -1
  777. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-83c347ffe7fd763e.js +0 -1
  778. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-83c347ffe7fd763e.js +0 -1
  779. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-83c347ffe7fd763e.js +0 -1
  780. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-83c347ffe7fd763e.js +0 -1
  781. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-83c347ffe7fd763e.js +0 -1
  782. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-83c347ffe7fd763e.js +0 -1
  783. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-83c347ffe7fd763e.js +0 -1
  784. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-83c347ffe7fd763e.js +0 -1
  785. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-83c347ffe7fd763e.js +0 -1
  786. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-83c347ffe7fd763e.js +0 -1
  787. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-83c347ffe7fd763e.js +0 -1
  788. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-83c347ffe7fd763e.js +0 -1
  789. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-83c347ffe7fd763e.js +0 -1
  790. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-83c347ffe7fd763e.js +0 -1
  791. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-83c347ffe7fd763e.js +0 -1
  792. package/app/.next-cli-build/static/chunks/app/api/combos/route-83c347ffe7fd763e.js +0 -1
  793. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-83c347ffe7fd763e.js +0 -1
  794. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-83c347ffe7fd763e.js +0 -1
  795. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-83c347ffe7fd763e.js +0 -1
  796. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-83c347ffe7fd763e.js +0 -1
  797. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-83c347ffe7fd763e.js +0 -1
  798. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-83c347ffe7fd763e.js +0 -1
  799. package/app/.next-cli-build/static/chunks/app/api/health/route-83c347ffe7fd763e.js +0 -1
  800. package/app/.next-cli-build/static/chunks/app/api/init/route-83c347ffe7fd763e.js +0 -1
  801. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-83c347ffe7fd763e.js +0 -1
  802. package/app/.next-cli-build/static/chunks/app/api/keys/route-83c347ffe7fd763e.js +0 -1
  803. package/app/.next-cli-build/static/chunks/app/api/locale/route-83c347ffe7fd763e.js +0 -1
  804. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-83c347ffe7fd763e.js +0 -1
  805. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-83c347ffe7fd763e.js +0 -1
  806. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-83c347ffe7fd763e.js +0 -1
  807. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-83c347ffe7fd763e.js +0 -1
  808. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-83c347ffe7fd763e.js +0 -1
  809. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-83c347ffe7fd763e.js +0 -1
  810. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-83c347ffe7fd763e.js +0 -1
  811. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-83c347ffe7fd763e.js +0 -1
  812. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-83c347ffe7fd763e.js +0 -1
  813. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-83c347ffe7fd763e.js +0 -1
  814. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-83c347ffe7fd763e.js +0 -1
  815. package/app/.next-cli-build/static/chunks/app/api/models/route-83c347ffe7fd763e.js +0 -1
  816. package/app/.next-cli-build/static/chunks/app/api/models/test/route-83c347ffe7fd763e.js +0 -1
  817. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-83c347ffe7fd763e.js +0 -1
  818. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-83c347ffe7fd763e.js +0 -1
  819. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-83c347ffe7fd763e.js +0 -1
  820. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-83c347ffe7fd763e.js +0 -1
  821. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-83c347ffe7fd763e.js +0 -1
  822. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-83c347ffe7fd763e.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-83c347ffe7fd763e.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-83c347ffe7fd763e.js +0 -1
  825. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-83c347ffe7fd763e.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-83c347ffe7fd763e.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-83c347ffe7fd763e.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-83c347ffe7fd763e.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-83c347ffe7fd763e.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/api/pricing/route-83c347ffe7fd763e.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-83c347ffe7fd763e.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-83c347ffe7fd763e.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-83c347ffe7fd763e.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/json-models/route-83c347ffe7fd763e.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-83c347ffe7fd763e.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-83c347ffe7fd763e.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-83c347ffe7fd763e.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-83c347ffe7fd763e.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-83c347ffe7fd763e.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-83c347ffe7fd763e.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/providers/route-83c347ffe7fd763e.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-83c347ffe7fd763e.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-83c347ffe7fd763e.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-83c347ffe7fd763e.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-83c347ffe7fd763e.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-83c347ffe7fd763e.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-83c347ffe7fd763e.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-83c347ffe7fd763e.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-83c347ffe7fd763e.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-83c347ffe7fd763e.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-83c347ffe7fd763e.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-83c347ffe7fd763e.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-83c347ffe7fd763e.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-83c347ffe7fd763e.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-83c347ffe7fd763e.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-83c347ffe7fd763e.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-83c347ffe7fd763e.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-83c347ffe7fd763e.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-83c347ffe7fd763e.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-83c347ffe7fd763e.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-83c347ffe7fd763e.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/settings/route-83c347ffe7fd763e.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-83c347ffe7fd763e.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/tags/route-83c347ffe7fd763e.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-83c347ffe7fd763e.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-83c347ffe7fd763e.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-83c347ffe7fd763e.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-83c347ffe7fd763e.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-83c347ffe7fd763e.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-83c347ffe7fd763e.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-83c347ffe7fd763e.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-83c347ffe7fd763e.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-83c347ffe7fd763e.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-83c347ffe7fd763e.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-83c347ffe7fd763e.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-83c347ffe7fd763e.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-83c347ffe7fd763e.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-83c347ffe7fd763e.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-83c347ffe7fd763e.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-83c347ffe7fd763e.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-83c347ffe7fd763e.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-83c347ffe7fd763e.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-83c347ffe7fd763e.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-83c347ffe7fd763e.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-83c347ffe7fd763e.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-83c347ffe7fd763e.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-83c347ffe7fd763e.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-83c347ffe7fd763e.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-83c347ffe7fd763e.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-83c347ffe7fd763e.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-83c347ffe7fd763e.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-83c347ffe7fd763e.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-83c347ffe7fd763e.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-83c347ffe7fd763e.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-83c347ffe7fd763e.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-83c347ffe7fd763e.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-83c347ffe7fd763e.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-83c347ffe7fd763e.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-83c347ffe7fd763e.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-83c347ffe7fd763e.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-83c347ffe7fd763e.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/v1/route-83c347ffe7fd763e.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-83c347ffe7fd763e.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-83c347ffe7fd763e.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-83c347ffe7fd763e.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-83c347ffe7fd763e.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-83c347ffe7fd763e.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-83c347ffe7fd763e.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-83c347ffe7fd763e.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-83c347ffe7fd763e.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/version/route-83c347ffe7fd763e.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-83c347ffe7fd763e.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/version/update/route-83c347ffe7fd763e.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/landing/page-aff2214a6b8b2806.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/layout-1c3c7f60d8aa941b.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-83c347ffe7fd763e.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/page-83c347ffe7fd763e.js +0 -1
  918. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-83c347ffe7fd763e.js +0 -1
  919. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-83c347ffe7fd763e.js +0 -1
  920. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-83c347ffe7fd763e.js +0 -1
  921. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-83c347ffe7fd763e.js +0 -1
  922. package/app/.next-cli-build/static/css/97ee7865cf5a1a93.css +0 -1
  923. package/app/.next-cli-build/static/gWuzsY77U7qp3_zxV6Ar9/_buildManifest.js +0 -1
  924. /package/app/.next-cli-build/static/{gWuzsY77U7qp3_zxV6Ar9 → AFIMSU-vh_yXimJozqVPF}/_ssgManifest.js +0 -0
@@ -1,14 +1,14 @@
1
- (()=>{var a={};a.id=2134,a.ids=[2134],a.modules={643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},6069:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>Q});var d=c(48249),e=c(67484),f=c(19099),g=c(2116),h=c.n(g),i=c(81220),j=c(29225),k=c(50412),l=c(92592),m=c(91431),n=c(59160),o=c(18982);c(87592);let p=["none","low","medium","high"],q=["none","thinking"],r=["none","low","medium","high","max"],s={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":r,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":p,zai:q,qwen:p,kimi:r,deepseek:["none","high","max"],minimax:q,hunyuan:p,step:p},t=["none","minimal","low","medium","high","xhigh","max"],u=[{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...t,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...t,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:t},{pattern:"*codex*",levels:["low","medium","high","xhigh"]}];function v(a,b){if("kiro"===a&&null===function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(b))return"reasoning";if(!b.includes("claude"))return null;let c=b.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!c)return null;let[,d,e]=c,f=Number(d),g=void 0===e?null:Number(e);return f<4||4===f&&(null===g||g<=5||null!==g&&g>=1e3)?null:"output_config"}(b))return null;let c=(0,n.nl)(a,b);if(!c.reasoning)return null;let d=u.find(c=>(!c.provider||c.provider===a)&&(0,o.gH)(c.pattern,b)),e=d?.levels||s[c.thinkingFormat]||p;return!1===c.thinkingCanDisable&&(e=e.filter(a=>"none"!==a)),e}var w=c(50377),x=c(29476),y=c(99258);function z({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,enabled:!1!==b.enabled,...void 0===b.vision?{}:{vision:b.vision},...void 0===b.reasoning?{}:{reasoning:b.reasoning},...void 0===b.contextWindow?{}:{contextWindow:b.contextWindow},...void 0===b.maxOutput?{}:{maxOutput:b.maxOutput}}))}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}var A=c(49885),B=c.n(A);function C({model:a,fullModel:b,alias:c,copied:e,onCopy:f,testStatus:g,isCustom:h,isFree:i,onDeleteAlias:j,onTest:l,isTesting:m,onDisable:n,caps:o,thinkingSuffix:p}){let q=p?`${b}(${p})`:b,r="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===g?"border-green-500/40":"error"===g?"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:r?{color:r}:void 0,children:"ok"===g?"check_circle":"error"===g?"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:q}),(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)(k.nh,{caps:o,colorOverride:"text-text-muted/70",size:12})]})]}),l&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:l,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"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:m?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(q,`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:e===`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:e===`model-${a.id}`?"Copied!":"Copy"})]}),h?(0,d.jsx)("button",{onClick:j,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"})}):n?(0,d.jsx)("button",{onClick:n,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 D({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 E({modelId:a,fullModel:b,copied:c,onCopy:e,onToggle:f,enabled:g,onTest:h,testStatus:i,isTesting:j}){let k="ok"===i?"#22c55e":"error"===i?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===i?"border-green-500/40":"error"===i?"border-red-500/40":"border-border"} hover:bg-sidebar/50 ${g?"":"opacity-60"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:k?{color:k}:void 0,children:"ok"===i?"check_circle":"error"===i?"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"})]}),h&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:h,disabled:j,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:j?{animation:"spin 1s linear infinite"}:void 0,children:j?"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:j?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:`p-1 rounded ${g?"text-amber-500 hover:bg-amber-50 dark:hover:bg-amber-500/10":"text-green-600 hover:bg-green-50 dark:hover:bg-green-500/10"}`,title:g?"Disable model":"Activate model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:g?"block":"restart_alt"})})]})}function F({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:j,onDeleteCustomModel:l,connections:m,isAnthropic:n,jsonModels:o,importingJsonModels:p,onImportJsonModels:q,onToggleJsonModel:r,onBulkJsonModels:s,useJsonCatalog:t}){let[u,v]=(0,e.useState)(""),[w,x]=(0,e.useState)(!1),[y,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(null),[G,H]=(0,e.useState)({}),I=async b=>{if(!B){C(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();H(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{H(a=>({...a,[b]:"error"}))}finally{C(null)}}},J=z({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),K=async()=>{if(!u.trim()||w)return;let a=u.trim();if(J.some(b=>b.id===a))return void alert("Model already exists for this provider.");x(!0);try{await j(a),v("")}catch(a){console.log("Error adding model:",a)}finally{x(!1)}},L=async()=>{if(y)return;let a=m.find(a=>!1!==a.isActive);if(a){A(!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&&(J.some(a=>a.id===b)||(await j(b),e+=1))}0===e&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{A(!1)}}},M=m.some(a=>!1!==a.isActive),N=Array.isArray(o),O=N?o.filter(a=>!1!==a.enabled):[],P=N?o.filter(a=>!1===a.enabled):[],Q=t&&O.length>0;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:u,onChange:a=>v(a.target.value),onKeyDown:a=>"Enter"===a.key&&K(),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)(k.$n,{size:"sm",icon:"add",onClick:K,disabled:!u.trim()||w,children:w?"Adding...":"Add"}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"download",onClick:L,disabled:!M||y,children:y?"Importing...":"Import from /models"})]}),!M&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),N&&(0,d.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"download",onClick:q,disabled:!M||p,children:p?"Fetching...":"Fetch Models from JSON"}),Q&&P.length>0&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>s(!0),children:"Active All"}),Q&&O.length>0&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>s(!1),children:"Disable All"})]}),Q&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:O.map(a=>(0,d.jsx)(E,{modelId:a.id,fullModel:`${b}/${a.id}`,copied:g,onCopy:h,enabled:!0,onToggle:()=>r(a.id,!1)},`json-${a.id}`))}),!Q&&J.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:J.map(({id:c,alias:e,source:f})=>(0,d.jsx)(D,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:m.length>0?()=>I(c):void 0,testStatus:G[c],isTesting:B===c},`${f}-${a}/${c}`))}),t&&P.length>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Disabled (activate to expose again):"}),P.map(a=>(0,d.jsx)(E,{modelId:a.id,fullModel:`${b}/${a.id}`,copied:g,onCopy:h,enabled:!1,onToggle:()=>r(a.id,!0)},`json-disabled-${a.id}`))]})]})}C.propTypes={model:B().shape({id:B().string.isRequired}).isRequired,fullModel:B().string.isRequired,alias:B().string,copied:B().string,onCopy:B().func.isRequired,testStatus:B().oneOf(["ok","error"]),isCustom:B().bool,isFree:B().bool,onDeleteAlias:B().func,onTest:B().func,isTesting:B().bool,onDisable:B().func,caps:B().object,thinkingSuffix:B().string},B().string.isRequired,B().string.isRequired,B().string,B().func.isRequired,B().func.isRequired,B().func,B().oneOf(["ok","error"]),B().bool,B().string.isRequired,B().object.isRequired,B().arrayOf(B().object),B().string,B().func.isRequired,B().func.isRequired,B().func.isRequired,B().func.isRequired,F.propTypes={providerStorageAlias:B().string.isRequired,providerDisplayAlias:B().string.isRequired,modelAliases:B().object.isRequired,customModels:B().arrayOf(B().object),copied:B().string,onCopy:B().func.isRequired,onDeleteAlias:B().func.isRequired,onAddCustomModel:B().func.isRequired,onDeleteCustomModel:B().func.isRequired,connections:B().arrayOf(B().shape({id:B().string,isActive:B().bool})).isRequired,isAnthropic:B().bool,jsonModels:B().arrayOf(B().object),importingJsonModels:B().bool,onImportJsonModels:B().func,onToggleJsonModel:B().func,onBulkJsonModels:B().func,useJsonCatalog:B().bool};var G=c(74875);function H({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 I({connection:a,proxyPools:b,isOAuth:c,isFirst:f,isLast:g,onMoveUp:h,onMoveDown:i,onToggleActive:j,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||"",E="default";x?.isActive===!0?E="success":(w||y)&&(E="error");let F=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:i,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)(k.Ex,{variant:(0,G.g)(a.isActive,R),size:"sm",dot:!0,children:!1===a.isActive?"disabled":R||"Unknown"}),(0,d.jsx)(k.Ex,{variant:"default",size:"sm",children:K?"OAuth":L?"Cookie":"API Key"}),z&&(0,d.jsx)(k.Ex,{variant:E,size:"sm",children:"Proxy"}),O&&!1!==a.isActive&&(0,d.jsx)(H,{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)(k.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:()=>F("__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:()=>F(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)(k.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)(k.lM,{size:"sm",checked:a.isActive??!0,onChange:j,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}H.propTypes={until:B().string.isRequired},I.propTypes={connection:B().shape({id:B().string,name:B().string,email:B().string,displayName:B().string,modelLockUntil:B().string,testStatus:B().string,isActive:B().bool,lastError:B().string,priority:B().number,globalPriority:B().number}).isRequired,proxyPools:B().arrayOf(B().shape({id:B().string,name:B().string,proxyUrl:B().string,noProxy:B().string,isActive:B().bool})),isOAuth:B().bool.isRequired,isFirst:B().bool.isRequired,isLast:B().bool.isRequired,onMoveUp:B().func.isRequired,onMoveDown:B().func.isRequired,onToggleActive:B().func.isRequired,onUpdateProxy:B().func,onEdit:B().func.isRequired,onDelete:B().func.isRequired,oneByOneStatus:B().shape({state:B().string,error:B().string}),autoPing:B().shape({on:B().bool,onToggle:B().func,provider:B().string})};let J=`name1|sk-key1
1
+ (()=>{var a={};a.id=2134,a.ids=[2134],a.modules={643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},6069:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>R});var d=c(48249),e=c(67484),f=c(19099),g=c(2116),h=c.n(g),i=c(81220),j=c(29225),k=c(50412),l=c(92592),m=c(91431),n=c(59160),o=c(18982);c(87592);let p=["none","low","medium","high"],q=["none","thinking"],r=["none","low","medium","high","max"],s={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":r,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":p,zai:q,qwen:p,kimi:r,deepseek:["none","high","max"],minimax:q,hunyuan:p,step:p},t=["none","minimal","low","medium","high","xhigh","max"],u=[{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...t,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...t,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:t},{pattern:"*codex*",levels:["low","medium","high","xhigh"]}];function v(a,b){if("kiro"===a&&null===function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(b))return"reasoning";if(!b.includes("claude"))return null;let c=b.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!c)return null;let[,d,e]=c,f=Number(d),g=void 0===e?null:Number(e);return f<4||4===f&&(null===g||g<=5||null!==g&&g>=1e3)?null:"output_config"}(b))return null;let c=(0,n.nl)(a,b);if(!c.reasoning)return null;let d=u.find(c=>(!c.provider||c.provider===a)&&(0,o.gH)(c.pattern,b)),e=d?.levels||s[c.thinkingFormat]||p;return!1===c.thinkingCanDisable&&(e=e.filter(a=>"none"!==a)),e}var w=c(50377),x=c(29476),y=c(99258),z=c(41371);function A({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,enabled:!1!==b.enabled,...void 0===b.vision?{}:{vision:b.vision},...void 0===b.reasoning?{}:{reasoning:b.reasoning},...void 0===b.contextWindow?{}:{contextWindow:b.contextWindow},...void 0===b.maxOutput?{}:{maxOutput:b.maxOutput}}))}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}var B=c(49885),C=c.n(B);function D({model:a,fullModel:b,alias:c,copied:e,onCopy:f,testStatus:g,isCustom:h,isFree:i,onDeleteAlias:j,onTest:l,isTesting:m,onDisable:n,caps:o,thinkingSuffix:p}){let q=p?`${b}(${p})`:b,r="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===g?"border-green-500/40":"error"===g?"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:r?{color:r}:void 0,children:"ok"===g?"check_circle":"error"===g?"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:q}),(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)(k.nh,{caps:o,colorOverride:"text-text-muted/70",size:12})]})]}),l&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:l,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"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:m?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(q,`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:e===`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:e===`model-${a.id}`?"Copied!":"Copy"})]}),h?(0,d.jsx)("button",{onClick:j,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"})}):n?(0,d.jsx)("button",{onClick:n,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 E({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 F({modelId:a,fullModel:b,copied:c,onCopy:e,onToggle:f,enabled:g,onTest:h,testStatus:i,isTesting:j}){let k="ok"===i?"#22c55e":"error"===i?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===i?"border-green-500/40":"error"===i?"border-red-500/40":"border-border"} hover:bg-sidebar/50 ${g?"":"opacity-60"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:k?{color:k}:void 0,children:"ok"===i?"check_circle":"error"===i?"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"})]}),h&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:h,disabled:j,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:j?{animation:"spin 1s linear infinite"}:void 0,children:j?"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:j?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:`p-1 rounded ${g?"text-amber-500 hover:bg-amber-50 dark:hover:bg-amber-500/10":"text-green-600 hover:bg-green-50 dark:hover:bg-green-500/10"}`,title:g?"Disable model":"Activate model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:g?"block":"restart_alt"})})]})}function G({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:j,onDeleteCustomModel:l,connections:m,isAnthropic:n,jsonModels:o,importingJsonModels:p,onImportJsonModels:q,onToggleJsonModel:r,onBulkJsonModels:s,useJsonCatalog:t}){let u=(0,z.i)(),[v,w]=(0,e.useState)(""),[x,y]=(0,e.useState)(!1),[B,C]=(0,e.useState)(!1),[D,H]=(0,e.useState)(null),[I,J]=(0,e.useState)({}),K=async b=>{if(!D){H(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();J(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{J(a=>({...a,[b]:"error"}))}finally{H(null)}}},L=A({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),M=async()=>{if(!v.trim()||x)return;let a=v.trim();if(L.some(b=>b.id===a))return void u.warning("Model already exists for this provider.");y(!0);try{await j(a),w("")}catch(a){console.log("Error adding model:",a)}finally{y(!1)}},N=async()=>{if(B)return;let a=m.find(a=>!1!==a.isActive);if(a){C(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void u.error(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void u.warning("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(L.some(a=>a.id===b)||(await j(b),e+=1))}0===e&&u.warning("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{C(!1)}}},O=m.some(a=>!1!==a.isActive),P=Array.isArray(o),Q=P?o.filter(a=>!1!==a.enabled):[],R=P?o.filter(a=>!1===a.enabled):[],S=t&&Q.length>0;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:v,onChange:a=>w(a.target.value),onKeyDown:a=>"Enter"===a.key&&M(),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)(k.$n,{size:"sm",icon:"add",onClick:M,disabled:!v.trim()||x,children:x?"Adding...":"Add"}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"download",onClick:N,disabled:!O||B,children:B?"Importing...":"Import from /models"})]}),!O&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),P&&(0,d.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"download",onClick:q,disabled:!O||p,children:p?"Fetching...":"Fetch Models from JSON"}),S&&R.length>0&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>s(!0),children:"Active All"}),S&&Q.length>0&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>s(!1),children:"Disable All"})]}),S&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:Q.map(a=>(0,d.jsx)(F,{modelId:a.id,fullModel:`${b}/${a.id}`,copied:g,onCopy:h,enabled:!0,onToggle:()=>r(a.id,!1)},`json-${a.id}`))}),!S&&L.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:L.map(({id:c,alias:e,source:f})=>(0,d.jsx)(E,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:m.length>0?()=>K(c):void 0,testStatus:I[c],isTesting:D===c},`${f}-${a}/${c}`))}),t&&R.length>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Disabled (activate to expose again):"}),R.map(a=>(0,d.jsx)(F,{modelId:a.id,fullModel:`${b}/${a.id}`,copied:g,onCopy:h,enabled:!1,onToggle:()=>r(a.id,!0)},`json-disabled-${a.id}`))]})]})}D.propTypes={model:C().shape({id:C().string.isRequired}).isRequired,fullModel:C().string.isRequired,alias:C().string,copied:C().string,onCopy:C().func.isRequired,testStatus:C().oneOf(["ok","error"]),isCustom:C().bool,isFree:C().bool,onDeleteAlias:C().func,onTest:C().func,isTesting:C().bool,onDisable:C().func,caps:C().object,thinkingSuffix:C().string},C().string.isRequired,C().string.isRequired,C().string,C().func.isRequired,C().func.isRequired,C().func,C().oneOf(["ok","error"]),C().bool,C().string.isRequired,C().object.isRequired,C().arrayOf(C().object),C().string,C().func.isRequired,C().func.isRequired,C().func.isRequired,C().func.isRequired,G.propTypes={providerStorageAlias:C().string.isRequired,providerDisplayAlias:C().string.isRequired,modelAliases:C().object.isRequired,customModels:C().arrayOf(C().object),copied:C().string,onCopy:C().func.isRequired,onDeleteAlias:C().func.isRequired,onAddCustomModel:C().func.isRequired,onDeleteCustomModel:C().func.isRequired,connections:C().arrayOf(C().shape({id:C().string,isActive:C().bool})).isRequired,isAnthropic:C().bool,jsonModels:C().arrayOf(C().object),importingJsonModels:C().bool,onImportJsonModels:C().func,onToggleJsonModel:C().func,onBulkJsonModels:C().func,useJsonCatalog:C().bool};var H=c(74875);function I({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 J({connection:a,proxyPools:b,isOAuth:c,isFirst:f,isLast:g,onMoveUp:h,onMoveDown:i,onToggleActive:j,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,z=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,A=!!w||z,B=x?`Pool: ${x.name}`:w?`Pool: ${w} (inactive/missing)`:z?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",C=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.",D="";if(x?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=x?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);D=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{D=b}}let E=x?.noProxy||a.providerSpecificData?.connectionNoProxy||"",F="default";x?.isActive===!0?F="success":(w||z)&&(F="error");let G=async a=>{t(!0);try{await l("__none__"===a?null:a)}finally{t(!1),r(!1)}},K=a.authType||(c?"oauth":"apikey"),L="oauth"===K,M="cookie"===K,N=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(L?"OAuth Account":M?"Cookie Account":"API Key"),O=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,[P,Q]=(0,e.useState)(!1),R=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,S="unavailable"!==a.testStatus||P?a.testStatus:"active",T=()=>o?"queued"===o.state?(0,y.Tl)("queued"):"testing"===o.state?(0,y.Tl)("testing"):"success"===o.state?(0,y.Tl)("success"):"failed"===o.state?o.error?`${(0,y.Tl)("failed")}: ${o.error}`:(0,y.Tl)("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:i,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:M?"cookie":L?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:N}),O&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:O}),(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)(k.Ex,{variant:(0,H.g)(a.isActive,S),size:"sm",dot:!0,children:!1===a.isActive?(0,y.Tl)("disabled"):S||(0,y.Tl)("Unknown")}),(0,d.jsx)(k.Ex,{variant:"default",size:"sm",children:L?"OAuth":M?"Cookie":"API Key"}),A&&(0,d.jsx)(k.Ex,{variant:F,size:"sm",children:"Proxy"}),P&&!1!==a.isActive&&(0,d.jsx)(I,{until:R}),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]}),T()&&(0,d.jsx)(k.Ex,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:T()})]}),A&&(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:B,children:B}),D&&(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:D}),E&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:E,children:["no_proxy: ",E]})]})]})]}),(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 ${A?"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:()=>G("__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:()=>G(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)(k.m_,{text:C,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)(k.lM,{size:"sm",checked:a.isActive??!0,onChange:j,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}I.propTypes={until:C().string.isRequired},J.propTypes={connection:C().shape({id:C().string,name:C().string,email:C().string,displayName:C().string,modelLockUntil:C().string,testStatus:C().string,isActive:C().bool,lastError:C().string,priority:C().number,globalPriority:C().number}).isRequired,proxyPools:C().arrayOf(C().shape({id:C().string,name:C().string,proxyUrl:C().string,noProxy:C().string,isActive:C().bool})),isOAuth:C().bool.isRequired,isFirst:C().bool.isRequired,isLast:C().bool.isRequired,onMoveUp:C().func.isRequired,onMoveDown:C().func.isRequired,onToggleActive:C().func.isRequired,onUpdateProxy:C().func,onEdit:C().func.isRequired,onDelete:C().func.isRequired,oneByOneStatus:C().shape({state:C().string,error:C().string}),autoPing:C().shape({on:C().bool,onToggle:C().func,provider:C().string})};let K=`name1|sk-key1
2
2
  name2|sk-key2
3
- sk-key-only-auto-named`;function K({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:g,authType:h,authHint:i,website:j,proxyPools:m,error:n,existingNames:o,onSave:p,onBulkDone:q,onClose:r}){let s="__none__",t="ollama-local"===b,u="cookie"===h,v="xai"===b&&!u,w=u?"Cookie Value":"qoder"===b?"Personal Access Token (PAT)":"API Key",x="azure"===b,y="cloudflare-ai"===b,z=l.Q2?.[b]?.regions||null,A=l.Q2?.[b]?.defaultRegion||z?.[0]?.id||"",[B,C]=(0,e.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:s,ollamaHostUrl:""}),[D,E]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[F,G]=(0,e.useState)({accountId:""}),[H,I]=(0,e.useState)(A),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(null),[P,Q]=(0,e.useState)(!1),R=y?`name1|sk-key1|acc123456
3
+ sk-key-only-auto-named`;function L({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:g,authType:h,authHint:i,website:j,proxyPools:m,error:n,existingNames:o,onSave:p,onBulkDone:q,onClose:r}){let s="__none__",t="ollama-local"===b,u="cookie"===h,v="xai"===b&&!u,w=u?"Cookie Value":"qoder"===b?"Personal Access Token (PAT)":"API Key",x="azure"===b,y="cloudflare-ai"===b,z=l.Q2?.[b]?.regions||null,A=l.Q2?.[b]?.defaultRegion||z?.[0]?.id||"",[B,C]=(0,e.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:s,ollamaHostUrl:""}),[D,E]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[F,G]=(0,e.useState)({accountId:""}),[H,I]=(0,e.useState)(A),[J,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(null),[P,Q]=(0,e.useState)(null),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(!1),V=y?`name1|sk-key1|acc123456
4
4
  name2|sk-key2|def789012
5
5
  sk-key-only-auto-named`:"qoder"===b?`name1|pt-xxxxx
6
6
  name2|pt-yyyyy
7
- pt-only-auto-named`:J,[S,T]=(0,e.useState)("single"),[U,V]=(0,e.useState)(""),[W,X]=(0,e.useState)(null),Y=()=>t&&B.ollamaHostUrl.trim()?{baseUrl:B.ollamaHostUrl.trim()}:x?{azureEndpoint:D.azureEndpoint,apiVersion:D.apiVersion,deployment:D.deployment,organization:D.organization}:y?{accountId:F.accountId}:z&&H?{region:H}:void 0,Z=async()=>{M(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:B.apiKey,providerSpecificData:Y()})}),c=await a.json();O(c.valid?"success":"failed")}catch{O("failed")}finally{M(!1)}},$=async()=>{if(b&&(t||B.apiKey)&&(t||B.name)&&(!f||B.defaultModel.trim())){Q(!0);try{let a=!1;try{M(!0),O(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:B.apiKey,providerSpecificData:Y()})});a=!!(await c.json()).valid,O(a?"success":"failed")}catch{O("failed")}finally{M(!1)}await p({name:B.name||(t?"Ollama Local":""),apiKey:B.apiKey,defaultModel:f?B.defaultModel.trim():void 0,priority:B.priority,proxyPoolId:B.proxyPoolId===s?null:B.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:Y()})}finally{Q(!1)}}},_=async()=>{let a=U.split("\n");if(!a.length)return;let c=function(a,b,c={}){let{isCloudflareAi:d=!1}=c,e=new Set((Array.isArray(b)?b:[]).map(a=>"string"==typeof a?a.toLowerCase():"")),f=[];for(let b of a){let a,c="string"==typeof b?b.trim():"";if(!c)continue;let g=function(a,b={}){let{isCloudflareAi:c=!1}=b,d=a.split("|");if(c&&d.length>=3){let a=d[0].trim();return{baseName:a||"Key",apiKey:d.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:d[d.length-1].trim()}}}return d.length>=2?{baseName:d[0].trim()||"Key",apiKey:d.slice(1).join("|").trim()}:{baseName:"Key",apiKey:d[0].trim()}}(c,{isCloudflareAi:d});if(!g||!g.apiKey)continue;let h=g.baseName,i=1;for(;a=`${h} ${i}`,e.has(a.toLowerCase());)i+=1;e.add(a.toLowerCase());let j={name:a,apiKey:g.apiKey,skipped:!1};g.providerSpecificData&&(j.providerSpecificData=g.providerSpecificData),f.push(j)}return f}(a,o,{isCloudflareAi:y});if(!c.length)return;Q(!0),X(null);let d=0,e=0;for(let a of c)try{let c=!1;try{let d=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a.apiKey})});c=!!(await d.json().catch(()=>({}))).valid}catch{c=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a.apiKey,name:a.name,priority:1,testStatus:c?"active":"unknown",...a.providerSpecificData?{providerSpecificData:a.providerSpecificData}:{}})})).ok?d++:e++}catch{e++}Q(!1),X({success:d,failed:e}),d>0&&q&&q()};return b?(0,d.jsx)(k.aF,{isOpen:a,title:`Add ${c||b} ${w}`,onClose:r,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{size:"sm",variant:"single"===S?"primary":"ghost",onClick:()=>{T("single"),X(null)},children:"Single"}),(0,d.jsx)(k.$n,{size:"sm",variant:"bulk"===S?"primary":"ghost",onClick:()=>{T("bulk"),X(null)},children:"Bulk Add"})]}),"bulk"===S&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:y?(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===b?(0,d.jsxs)(d.Fragment,{children:["One PAT per line. Format: ",(0,d.jsx)("code",{children:"name|pt-..."})," or just ",(0,d.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:R,value:U,onChange:a=>V(a.target.value)}),W&&(0,d.jsxs)("div",{className:`text-sm font-medium ${W.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",W.success," added",W.failed>0?`, ✗ ${W.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:_,fullWidth:!0,disabled:P||!U.trim(),children:P?"Adding...":"Add All Keys"}),(0,d.jsx)(k.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===S&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.pd,{label:"Name",value:B.name,onChange:a=>C({...B,name:a.target.value}),placeholder:t?"Ollama Local":"Production Key"}),t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.pd,{label:"Ollama Host URL",value:B.ollamaHostUrl,onChange:a=>C({...B,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(k.$n,{onClick:Z,disabled:L||P,variant:"secondary",children:L?"Checking...":"Check"})})]}),!t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.pd,{label:w,type:u?"text":"password",value:B.apiKey,onChange:a=>C({...B,apiKey:a.target.value}),placeholder:u?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"qoder"===b?"pt-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(k.$n,{onClick:Z,disabled:!B.apiKey||L||P,variant:"secondary",children:L?"Checking...":"Check"})})]}),v&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),u&&i&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[i,j&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",j.replace(/^https?:\/\//,"")]})]})]}),z&&(0,d.jsx)(k.l6,{label:"Region",value:H,onChange:a=>I(a.target.value),options:z.map(a=>({value:a.id,label:a.label}))}),f&&(0,d.jsx)(k.pd,{label:"Default Model",value:B.defaultModel,onChange:a=>C({...B,defaultModel:a.target.value}),placeholder:g?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),t&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),N&&(0,d.jsx)(k.Ex,{variant:"success"===N?"success":"error",children:"success"===N?"Valid":"Invalid"}),n&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),f&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),y&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(k.pd,{label:"Account ID",value:F.accountId,onChange:a=>G({...F,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),x&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(k.pd,{label:"Azure Endpoint",value:D.azureEndpoint,onChange:a=>E({...D,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(k.pd,{label:"Deployment Name",value:D.deployment,onChange:a=>E({...D,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(k.pd,{label:"API Version",value:D.apiVersion,onChange:a=>E({...D,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(k.pd,{label:"Organization",value:D.organization,onChange:a=>E({...D,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(k.pd,{label:"Priority",type:"number",value:B.priority,onChange:a=>C({...B,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsx)(k.l6,{label:"Proxy Pool",value:B.proxyPoolId,onChange:a=>C({...B,proxyPoolId:a.target.value}),options:[{value:s,label:"None"},...(m||[]).map(a=>({value:a.id,label:a.name}))],placeholder:"None"}),0===(m||[]).length&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:$,fullWidth:!0,disabled:P||!t&&(!B.name||!B.apiKey)||f&&!B.defaultModel.trim()||x&&(!D.azureEndpoint||!D.deployment||!D.organization)||y&&!F.accountId,children:P?"Saving...":"Save"}),(0,d.jsx)(k.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function L({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1",modelsJsonUrl:"",fallbackModelsJsonUrl:""}),[j,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),u=async()=>{if(h.name.trim()&&h.prefix.trim()&&h.baseUrl.trim()){l(!0);try{let a={name:h.name,prefix:h.prefix,baseUrl:h.baseUrl,modelsJsonUrl:h.modelsJsonUrl,fallbackModelsJsonUrl:h.fallbackModelsJsonUrl};g||(a.apiType=h.apiType),await c(a)}finally{l(!1)}}},v=async()=>{r(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:m,type:g?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();t(b.valid?"success":"failed")}catch{t("failed")}finally{r(!1)}};return b?(0,d.jsx)(k.aF,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(k.pd,{label:"Name",value:h.name,onChange:a=>i({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,d.jsx)(k.pd,{label:"Prefix",value:h.prefix,onChange:a=>i({...h,prefix:a.target.value}),placeholder:g?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!g&&(0,d.jsx)(k.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(k.pd,{label:"Base URL",value:h.baseUrl,onChange:a=>i({...h,baseUrl:a.target.value}),placeholder:g?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${g?"Anthropic":"OpenAI"}-compatible API.`}),(0,d.jsx)(k.pd,{label:"Model JSON URL (optional)",value:h.modelsJsonUrl,onChange:a=>i({...h,modelsJsonUrl:a.target.value}),placeholder:"https://example.com/models.json",hint:"Optional. A {models:[...]} or {data:[...]} JSON listing — enables Fetch Models with per-model enable/disable instead of add-only. Non-GitHub sources are sent the connection's API key as Bearer."}),(0,d.jsx)(k.pd,{label:"Fallback Model JSON URL (optional)",value:h.fallbackModelsJsonUrl,onChange:a=>i({...h,fallbackModelsJsonUrl:a.target.value}),placeholder:"https://mirror.example.com/models.json",hint:"Optional. Mirror used when the primary Model JSON URL is unreachable."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(k.$n,{onClick:v,disabled:!m||q||!h.baseUrl.trim(),variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(k.pd,{label:"Model ID (optional)",value:o,onChange:a=>p(a.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),s&&(0,d.jsx)(k.Ex,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:u,fullWidth:!0,disabled:!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||j,children:j?"Saving...":"Save"}),(0,d.jsx)(k.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function M({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useState)(""),[j,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),q=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},r=async()=>{let a=q(h.trim());if(a){l("testing"),n("");try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();l(d.ok?"ok":"error"),n(d.error||"")}catch(a){l("error"),n(a.message)}}},s=async()=>{let a=q(h.trim());if(a&&!o){p(!0);try{await f(a)}finally{p(!1)}}};return(0,d.jsx)(k.aF,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{type:"text",value:h,onChange:a=>{i(a.target.value),l(null),n("")},onKeyDown:a=>{"Enter"===a.key&&r()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,d.jsx)(k.$n,{variant:"secondary",icon:"science",loading:"testing"===j,onClick:r,disabled:!h.trim()||"testing"===j,children:"testing"===j?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:q(h.trim())||"model-id"})]})]}),"ok"===j&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===j&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:m||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(k.$n,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(k.$n,{onClick:s,fullWidth:!0,size:"sm",disabled:!h.trim()||o,children:o?"Adding...":"Add Model"})]})]})})}K.propTypes={isOpen:B().bool.isRequired,provider:B().string,providerName:B().string,isCompatible:B().bool,isAnthropic:B().bool,authType:B().string,authHint:B().string,website:B().string,proxyPools:B().arrayOf(B().shape({id:B().string,name:B().string})),error:B().string,existingNames:B().arrayOf(B().string),onSave:B().func.isRequired,onBulkDone:B().func,onClose:B().func.isRequired},L.propTypes={isOpen:B().bool.isRequired,node:B().shape({id:B().string,name:B().string,prefix:B().string,apiType:B().string,baseUrl:B().string,modelsJsonUrl:B().string,fallbackModelsJsonUrl:B().string}),onSave:B().func.isRequired,onClose:B().func.isRequired,isAnthropic:B().bool},M.propTypes={isOpen:B().bool.isRequired,providerAlias:B().string.isRequired,providerDisplayAlias:B().string.isRequired,onSave:B().func.isRequired,onClose:B().func.isRequired};let N=`[
7
+ pt-only-auto-named`:K,[W,X]=(0,e.useState)("single"),[Y,Z]=(0,e.useState)(""),[$,_]=(0,e.useState)(null),aa=()=>t&&B.ollamaHostUrl.trim()?{baseUrl:B.ollamaHostUrl.trim()}:x?{azureEndpoint:D.azureEndpoint,apiVersion:D.apiVersion,deployment:D.deployment,organization:D.organization}:y?{accountId:F.accountId}:z&&H?{region:H}:void 0,ab=async()=>{M(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:B.apiKey,providerSpecificData:aa()})}),c=await a.json();O(c.valid?"success":"failed"),Q(c.valid?null:c.error||null),S(!!c.maintenance)}catch{O("failed"),Q(null),S(!1)}finally{M(!1)}},ac=async()=>{if(b&&(t||B.apiKey)&&(t||B.name)&&(!f||B.defaultModel.trim())){U(!0);try{let a=!1;try{M(!0),O(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:B.apiKey,providerSpecificData:aa()})});a=!!(await c.json()).valid,O(a?"success":"failed")}catch{O("failed")}finally{M(!1)}await p({name:B.name||(t?"Ollama Local":""),apiKey:B.apiKey,defaultModel:f?B.defaultModel.trim():void 0,priority:B.priority,proxyPoolId:B.proxyPoolId===s?null:B.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:aa()})}finally{U(!1)}}},ad=async()=>{let a=Y.split("\n");if(!a.length)return;let c=function(a,b,c={}){let{isCloudflareAi:d=!1}=c,e=new Set((Array.isArray(b)?b:[]).map(a=>"string"==typeof a?a.toLowerCase():"")),f=[];for(let b of a){let a,c="string"==typeof b?b.trim():"";if(!c)continue;let g=function(a,b={}){let{isCloudflareAi:c=!1}=b,d=a.split("|");if(c&&d.length>=3){let a=d[0].trim();return{baseName:a||"Key",apiKey:d.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:d[d.length-1].trim()}}}return d.length>=2?{baseName:d[0].trim()||"Key",apiKey:d.slice(1).join("|").trim()}:{baseName:"Key",apiKey:d[0].trim()}}(c,{isCloudflareAi:d});if(!g||!g.apiKey)continue;let h=g.baseName,i=1;for(;a=`${h} ${i}`,e.has(a.toLowerCase());)i+=1;e.add(a.toLowerCase());let j={name:a,apiKey:g.apiKey,skipped:!1};g.providerSpecificData&&(j.providerSpecificData=g.providerSpecificData),f.push(j)}return f}(a,o,{isCloudflareAi:y});if(!c.length)return;U(!0),_(null);let d=0,e=0;for(let a of c)try{let c=!1;try{let d=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a.apiKey})});c=!!(await d.json().catch(()=>({}))).valid}catch{c=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a.apiKey,name:a.name,priority:1,testStatus:c?"active":"unknown",...a.providerSpecificData?{providerSpecificData:a.providerSpecificData}:{}})})).ok?d++:e++}catch{e++}U(!1),_({success:d,failed:e}),d>0&&q&&q()};return b?(0,d.jsx)(k.aF,{isOpen:a,title:`Add ${c||b} ${w}`,onClose:r,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{size:"sm",variant:"single"===W?"primary":"ghost",onClick:()=>{X("single"),_(null)},children:"Single"}),(0,d.jsx)(k.$n,{size:"sm",variant:"bulk"===W?"primary":"ghost",onClick:()=>{X("bulk"),_(null)},children:"Bulk Add"})]}),"bulk"===W&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:y?(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===b?(0,d.jsxs)(d.Fragment,{children:["One PAT per line. Format: ",(0,d.jsx)("code",{children:"name|pt-..."})," or just ",(0,d.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:V,value:Y,onChange:a=>Z(a.target.value)}),$&&(0,d.jsxs)("div",{className:`text-sm font-medium ${$.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",$.success," added",$.failed>0?`, ✗ ${$.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:ad,fullWidth:!0,disabled:T||!Y.trim(),children:T?"Adding...":"Add All Keys"}),(0,d.jsx)(k.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===W&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.pd,{label:"Name",value:B.name,onChange:a=>C({...B,name:a.target.value}),placeholder:t?"Ollama Local":"Production Key"}),t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.pd,{label:"Ollama Host URL",value:B.ollamaHostUrl,onChange:a=>C({...B,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(k.$n,{onClick:ab,disabled:J||T,variant:"secondary",children:J?"Checking...":"Check"})})]}),!t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.pd,{label:w,type:u?"text":"password",value:B.apiKey,onChange:a=>C({...B,apiKey:a.target.value}),placeholder:u?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"qoder"===b?"pt-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(k.$n,{onClick:ab,disabled:!B.apiKey||J||T,variant:"secondary",children:J?"Checking...":"Check"})})]}),v&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),u&&i&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[i,j&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",j.replace(/^https?:\/\//,"")]})]})]}),z&&(0,d.jsx)(k.l6,{label:"Region",value:H,onChange:a=>I(a.target.value),options:z.map(a=>({value:a.id,label:a.label}))}),f&&(0,d.jsx)(k.pd,{label:"Default Model",value:B.defaultModel,onChange:a=>C({...B,defaultModel:a.target.value}),placeholder:g?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),t&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),N&&(0,d.jsx)(k.Ex,{variant:"success"===N?"success":R?"warning":"error",children:"success"===N?"Valid":R?"Check endpoint":"Invalid"}),R&&P&&(0,d.jsx)("p",{className:"text-xs text-amber-500 break-words",children:P}),n&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),f&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),y&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(k.pd,{label:"Account ID",value:F.accountId,onChange:a=>G({...F,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),x&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(k.pd,{label:"Azure Endpoint",value:D.azureEndpoint,onChange:a=>E({...D,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(k.pd,{label:"Deployment Name",value:D.deployment,onChange:a=>E({...D,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(k.pd,{label:"API Version",value:D.apiVersion,onChange:a=>E({...D,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(k.pd,{label:"Organization",value:D.organization,onChange:a=>E({...D,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(k.pd,{label:"Priority",type:"number",value:B.priority,onChange:a=>C({...B,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsx)(k.l6,{label:"Proxy Pool",value:B.proxyPoolId,onChange:a=>C({...B,proxyPoolId:a.target.value}),options:[{value:s,label:"None"},...(m||[]).map(a=>({value:a.id,label:a.name}))],placeholder:"None"}),0===(m||[]).length&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:ac,fullWidth:!0,disabled:T||!t&&(!B.name||!B.apiKey)||f&&!B.defaultModel.trim()||x&&(!D.azureEndpoint||!D.deployment||!D.organization)||y&&!F.accountId,children:T?"Saving...":"Save"}),(0,d.jsx)(k.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function M({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1",modelsJsonUrl:"",fallbackModelsJsonUrl:""}),[j,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),u=async()=>{if(h.name.trim()&&h.prefix.trim()&&h.baseUrl.trim()){l(!0);try{let a={name:h.name,prefix:h.prefix,baseUrl:h.baseUrl,modelsJsonUrl:h.modelsJsonUrl,fallbackModelsJsonUrl:h.fallbackModelsJsonUrl};g||(a.apiType=h.apiType),await c(a)}finally{l(!1)}}},v=async()=>{r(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:m,type:g?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();t(b.valid?"success":"failed")}catch{t("failed")}finally{r(!1)}};return b?(0,d.jsx)(k.aF,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(k.pd,{label:"Name",value:h.name,onChange:a=>i({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,d.jsx)(k.pd,{label:"Prefix",value:h.prefix,onChange:a=>i({...h,prefix:a.target.value}),placeholder:g?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!g&&(0,d.jsx)(k.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(k.pd,{label:"Base URL",value:h.baseUrl,onChange:a=>i({...h,baseUrl:a.target.value}),placeholder:g?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${g?"Anthropic":"OpenAI"}-compatible API.`}),(0,d.jsx)(k.pd,{label:"Model JSON URL (optional)",value:h.modelsJsonUrl,onChange:a=>i({...h,modelsJsonUrl:a.target.value}),placeholder:"https://example.com/models.json",hint:"Optional. A {models:[...]} or {data:[...]} JSON listing — enables Fetch Models with per-model enable/disable instead of add-only. Non-GitHub sources are sent the connection's API key as Bearer."}),(0,d.jsx)(k.pd,{label:"Fallback Model JSON URL (optional)",value:h.fallbackModelsJsonUrl,onChange:a=>i({...h,fallbackModelsJsonUrl:a.target.value}),placeholder:"https://mirror.example.com/models.json",hint:"Optional. Mirror used when the primary Model JSON URL is unreachable."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(k.$n,{onClick:v,disabled:!m||q||!h.baseUrl.trim(),variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(k.pd,{label:"Model ID (optional)",value:o,onChange:a=>p(a.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),s&&(0,d.jsx)(k.Ex,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(k.$n,{onClick:u,fullWidth:!0,disabled:!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||j,children:j?"Saving...":"Save"}),(0,d.jsx)(k.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function N({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useState)(""),[j,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),q=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},r=async()=>{let a=q(h.trim());if(a){l("testing"),n("");try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();l(d.ok?"ok":"error"),n(d.error||"")}catch(a){l("error"),n(a.message)}}},s=async()=>{let a=q(h.trim());if(a&&!o){p(!0);try{await f(a)}finally{p(!1)}}};return(0,d.jsx)(k.aF,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{type:"text",value:h,onChange:a=>{i(a.target.value),l(null),n("")},onKeyDown:a=>{"Enter"===a.key&&r()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,d.jsx)(k.$n,{variant:"secondary",icon:"science",loading:"testing"===j,onClick:r,disabled:!h.trim()||"testing"===j,children:"testing"===j?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:q(h.trim())||"model-id"})]})]}),"ok"===j&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===j&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:m||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(k.$n,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(k.$n,{onClick:s,fullWidth:!0,size:"sm",disabled:!h.trim()||o,children:o?"Adding...":"Add Model"})]})]})})}L.propTypes={isOpen:C().bool.isRequired,provider:C().string,providerName:C().string,isCompatible:C().bool,isAnthropic:C().bool,authType:C().string,authHint:C().string,website:C().string,proxyPools:C().arrayOf(C().shape({id:C().string,name:C().string})),error:C().string,existingNames:C().arrayOf(C().string),onSave:C().func.isRequired,onBulkDone:C().func,onClose:C().func.isRequired},M.propTypes={isOpen:C().bool.isRequired,node:C().shape({id:C().string,name:C().string,prefix:C().string,apiType:C().string,baseUrl:C().string,modelsJsonUrl:C().string,fallbackModelsJsonUrl:C().string}),onSave:C().func.isRequired,onClose:C().func.isRequired,isAnthropic:C().bool},N.propTypes={isOpen:C().bool.isRequired,providerAlias:C().string.isRequired,providerDisplayAlias:C().string.isRequired,onSave:C().func.isRequired,onClose:C().func.isRequired};let O=`[
8
8
  {
9
9
  "accessToken": "eyJhbGc...",
10
10
  "refreshToken": "rt_...",
11
11
  "idToken": "eyJhbGc...",
12
12
  "email": "user@example.com"
13
13
  }
14
- ]`;function O({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(!1),[j,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(null),o=()=>{h||(g(""),l(""),n(null),b())},p=async()=>{var a;let b;l(""),n(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){l(`${(0,y.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,y.Tl)("No accounts found in input"));i(!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}`);n(b),b.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,y.Tl)("Request failed"))}finally{i(!1)}},q=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(k.aF,{isOpen:a,title:(0,y.Tl)("Bulk Add Codex Accounts"),onClose:o,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,y.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:N,value:f,onChange:a=>g(a.target.value),disabled:h}),j&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:j}),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,y.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,y.Tl)("failed")}`:""]}),q.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:q.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)(k.$n,{onClick:p,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,y.Tl)("Importing..."):(0,y.Tl)("Import All")}),(0,d.jsx)(k.$n,{onClick:o,variant:"ghost",fullWidth:!0,disabled:h,children:(0,y.Tl)("Close")})]})]})})}O.propTypes={isOpen:B().bool.isRequired,onClose:B().func.isRequired,onSuccess:B().func};let P={claude:"claudeAutoPing",codex:"codexAutoPing"};function Q(){let a,b,c,g,n,o,p=(0,f.useParams)(),q=(0,f.useRouter)(),r=p.id,{getCaps:s}=(0,x.y)(),[t,u]=(0,e.useState)([]),[A,B]=(0,e.useState)(!0),[D,E]=(0,e.useState)(null),[G,H]=(0,e.useState)([]),[J,N]=(0,e.useState)(!1),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(""),[W,X]=(0,e.useState)(!1),[Y,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(!1),[aa,ab]=(0,e.useState)(!1),[ac,ad]=(0,e.useState)(null),[ae,af]=(0,e.useState)({}),[ag,ah]=(0,e.useState)([]),[ai,aj]=(0,e.useState)(()=>null),[ak,al]=(0,e.useState)(!1),[am,an]=(0,e.useState)(!1),[ao,ap]=(0,e.useState)({}),[aq,ar]=(0,e.useState)(""),[as,at]=(0,e.useState)(()=>new Set),[au,av]=(0,e.useState)(!1),[aw,ax]=(0,e.useState)([]),[ay,az]=(0,e.useState)("__none__"),[aA,aB]=(0,e.useState)(!1),[aC,aD]=(0,e.useState)(null),[aE,aF]=(0,e.useState)(""),[aG,aH]=(0,e.useState)("auto"),[aI,aJ]=(0,e.useState)({enabled:!1,connections:{}}),[aK,aL]=(0,e.useState)([]),[aM,aN]=(0,e.useState)([]),[aO,aP]=(0,e.useState)([]),[aQ,aR]=(0,e.useState)([]),[aS,aT]=(0,e.useState)(null),[aU,aV]=(0,e.useState)(!1),[aW,aX]=(0,e.useState)(!1),[aY,aZ]=(0,e.useState)(!1),[a$,a_]=(0,e.useState)(null),[a0,a1]=(0,e.useState)({}),[a2,a3]=(0,e.useState)(null),a4=(0,e.useRef)(!1),[a5,a6]=(0,e.useState)(!1),[a7,a8]=(0,e.useState)(!1),{copied:a9,copy:ba}=(0,w.C)(),bb=()=>{N(!0)},bc=()=>{bi?bb():(V(""),T(!0))},bd=()=>{V(""),T(!0)},be=()=>{bi?bc():bd()},bf=D?{id:D.id,name:D.name||("anthropic-compatible"===D.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===D.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===D.type?"AC":"OC",apiType:D.apiType,baseUrl:D.baseUrl,type:D.type,modelsJsonUrl:D.modelsJsonUrl||void 0,fallbackModelsJsonUrl:D.fallbackModelsJsonUrl||void 0}:l.zN[r]||l.fg[r]||l.IS[r]||l.nJ[r]||l.br[r],bg=bf?.modelsJsonUrl,bh=bf?.authModes||[],bi=!!l.zN[r]||!!l.IS[r]||bh.includes("oauth"),bj=!!l.fg[r]||bh.includes("apikey"),bk=!!l.IS[r]?.noAuth,bl=(0,m.KC)(r),bm="cursor"===r&&aM.length>0?aM:bl,bn=(0,l.wG)(r),bo=(0,l.mq)(r),bp=(0,l.gb)(r),bq=bo||bp,br=!bq&&bi&&bj,bs="xai"===r?"Grok Build OAuth":"grok-cli"===r?"Grok CLI Device Login":"kimi"===r?"Kimi Coding OAuth":"OAuth",bt="xai"===r?"xAI API Key":"kimi"===r?"Kimi API Key":"qoder"===r?"PAT":"API Key",bu=a=>{if(!aG||"auto"===aG)return null;let b=v(r,a);return b&&b.includes(aG)?aG:null},bv=bq?r:bn,bw=(()=>{let a=new Set,b=new Set,c=c=>{if(!c||b.has(c))return;b.add(c);let d=v(r,c);d&&d.forEach(b=>{"none"!==b&&a.add(b)})};for(let a of bm)c(a.id);for(let a of aO)c(a.id);for(let a of ag)a.providerAlias===bv&&"llm"===(a.kind||a.type||"llm")&&c(a.id);return a.size?["auto",...a]:null})(),bx=bq?D?.prefix||r:bn,by=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bv)}`,{cache:"no-store"}),b=await a.json();a.ok&&aR(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bv]),bz=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bv,ids:[a]})})).ok&&await by()}catch(a){console.log("Error disabling model:",a)}},bA=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bv)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await by()}catch(a){console.log("Error enabling model:",a)}},bB=async a=>{a.length&&aT({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aT(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bv,ids:a})})).ok&&await by()}catch(a){console.log("Error disabling all models:",a)}}})},bC=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bv)}`,{method:"DELETE"})).ok&&await by()}catch(a){console.log("Error enabling all models:",a)}},bD=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&af(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bE=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&ah(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),bF=(0,e.useCallback)(async()=>{if(bg)try{let a=await fetch(`/api/providers/${r}/json-models`,{cache:"no-store"}),b=await a.json();a.ok&&aj(b.models||[])}catch(a){console.log("Error fetching provider JSON models:",a)}},[r,bg]),bG=(0,e.useCallback)(async()=>{try{let[a,b,c,d]=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"})]),e=await a.json(),f=await b.json(),g=await c.json(),h=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===r);u(a)}c.ok&&H(g.proxyPools||[]);let i=(h.providerStrategies||{})[r]||{};aD(i.fallbackStrategy||null),aF(null!=i.stickyRoundRobinLimit?String(i.stickyRoundRobinLimit):"1");let j=(h.providerThinking||{})[r]||{};aH(j.mode||"auto");let k=P[r],l=k&&h[k]||{};if(aJ({enabled:!0===l.enabled,connections:l.connections||{}}),b.ok){let a=(f.nodes||[]).find(a=>a.id===r)||null;if(!a&&bq)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===r)||null))break}E(a)}}catch(a){console.log("Error fetching connections:",a)}finally{B(!1)}},[r,bq]),bH=async a=>{try{let b=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(E(c.node),await bG(),_(!1))}catch(a){console.log("Error updating provider node:",a)}},bI=async(a,b)=>{try{let c=await fetch("/api/settings",{cache:"no-store"}),d=(c.ok?await c.json():{}).providerStrategies||{},e={};a&&(e.fallbackStrategy=a),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[r]:f[r]=e,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:f})})}catch(a){console.log("Error saving provider strategy:",a)}},bJ=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[r]={mode:a}:delete c[r],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){console.log("Error saving thinking config:",a)}},bK=async a=>{let b=P[r];if(b){aJ(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)}}},bL=async(a,b,c=bn)=>{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 bD();else{let b=await a.json();alert(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bM=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bD()}catch(a){console.log("Error deleting alias:",a)}},bN=async(a,b="llm",c=bv,d={},e)=>{try{let f={providerAlias:c,id:a,type:b};if(void 0!==e&&(f.enabled=e),d&&"object"==typeof d)for(let a of["vision","reasoning","contextWindow","maxOutput","thinkingFormat"])void 0!==d[a]&&(f[a]=d[a]);let g=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(g.ok)await bE();else{let a=await g.json();alert(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},bO=async(a,b="llm",c=bv)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bE()}catch(a){console.log("Error deleting custom model:",a)}},bP=async()=>{if(a5)return;let a=t.find(a=>!1!==a.isActive);if(!a)return void alert((0,y.Tl)("Please add an active Qoder connection first"));a6(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,y.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,y.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\//,"");ag.some(a=>a.providerAlias===bv&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values(ae).includes(`${bv}/${c}`)||(await bN(c,"llm",bv),e+=1)}0===e?alert((0,y.Tl)("All models already exist, no new models added")):alert((0,y.Tl)("Successfully added")+` ${e} `+(0,y.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),alert((0,y.Tl)("Error fetching models")+": "+a.message)}finally{a6(!1)}},bQ=async()=>{if(!a7){a8(!0);try{let a=await fetch(`/api/providers/${r}/json-models`,{method:"POST"}),b=await a.json();if(!a.ok)return void alert(b.error||(0,y.Tl)("Failed to fetch models"));await bF();let c=b.total||b.models?.length||0;alert((0,y.Tl)("Sync complete")+` (${c} ${(0,y.Tl)("models")})`)}catch(a){console.log("Error importing models from JSON:",a),alert((0,y.Tl)("Error fetching models")+": "+a.message)}finally{a8(!1)}}},bR=async(a,b)=>{try{(await fetch(`/api/providers/${r}/json-models`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({modelId:a,enabled:b})})).ok&&await bF()}catch(a){console.log("Error toggling JSON model:",a)}},bS=async a=>{try{(await fetch(`/api/providers/${r}/json-models`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({all:!0,enabled:a})})).ok&&await bF()}catch(a){console.log("Error bulk-toggling JSON models:",a)}},bT=async()=>{if(aW||0===t.length)return;let a=Object.fromEntries(t.map(a=>[a.id,{state:"queued",error:null}]));a4.current=!1,aX(!0),aZ(!1),a_(null),a1(a),a3({total:t.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<t.length;a+=1){if(a4.current){a3({total:t.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=t[a];a_(d.id),a1(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,a1(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,a1(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}a3({total:t.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<t.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{a_(null),aX(!1),aZ(!1),a4.current=!1}},bU=async a=>{aT({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aT(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&u(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bV=()=>{bG(),N(!1)},bW=async a=>{V("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bG(),T(!1);return}V(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),V("Failed to save connection")}},bX=async a=>{try{(await fetch(`/api/providers/${ac.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bG(),Z(!1))}catch(a){console.log("Error updating connection:",a)}},bY=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&u(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},bZ=async(a,b)=>{let c=[...t];[c[a],c[b]]=[c[b],c[a]],u(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 bG()}},b$=t.filter(a=>aw.includes(a.id)),b_=t.length>0&&aw.length===t.length;(()=>{if(0===b$.length)return;let a=new Set(b$.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return;let c=G.find(a=>a.id===b);return c?.name}})();let b0=()=>{aA||ab(!1)},b1=async a=>{aB(!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 bG(),ab(!1)}finally{aB(!1)}},b2=a=>b1(t.map(b=>({connectionId:b.id,proxyPoolId:a}))),b3=(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:t.map((a,b)=>{let c;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:(c=a.id,aw.includes(c)),onChange:()=>{var b;return b=a.id,void ax(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(I,{connection:a,proxyPools:G,isOAuth:bi,isFirst:0===b,isLast:b===t.length-1,onMoveUp:()=>bZ(b,b-1),onMoveDown:()=>bZ(b,b+1),onToggleActive:b=>bY(a.id,b),autoPing:P[r]&&"oauth"===a.authType?{on:!0===aI.connections[a.id],onToggle:b=>{var c;return c=a.id,void bK({...aI,connections:{...aI.connections,[c]:b}})},provider:r}:null,onUpdateProxy:async b=>{try{(await fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:b||null})})).ok&&u(c=>c.map(c=>c.id===a.id?{...c,providerSpecificData:{...c.providerSpecificData,proxyPoolId:b||null}}:c))}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{ad(a),Z(!0)},onDelete:()=>bU(a.id),oneByOneStatus:a0[a.id]||null})})]},a.id)})}),b4=G.filter(a=>!0===a.isActive),b5=(0,d.jsx)(k.aF,{isOpen:aa,onClose:b0,title:`Apply Proxy (${t.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("button",{onClick:()=>{let a=G.filter(a=>!0===a.isActive);return 0===a.length?void alert("No active proxy pools available."):b1(t.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},disabled:aA||0===b4.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,d.jsxs)("button",{onClick:()=>b2(null),disabled:aA,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),G.map(a=>(0,d.jsxs)("button",{onClick:()=>b2(a.id),disabled:aA||!0!==a.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",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))]}),aA&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,d.jsx)(k.$n,{onClick:b0,variant:"ghost",fullWidth:!0,disabled:aA,children:"Cancel"})]})}),b6=async a=>{if(!as.has(a)){at(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:`${bv}/${a}`})}),c=await b.json();ap(b=>({...b,[a]:c.ok?"ok":"error"})),ar(c.ok?"":c.error||"Model not reachable")}catch{ap(b=>({...b,[a]:"error"})),ar("Network error")}finally{at(b=>{let c=new Set(b);return c.delete(a),c})}}};if(A)return(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(k.Qv,{}),(0,d.jsx)(k.Qv,{})]});if(!bf)return(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let b7=()=>bo&&bf.apiType?"responses"===bf.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":bp?"/providers/anthropic-m.png":(0,j.HY)(bf.id);return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(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 hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${bf.color}15`},children:am||!b7()?(0,d.jsx)("span",{className:"text-sm font-bold",style:{color:bf.color},children:bf.textIcon||bf.id.slice(0,2).toUpperCase()}):(0,d.jsx)(i.default,{src:b7(),alt:bf.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,j.Kw)(bf.id),an(!0)},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:bf.name}),(bf.notice?.apiKeyUrl||bf.notice?.signupUrl||bf.website)&&(0,d.jsxs)("a",{href:bf.notice?.apiKeyUrl||bf.notice?.signupUrl||bf.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),bf.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[t.length," connection",1===t.length?"":"s"]})]})]})]}),bf.deprecated&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:bf.deprecationNotice})]}),bf.notice?.text&&!bf.deprecated&&(0,d.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:bf.notice.text}),bf.notice.apiKeyUrl&&(0,d.jsx)("a",{href:bf.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 →"})]}),bq&&D&&(0,d.jsx)(k.Zp,{children:(0,d.jsxs)("div",{className:"mb-4 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:bp?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bp?"Messages API":"responses"===D.apiType?"Responses API":"Chat Completions"," \xb7 ",(D.baseUrl||"").replace(/\/$/,""),"/",bp?"messages":"responses"===D.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:()=>{V(""),T(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>_(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{aT({title:"Delete Compatible Node",message:`Delete this ${bp?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aT(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&q.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),bk?(0,d.jsx)(k.gw,{providerId:r}):(0,d.jsxs)(k.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[t.length>0&&G.length>0&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ab(!0),children:"Apply Proxy"}),t.length>0&&(0,d.jsxs)(d.Fragment,{children:[aw.length>0&&(0,d.jsxs)(k.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=aw.length;0!==a&&aT({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aT(null);let a=0,b=[...aw];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}u(a=>a.filter(a=>!b.includes(a.id))),ax([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},children:["Delete Selected (",aw.length,")"]}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:bT,disabled:aW,children:aW?"Testing Connection One-by-One...":"Test Connection One-by-One"}),aW&&(0,d.jsx)(k.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{aW&&(a4.current=!0,aZ(!0))},disabled:aY,children:aY?"Stopping...":"Stop"})]}),(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:"Round Robin"}),(0,d.jsx)(k.lM,{checked:"round-robin"===aC,onChange:a=>{let b=a?"round-robin":null,c=a?aE||"1":aE;a&&!aE&&aF("1"),aD(b),bI(b,c)}}),"round-robin"===aC&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,d.jsx)("input",{type:"number",min:1,value:aE,onChange:a=>{var b;aF(b=a.target.value),bI("round-robin",b)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===t.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:bi?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),br&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bs," or ",bt,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:br?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bc,children:bs}),(0,d.jsx)(k.$n,{size:"sm",icon:"key",onClick:bd,children:bt})]}):(0,d.jsxs)(d.Fragment,{children:[!bq&&"iflow"===r&&(0,d.jsx)(k.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>R(!0),children:"Cookie"}),"codex"===r&&(0,d.jsx)(k.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>X(!0),children:(0,y.Tl)("Bulk Add")}),(0,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:be,children:bq?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[a2&&(0,d.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:["Total: ",a2.total]}),(0,d.jsxs)("span",{children:["Completed: ",a2.completed]}),(0,d.jsxs)("span",{children:["Passed: ",a2.passed]}),(0,d.jsxs)("span",{children:["Failed: ",a2.failed]}),a2.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),aW&&a$&&(0,d.jsxs)("span",{children:["Running: ",t.find(a=>a.id===a$)?.name||a$]})]})}),t.length>0&&(0,d.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,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:b_,onChange:()=>{b_?ax([]):ax(t.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),b3,!bq&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,d.jsx)(k.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>R(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===r&&(0,d.jsx)(k.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>X(!0),title:(0,y.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,y.Tl)("Bulk Add")}),br?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bc,className:"w-full sm:w-auto",children:bs}),(0,d.jsx)(k.$n,{size:"sm",icon:"key",onClick:bd,className:"w-full sm:w-auto",children:bt})]}):(0,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:be,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsxs)(k.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),bw&&(0,d.jsx)("select",{value:aG,onChange:a=>{var b;aH(b=a.target.value),bJ(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:bw.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))})]}),!bq&&(a=ak&&!!bg,b=(ai||[]).filter(a=>!1!==a.enabled).length,c=(ai||[]).length-b,g=[...bm,...aO.filter(a=>!bm.some(b=>b.id===a.id))].filter(a=>{let b=(0,m.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!aQ.includes(a)),n=a?c>0:aQ.length>0,o=a?b>0:g.length>0,(0,d.jsxs)("div",{className:"flex gap-2",children:[n&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>a?bS(!0):bC(),children:"Active All"}),o&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>a?bS(!1):bB(g),children:"Disable All"})]}))]}),!!aq&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:aq}),(()=>{let a,b,c;if(bq)return(0,d.jsx)(F,{providerStorageAlias:bv,providerDisplayAlias:bx,modelAliases:ae,customModels:ag,copied:a9,onCopy:ba,onSetAlias:bL,onDeleteAlias:bM,onAddCustomModel:a=>bN(a,"llm",bv),onDeleteCustomModel:a=>bO(a,"llm",bv),connections:t,isAnthropic:bp,jsonModels:bg?ai:null,importingJsonModels:a7,onImportJsonModels:bQ,onToggleJsonModel:bR,onBulkJsonModels:bS,useJsonCatalog:ak&&!!bg});let e=[...bm,...aO.filter(a=>!bm.some(b=>b.id===a.id))].filter(a=>{let b=(0,m.CP)(a);return!b||"llm"===b}),f=new Set(aQ),g=ak&&!!bg,h=g?(ai||[]).filter(a=>!1!==a.enabled):[],i=g?(ai||[]).filter(a=>!1===a.enabled):[],j=g?[]:e.filter(a=>!f.has(a.id)),k=g?[]:e.filter(a=>f.has(a.id)),l=g?[]:z({customModels:ag,modelAliases:ae,providerAlias:bv,builtInModels:bm,type:"llm"});return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[l.filter(a=>!1!==a.enabled).map(a=>(0,d.jsx)(C,{model:{id:a.id,name:a.name},fullModel:`${bx}/${a.id}`,alias:a.alias,copied:a9,onCopy:ba,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bO(a.id,"llm",bv):bM(a.alias)},testStatus:ao[a.id],onTest:t.length>0||bk?()=>b6(a.id):void 0,isTesting:as.has(a.id),isCustom:!0,isFree:!1,caps:{...s(`${r}/${a.id}`)||{},...void 0===a.vision?{}:{vision:a.vision},...void 0===a.reasoning?{}:{reasoning:a.reasoning},...void 0===a.contextWindow?{}:{contextWindow:a.contextWindow},...void 0===a.maxOutput?{}:{maxOutput:a.maxOutput}},thinkingSuffix:bu(a.id)},`${a.source}-${a.fullModel}`)),h.map(a=>(0,d.jsx)(C,{model:{id:a.id,name:a.name},fullModel:`${bx}/${a.id}`,copied:a9,onCopy:ba,testStatus:ao[a.id],onTest:t.length>0||bk?()=>b6(a.id):void 0,isTesting:as.has(a.id),onDisable:()=>bR(a.id,!1),isFree:!1,caps:{...s(`${r}/${a.id}`)||{},...void 0===a.vision?{}:{vision:a.vision},...void 0===a.reasoning?{}:{reasoning:a.reasoning},...void 0===a.contextWindow?{}:{contextWindow:a.contextWindow},...void 0===a.maxOutput?{}:{maxOutput:a.maxOutput}},thinkingSuffix:bu(a.id)},`json-${a.id}`)),j.map(a=>{let b=`${bv}/${a.id}`,c=`${r}/${a.id}`,e=Object.entries(ae).find(([,a])=>a===b||a===c)?.[0];return(0,d.jsx)(C,{model:a,fullModel:`${bx}/${a.id}`,alias:e,copied:a9,onCopy:ba,onSetAlias:b=>bL(a.id,b,bv),onDeleteAlias:()=>bM(e),testStatus:ao[a.id],onTest:t.length>0||bk?()=>b6(a.id):void 0,isTesting:as.has(a.id),isFree:a.isFree,onDisable:()=>bz(a.id),caps:s(`${r}/${a.id}`),thinkingSuffix:bu(a.id)},a.id)}),(0,d.jsxs)("button",{onClick:()=>av(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===r&&t.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:bP,disabled:a5,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:a5?{animation:"spin 1s linear infinite"}:void 0,children:a5?"progress_activity":"download"}),a5?(0,y.Tl)("Fetching..."):(0,y.Tl)("Fetch Qoder Models")]}),ak&&bg&&t.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:bQ,disabled:a7,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:a7?{animation:"spin 1s linear infinite"}:void 0,children:a7?"progress_activity":"download"}),a7?(0,y.Tl)("Fetching..."):(0,y.Tl)("Fetch Models")]}),aK.length>0&&(a=new Set([...Object.values(ae),...l.map(a=>a.fullModel)]),b=new Set(bm.map(a=>a.id)),0===(c=aK.filter(c=>!a.has(`${bv}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await bN(a.id,"llm",bv)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${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))})]})),(i.length>0||k.length>0)&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",i.length+k.length,"):"]}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i.map(a=>(0,d.jsxs)("button",{onClick:()=>bR(a.id,!0),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},`json-${a.id}`)),k.map(a=>(0,d.jsxs)("button",{onClick:()=>bA(a.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))]})]})]})})()]}),b5,"kiro"===r?(0,d.jsx)(k.Mh,{isOpen:J,providerInfo:bf,onSuccess:bV,onClose:()=>N(!1)}):"cursor"===r?(0,d.jsx)(k.G9,{isOpen:J,onSuccess:bV,onClose:()=>N(!1)}):"gitlab"===r?(0,d.jsx)(k.vj,{isOpen:J,providerInfo:bf,onSuccess:bV,onClose:()=>N(!1)}):(0,d.jsx)(k.LF,{isOpen:J,provider:r,providerInfo:bf,onSuccess:bV,onClose:()=>N(!1)}),"iflow"===r&&(0,d.jsx)(k.vE,{isOpen:Q,onSuccess:()=>{bG(),R(!1)},onClose:()=>R(!1)}),(0,d.jsx)(K,{isOpen:S,provider:r,providerName:bf.name,isCompatible:bq,isAnthropic:bp,authType:bf?.authType,authHint:bf?.authHint,website:bf?.website,proxyPools:G,error:U,existingNames:t.map(a=>a.name).filter(Boolean),onSave:bW,onBulkDone:bG,onClose:()=>{V(""),T(!1)}}),(0,d.jsx)(k.wI,{isOpen:Y,connection:ac,proxyPools:G,onSave:bX,onClose:()=>Z(!1)}),bq&&(0,d.jsx)(L,{isOpen:$,node:D,onSave:bH,onClose:()=>_(!1),isAnthropic:bp}),!bq&&(0,d.jsx)(M,{isOpen:au,providerAlias:bv,providerDisplayAlias:bx,onSave:async a=>{await bN(a,"llm",bv),av(!1)},onClose:()=>av(!1)}),"codex"===r&&(0,d.jsx)(O,{isOpen:W,onClose:()=>X(!1),onSuccess:bG}),(0,d.jsx)(k.uo,{isOpen:aU,onClose:()=>aV(!1),onConfirm:()=>{(aV(!1),bi)?bb():bd()},title:"Risk Notice",message:bf?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(k.uo,{isOpen:!!aS,onClose:()=>aT(null),onConfirm:aS?.onConfirm,title:aS?.title||"Confirm",message:aS?.message,variant:"danger"})]})}},7066:a=>{"use strict";a.exports=require("node:tty")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},9422:(a,b,c)=>{Promise.resolve().then(c.bind(c,6069))},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},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")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},71622:a=>{"use strict";a.exports=import("open")},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})},74918:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},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")},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")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81457:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>x,handler:()=>z,routeModule:()=>y});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,57529))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),v={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,93110))),"F:\\Files\\GitHub Files\\10router\\src\\app\\(dashboard)\\dashboard\\providers\\[id]\\page.js"]}]},{"global-error":[u,"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"F:\\Files\\GitHub Files\\10router\\src\\app\\(dashboard)\\layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"F:\\Files\\GitHub Files\\10router\\src\\app\\layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,w=(0,e.H)({tree:v,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),x=w.__next_app__,y=w.routeModule,z=w.handler},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},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 \"F:\\\\Files\\\\GitHub Files\\\\10router\\\\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.")},"F:\\Files\\GitHub Files\\10router\\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,1260,2430,4613,4665,1220,5247,2025,6070,869,915,6457,4123,1377,412,7356],()=>b(b.s=81457));module.exports=c})();
14
+ ]`;function P({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(!1),[j,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(null),o=()=>{h||(g(""),l(""),n(null),b())},p=async()=>{var a;let b;l(""),n(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){l(`${(0,y.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,y.Tl)("No accounts found in input"));i(!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}`);n(b),b.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,y.Tl)("Request failed"))}finally{i(!1)}},q=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(k.aF,{isOpen:a,title:(0,y.Tl)("Bulk Add Codex Accounts"),onClose:o,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,y.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:O,value:f,onChange:a=>g(a.target.value),disabled:h}),j&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:j}),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,y.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,y.Tl)("failed")}`:""]}),q.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:q.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)(k.$n,{onClick:p,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,y.Tl)("Importing..."):(0,y.Tl)("Import All")}),(0,d.jsx)(k.$n,{onClick:o,variant:"ghost",fullWidth:!0,disabled:h,children:(0,y.Tl)("Close")})]})]})})}P.propTypes={isOpen:C().bool.isRequired,onClose:C().func.isRequired,onSuccess:C().func};let Q={claude:"claudeAutoPing",codex:"codexAutoPing"};function R(){let a,b,c,g,n,o,p=(0,f.useParams)(),q=(0,f.useRouter)(),r=p.id,{getCaps:s}=(0,x.y)(),t=(0,z.i)(),[u,B]=(0,e.useState)([]),[C,E]=(0,e.useState)(!0),[F,H]=(0,e.useState)(null),[I,K]=(0,e.useState)([]),[O,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(""),[Y,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(!1),[aa,ab]=(0,e.useState)(!1),[ac,ad]=(0,e.useState)(!1),[ae,af]=(0,e.useState)(null),[ag,ah]=(0,e.useState)({}),[ai,aj]=(0,e.useState)([]),[ak,al]=(0,e.useState)(()=>null),[am,an]=(0,e.useState)(!1),[ao,ap]=(0,e.useState)(!1),[aq,ar]=(0,e.useState)({}),[as,at]=(0,e.useState)(""),[au,av]=(0,e.useState)(()=>new Set),[aw,ax]=(0,e.useState)(!1),[ay,az]=(0,e.useState)([]),[aA,aB]=(0,e.useState)("__none__"),[aC,aD]=(0,e.useState)(!1),[aE,aF]=(0,e.useState)(null),[aG,aH]=(0,e.useState)(""),[aI,aJ]=(0,e.useState)("auto"),[aK,aL]=(0,e.useState)({enabled:!1,connections:{}}),[aM,aN]=(0,e.useState)([]),[aO,aP]=(0,e.useState)([]),[aQ,aR]=(0,e.useState)([]),[aS,aT]=(0,e.useState)([]),[aU,aV]=(0,e.useState)(null),[aW,aX]=(0,e.useState)(!1),[aY,aZ]=(0,e.useState)(!1),[a$,a_]=(0,e.useState)(!1),[a0,a1]=(0,e.useState)(null),[a2,a3]=(0,e.useState)({}),[a4,a5]=(0,e.useState)(null),a6=(0,e.useRef)(!1),[a7,a8]=(0,e.useState)(!1),[a9,ba]=(0,e.useState)(!1),{copied:bb,copy:bc}=(0,w.C)(),bd=()=>{R(!0)},be=()=>{bk?bd():(X(""),V(!0))},bf=()=>{X(""),V(!0)},bg=()=>{bk?be():bf()},bh=F?{id:F.id,name:F.name||("anthropic-compatible"===F.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===F.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===F.type?"AC":"OC",apiType:F.apiType,baseUrl:F.baseUrl,type:F.type,modelsJsonUrl:F.modelsJsonUrl||void 0,fallbackModelsJsonUrl:F.fallbackModelsJsonUrl||void 0}:l.zN[r]||l.fg[r]||l.IS[r]||l.nJ[r]||l.br[r],bi=bh?.modelsJsonUrl,bj=bh?.authModes||[],bk=!!l.zN[r]||!!l.IS[r]||bj.includes("oauth"),bl=!!l.fg[r]||bj.includes("apikey"),bm=!!l.IS[r]?.noAuth,bn=(0,m.KC)(r),bo="cursor"===r&&aO.length>0?aO:bn,bp=(0,l.wG)(r),bq=(0,l.mq)(r),br=(0,l.gb)(r),bs=bq||br,bt=!bs&&bk&&bl,bu="xai"===r?"Grok Build OAuth":"grok-cli"===r?"Grok CLI Device Login":"kimi"===r?"Kimi Coding OAuth":"OAuth",bv="xai"===r?"xAI API Key":"kimi"===r?"Kimi API Key":"qoder"===r?"PAT":"API Key",bw=a=>{if(!aI||"auto"===aI)return null;let b=v(r,a);return b&&b.includes(aI)?aI:null},bx=bs?r:bp,by=(()=>{let a=new Set,b=new Set,c=c=>{if(!c||b.has(c))return;b.add(c);let d=v(r,c);d&&d.forEach(b=>{"none"!==b&&a.add(b)})};for(let a of bo)c(a.id);for(let a of aQ)c(a.id);for(let a of ai)a.providerAlias===bx&&"llm"===(a.kind||a.type||"llm")&&c(a.id);return a.size?["auto",...a]:null})(),bz=bs?F?.prefix||r:bp,bA=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bx)}`,{cache:"no-store"}),b=await a.json();a.ok&&aT(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bx]),bB=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bx,ids:[a]})})).ok&&await bA()}catch(a){console.log("Error disabling model:",a)}},bC=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bx)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bA()}catch(a){console.log("Error enabling model:",a)}},bD=async a=>{a.length&&aV({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aV(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bx,ids:a})})).ok&&await bA()}catch(a){console.log("Error disabling all models:",a)}}})},bE=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bx)}`,{method:"DELETE"})).ok&&await bA()}catch(a){console.log("Error enabling all models:",a)}},bF=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&ah(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bG=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&aj(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),bH=(0,e.useCallback)(async()=>{if(bi)try{let a=await fetch(`/api/providers/${r}/json-models`,{cache:"no-store"}),b=await a.json();a.ok&&al(b.models||[])}catch(a){console.log("Error fetching provider JSON models:",a)}},[r,bi]),bI=(0,e.useCallback)(async()=>{try{let[a,b,c,d]=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"})]),e=await a.json(),f=await b.json(),g=await c.json(),h=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===r);B(a)}c.ok&&K(g.proxyPools||[]);let i=(h.providerStrategies||{})[r]||{};aF(i.fallbackStrategy||null),aH(null!=i.stickyRoundRobinLimit?String(i.stickyRoundRobinLimit):"1");let j=(h.providerThinking||{})[r]||{};aJ(j.mode||"auto");let k=Q[r],l=k&&h[k]||{};if(aL({enabled:!0===l.enabled,connections:l.connections||{}}),b.ok){let a=(f.nodes||[]).find(a=>a.id===r)||null;if(!a&&bs)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===r)||null))break}H(a)}}catch(a){console.log("Error fetching connections:",a)}finally{E(!1)}},[r,bs]),bJ=async a=>{try{let b=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(H(c.node),await bI(),ab(!1))}catch(a){console.log("Error updating provider node:",a)}},bK=async(a,b)=>{try{let c=await fetch("/api/settings",{cache:"no-store"}),d=(c.ok?await c.json():{}).providerStrategies||{},e={};a&&(e.fallbackStrategy=a),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[r]:f[r]=e,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:f})})}catch(a){console.log("Error saving provider strategy:",a)}},bL=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[r]={mode:a}:delete c[r],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){console.log("Error saving thinking config:",a)}},bM=async a=>{let b=Q[r];if(b){aL(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)}}},bN=async(a,b,c=bp)=>{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 bF();else{let b=await a.json();t.error(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bO=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bF()}catch(a){console.log("Error deleting alias:",a)}},bP=async(a,b="llm",c=bx,d={},e)=>{try{let f={providerAlias:c,id:a,type:b};if(void 0!==e&&(f.enabled=e),d&&"object"==typeof d)for(let a of["vision","reasoning","contextWindow","maxOutput","thinkingFormat"])void 0!==d[a]&&(f[a]=d[a]);let g=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(g.ok)await bG();else{let a=await g.json();t.error(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},bQ=async(a,b="llm",c=bx)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bG()}catch(a){console.log("Error deleting custom model:",a)}},bR=async()=>{if(a7)return;let a=u.find(a=>!1!==a.isActive);if(!a)return void t.warning((0,y.Tl)("Please add an active Qoder connection first"));a8(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void t.error(c.error||(0,y.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void t.warning((0,y.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\//,"");ai.some(a=>a.providerAlias===bx&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values(ag).includes(`${bx}/${c}`)||(await bP(c,"llm",bx),e+=1)}0===e?t.warning((0,y.Tl)("All models already exist, no new models added")):t.success((0,y.Tl)("Successfully added")+` ${e} `+(0,y.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),t.error((0,y.Tl)("Error fetching models")+": "+a.message)}finally{a8(!1)}},bS=async()=>{if(!a9){ba(!0);try{let a=await fetch(`/api/providers/${r}/json-models`,{method:"POST"}),b=await a.json();if(!a.ok)return void t.error(b.error||(0,y.Tl)("Failed to fetch models"));await bH();let c=b.total||b.models?.length||0;t.success((0,y.Tl)("Sync complete")+` (${c} ${(0,y.Tl)("models")})`)}catch(a){console.log("Error importing models from JSON:",a),t.error((0,y.Tl)("Error fetching models")+": "+a.message)}finally{ba(!1)}}},bT=async(a,b)=>{try{(await fetch(`/api/providers/${r}/json-models`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({modelId:a,enabled:b})})).ok&&await bH()}catch(a){console.log("Error toggling JSON model:",a)}},bU=async a=>{try{(await fetch(`/api/providers/${r}/json-models`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({all:!0,enabled:a})})).ok&&await bH()}catch(a){console.log("Error bulk-toggling JSON models:",a)}},bV=async()=>{if(aY||0===u.length)return;let a=Object.fromEntries(u.map(a=>[a.id,{state:"queued",error:null}]));a6.current=!1,aZ(!0),a_(!1),a1(null),a3(a),a5({total:u.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<u.length;a+=1){if(a6.current){a5({total:u.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=u[a];a1(d.id),a3(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,a3(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,a3(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}a5({total:u.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<u.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{a1(null),aZ(!1),a_(!1),a6.current=!1}},bW=async a=>{aV({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aV(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&B(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bX=()=>{bI(),R(!1)},bY=async a=>{X("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bI(),V(!1);return}X(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),X("Failed to save connection")}},bZ=async a=>{try{(await fetch(`/api/providers/${ae.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bI(),_(!1))}catch(a){console.log("Error updating connection:",a)}},b$=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&B(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},b_=async(a,b)=>{let c=[...u];[c[a],c[b]]=[c[b],c[a]],B(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 bI()}},b0=u.filter(a=>ay.includes(a.id)),b1=u.length>0&&ay.length===u.length;(()=>{if(0===b0.length)return;let a=new Set(b0.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return;let c=I.find(a=>a.id===b);return c?.name}})();let b2=()=>{aC||ad(!1)},b3=async a=>{aD(!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 bI(),ad(!1)}finally{aD(!1)}},b4=a=>b3(u.map(b=>({connectionId:b.id,proxyPoolId:a}))),b5=(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:u.map((a,b)=>{let c;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:(c=a.id,ay.includes(c)),onChange:()=>{var b;return b=a.id,void az(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(J,{connection:a,proxyPools:I,isOAuth:bk,isFirst:0===b,isLast:b===u.length-1,onMoveUp:()=>b_(b,b-1),onMoveDown:()=>b_(b,b+1),onToggleActive:b=>b$(a.id,b),autoPing:Q[r]&&"oauth"===a.authType?{on:!0===aK.connections[a.id],onToggle:b=>{var c;return c=a.id,void bM({...aK,connections:{...aK.connections,[c]:b}})},provider:r}:null,onUpdateProxy:async b=>{try{(await fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:b||null})})).ok&&B(c=>c.map(c=>c.id===a.id?{...c,providerSpecificData:{...c.providerSpecificData,proxyPoolId:b||null}}:c))}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{af(a),_(!0)},onDelete:()=>bW(a.id),oneByOneStatus:a2[a.id]||null})})]},a.id)})}),b6=I.filter(a=>!0===a.isActive),b7=(0,d.jsx)(k.aF,{isOpen:ac,onClose:b2,title:`Apply Proxy (${u.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("button",{onClick:()=>{let a=I.filter(a=>!0===a.isActive);return 0===a.length?void t.warning("No active proxy pools available."):b3(u.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},disabled:aC||0===b6.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,d.jsxs)("button",{onClick:()=>b4(null),disabled:aC,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),I.map(a=>(0,d.jsxs)("button",{onClick:()=>b4(a.id),disabled:aC||!0!==a.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",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))]}),aC&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,d.jsx)(k.$n,{onClick:b2,variant:"ghost",fullWidth:!0,disabled:aC,children:"Cancel"})]})}),b8=async a=>{if(!au.has(a)){av(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:`${bx}/${a}`})}),c=await b.json();ar(b=>({...b,[a]:c.ok?"ok":"error"})),at(c.ok?"":c.error||"Model not reachable")}catch{ar(b=>({...b,[a]:"error"})),at("Network error")}finally{av(b=>{let c=new Set(b);return c.delete(a),c})}}};if(C)return(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(k.Qv,{}),(0,d.jsx)(k.Qv,{})]});if(!bh)return(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let b9=()=>bq&&bh.apiType?"responses"===bh.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":br?"/providers/anthropic-m.png":(0,j.HY)(bh.id);return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(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 hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${bh.color}15`},children:ao||!b9()?(0,d.jsx)("span",{className:"text-sm font-bold",style:{color:bh.color},children:bh.textIcon||bh.id.slice(0,2).toUpperCase()}):(0,d.jsx)(i.default,{src:b9(),alt:bh.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,j.Kw)(bh.id),ap(!0)},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:bh.name}),(bh.notice?.apiKeyUrl||bh.notice?.signupUrl||bh.website)&&(0,d.jsxs)("a",{href:bh.notice?.apiKeyUrl||bh.notice?.signupUrl||bh.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),bh.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[u.length," connection",1===u.length?"":"s"]})]})]})]}),bh.deprecated&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:bh.deprecationNotice})]}),bh.notice?.text&&!bh.deprecated&&(0,d.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:bh.notice.text}),bh.notice.apiKeyUrl&&(0,d.jsx)("a",{href:bh.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 →"})]}),bs&&F&&(0,d.jsx)(k.Zp,{children:(0,d.jsxs)("div",{className:"mb-4 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:br?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[br?"Messages API":"responses"===F.apiType?"Responses API":"Chat Completions"," \xb7 ",(F.baseUrl||"").replace(/\/$/,""),"/",br?"messages":"responses"===F.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:()=>{X(""),V(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ab(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{aV({title:"Delete Compatible Node",message:`Delete this ${br?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aV(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&q.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),bm?(0,d.jsx)(k.gw,{providerId:r}):(0,d.jsxs)(k.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[u.length>0&&I.length>0&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ad(!0),children:"Apply Proxy"}),u.length>0&&(0,d.jsxs)(d.Fragment,{children:[ay.length>0&&(0,d.jsxs)(k.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=ay.length;0!==a&&aV({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aV(null);let a=0,b=[...ay];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}B(a=>a.filter(a=>!b.includes(a.id))),az([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},children:["Delete Selected (",ay.length,")"]}),(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:bV,disabled:aY,children:aY?(0,y.Tl)("Testing Connection One-by-One..."):(0,y.Tl)("Test Connection One-by-One")}),aY&&(0,d.jsx)(k.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{aY&&(a6.current=!0,a_(!0))},disabled:a$,children:a$?(0,y.Tl)("Stopping..."):(0,y.Tl)("Stop")})]}),(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:(0,y.Tl)("Round Robin")}),(0,d.jsx)(k.lM,{checked:"round-robin"===aE,onChange:a=>{let b=a?"round-robin":null,c=a?aG||"1":aG;a&&!aG&&aH("1"),aF(b),bK(b,c)}}),"round-robin"===aE&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:(0,y.Tl)("Sticky:")}),(0,d.jsx)("input",{type:"number",min:1,value:aG,onChange:a=>{var b;aH(b=a.target.value),bK("round-robin",b)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===u.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:bk?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),bt&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bu," or ",bv,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:bt?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:be,children:bu}),(0,d.jsx)(k.$n,{size:"sm",icon:"key",onClick:bf,children:bv})]}):(0,d.jsxs)(d.Fragment,{children:[!bs&&"iflow"===r&&(0,d.jsx)(k.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>T(!0),children:"Cookie"}),"codex"===r&&(0,d.jsx)(k.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Z(!0),children:(0,y.Tl)("Bulk Add")}),(0,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:bg,children:bs?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[a4&&(0,d.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:[(0,y.Tl)("Total:")," ",a4.total]}),(0,d.jsxs)("span",{children:[(0,y.Tl)("Completed:")," ",a4.completed]}),(0,d.jsxs)("span",{children:[(0,y.Tl)("Passed:")," ",a4.passed]}),(0,d.jsxs)("span",{children:[(0,y.Tl)("Failed:")," ",a4.failed]}),a4.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:(0,y.Tl)("Stopped")}),aY&&a0&&(0,d.jsxs)("span",{children:[(0,y.Tl)("Running:")," ",u.find(a=>a.id===a0)?.name||a0]})]})}),u.length>0&&(0,d.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,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:b1,onChange:()=>{b1?az([]):az(u.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),b5,!bs&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,d.jsx)(k.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>T(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===r&&(0,d.jsx)(k.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Z(!0),title:(0,y.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,y.Tl)("Bulk Add")}),bt?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:be,className:"w-full sm:w-auto",children:bu}),(0,d.jsx)(k.$n,{size:"sm",icon:"key",onClick:bf,className:"w-full sm:w-auto",children:bv})]}):(0,d.jsx)(k.$n,{size:"sm",icon:"add",onClick:bg,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsxs)(k.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),by&&(0,d.jsx)("select",{value:aI,onChange:a=>{var b;aJ(b=a.target.value),bL(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:by.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))})]}),!bs&&(a=am&&!!bi,b=(ak||[]).filter(a=>!1!==a.enabled).length,c=(ak||[]).length-b,g=[...bo,...aQ.filter(a=>!bo.some(b=>b.id===a.id))].filter(a=>{let b=(0,m.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!aS.includes(a)),n=a?c>0:aS.length>0,o=a?b>0:g.length>0,(0,d.jsxs)("div",{className:"flex gap-2",children:[n&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>a?bU(!0):bE(),children:"Active All"}),o&&(0,d.jsx)(k.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>a?bU(!1):bD(g),children:"Disable All"})]}))]}),!!as&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:as}),(()=>{let a,b,c;if(bs)return(0,d.jsx)(G,{providerStorageAlias:bx,providerDisplayAlias:bz,modelAliases:ag,customModels:ai,copied:bb,onCopy:bc,onSetAlias:bN,onDeleteAlias:bO,onAddCustomModel:a=>bP(a,"llm",bx),onDeleteCustomModel:a=>bQ(a,"llm",bx),connections:u,isAnthropic:br,jsonModels:bi?ak:null,importingJsonModels:a9,onImportJsonModels:bS,onToggleJsonModel:bT,onBulkJsonModels:bU,useJsonCatalog:am&&!!bi});let e=[...bo,...aQ.filter(a=>!bo.some(b=>b.id===a.id))].filter(a=>{let b=(0,m.CP)(a);return!b||"llm"===b}),f=new Set(aS),g=am&&!!bi,h=g?(ak||[]).filter(a=>!1!==a.enabled):[],i=g?(ak||[]).filter(a=>!1===a.enabled):[],j=g?[]:e.filter(a=>!f.has(a.id)),k=g?[]:e.filter(a=>f.has(a.id)),l=A({customModels:ai,modelAliases:ag,providerAlias:bx,builtInModels:bo,type:"llm"});return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[l.filter(a=>!1!==a.enabled).map(a=>(0,d.jsx)(D,{model:{id:a.id,name:a.name},fullModel:`${bz}/${a.id}`,alias:a.alias,copied:bb,onCopy:bc,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bQ(a.id,"llm",bx):bO(a.alias)},testStatus:aq[a.id],onTest:u.length>0||bm?()=>b8(a.id):void 0,isTesting:au.has(a.id),isCustom:!0,isFree:!1,caps:{...s(`${r}/${a.id}`)||{},...void 0===a.vision?{}:{vision:a.vision},...void 0===a.reasoning?{}:{reasoning:a.reasoning},...void 0===a.contextWindow?{}:{contextWindow:a.contextWindow},...void 0===a.maxOutput?{}:{maxOutput:a.maxOutput}},thinkingSuffix:bw(a.id)},`${a.source}-${a.fullModel}`)),h.map(a=>(0,d.jsx)(D,{model:{id:a.id,name:a.name},fullModel:`${bz}/${a.id}`,copied:bb,onCopy:bc,testStatus:aq[a.id],onTest:u.length>0||bm?()=>b8(a.id):void 0,isTesting:au.has(a.id),onDisable:()=>bT(a.id,!1),isFree:!1,caps:{...s(`${r}/${a.id}`)||{},...void 0===a.vision?{}:{vision:a.vision},...void 0===a.reasoning?{}:{reasoning:a.reasoning},...void 0===a.contextWindow?{}:{contextWindow:a.contextWindow},...void 0===a.maxOutput?{}:{maxOutput:a.maxOutput}},thinkingSuffix:bw(a.id)},`json-${a.id}`)),j.map(a=>{let b=`${bx}/${a.id}`,c=`${r}/${a.id}`,e=Object.entries(ag).find(([,a])=>a===b||a===c)?.[0];return(0,d.jsx)(D,{model:a,fullModel:`${bz}/${a.id}`,alias:e,copied:bb,onCopy:bc,onSetAlias:b=>bN(a.id,b,bx),onDeleteAlias:()=>bO(e),testStatus:aq[a.id],onTest:u.length>0||bm?()=>b8(a.id):void 0,isTesting:au.has(a.id),isFree:a.isFree,onDisable:()=>bB(a.id),caps:s(`${r}/${a.id}`),thinkingSuffix:bw(a.id)},a.id)}),(0,d.jsxs)("button",{onClick:()=>ax(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===r&&u.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:bR,disabled:a7,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:a7?{animation:"spin 1s linear infinite"}:void 0,children:a7?"progress_activity":"download"}),a7?(0,y.Tl)("Fetching..."):(0,y.Tl)("Fetch Qoder Models")]}),am&&bi&&u.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:bS,disabled:a9,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:a9?{animation:"spin 1s linear infinite"}:void 0,children:a9?"progress_activity":"download"}),a9?(0,y.Tl)("Fetching..."):(0,y.Tl)("Fetch Models")]}),aM.length>0&&(a=new Set([...Object.values(ag),...l.map(a=>a.fullModel)]),b=new Set(bo.map(a=>a.id)),0===(c=aM.filter(c=>!a.has(`${bx}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await bP(a.id,"llm",bx)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${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))})]})),(i.length>0||k.length>0)&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",i.length+k.length,"):"]}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i.map(a=>(0,d.jsxs)("button",{onClick:()=>bT(a.id,!0),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},`json-${a.id}`)),k.map(a=>(0,d.jsxs)("button",{onClick:()=>bC(a.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))]})]})]})})()]}),b7,"kiro"===r?(0,d.jsx)(k.Mh,{isOpen:O,providerInfo:bh,onSuccess:bX,onClose:()=>R(!1)}):"cursor"===r?(0,d.jsx)(k.G9,{isOpen:O,onSuccess:bX,onClose:()=>R(!1)}):"gitlab"===r?(0,d.jsx)(k.vj,{isOpen:O,providerInfo:bh,onSuccess:bX,onClose:()=>R(!1)}):(0,d.jsx)(k.LF,{isOpen:O,provider:r,providerInfo:bh,onSuccess:bX,onClose:()=>R(!1)}),"iflow"===r&&(0,d.jsx)(k.vE,{isOpen:S,onSuccess:()=>{bI(),T(!1)},onClose:()=>T(!1)}),(0,d.jsx)(L,{isOpen:U,provider:r,providerName:bh.name,isCompatible:bs,isAnthropic:br,authType:bh?.authType,authHint:bh?.authHint,website:bh?.website,proxyPools:I,error:W,existingNames:u.map(a=>a.name).filter(Boolean),onSave:bY,onBulkDone:bI,onClose:()=>{X(""),V(!1)}}),(0,d.jsx)(k.wI,{isOpen:$,connection:ae,proxyPools:I,onSave:bZ,onClose:()=>_(!1)}),bs&&(0,d.jsx)(M,{isOpen:aa,node:F,onSave:bJ,onClose:()=>ab(!1),isAnthropic:br}),!bs&&(0,d.jsx)(N,{isOpen:aw,providerAlias:bx,providerDisplayAlias:bz,onSave:async a=>{await bP(a,"llm",bx),ax(!1)},onClose:()=>ax(!1)}),"codex"===r&&(0,d.jsx)(P,{isOpen:Y,onClose:()=>Z(!1),onSuccess:bI}),(0,d.jsx)(k.uo,{isOpen:aW,onClose:()=>aX(!1),onConfirm:()=>{(aX(!1),bk)?bd():bf()},title:"Risk Notice",message:bh?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(k.uo,{isOpen:!!aU,onClose:()=>aV(null),onConfirm:aU?.onConfirm,title:aU?.title||"Confirm",message:aU?.message,variant:"danger"})]})}},7066:a=>{"use strict";a.exports=require("node:tty")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},9422:(a,b,c)=>{Promise.resolve().then(c.bind(c,6069))},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},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")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},71622:a=>{"use strict";a.exports=import("open")},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})},74918:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},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")},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")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81424:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>x,handler:()=>z,routeModule:()=>y});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,57529))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),v={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,93110))),"F:\\Files\\GitHub Files\\10router\\src\\app\\(dashboard)\\dashboard\\providers\\[id]\\page.js"]}]},{"global-error":[u,"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"F:\\Files\\GitHub Files\\10router\\src\\app\\(dashboard)\\layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"F:\\Files\\GitHub Files\\10router\\src\\app\\layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,w=(0,e.H)({tree:v,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),x=w.__next_app__,y=w.routeModule,z=w.handler},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},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 \"F:\\\\Files\\\\GitHub Files\\\\10router\\\\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.")},"F:\\Files\\GitHub Files\\10router\\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,1260,2430,4613,4665,1220,9703,5448,7419,6070,869,915,6457,4123,1377,412,7356],()=>b(b.s=81424));module.exports=c})();