67router 1.0.1 → 1.0.3

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 (1132) hide show
  1. package/README.md +73 -1
  2. package/app/.next-cli-build/BUILD_ID +1 -1
  3. package/app/.next-cli-build/app-path-routes-manifest.json +5 -3
  4. package/app/.next-cli-build/build-manifest.json +2 -2
  5. package/app/.next-cli-build/prerender-manifest.json +17 -17
  6. package/app/.next-cli-build/required-server-files.json +2 -1
  7. package/app/.next-cli-build/routes-manifest.json +12 -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 +12 -8
  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 +2 -2
  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 +3 -3
  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 +4 -4
  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 +1 -1
  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 +2 -2
  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 +5 -29
  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 +1 -1
  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 +2 -2
  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/codewhale-settings/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  142. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +25 -0
  152. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -0
  153. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route_client-reference-manifest.js +1 -0
  154. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -26
  155. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
  161. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  163. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  165. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  257. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  263. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  301. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  303. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +68 -0
  305. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -0
  306. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route_client-reference-manifest.js +1 -0
  307. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  312. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  314. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  316. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  318. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  320. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  322. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  324. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  326. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  342. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  400. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  436. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  437. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  438. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  439. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  442. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  444. package/app/.next-cli-build/server/app/callback.html +1 -1
  445. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  446. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  447. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  448. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  449. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  451. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +4 -4
  452. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  453. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  454. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  456. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +5 -5
  457. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  458. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  459. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  461. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +4 -4
  462. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  463. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  464. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  466. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -6
  467. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  468. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  469. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  471. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +4 -4
  472. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  473. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  474. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  476. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +5 -5
  477. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  478. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  479. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  481. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +4 -4
  482. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  483. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  484. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  486. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +4 -4
  487. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  488. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  491. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +4 -4
  492. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  493. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  494. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  496. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +5 -5
  497. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  498. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  501. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +4 -4
  502. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  503. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  504. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  506. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +5 -5
  507. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  508. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  512. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  514. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  515. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
  517. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  519. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +4 -4
  520. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  521. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  522. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  523. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  524. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +5 -5
  525. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  526. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  527. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  529. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +4 -4
  530. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  531. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  532. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  533. package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  534. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +4 -4
  535. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  536. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  537. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  538. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  539. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +6 -6
  540. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  541. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  542. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  543. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  544. package/app/.next-cli-build/server/app/favicon.ico.body +0 -0
  545. package/app/.next-cli-build/server/app/index.html +1 -1
  546. package/app/.next-cli-build/server/app/index.rsc +5 -5
  547. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  548. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  549. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  550. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  551. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  552. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  553. package/app/.next-cli-build/server/app/landing.html +1 -1
  554. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  555. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  556. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  557. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
  558. package/app/.next-cli-build/server/app/login/page.js +1 -1
  559. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  560. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  561. package/app/.next-cli-build/server/app/login.html +1 -1
  562. package/app/.next-cli-build/server/app/login.rsc +5 -5
  563. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  564. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  565. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  566. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  567. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  568. package/app/.next-cli-build/server/app/page.js +1 -1
  569. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  570. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  571. package/app/.next-cli-build/server/app-paths-manifest.json +5 -3
  572. package/app/.next-cli-build/server/chunks/1757.js +25 -0
  573. package/app/.next-cli-build/server/chunks/238.js +1 -0
  574. package/app/.next-cli-build/server/chunks/24.js +1 -1
  575. package/app/.next-cli-build/server/chunks/3047.js +1 -0
  576. package/app/.next-cli-build/server/chunks/3593.js +2 -2
  577. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  578. package/app/.next-cli-build/server/chunks/3966.js +1 -1
  579. package/app/.next-cli-build/server/chunks/4049.js +1 -1
  580. package/app/.next-cli-build/server/chunks/4055.js +2 -2
  581. package/app/.next-cli-build/server/chunks/412.js +1 -1
  582. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  583. package/app/.next-cli-build/server/chunks/4252.js +1 -0
  584. package/app/.next-cli-build/server/chunks/436.js +1 -1
  585. package/app/.next-cli-build/server/chunks/4663.js +1 -1
  586. package/app/.next-cli-build/server/chunks/4739.js +2 -2
  587. package/app/.next-cli-build/server/chunks/4780.js +2 -2
  588. package/app/.next-cli-build/server/chunks/4872.js +1 -0
  589. package/app/.next-cli-build/server/chunks/507.js +2 -2
  590. package/app/.next-cli-build/server/chunks/5217.js +2 -2
  591. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  592. package/app/.next-cli-build/server/chunks/5299.js +20 -19
  593. package/app/.next-cli-build/server/chunks/5330.js +7 -7
  594. package/app/.next-cli-build/server/chunks/5500.js +1 -1
  595. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  596. package/app/.next-cli-build/server/chunks/5946.js +2 -2
  597. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  598. package/app/.next-cli-build/server/chunks/615.js +1 -1
  599. package/app/.next-cli-build/server/chunks/6249.js +2 -2
  600. package/app/.next-cli-build/server/chunks/{4037.js → 6540.js} +1 -1
  601. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  602. package/app/.next-cli-build/server/chunks/6922.js +1 -1
  603. package/app/.next-cli-build/server/chunks/698.js +2 -2
  604. package/app/.next-cli-build/server/chunks/7037.js +1 -1
  605. package/app/.next-cli-build/server/chunks/7211.js +1 -1
  606. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  607. package/app/.next-cli-build/server/chunks/7285.js +1 -0
  608. package/app/.next-cli-build/server/chunks/7552.js +1 -0
  609. package/app/.next-cli-build/server/chunks/7716.js +1 -1
  610. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  611. package/app/.next-cli-build/server/chunks/8251.js +1 -0
  612. package/app/.next-cli-build/server/chunks/827.js +1 -1
  613. package/app/.next-cli-build/server/chunks/8402.js +1 -1
  614. package/app/.next-cli-build/server/chunks/8416.js +1 -1
  615. package/app/.next-cli-build/server/chunks/8499.js +3 -3
  616. package/app/.next-cli-build/server/chunks/8520.js +2 -2
  617. package/app/.next-cli-build/server/chunks/8635.js +1 -1
  618. package/app/.next-cli-build/server/chunks/869.js +1 -1
  619. package/app/.next-cli-build/server/chunks/8895.js +5 -5
  620. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  621. package/app/.next-cli-build/server/chunks/9100.js +21 -0
  622. package/app/.next-cli-build/server/chunks/915.js +2 -2
  623. package/app/.next-cli-build/server/chunks/936.js +1 -0
  624. package/app/.next-cli-build/server/chunks/9378.js +1 -0
  625. package/app/.next-cli-build/server/chunks/9604.js +1 -0
  626. package/app/.next-cli-build/server/chunks/9696.js +7 -0
  627. package/app/.next-cli-build/server/instrumentation.js +1 -1
  628. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  629. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  630. package/app/.next-cli-build/server/middleware.js +4 -4
  631. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  632. package/app/.next-cli-build/server/pages/404.html +1 -1
  633. package/app/.next-cli-build/server/pages/500.html +1 -1
  634. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  635. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  636. package/app/.next-cli-build/static/chunks/1321-10507ce87a2d1e74.js +1 -0
  637. package/app/.next-cli-build/static/chunks/{2694-a1e5a15b567b3016.js → 2694-fa4a038c7addaf24.js} +2 -2
  638. package/app/.next-cli-build/static/chunks/5497-3353154ebc0a5eb1.js +7 -0
  639. package/app/.next-cli-build/static/chunks/761-14e8dc284c182522.js +125 -0
  640. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-5c93b8979ef66e54.js → page-99efb86d0bd7063d.js} +15 -11
  641. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-3ec2eae580cfd6e9.js +27 -0
  642. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-d61c6b11bb916a3c.js +4 -0
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c2e6b6ae60d66ee6.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-4b073ba7273cde14.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/_global-error/page-7ee9602010473e2d.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-7ee9602010473e2d.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-7ee9602010473e2d.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-7ee9602010473e2d.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-7ee9602010473e2d.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-7ee9602010473e2d.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-7ee9602010473e2d.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-7ee9602010473e2d.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-7ee9602010473e2d.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-7ee9602010473e2d.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-7ee9602010473e2d.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-7ee9602010473e2d.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-7ee9602010473e2d.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-7ee9602010473e2d.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-7ee9602010473e2d.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-7ee9602010473e2d.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-7ee9602010473e2d.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-7ee9602010473e2d.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-7ee9602010473e2d.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-7ee9602010473e2d.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-7ee9602010473e2d.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-7ee9602010473e2d.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-7ee9602010473e2d.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-7ee9602010473e2d.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-7ee9602010473e2d.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-7ee9602010473e2d.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-7ee9602010473e2d.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-7ee9602010473e2d.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-7ee9602010473e2d.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-7ee9602010473e2d.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-7ee9602010473e2d.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-7ee9602010473e2d.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-7ee9602010473e2d.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-7ee9602010473e2d.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-7ee9602010473e2d.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-7ee9602010473e2d.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-7ee9602010473e2d.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-7ee9602010473e2d.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-7ee9602010473e2d.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-7ee9602010473e2d.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-7ee9602010473e2d.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/combos/route-7ee9602010473e2d.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-7ee9602010473e2d.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-7ee9602010473e2d.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-7ee9602010473e2d.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-7ee9602010473e2d.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-7ee9602010473e2d.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-7ee9602010473e2d.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/health/route-7ee9602010473e2d.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/init/route-7ee9602010473e2d.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-7ee9602010473e2d.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/keys/route-7ee9602010473e2d.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/locale/route-7ee9602010473e2d.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-7ee9602010473e2d.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-7ee9602010473e2d.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-7ee9602010473e2d.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-7ee9602010473e2d.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-7ee9602010473e2d.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-7ee9602010473e2d.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-7ee9602010473e2d.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-7ee9602010473e2d.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-7ee9602010473e2d.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-7ee9602010473e2d.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-7ee9602010473e2d.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-7ee9602010473e2d.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/models/route-7ee9602010473e2d.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/models/test/route-7ee9602010473e2d.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-7ee9602010473e2d.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-7ee9602010473e2d.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-7ee9602010473e2d.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-7ee9602010473e2d.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-7ee9602010473e2d.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-7ee9602010473e2d.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-7ee9602010473e2d.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-7ee9602010473e2d.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-7ee9602010473e2d.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-7ee9602010473e2d.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-7ee9602010473e2d.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-7ee9602010473e2d.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-7ee9602010473e2d.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-7ee9602010473e2d.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-7ee9602010473e2d.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-7ee9602010473e2d.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-7ee9602010473e2d.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-7ee9602010473e2d.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-7ee9602010473e2d.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-7ee9602010473e2d.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/pricing/route-7ee9602010473e2d.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-7ee9602010473e2d.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-7ee9602010473e2d.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-7ee9602010473e2d.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-7ee9602010473e2d.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-7ee9602010473e2d.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-7ee9602010473e2d.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-7ee9602010473e2d.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-7ee9602010473e2d.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-7ee9602010473e2d.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-7ee9602010473e2d.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/providers/route-7ee9602010473e2d.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-7ee9602010473e2d.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-7ee9602010473e2d.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-7ee9602010473e2d.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-7ee9602010473e2d.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-7ee9602010473e2d.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-7ee9602010473e2d.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-7ee9602010473e2d.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-7ee9602010473e2d.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-7ee9602010473e2d.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-7ee9602010473e2d.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-7ee9602010473e2d.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-7ee9602010473e2d.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-7ee9602010473e2d.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-7ee9602010473e2d.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-7ee9602010473e2d.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-7ee9602010473e2d.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-7ee9602010473e2d.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-7ee9602010473e2d.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-7ee9602010473e2d.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-7ee9602010473e2d.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-7ee9602010473e2d.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/settings/route-7ee9602010473e2d.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-7ee9602010473e2d.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/tags/route-7ee9602010473e2d.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-7ee9602010473e2d.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-7ee9602010473e2d.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-7ee9602010473e2d.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-7ee9602010473e2d.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-7ee9602010473e2d.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-7ee9602010473e2d.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-7ee9602010473e2d.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-7ee9602010473e2d.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-7ee9602010473e2d.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-7ee9602010473e2d.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-7ee9602010473e2d.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-7ee9602010473e2d.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-7ee9602010473e2d.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-7ee9602010473e2d.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-7ee9602010473e2d.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-7ee9602010473e2d.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-7ee9602010473e2d.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-7ee9602010473e2d.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-7ee9602010473e2d.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-7ee9602010473e2d.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-7ee9602010473e2d.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-7ee9602010473e2d.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-7ee9602010473e2d.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-7ee9602010473e2d.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-7ee9602010473e2d.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-7ee9602010473e2d.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-7ee9602010473e2d.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-7ee9602010473e2d.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-7ee9602010473e2d.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-7ee9602010473e2d.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-7ee9602010473e2d.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-7ee9602010473e2d.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-7ee9602010473e2d.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-7ee9602010473e2d.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-7ee9602010473e2d.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-7ee9602010473e2d.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-7ee9602010473e2d.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-7ee9602010473e2d.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/v1/route-7ee9602010473e2d.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-7ee9602010473e2d.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-7ee9602010473e2d.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-7ee9602010473e2d.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-7ee9602010473e2d.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-7ee9602010473e2d.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-7ee9602010473e2d.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-7ee9602010473e2d.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-7ee9602010473e2d.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-7ee9602010473e2d.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/version/route-7ee9602010473e2d.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-7ee9602010473e2d.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/version/update/route-7ee9602010473e2d.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/landing/page-d95764e0f3861cfe.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-7ee9602010473e2d.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/page-7ee9602010473e2d.js +1 -0
  822. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-7ee9602010473e2d.js +1 -0
  823. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-7ee9602010473e2d.js +1 -0
  824. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-7ee9602010473e2d.js +1 -0
  825. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-7ee9602010473e2d.js +1 -0
  826. package/app/.next-cli-build/static/css/1b93179163bad564.css +1 -0
  827. package/app/.next-cli-build/static/eXoiEKu5yWZkk7npUXFrc/_buildManifest.js +1 -0
  828. package/app/cli/.build-home/AppData/Roaming/67router/db/backups/schema-1-to-2-1.0.1-20261009-073855/data.sqlite +0 -0
  829. package/app/cli/.build-home/AppData/Roaming/67router/db/data.sqlite-shm +0 -0
  830. package/app/cli/.build-home/AppData/Roaming/67router/db/data.sqlite-wal +0 -0
  831. package/app/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js +131 -0
  832. package/app/node_modules/@aws/lambda-invoke-store/package.json +55 -0
  833. package/app/node_modules/@aws-sdk/core/client.js +5 -0
  834. package/app/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +984 -0
  835. package/app/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +349 -0
  836. package/app/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +2949 -0
  837. package/app/node_modules/@aws-sdk/core/httpAuthSchemes.js +5 -0
  838. package/app/node_modules/@aws-sdk/core/package.json +146 -0
  839. package/app/node_modules/@aws-sdk/core/protocols.js +5 -0
  840. package/app/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-cjs/index.js +202 -0
  841. package/app/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-cjs/loadCognitoIdentity-v413cIIq.js +4 -0
  842. package/app/node_modules/@aws-sdk/credential-provider-cognito-identity/package.json +59 -0
  843. package/app/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +39 -0
  844. package/app/node_modules/@aws-sdk/credential-provider-env/package.json +63 -0
  845. package/app/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +179 -0
  846. package/app/node_modules/@aws-sdk/credential-provider-http/package.json +75 -0
  847. package/app/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +229 -0
  848. package/app/node_modules/@aws-sdk/credential-provider-ini/package.json +73 -0
  849. package/app/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +290 -0
  850. package/app/node_modules/@aws-sdk/credential-provider-login/package.json +66 -0
  851. package/app/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +166 -0
  852. package/app/node_modules/@aws-sdk/credential-provider-node/package.json +71 -0
  853. package/app/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +76 -0
  854. package/app/node_modules/@aws-sdk/credential-provider-process/package.json +63 -0
  855. package/app/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +192 -0
  856. package/app/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js +3 -0
  857. package/app/node_modules/@aws-sdk/credential-provider-sso/package.json +67 -0
  858. package/app/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +58 -0
  859. package/app/node_modules/@aws-sdk/credential-provider-web-identity/package.json +71 -0
  860. package/app/node_modules/@aws-sdk/credential-providers/dist-cjs/index.js +284 -0
  861. package/app/node_modules/@aws-sdk/credential-providers/dist-cjs/loadSts-C4jOcYxJ.js +3 -0
  862. package/app/node_modules/@aws-sdk/credential-providers/package.json +85 -0
  863. package/app/node_modules/@aws-sdk/nested-clients/cognito-identity.js +5 -0
  864. package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +616 -0
  865. package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +590 -0
  866. package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +468 -0
  867. package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +674 -0
  868. package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +881 -0
  869. package/app/node_modules/@aws-sdk/nested-clients/package.json +121 -0
  870. package/app/node_modules/@aws-sdk/nested-clients/signin.js +5 -0
  871. package/app/node_modules/@aws-sdk/nested-clients/sso-oidc.js +5 -0
  872. package/app/node_modules/@aws-sdk/nested-clients/sso.js +5 -0
  873. package/app/node_modules/@aws-sdk/nested-clients/sts.js +5 -0
  874. package/app/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +155 -0
  875. package/app/node_modules/@aws-sdk/signature-v4-multi-region/package.json +60 -0
  876. package/app/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +158 -0
  877. package/app/node_modules/@aws-sdk/token-providers/package.json +69 -0
  878. package/app/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +372 -0
  879. package/app/node_modules/@aws-sdk/xml-builder/package.json +63 -0
  880. package/app/node_modules/@smithy/core/cbor.js +5 -0
  881. package/app/node_modules/@smithy/core/checksum.js +5 -0
  882. package/app/node_modules/@smithy/core/client.js +5 -0
  883. package/app/node_modules/@smithy/core/config.js +5 -0
  884. package/app/node_modules/@smithy/core/dist-cjs/index.js +344 -0
  885. package/app/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +2550 -0
  886. package/app/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +577 -0
  887. package/app/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +1200 -0
  888. package/app/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +779 -0
  889. package/app/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +879 -0
  890. package/app/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +924 -0
  891. package/app/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1099 -0
  892. package/app/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +848 -0
  893. package/app/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +709 -0
  894. package/app/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +1765 -0
  895. package/app/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +189 -0
  896. package/app/node_modules/@smithy/core/endpoints.js +5 -0
  897. package/app/node_modules/@smithy/core/event-streams.js +5 -0
  898. package/app/node_modules/@smithy/core/package.json +258 -0
  899. package/app/node_modules/@smithy/core/protocols.js +5 -0
  900. package/app/node_modules/@smithy/core/retry.js +5 -0
  901. package/app/node_modules/@smithy/core/schema.js +5 -0
  902. package/app/node_modules/@smithy/core/serde.js +5 -0
  903. package/app/node_modules/@smithy/core/transport.js +5 -0
  904. package/app/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +370 -0
  905. package/app/node_modules/@smithy/credential-provider-imds/package.json +57 -0
  906. package/app/node_modules/@smithy/node-http-handler/dist-cjs/index.js +859 -0
  907. package/app/node_modules/@smithy/node-http-handler/package.json +56 -0
  908. package/app/node_modules/@smithy/signature-v4/dist-cjs/index.js +585 -0
  909. package/app/node_modules/@smithy/signature-v4/package.json +53 -0
  910. package/app/node_modules/@smithy/types/dist-cjs/index.js +96 -0
  911. package/app/node_modules/@smithy/types/package.json +50 -0
  912. package/app/node_modules/bowser/es5.js +1 -0
  913. package/app/node_modules/bowser/package.json +93 -0
  914. package/app/package.json +4 -1
  915. package/app/public/providers/bedrock-xai.png +0 -0
  916. package/app/public/providers/bedrock.png +0 -0
  917. package/app/server.js +1 -1
  918. package/app/src/mitm/server.js +24 -24
  919. package/cli.js +9 -6
  920. package/package.json +1 -1
  921. package/src/cli/api/client.js +17 -4
  922. package/src/cli/commands/connect.js +156 -16
  923. package/src/cli/commands/connectTools.js +282 -21
  924. package/src/cli/commands/show.js +101 -0
  925. package/src/cli/menus/cliTools.js +116 -17
  926. package/src/cli/menus/combos.js +9 -2
  927. package/src/cli/menus/providers.js +8 -0
  928. package/src/cli/tray/autostart.js +2 -2
  929. package/src/cli/tray/icon.ico +0 -0
  930. package/src/cli/tray/icon.png +0 -0
  931. package/src/cli/tray/tray.js +7 -7
  932. package/src/cli/tray/tray.ps1 +1 -1
  933. package/src/cli/utils/comboModelId.js +10 -0
  934. package/app/.next-cli-build/server/chunks/1731.js +0 -1
  935. package/app/.next-cli-build/server/chunks/4572.js +0 -1
  936. package/app/.next-cli-build/server/chunks/458.js +0 -1
  937. package/app/.next-cli-build/server/chunks/4850.js +0 -1
  938. package/app/.next-cli-build/server/chunks/4884.js +0 -21
  939. package/app/.next-cli-build/server/chunks/5524.js +0 -1
  940. package/app/.next-cli-build/server/chunks/5670.js +0 -1
  941. package/app/.next-cli-build/server/chunks/700.js +0 -1
  942. package/app/.next-cli-build/server/chunks/7220.js +0 -1
  943. package/app/.next-cli-build/server/chunks/9128.js +0 -1
  944. package/app/.next-cli-build/static/chunks/1321-c545acd5fe356d7b.js +0 -1
  945. package/app/.next-cli-build/static/chunks/5497-1564aeaafa84c485.js +0 -7
  946. package/app/.next-cli-build/static/chunks/761-620fbf946f547a62.js +0 -124
  947. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-319aa3378d3ab380.js +0 -27
  948. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-2476e19d152dd091.js +0 -4
  949. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-9f91a799bf128657.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-49a84b0cda78a0cb.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/_global-error/page-11746d5d6532f1f0.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-11746d5d6532f1f0.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-11746d5d6532f1f0.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-11746d5d6532f1f0.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-11746d5d6532f1f0.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-11746d5d6532f1f0.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-11746d5d6532f1f0.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-11746d5d6532f1f0.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-11746d5d6532f1f0.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-11746d5d6532f1f0.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-11746d5d6532f1f0.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-11746d5d6532f1f0.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-11746d5d6532f1f0.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-11746d5d6532f1f0.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-11746d5d6532f1f0.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-11746d5d6532f1f0.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-11746d5d6532f1f0.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-11746d5d6532f1f0.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-11746d5d6532f1f0.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-11746d5d6532f1f0.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-11746d5d6532f1f0.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-11746d5d6532f1f0.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-11746d5d6532f1f0.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-11746d5d6532f1f0.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-11746d5d6532f1f0.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-11746d5d6532f1f0.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-11746d5d6532f1f0.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-11746d5d6532f1f0.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-11746d5d6532f1f0.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-11746d5d6532f1f0.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-11746d5d6532f1f0.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-11746d5d6532f1f0.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-11746d5d6532f1f0.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-11746d5d6532f1f0.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-11746d5d6532f1f0.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-11746d5d6532f1f0.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-11746d5d6532f1f0.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-11746d5d6532f1f0.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-11746d5d6532f1f0.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-11746d5d6532f1f0.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/combos/route-11746d5d6532f1f0.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-11746d5d6532f1f0.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-11746d5d6532f1f0.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-11746d5d6532f1f0.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-11746d5d6532f1f0.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-11746d5d6532f1f0.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-11746d5d6532f1f0.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/health/route-11746d5d6532f1f0.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/init/route-11746d5d6532f1f0.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-11746d5d6532f1f0.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/keys/route-11746d5d6532f1f0.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/locale/route-11746d5d6532f1f0.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-11746d5d6532f1f0.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-11746d5d6532f1f0.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-11746d5d6532f1f0.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-11746d5d6532f1f0.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-11746d5d6532f1f0.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-11746d5d6532f1f0.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-11746d5d6532f1f0.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-11746d5d6532f1f0.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-11746d5d6532f1f0.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-11746d5d6532f1f0.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-11746d5d6532f1f0.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-11746d5d6532f1f0.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/models/route-11746d5d6532f1f0.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/models/test/route-11746d5d6532f1f0.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-11746d5d6532f1f0.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-11746d5d6532f1f0.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-11746d5d6532f1f0.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-11746d5d6532f1f0.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-11746d5d6532f1f0.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-11746d5d6532f1f0.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-11746d5d6532f1f0.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-11746d5d6532f1f0.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-11746d5d6532f1f0.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-11746d5d6532f1f0.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-11746d5d6532f1f0.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-11746d5d6532f1f0.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-11746d5d6532f1f0.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-11746d5d6532f1f0.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-11746d5d6532f1f0.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-11746d5d6532f1f0.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-11746d5d6532f1f0.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-11746d5d6532f1f0.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-11746d5d6532f1f0.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-11746d5d6532f1f0.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/pricing/route-11746d5d6532f1f0.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-11746d5d6532f1f0.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-11746d5d6532f1f0.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-11746d5d6532f1f0.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-11746d5d6532f1f0.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-11746d5d6532f1f0.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-11746d5d6532f1f0.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-11746d5d6532f1f0.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-11746d5d6532f1f0.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-11746d5d6532f1f0.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-11746d5d6532f1f0.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/providers/route-11746d5d6532f1f0.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-11746d5d6532f1f0.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-11746d5d6532f1f0.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-11746d5d6532f1f0.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-11746d5d6532f1f0.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-11746d5d6532f1f0.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-11746d5d6532f1f0.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-11746d5d6532f1f0.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-11746d5d6532f1f0.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-11746d5d6532f1f0.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-11746d5d6532f1f0.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-11746d5d6532f1f0.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-11746d5d6532f1f0.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-11746d5d6532f1f0.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-11746d5d6532f1f0.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-11746d5d6532f1f0.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-11746d5d6532f1f0.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-11746d5d6532f1f0.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-11746d5d6532f1f0.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-11746d5d6532f1f0.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-11746d5d6532f1f0.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/settings/route-11746d5d6532f1f0.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-11746d5d6532f1f0.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/tags/route-11746d5d6532f1f0.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-11746d5d6532f1f0.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-11746d5d6532f1f0.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-11746d5d6532f1f0.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-11746d5d6532f1f0.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-11746d5d6532f1f0.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-11746d5d6532f1f0.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-11746d5d6532f1f0.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-11746d5d6532f1f0.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-11746d5d6532f1f0.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-11746d5d6532f1f0.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-11746d5d6532f1f0.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-11746d5d6532f1f0.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-11746d5d6532f1f0.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-11746d5d6532f1f0.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-11746d5d6532f1f0.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-11746d5d6532f1f0.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-11746d5d6532f1f0.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-11746d5d6532f1f0.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-11746d5d6532f1f0.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-11746d5d6532f1f0.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-11746d5d6532f1f0.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-11746d5d6532f1f0.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-11746d5d6532f1f0.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-11746d5d6532f1f0.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-11746d5d6532f1f0.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-11746d5d6532f1f0.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-11746d5d6532f1f0.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-11746d5d6532f1f0.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-11746d5d6532f1f0.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-11746d5d6532f1f0.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-11746d5d6532f1f0.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-11746d5d6532f1f0.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-11746d5d6532f1f0.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-11746d5d6532f1f0.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-11746d5d6532f1f0.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-11746d5d6532f1f0.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-11746d5d6532f1f0.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-11746d5d6532f1f0.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/v1/route-11746d5d6532f1f0.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-11746d5d6532f1f0.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-11746d5d6532f1f0.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-11746d5d6532f1f0.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-11746d5d6532f1f0.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-11746d5d6532f1f0.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-11746d5d6532f1f0.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-11746d5d6532f1f0.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-11746d5d6532f1f0.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-11746d5d6532f1f0.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/version/route-11746d5d6532f1f0.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-11746d5d6532f1f0.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/version/update/route-11746d5d6532f1f0.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/landing/page-26c6c887a10d753f.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-11746d5d6532f1f0.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/page-11746d5d6532f1f0.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-11746d5d6532f1f0.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-11746d5d6532f1f0.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-11746d5d6532f1f0.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-11746d5d6532f1f0.js +0 -1
  1130. package/app/.next-cli-build/static/css/820ca25fc8556f66.css +0 -1
  1131. package/app/.next-cli-build/static/ghb3xq22SZISfX5LQ5iP2/_buildManifest.js +0 -1
  1132. /package/app/.next-cli-build/static/{ghb3xq22SZISfX5LQ5iP2 → eXoiEKu5yWZkk7npUXFrc}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{41095:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>K});var a=s(95155),r=s(73321),o=s(98500),l=s.n(o),n=s(12115),i=s(35497),d=s(57250),c=s(88105),u=s(70217),m=s(14051),p=s.n(m);function x({until:e}){let[t,s]=(0,n.useState)("");return((0,n.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);a<60?s(`${a}s`):a<3600?s(`${Math.floor(a/60)}m ${a%60}s`):s(`${Math.floor(a/3600)}h ${Math.floor(a%3600/60)}m`)};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function h({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:o,onMoveUp:l,onMoveDown:d,onToggleActive:c,onUpdateProxy:m,onEdit:p,onDelete:b}){let[g,f]=(0,n.useState)(!1),[y,v]=(0,n.useState)(!1),[j,w]=(0,n.useState)(!1),N=(0,n.useRef)(null),k=new Map((t||[]).map(e=>[e.id,e])),C=e.providerSpecificData?.proxyPoolId||null,S=C?k.get(C):null,$=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,P=!!C||$,_=S?`Pool: ${S.name}`:C?`Pool: ${C} (inactive/missing)`:$?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",I="",T=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(T)try{let e=new URL(T);I=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{I=T}let A=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",E=S?.isActive===!0?"success":C||$?"error":"default",R=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(Boolean).sort()[0]||null;(0,n.useEffect)(()=>{let t=()=>{w(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=R?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[R]),(0,n.useEffect)(()=>{if(!g)return;let e=e=>{N.current&&!N.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]);let O="unavailable"!==e.testStatus||j?e.testStatus:"active",M=s?e.name||e.email||e.displayName||"OAuth Account":e.name,K=async e=>{v(!0);try{await m("__none__"===e?null:e)}finally{v(!1),f(!1)}};return(0,a.jsxs)("div",{className:`group flex flex-col gap-3 p-2 rounded-lg sm:flex-row sm:items-center sm:justify-between hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("button",{onClick:l,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:d,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:M}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:(0,u.g)(e.isActive,O),size:"sm",dot:!0,children:!1===e.isActive?"disabled":O||"Unknown"}),P&&(0,a.jsx)(i.Ex,{variant:E,size:"sm",children:"Proxy"}),j&&!1!==e.isActive&&(0,a.jsx)(x,{until:R}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),P&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:_,children:_}),I&&(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:I}),A&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:A,children:["no_proxy: ",A]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:N,children:[(0,a.jsxs)("button",{onClick:()=>f(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${P?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),g&&(0,a.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,a.jsx)("button",{onClick:()=>K("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!C?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>K(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${C===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:b,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function b({isOpen:e,provider:t,providerName:s,proxyPools:r,onSave:o,onClose:l}){let d="__none__",[c,u]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[m,p]=(0,n.useState)(!1),[x,h]=(0,n.useState)(null),[g,f]=(0,n.useState)(!1),y=async()=>{p(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),s=await e.json();h(s.valid?"success":"failed")}catch{h("failed")}finally{p(!1)}},v=async()=>{if(t&&c.apiKey){f(!0);try{let e=!1;try{p(!0),h(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await s.json()).valid,h(e?"success":"failed")}catch{h("failed")}finally{p(!1)}await o({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{f(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.name,onChange:e=>u({...c,name:e.target.value}),placeholder:"Production Key"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,a.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.apiKey,onChange:e=>u({...c,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!c.apiKey||m||g,variant:"secondary",children:m?"Checking...":"Check"})})]}),x&&(0,a.jsx)(i.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"Valid":"Invalid"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,a.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.priority,onChange:e=>u({...c,priority:Number.parseInt(e.target.value)||1})})]}),(0,a.jsx)(i.l6,{label:"Proxy Pool",value:c.proxyPoolId,onChange:e=>u({...c,proxyPoolId:e.target.value}),options:[{value:d,label:"None"},...(r||[]).map(e=>({value:e.id,label:e.name}))]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!c.name||!c.apiKey||g,children:g?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function g({providerId:e,isOAuth:t}){let[s,r]=(0,n.useState)([]),[o,l]=(0,n.useState)([]),[d,c]=(0,n.useState)(!0),[u,m]=(0,n.useState)(!1),[p,x]=(0,n.useState)(!1),[f,y]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[w,N]=(0,n.useState)("1"),[k,C]=(0,n.useState)(null),S=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),o=await t.json(),n=await s.json(),i=a.ok?await a.json():{};t.ok&&r((o.connections||[]).filter(t=>t.provider===e)),s.ok&&l(n.proxyPools||[]);let d=(i.providerStrategies||{})[e]||{};j(d.fallbackStrategy||null),N(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1")}catch(e){console.log("ConnectionsCard fetch error:",e)}finally{c(!1)}},[e]);(0,n.useEffect)(()=>{S()},[S]);let $=async(t,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),r=(a.ok?await a.json():{}).providerStrategies||{},o={};t&&(o.fallbackStrategy=t),"round-robin"===t&&""!==s&&(o.stickyRoundRobinLimit=Number(s)||3);let l={...r};0===Object.keys(o).length?delete l[e]:l[e]=o,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("saveStrategy error:",e)}},P=async(e,t)=>{let a=[...s];[a[e],a[t]]=[a[t],a[e]],r(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch{await S()}},_=async e=>{C({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{C(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(t=>t.filter(t=>t.id!==e))}catch(e){console.log("delete error:",e)}}})},I=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("toggle error:",e)}},T=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&r(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("proxy error:",e)}},A=async t=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})})).ok&&(await S(),m(!1))}catch(e){console.log("save apikey error:",e)}},E=async e=>{try{(await fetch(`/api/providers/${f.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await S(),x(!1))}catch(e){console.log("update connection error:",e)}};return d?(0,a.jsx)(i.Zp,{children:(0,a.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(i.lM,{checked:"round-robin"===v,onChange:e=>{let t=e?"round-robin":null;j(t),e&&!w&&N("1"),$(t,e?w||"1":w)}}),"round-robin"===v&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:w,onChange:e=>{N(e.target.value),$("round-robin",e.target.value)},className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===s.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>m(!0),children:"Add Connection"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03] max-h-[500px] overflow-y-auto pr-1",children:s.map((e,r)=>(0,a.jsx)(h,{connection:e,proxyPools:o,isOAuth:t,isFirst:0===r,isLast:r===s.length-1,onMoveUp:()=>P(r,r-1),onMoveDown:()=>P(r,r+1),onToggleActive:t=>I(e.id,t),onUpdateProxy:t=>T(e.id,t),onEdit:()=>{y(e),x(!0)},onDelete:()=>_(e.id)},e.id))}),(0,a.jsx)("div",{className:"mt-4 flex justify-stretch sm:justify-start",children:(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>m(!0),children:"Add"})})]})]}),(0,a.jsx)(b,{isOpen:u,provider:e,proxyPools:o,onSave:A,onClose:()=>m(!1)}),(0,a.jsx)(i.wI,{isOpen:p,connection:f,proxyPools:o,onSave:E,onClose:()=>x(!1)}),(0,a.jsx)(i.uo,{isOpen:!!k,onClose:()=>C(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}x.propTypes={until:p().string.isRequired},h.propTypes={connection:p().shape({id:p().string,name:p().string,email:p().string,displayName:p().string,testStatus:p().string,isActive:p().bool,lastError:p().string,priority:p().number}).isRequired,proxyPools:p().array,isOAuth:p().bool.isRequired,isFirst:p().bool.isRequired,isLast:p().bool.isRequired,onMoveUp:p().func.isRequired,onMoveDown:p().func.isRequired,onToggleActive:p().func.isRequired,onUpdateProxy:p().func,onEdit:p().func.isRequired,onDelete:p().func.isRequired},b.propTypes={isOpen:p().bool.isRequired,provider:p().string,providerName:p().string,proxyPools:p().array,onSave:p().func.isRequired,onClose:p().func.isRequired},g.propTypes={providerId:p().string.isRequired,isOAuth:p().bool};var f=s(28777),y=s(11059);function v({model:e,fullModel:t,copied:s,onCopy:r,testStatus:o,isCustom:l,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let u="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:u?{color:u}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e.id}`?"Copied!":"Copy"})]}),n&&(0,a.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),l&&(0,a.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function j({isOpen:e,onSave:t,onClose:s}){let[r,o]=(0,n.useState)(""),l=()=>{r.trim()&&(t(r.trim()),o(""))};return(0,a.jsx)(i.aF,{isOpen:e,title:"Add Custom Model",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:r,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&l(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:l,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function w({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,y.C)(),[l,d]=(0,n.useState)({}),[u,m]=(0,n.useState)([]),[p,x]=(0,n.useState)({}),[h,b]=(0,n.useState)(null),[g,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(!1),S=s||(0,c.wG)(e),$=t||"llm",P=(0,n.useCallback)(async()=>{try{let[e,t]=await Promise.all([fetch("/api/models/alias"),fetch("/api/models/custom",{cache:"no-store"})]),s=await e.json(),a=await t.json();e.ok&&d(s.aliases||{}),t.ok&&m(a.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[]);(0,n.useEffect)(()=>{P()},[P]);let _=async(e,t)=>{let s=`${S}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await P()}catch(e){console.log("set alias error:",e)}},I=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await P()}catch(e){console.log("delete alias error:",e)}},T=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:S,id:e,type:$})})).ok&&(await P(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},A=async e=>{try{let t=new URLSearchParams({providerAlias:S,id:e,type:$});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await P(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},E=async e=>{if(!h){b(e);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${S}/${e}`,kind:t})}),a=await s.json();x(t=>({...t,[e]:a.ok?"ok":"error"})),N(a.ok?"":a.error||"Model not reachable")}catch{x(t=>({...t,[e]:"error"})),N("Network error")}finally{b(null)}}},R=(0,f.KC)(e),O=t?R.filter(e=>e.kinds?e.kinds.includes(t):(0,f.CP)(e,"llm")===t):R,M=u.filter(e=>e.providerAlias===S&&(0,f.CP)(e,"llm")===$&&!O.some(t=>t.id===e.id));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),g&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:g}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[O.map(e=>{let t=`${S}/${e.id}`,s=Object.entries(l).find(([,e])=>e===t)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${S}/${e.id}`,alias:s,copied:r,onCopy:o,onSetAlias:t=>_(e.id,t),onDeleteAlias:()=>I(s),testStatus:p[e.id],onTest:()=>E(e.id),isTesting:h===e.id,isFree:e.isFree},e.id)}),M.map(e=>(0,a.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${S}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>A(e.id),testStatus:p[e.id],onTest:()=>E(e.id),isTesting:h===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,a.jsxs)("button",{onClick:()=>C(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(j,{isOpen:k,onSave:async e=>{await T(e),C(!1)},onClose:()=>C(!1)})]})}function N({label:e,children:t}){return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,a.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}v.propTypes={model:p().shape({id:p().string.isRequired}).isRequired,fullModel:p().string.isRequired,copied:p().string,onCopy:p().func.isRequired,testStatus:p().oneOf(["ok","error"]),isCustom:p().bool,isFree:p().bool,onDeleteAlias:p().func,onTest:p().func,isTesting:p().bool},j.propTypes={isOpen:p().bool.isRequired,onSave:p().func.isRequired,onClose:p().func.isRequired},w.propTypes={providerId:p().string.isRequired,kindFilter:p().string,providerAliasOverride:p().string};let k={webSearch:{inputLabel:"Query",inputPlaceholder:"What is the latest news about AI?",defaultInput:"What is the latest news about AI?",bodyKey:"query",defaultResponse:`{
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{41095:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>K});var a=s(95155),r=s(73321),o=s(98500),l=s.n(o),n=s(12115),i=s(35497),d=s(57250),c=s(88105),u=s(70217),m=s(14051),p=s.n(m);function x({until:e}){let[t,s]=(0,n.useState)("");return((0,n.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);a<60?s(`${a}s`):a<3600?s(`${Math.floor(a/60)}m ${a%60}s`):s(`${Math.floor(a/3600)}h ${Math.floor(a%3600/60)}m`)};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function h({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:o,onMoveUp:l,onMoveDown:d,onToggleActive:c,onUpdateProxy:m,onEdit:p,onDelete:b}){let[g,f]=(0,n.useState)(!1),[y,v]=(0,n.useState)(!1),[j,w]=(0,n.useState)(!1),N=(0,n.useRef)(null),k=new Map((t||[]).map(e=>[e.id,e])),C=e.providerSpecificData?.proxyPoolId||null,S=C?k.get(C):null,$=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,_=!!C||$,P=S?`Pool: ${S.name}`:C?`Pool: ${C} (inactive/missing)`:$?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",I="",T=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(T)try{let e=new URL(T);I=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{I=T}let A=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",E=S?.isActive===!0?"success":C||$?"error":"default",R=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(Boolean).sort()[0]||null;(0,n.useEffect)(()=>{let t=()=>{w(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=R?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[R]),(0,n.useEffect)(()=>{if(!g)return;let e=e=>{N.current&&!N.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]);let M="unavailable"!==e.testStatus||j?e.testStatus:"active",O=s?e.name||e.email||e.displayName||"OAuth Account":e.name,K=async e=>{v(!0);try{await m("__none__"===e?null:e)}finally{v(!1),f(!1)}};return(0,a.jsxs)("div",{className:`group flex flex-col gap-3 p-2 rounded-lg sm:flex-row sm:items-center sm:justify-between hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("button",{onClick:l,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:d,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:O}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:(0,u.g)(e.isActive,M),size:"sm",dot:!0,children:!1===e.isActive?"disabled":M||"Unknown"}),_&&(0,a.jsx)(i.Ex,{variant:E,size:"sm",children:"Proxy"}),j&&!1!==e.isActive&&(0,a.jsx)(x,{until:R}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),_&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:P,children:P}),I&&(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:I}),A&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:A,children:["no_proxy: ",A]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:N,children:[(0,a.jsxs)("button",{onClick:()=>f(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${_?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),g&&(0,a.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,a.jsx)("button",{onClick:()=>K("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!C?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>K(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${C===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:b,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function b({isOpen:e,provider:t,providerName:s,proxyPools:r,onSave:o,onClose:l}){let d="__none__",[c,u]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[m,p]=(0,n.useState)(!1),[x,h]=(0,n.useState)(null),[g,f]=(0,n.useState)(!1),y=async()=>{p(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),s=await e.json();h(s.valid?"success":"failed")}catch{h("failed")}finally{p(!1)}},v=async()=>{if(t&&c.apiKey){f(!0);try{let e=!1;try{p(!0),h(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await s.json()).valid,h(e?"success":"failed")}catch{h("failed")}finally{p(!1)}await o({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{f(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.name,onChange:e=>u({...c,name:e.target.value}),placeholder:"Production Key"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,a.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.apiKey,onChange:e=>u({...c,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!c.apiKey||m||g,variant:"secondary",children:m?"Checking...":"Check"})})]}),x&&(0,a.jsx)(i.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"Valid":"Invalid"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,a.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.priority,onChange:e=>u({...c,priority:Number.parseInt(e.target.value)||1})})]}),(0,a.jsx)(i.l6,{label:"Proxy Pool",value:c.proxyPoolId,onChange:e=>u({...c,proxyPoolId:e.target.value}),options:[{value:d,label:"None"},...(r||[]).map(e=>({value:e.id,label:e.name}))]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!c.name||!c.apiKey||g,children:g?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function g({providerId:e,isOAuth:t}){let[s,r]=(0,n.useState)([]),[o,l]=(0,n.useState)([]),[d,c]=(0,n.useState)(!0),[u,m]=(0,n.useState)(!1),[p,x]=(0,n.useState)(!1),[f,y]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[w,N]=(0,n.useState)("1"),[k,C]=(0,n.useState)(null),S=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),o=await t.json(),n=await s.json(),i=a.ok?await a.json():{};t.ok&&r((o.connections||[]).filter(t=>t.provider===e)),s.ok&&l(n.proxyPools||[]);let d=(i.providerStrategies||{})[e]||{};j(d.fallbackStrategy||null),N(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1")}catch(e){console.log("ConnectionsCard fetch error:",e)}finally{c(!1)}},[e]);(0,n.useEffect)(()=>{S()},[S]);let $=async(t,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),r=(a.ok?await a.json():{}).providerStrategies||{},o={};t&&(o.fallbackStrategy=t),"round-robin"===t&&""!==s&&(o.stickyRoundRobinLimit=Number(s)||3);let l={...r};0===Object.keys(o).length?delete l[e]:l[e]=o,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("saveStrategy error:",e)}},_=async(e,t)=>{let a=[...s];[a[e],a[t]]=[a[t],a[e]],r(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch{await S()}},P=async e=>{C({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{C(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(t=>t.filter(t=>t.id!==e))}catch(e){console.log("delete error:",e)}}})},I=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("toggle error:",e)}},T=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&r(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("proxy error:",e)}},A=async t=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})})).ok&&(await S(),m(!1))}catch(e){console.log("save apikey error:",e)}},E=async e=>{try{(await fetch(`/api/providers/${f.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await S(),x(!1))}catch(e){console.log("update connection error:",e)}};return d?(0,a.jsx)(i.Zp,{children:(0,a.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(i.lM,{checked:"round-robin"===v,onChange:e=>{let t=e?"round-robin":null;j(t),e&&!w&&N("1"),$(t,e?w||"1":w)}}),"round-robin"===v&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:w,onChange:e=>{N(e.target.value),$("round-robin",e.target.value)},className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===s.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>m(!0),children:"Add Connection"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03] max-h-[500px] overflow-y-auto pr-1",children:s.map((e,r)=>(0,a.jsx)(h,{connection:e,proxyPools:o,isOAuth:t,isFirst:0===r,isLast:r===s.length-1,onMoveUp:()=>_(r,r-1),onMoveDown:()=>_(r,r+1),onToggleActive:t=>I(e.id,t),onUpdateProxy:t=>T(e.id,t),onEdit:()=>{y(e),x(!0)},onDelete:()=>P(e.id)},e.id))}),(0,a.jsx)("div",{className:"mt-4 flex justify-stretch sm:justify-start",children:(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>m(!0),children:"Add"})})]})]}),(0,a.jsx)(b,{isOpen:u,provider:e,proxyPools:o,onSave:A,onClose:()=>m(!1)}),(0,a.jsx)(i.wI,{isOpen:p,connection:f,proxyPools:o,onSave:E,onClose:()=>x(!1)}),(0,a.jsx)(i.uo,{isOpen:!!k,onClose:()=>C(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}x.propTypes={until:p().string.isRequired},h.propTypes={connection:p().shape({id:p().string,name:p().string,email:p().string,displayName:p().string,testStatus:p().string,isActive:p().bool,lastError:p().string,priority:p().number}).isRequired,proxyPools:p().array,isOAuth:p().bool.isRequired,isFirst:p().bool.isRequired,isLast:p().bool.isRequired,onMoveUp:p().func.isRequired,onMoveDown:p().func.isRequired,onToggleActive:p().func.isRequired,onUpdateProxy:p().func,onEdit:p().func.isRequired,onDelete:p().func.isRequired},b.propTypes={isOpen:p().bool.isRequired,provider:p().string,providerName:p().string,proxyPools:p().array,onSave:p().func.isRequired,onClose:p().func.isRequired},g.propTypes={providerId:p().string.isRequired,isOAuth:p().bool};var f=s(28777),y=s(11059);function v({model:e,fullModel:t,copied:s,onCopy:r,testStatus:o,isCustom:l,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let u="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:u?{color:u}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e.id}`?"Copied!":"Copy"})]}),n&&(0,a.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),l&&(0,a.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function j({isOpen:e,onSave:t,onClose:s}){let[r,o]=(0,n.useState)(""),l=()=>{r.trim()&&(t(r.trim()),o(""))};return(0,a.jsx)(i.aF,{isOpen:e,title:"Add Custom Model",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:r,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&l(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:l,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function w({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,y.C)(),[l,d]=(0,n.useState)({}),[u,m]=(0,n.useState)([]),[p,x]=(0,n.useState)({}),[h,b]=(0,n.useState)(null),[g,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(!1),S=s||(0,c.wG)(e),$=t||"llm",_=(0,n.useCallback)(async()=>{try{let[e,t]=await Promise.all([fetch("/api/models/alias"),fetch("/api/models/custom",{cache:"no-store"})]),s=await e.json(),a=await t.json();e.ok&&d(s.aliases||{}),t.ok&&m(a.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[]);(0,n.useEffect)(()=>{_()},[_]);let P=async(e,t)=>{let s=`${S}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await _()}catch(e){console.log("set alias error:",e)}},I=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await _()}catch(e){console.log("delete alias error:",e)}},T=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:S,id:e,type:$})})).ok&&(await _(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},A=async e=>{try{let t=new URLSearchParams({providerAlias:S,id:e,type:$});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await _(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},E=async e=>{if(!h){b(e);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${S}/${e}`,kind:t})}),a=await s.json();x(t=>({...t,[e]:a.ok?"ok":"error"})),N(a.ok?"":a.error||"Model not reachable")}catch{x(t=>({...t,[e]:"error"})),N("Network error")}finally{b(null)}}},R=(0,f.KC)(e),M=t?R.filter(e=>e.kinds?e.kinds.includes(t):(0,f.CP)(e,"llm")===t):R,O=u.filter(e=>e.providerAlias===S&&(0,f.CP)(e,"llm")===$&&!M.some(t=>t.id===e.id));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),g&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:g}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[M.map(e=>{let t=`${S}/${e.id}`,s=Object.entries(l).find(([,e])=>e===t)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${S}/${e.id}`,alias:s,copied:r,onCopy:o,onSetAlias:t=>P(e.id,t),onDeleteAlias:()=>I(s),testStatus:p[e.id],onTest:()=>E(e.id),isTesting:h===e.id,isFree:e.isFree},e.id)}),O.map(e=>(0,a.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${S}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>A(e.id),testStatus:p[e.id],onTest:()=>E(e.id),isTesting:h===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,a.jsxs)("button",{onClick:()=>C(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(j,{isOpen:k,onSave:async e=>{await T(e),C(!1)},onClose:()=>C(!1)})]})}function N({label:e,children:t}){return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,a.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}v.propTypes={model:p().shape({id:p().string.isRequired}).isRequired,fullModel:p().string.isRequired,copied:p().string,onCopy:p().func.isRequired,testStatus:p().oneOf(["ok","error"]),isCustom:p().bool,isFree:p().bool,onDeleteAlias:p().func,onTest:p().func,isTesting:p().bool},j.propTypes={isOpen:p().bool.isRequired,onSave:p().func.isRequired,onClose:p().func.isRequired},w.propTypes={providerId:p().string.isRequired,kindFilter:p().string,providerAliasOverride:p().string};let k={webSearch:{inputLabel:"Query",inputPlaceholder:"What is the latest news about AI?",defaultInput:"What is the latest news about AI?",bodyKey:"query",defaultResponse:`{
2
2
  "results": [
3
3
  { "title": "...", "url": "...", "snippet": "..." }
4
4
  ]
@@ -36,30 +36,34 @@
36
36
  }],
37
37
  "model": "...",
38
38
  "usage": { "prompt_tokens": 9, "total_tokens": 9 }
39
- }`;function S({providerId:e,customAlias:t}){let s=(0,c.gC)(e),r=s?t||e:(0,c.wG)(e),o=s?[]:(0,f.KC)(e).filter(e=>"embedding"===(0,f.CP)(e)),[l,d]=(0,n.useState)(o[0]?.id??""),[u,m]=(0,n.useState)("The quick brown fox jumps over the lazy dog"),[p,x]=(0,n.useState)(""),[h,b]=(0,n.useState)(""),[g,v]=(0,n.useState)(!1),[j,w]=(0,n.useState)(""),[k,$]=(0,n.useState)(""),[P,_]=(0,n.useState)(null),[I,T]=(0,n.useState)(!1),[A,E]=(0,n.useState)(""),{copied:R,copy:O}=(0,y.C)(),{copied:M,copy:K}=(0,y.C)();(0,n.useEffect)(()=>{w(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{b((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&$(e.publicUrl)}).catch(()=>{})},[]);let L=g?k:j,B=l?`${r}/${l}`:"",D=()=>{let e={model:B,input:u.trim()},t=Number(p);return p&&Number.isFinite(t)&&t>0&&(e.dimensions=t),e},U=`curl -X POST ${L}/v1/embeddings \\
39
+ }`;function S({providerId:e,customAlias:t}){let s=(0,c.gC)(e),r=s?t||e:(0,c.wG)(e),o=s?[]:(0,f.KC)(e).filter(e=>"embedding"===(0,f.CP)(e)),[l,d]=(0,n.useState)(o[0]?.id??""),[u,m]=(0,n.useState)("The quick brown fox jumps over the lazy dog"),[p,x]=(0,n.useState)(""),[h,b]=(0,n.useState)(""),[g,v]=(0,n.useState)(!1),[j,w]=(0,n.useState)(""),[k,$]=(0,n.useState)(""),[_,P]=(0,n.useState)(null),[I,T]=(0,n.useState)(!1),[A,E]=(0,n.useState)(""),{copied:R,copy:M}=(0,y.C)(),{copied:O,copy:K}=(0,y.C)();(0,n.useEffect)(()=>{w(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{b((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&$(e.publicUrl)}).catch(()=>{})},[]);let L=g?k:j,B=l?`${r}/${l}`:"",D=()=>{let e={model:B,input:u.trim()},t=Number(p);return p&&Number.isFinite(t)&&t>0&&(e.dimensions=t),e},U=`curl -X POST ${L}/v1/embeddings \\
40
40
  -H "Content-Type: application/json" \\
41
41
  -H "Authorization: Bearer ${h||"YOUR_KEY"}" \\
42
- -d '${JSON.stringify(D())}'`,F=async()=>{if(!u.trim()||!B)return;T(!0),E(""),_(null);let e=Date.now();try{let t={"Content-Type":"application/json"};h&&(t.Authorization=`Bearer ${h}`);let s=await fetch("/api/v1/embeddings",{method:"POST",headers:t,body:JSON.stringify(D())}),a=Date.now()-e,r=await s.json();if(!s.ok)return void E(r?.error?.message||r?.error||`HTTP ${s.status}`);_({data:r,latencyMs:a})}catch(e){E(e.message||"Network error")}finally{T(!1)}},q=P?JSON.stringify(P.data,null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)(N,{label:"Model",children:s?(0,a.jsx)("input",{value:l,onChange:e=>d(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}):(0,a.jsx)("select",{value:l,onChange:e=>d(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:o.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(N,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("input",{value:L,onChange:e=>g?$(e.target.value):w(e.target.value),className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",placeholder:"http://localhost:3000"}),k&&(0,a.jsxs)("button",{onClick:()=>v(e=>!e),title:g?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${g?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("input",{type:"password",value:h,onChange:e=>b(e.target.value),placeholder:"sk-...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(N,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:u,onChange:e=>m(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),u&&(0,a.jsx)("button",{type:"button",onClick:()=>m(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(N,{label:"Dimensions",children:(0,a.jsx)("input",{type:"number",min:"1",value:p,onChange:e=>x(e.target.value),placeholder:"optional, e.g. 512, 1024 (leave empty for default)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>O(U),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:R?"check":"content_copy"}),R?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:F,disabled:I||!u.trim()||!B,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:I?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),I?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:U})]}),A&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:A}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",P&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",P.latencyMs,"ms"]})]}),P&&(0,a.jsxs)("button",{onClick:()=>K(q),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:M?"check":"content_copy"}),M?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:(e=>{if(!e)return C;let t=JSON.parse(JSON.stringify(e));return(t.data||[]).forEach(e=>{Array.isArray(e.embedding)&&e.embedding.length>4&&(e.embedding=[...e.embedding.slice(0,4).map(e=>parseFloat(e.toFixed(6))),`... (${e.embedding.length} dims)`])}),JSON.stringify(t,null,2)})(P?.data)})]})]})]})}let $={"google-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"hardcoded"},openai:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openai-tts-models",voiceKey:"openai-tts-voices",voicesPerModel:!0},openrouter:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openrouter-tts-models",voiceKey:"openrouter-tts-voices",voicesPerModel:!0},elevenlabs:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"elevenlabs-tts-models",apiEndpoint:"/api/media-providers/tts/elevenlabs/voices"},"edge-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"local-device":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},nvidia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},hyperbolic:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},deepgram:{hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/deepgram/voices"},huggingface:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},cartesia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},playht:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},coqui:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},tortoise:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},inworld:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"inworld-tts-models",apiEndpoint:"/api/media-providers/tts/inworld/voices"},qwen:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},minimax:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices",defaultVoiceId:"English_expressive_narrator"},"minimax-cn":{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices?provider=minimax-cn",defaultVoiceId:"English_expressive_narrator"},gemini:{hasLanguageDropdown:!1,hasLanguageHint:!0,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"gemini-tts-models",voiceKey:"gemini-tts-voices",voicesPerModel:!0},"xiaomi-mimo":{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!1,hasStyleInput:!0,hasLanguageHint:!0,languageOptions:["Chinese","English"],voiceSource:"hardcoded",modelKey:"xiaomi-mimo-tts-models",voicesPerModel:!0}};var P=s(73006),_=s(717),I=s(91781);let T=`// Audio will appear here after running.
42
+ -d '${JSON.stringify(D())}'`,F=async()=>{if(!u.trim()||!B)return;T(!0),E(""),P(null);let e=Date.now();try{let t={"Content-Type":"application/json"};h&&(t.Authorization=`Bearer ${h}`);let s=await fetch("/api/v1/embeddings",{method:"POST",headers:t,body:JSON.stringify(D())}),a=Date.now()-e,r=await s.json();if(!s.ok)return void E(r?.error?.message||r?.error||`HTTP ${s.status}`);P({data:r,latencyMs:a})}catch(e){E(e.message||"Network error")}finally{T(!1)}},q=_?JSON.stringify(_.data,null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)(N,{label:"Model",children:s?(0,a.jsx)("input",{value:l,onChange:e=>d(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}):(0,a.jsx)("select",{value:l,onChange:e=>d(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:o.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(N,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("input",{value:L,onChange:e=>g?$(e.target.value):w(e.target.value),className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",placeholder:"http://localhost:3000"}),k&&(0,a.jsxs)("button",{onClick:()=>v(e=>!e),title:g?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${g?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("input",{type:"password",value:h,onChange:e=>b(e.target.value),placeholder:"sk-...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(N,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:u,onChange:e=>m(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),u&&(0,a.jsx)("button",{type:"button",onClick:()=>m(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(N,{label:"Dimensions",children:(0,a.jsx)("input",{type:"number",min:"1",value:p,onChange:e=>x(e.target.value),placeholder:"optional, e.g. 512, 1024 (leave empty for default)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>M(U),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:R?"check":"content_copy"}),R?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:F,disabled:I||!u.trim()||!B,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:I?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),I?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:U})]}),A&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:A}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",_&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",_.latencyMs,"ms"]})]}),_&&(0,a.jsxs)("button",{onClick:()=>K(q),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:O?"check":"content_copy"}),O?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:(e=>{if(!e)return C;let t=JSON.parse(JSON.stringify(e));return(t.data||[]).forEach(e=>{Array.isArray(e.embedding)&&e.embedding.length>4&&(e.embedding=[...e.embedding.slice(0,4).map(e=>parseFloat(e.toFixed(6))),`... (${e.embedding.length} dims)`])}),JSON.stringify(t,null,2)})(_?.data)})]})]})]})}let $={"google-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"hardcoded"},openai:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openai-tts-models",voiceKey:"openai-tts-voices",voicesPerModel:!0},openrouter:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openrouter-tts-models",voiceKey:"openrouter-tts-voices",voicesPerModel:!0},elevenlabs:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"elevenlabs-tts-models",apiEndpoint:"/api/media-providers/tts/elevenlabs/voices"},"edge-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"local-device":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"selfhosted-tts":{hasModelSelector:!0,hasVoiceIdInput:!0,hasBrowseButton:!1,voiceSource:"manual"},nvidia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},hyperbolic:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},deepgram:{hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/deepgram/voices"},huggingface:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},cartesia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},playht:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},coqui:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},tortoise:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},inworld:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"inworld-tts-models",apiEndpoint:"/api/media-providers/tts/inworld/voices"},qwen:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},minimax:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices",defaultVoiceId:"English_expressive_narrator"},"minimax-cn":{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices?provider=minimax-cn",defaultVoiceId:"English_expressive_narrator"},gemini:{hasLanguageDropdown:!1,hasLanguageHint:!0,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"gemini-tts-models",voiceKey:"gemini-tts-voices",voicesPerModel:!0},"xiaomi-mimo":{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!1,hasStyleInput:!0,hasLanguageHint:!0,languageOptions:["Chinese","English"],voiceSource:"hardcoded",modelKey:"xiaomi-mimo-tts-models",voicesPerModel:!0}};var _=s(73006),P=s(717),I=s(91781);let T=`// Audio will appear here after running.
43
43
  // Example JSON response (response_format=json):
44
44
  {
45
45
  "format": "mp3",
46
46
  "audio": "//NExAANaAIIAUAAANNNNNNNN..." // base64 encoded MP3
47
- }`;function A({providerId:e}){let t,s,r=(0,c.wG)(e),o=$[e]||$["edge-tts"],[l,d]=(0,n.useState)(o.defaultVoiceId||""),[u,m]=(0,n.useState)(""),[p,x]=(0,n.useState)(o.defaultVoiceId||""),[h,b]=(0,n.useState)([]),[g,v]=(0,n.useState)(""),[j,w]=(0,n.useState)(()=>{let t=c.Q2[e]?.ttsConfig?.models;if(t?.length)return t[0].id;if(o.hasModelSelector&&o.modelKey){let e=(0,f.KC)(o.modelKey);return e?.[0]?.id||""}return""}),[k,C]=(0,n.useState)("Hello, this is a text to speech test."),[S,E]=(0,n.useState)(""),[R,O]=(0,n.useState)(""),[M,K]=(0,n.useState)(!1),[L,B]=(0,n.useState)(""),[D,U]=(0,n.useState)(""),[F,q]=(0,n.useState)("mp3"),[z,J]=(0,n.useState)(""),[V,H]=(0,n.useState)(null),[W,G]=(0,n.useState)(!1),[Y,Z]=(0,n.useState)(""),[Q,X]=(0,n.useState)(null),{copied:ee,copy:et}=(0,y.C)(),[es,ea]=(0,n.useState)(!1),[er,eo]=(0,n.useState)([]),[el,en]=(0,n.useState)(!1),[ei,ed]=(0,n.useState)(""),[ec,eu]=(0,n.useState)(""),[em,ep]=(0,n.useState)({}),[ex,eh]=(0,n.useState)(""),[eb,eg]=(0,n.useState)(0);(0,n.useEffect)(()=>{if(B(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{O((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(t=>{eg((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive).length)}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&U(e.publicUrl)}).catch(()=>{}),"hardcoded"===o.voiceSource){let t=o.hasModelSelector&&o.modelKey&&(0,f.KC)(o.modelKey)?.[0]?.id||"",s=o.voicesPerModel&&t?(0,_.jY)(e,t)||[]:(0,f.KC)(o.voiceKey||e).filter(e=>"tts"===(0,f.CP)(e));if(s.length)if(o.hasBrowseButton){let e=s.find(e=>"en"===e.id)||s[0];v(e.id),d(e.id),m(e.name),b([{id:e.id,name:e.name}])}else b(s),d(s[0].id),m(s[0].name||s[0].id)}},[e]),(0,n.useEffect)(()=>{if(!o.voicesPerModel||!j)return;let t=(0,_.jY)(e,j)||[];b(t),t.length?(d(t[0].id),m(t[0].name||t[0].id)):(d(""),m(""))},[j]);let ef=async()=>{if(ea(!0),ed(""),eu(""),!er.length){en(!0);try{if("hardcoded"===o.voiceSource){let t=o.voiceKey||e,s=(0,f.KC)(t).filter(e=>"tts"===(0,f.CP)(e)),a={};for(let e of s)a[e.id]||(a[e.id]={code:e.id,name:e.name,voices:[{id:e.id,name:e.name}]});ep(a),eo(Object.values(a).sort((e,t)=>e.name.localeCompare(t.name)))}else{let t=o.apiEndpoint?o.apiEndpoint:`/api/media-providers/tts/voices?provider=${"local-device"===e?"local-device":"edge-tts"}`,s=await fetch(t),a=await s.json();if(a.error)return void eu(a.error);eo(a.languages||[]),ep(a.byLang||{})}}catch(e){eu(e.message)}finally{en(!1)}}},ey=ei?er.filter(e=>e.name.toLowerCase().includes(ei.toLowerCase())||e.code.toLowerCase().includes(ei.toLowerCase())):er,ev=M?D:L,ej=o.hasVoiceIdInput&&p||l,ew=o.hasModelSelector&&j&&ej?`${r}/${j}/${ej}`:o.hasModelSelector&&j?`${r}/${j}`:ej?`${r}/${ej}`:"",eN=(t={model:ew,input:k},o.hasLanguageHint&&ex&&(t.language=ex),o.hasStyleInput&&S.trim()&&(t.style=S.trim()),t),ek=`curl -X POST ${ev}/v1/audio/speech${"json"===F?"?response_format=json":""} \\
47
+ }`;function A({providerId:e}){let t,s,r=(0,c.wG)(e),o=$[e]||$["edge-tts"],[l,d]=(0,n.useState)(o.defaultVoiceId||""),[u,m]=(0,n.useState)(""),[p,x]=(0,n.useState)(o.defaultVoiceId||""),[h,b]=(0,n.useState)([]),[g,v]=(0,n.useState)(""),[j,w]=(0,n.useState)(()=>{let t=c.Q2[e]?.ttsConfig?.models;if(t?.length)return t[0].id;if(o.hasModelSelector&&o.modelKey){let e=(0,f.KC)(o.modelKey);return e?.[0]?.id||""}return""}),[k,C]=(0,n.useState)("Hello, this is a text to speech test."),[S,E]=(0,n.useState)(""),[R,M]=(0,n.useState)(""),[O,K]=(0,n.useState)(!1),[L,B]=(0,n.useState)(""),[D,U]=(0,n.useState)(""),[F,q]=(0,n.useState)("mp3"),[z,J]=(0,n.useState)(""),[V,H]=(0,n.useState)(null),[W,G]=(0,n.useState)(!1),[Y,Q]=(0,n.useState)(""),[Z,X]=(0,n.useState)(null),{copied:ee,copy:et}=(0,y.C)(),[es,ea]=(0,n.useState)(!1),[er,eo]=(0,n.useState)([]),[el,en]=(0,n.useState)(!1),[ei,ed]=(0,n.useState)(""),[ec,eu]=(0,n.useState)(""),[em,ep]=(0,n.useState)({}),[ex,eh]=(0,n.useState)(""),[eb,eg]=(0,n.useState)(0);(0,n.useEffect)(()=>{if(B(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{M((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(t=>{eg((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive).length)}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&U(e.publicUrl)}).catch(()=>{}),"hardcoded"===o.voiceSource){let t=o.hasModelSelector&&o.modelKey&&(0,f.KC)(o.modelKey)?.[0]?.id||"",s=o.voicesPerModel&&t?(0,P.jY)(e,t)||[]:(0,f.KC)(o.voiceKey||e).filter(e=>"tts"===(0,f.CP)(e));if(s.length)if(o.hasBrowseButton){let e=s.find(e=>"en"===e.id)||s[0];v(e.id),d(e.id),m(e.name),b([{id:e.id,name:e.name}])}else b(s),d(s[0].id),m(s[0].name||s[0].id)}},[e]),(0,n.useEffect)(()=>{if(!o.voicesPerModel||!j)return;let t=(0,P.jY)(e,j)||[];b(t),t.length?(d(t[0].id),m(t[0].name||t[0].id)):(d(""),m(""))},[j]);let ef=async()=>{if(ea(!0),ed(""),eu(""),!er.length){en(!0);try{if("hardcoded"===o.voiceSource){let t=o.voiceKey||e,s=(0,f.KC)(t).filter(e=>"tts"===(0,f.CP)(e)),a={};for(let e of s)a[e.id]||(a[e.id]={code:e.id,name:e.name,voices:[{id:e.id,name:e.name}]});ep(a),eo(Object.values(a).sort((e,t)=>e.name.localeCompare(t.name)))}else{let t=o.apiEndpoint?o.apiEndpoint:`/api/media-providers/tts/voices?provider=${"local-device"===e?"local-device":"edge-tts"}`,s=await fetch(t),a=await s.json();if(a.error)return void eu(a.error);eo(a.languages||[]),ep(a.byLang||{})}}catch(e){eu(e.message)}finally{en(!1)}}},ey=ei?er.filter(e=>e.name.toLowerCase().includes(ei.toLowerCase())||e.code.toLowerCase().includes(ei.toLowerCase())):er,ev=O?D:L,ej=o.hasVoiceIdInput&&p||l,ew=(()=>{if("selfhosted-tts"===e){let e=j.trim(),t=ej.trim();return e?`${r}/${e}${t?`/${t}`:""}`:""}return o.hasModelSelector&&j&&ej?`${r}/${j}/${ej}`:o.hasModelSelector&&j?`${r}/${j}`:ej?`${r}/${ej}`:""})(),eN=(t={model:ew,input:k},o.hasLanguageHint&&ex&&(t.language=ex),o.hasStyleInput&&S.trim()&&(t.style=S.trim()),t),ek=`curl -X POST ${ev}/v1/audio/speech${"json"===F?"?response_format=json":""} \\
48
48
  -H "Content-Type: application/json" \\
49
49
  -H "Authorization: Bearer ${R||"YOUR_KEY"}" \\
50
50
  -d '${JSON.stringify(eN)}' \\
51
- ${"json"===F?"":"--output speech.mp3"}`,eC=async()=>{if(!k.trim()||!ew)return;G(!0),Z(""),J(""),H(null);let e=Date.now();try{let t={"Content-Type":"application/json"};R&&(t.Authorization=`Bearer ${R}`);let s=`/api/v1/audio/speech${"json"===F?"?response_format=json":""}`,a=await fetch(s,{method:"POST",headers:t,body:JSON.stringify({...eN,input:k.trim()})});if(X(Date.now()-e),!a.ok){let e=await a.json().catch(()=>({}));Z(e?.error?.message||e?.error||`HTTP ${a.status}`);return}if("json"===F){let e=await a.json();H(e);let t=e.format||"mp3",s=await fetch(`data:audio/${t};base64,${e.audio}`).then(e=>e.blob());J(URL.createObjectURL(s))}else{let e=await a.blob();J(URL.createObjectURL(e))}}catch(e){Z(e.message||"Network error")}finally{G(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)(N,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ev,"/v1/audio/speech"]}),D&&(0,a.jsxs)("button",{onClick:()=>K(e=>!e),title:M?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${M?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:R?`${R.slice(0,8)}${"•".repeat(Math.min(20,Math.max(0,R.length-8)))}`:eb>0?(0,a.jsxs)("span",{className:"text-text-muted italic",children:["Using stored key(s) \xb7 ",eb," connection",eb>1?"s":""]}):(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),o.hasModelSelector&&(o.modelKey||(0,f.KC)(e).some(e=>"tts"===(0,f.CP)(e)))&&(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("select",{value:j,onChange:e=>w(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:((s=(0,f.KC)(e).filter(e=>"tts"===(0,f.CP)(e))).length?s:(0,f.KC)(o.modelKey)||[]).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),o.hasLanguageHint&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsxs)("select",{value:ex,onChange:e=>eh(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"Auto-detect"}),(o.languageOptions||I.I).map(e=>"string"==typeof e?(0,a.jsx)("option",{value:e,children:e},e):(0,a.jsx)("option",{value:e.name,children:e.name},e.id))]})}),o.hasBrowseButton&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("button",{onClick:ef,className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background font-mono truncate text-left hover:border-primary/40 transition-colors",children:g?(0,a.jsx)("span",{className:"text-text-main",children:er.find(e=>e.code===g)?.name||g}):(0,a.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,a.jsxs)("button",{onClick:ef,className:"flex w-full items-center justify-center gap-1 text-xs px-2.5 py-1.5 rounded-lg border border-border text-text-muted hover:text-primary hover:border-primary/40 transition-colors sm:w-auto sm:shrink-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),h.length>0&&(0,a.jsx)(N,{label:"Voice",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:h.map(e=>(0,a.jsxs)("button",{onClick:()=>{d(e.id),m(e.name),o.hasVoiceIdInput&&x(e.id)},className:`px-2.5 py-1 rounded-full text-xs border transition-colors ${l===e.id?"bg-primary/15 border-primary/40 text-primary font-medium":"border-border text-text-muted hover:text-primary hover:border-primary/40"}`,children:[e.name,e.language?` \xb7 ${e.language}`:"",e.gender?` \xb7 ${e.gender[0].toUpperCase()}`:"",!0===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-green-500/15 text-green-600 border border-green-500/20",children:"Free"}),!1===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-amber-500/15 text-amber-600 border border-amber-500/20",children:"Paid"})]},e.id))})}),o.hasVoiceIdInput&&(0,a.jsx)(N,{label:"Voice ID",children:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:p,onChange:e=>{x(e.target.value),d(e.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),p&&(0,a.jsx)("button",{type:"button",onClick:()=>{x(""),d("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),o.hasLanguageDropdown&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsx)("select",{value:l,onChange:t=>{let s=(0,f.KC)(e).filter(e=>"tts"===(0,f.CP)(e)).find(e=>e.id===t.target.value);d(t.target.value),m(s?.name||t.target.value)},className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(0,f.KC)(e).filter(e=>"tts"===(0,f.CP)(e)).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(N,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:k,onChange:e=>C(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),k&&(0,a.jsx)("button",{type:"button",onClick:()=>C(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),o.hasStyleInput&&(0,a.jsx)(N,{label:(0,P.Tl)("Style"),children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("textarea",{value:S,onChange:e=>E(e.target.value),placeholder:(0,P.Tl)("e.g. a warm, gentle voice, speaking slowly with a British accent"),rows:2,className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"}),S&&(0,a.jsx)("button",{type:"button",onClick:()=>E(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(N,{label:"Output Format",children:(0,a.jsxs)("select",{value:F,onChange:e=>q(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>et(ek),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ee?"check":"content_copy"}),ee?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eC,disabled:W||!k.trim()||!ew,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:W?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),W?"Generating...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:ek})]}),Y&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:Y}),z?(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",Q&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",Q,"ms"]})]}),(0,a.jsxs)("a",{href:z,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})]}),(0,a.jsx)("audio",{controls:!0,src:z,className:"w-full"}),V&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"JSON Response"})}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:JSON.stringify({format:V.format,audio:V.audio?`${V.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,a.jsx)("pre",{className:"mt-1.5 bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-50",children:T})]})]})]}),es&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-end justify-center sm:items-center",style:{backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(2px)"},onClick:()=>ea(!1),children:(0,a.jsxs)("div",{className:"border border-border rounded-xl shadow-2xl w-full max-w-md mx-4 flex flex-col max-h-[80vh]",style:{backgroundColor:"var(--color-bg)",isolation:"isolate"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Select Language"}),(0,a.jsx)("button",{onClick:()=>ea(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,a.jsx)("input",{autoFocus:!0,value:ei,onChange:e=>ed(e.target.value),placeholder:"Search language...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[ec&&(0,a.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:ec}),el?(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[ey.map(e=>(0,a.jsxs)("button",{onClick:()=>{let t;return ea(!1),v(e.code),void(b(t=em[e.code]?.voices||[]),t.length&&(d(t[0].id),m(t[0].name),o.hasVoiceIdInput&&x(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${g===e.code?"bg-primary/10 text-primary":""}`,children:[(0,a.jsx)("span",{className:"text-sm",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.voices.length," voices"]}),g===e.code&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===ey.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}let E="https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png";function R(e){let t="string"==typeof e?e.trim():"";return t?/^(data:image\/|https?:\/\/)/i.test(t)?t:`data:image/png;base64,${t}`:""}function O({providerId:e,kind:t}){let s=(0,c.wG)(e),r=(0,c.rs)(s)===e?s:e,o=c.rj.find(e=>e.id===t),l=k[t],d=l||{},u=(0,f.KC)(e).filter(e=>(0,f.CP)(e)===t),m=new Set(["image","video","music","imageToText","systemone"]).has(t),p=m&&0===u.length,[x,h]=(0,n.useState)(u[0]?.id??""),b=u.find(e=>e.id===x),g=!!b?.capabilities?.includes("edit"),v=!!b?.capabilities?.includes("mask"),[j,w]=(0,n.useState)(d.defaultInput||""),[C,S]=(0,n.useState)("Does this request require urgent attention?"),[$,P]=(0,n.useState)(""),[_,I]=(0,n.useState)(""),[T,A]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[M,K]=(0,n.useState)(""),[L,B]=(0,n.useState)(!1),[D,U]=(0,n.useState)(""),[F,q]=(0,n.useState)(""),[z,J]=(0,n.useState)(null),[V,H]=(0,n.useState)(null),[W,G]=(0,n.useState)(null),[Y,Z]=(0,n.useState)("json"),[Q,X]=(0,n.useState)(""),[ee,et]=(0,n.useState)(!1),[es,ea]=(0,n.useState)(""),[er,eo]=(0,n.useState)([]),[el,en]=(0,n.useState)(""),{copied:ei,copy:ed}=(0,y.C)(),{copied:ec,copy:eu}=(0,y.C)();if((0,n.useEffect)(()=>{U(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{K((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&q(e.publicUrl)}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{eo((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!o||!l)return null;let em=L?F:D,ep=o.endpoint.path,ex=m?x?`${r}/${x}`:p?"":r:r,eh="huggingface"===e?{image:E}:"cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===x?{image:E}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===x?{image:E,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},eb=$.trim()||eh.image||"",eg=_.trim()||eh.mask_image||"",ef=R(eb),ey=R(eg),ev=Object.entries(T).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),ej="systemone"===t?{questions:{is_urgent:{type:"noul",instructions:C.trim()||"Does this request require urgent attention?"}}}:{},ew={model:ex,[l.bodyKey]:j,...l.extraBody,...ev,...ej,...g&&eb?{image:eb}:{},...v&&eg?{mask_image:eg}:{}},eN="image"===t&&"binary"===Y,ek="image"===t&&"codex"===e&&!eN,eC=`${ep}${eN?"?response_format=binary":""}`,eS=`-H "Content-Type: application/json" \\
52
- -H "Authorization: Bearer ${M||"YOUR_KEY"}"${el?` \\
51
+ ${"json"===F?"":"--output speech.mp3"}`,eC=async()=>{if(!k.trim()||!ew)return;G(!0),Q(""),J(""),H(null);let e=Date.now();try{let t={"Content-Type":"application/json"};R&&(t.Authorization=`Bearer ${R}`);let s=`/api/v1/audio/speech${"json"===F?"?response_format=json":""}`,a=await fetch(s,{method:"POST",headers:t,body:JSON.stringify({...eN,input:k.trim()})});if(X(Date.now()-e),!a.ok){let e=await a.json().catch(()=>({}));Q(e?.error?.message||e?.error||`HTTP ${a.status}`);return}if("json"===F){let e=await a.json();H(e);let t=e.format||"mp3",s=await fetch(`data:audio/${t};base64,${e.audio}`).then(e=>e.blob());J(URL.createObjectURL(s))}else{let e=await a.blob();J(URL.createObjectURL(e))}}catch(e){Q(e.message||"Network error")}finally{G(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)(N,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ev,"/v1/audio/speech"]}),D&&(0,a.jsxs)("button",{onClick:()=>K(e=>!e),title:O?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${O?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:R?`${R.slice(0,8)}${"•".repeat(Math.min(20,Math.max(0,R.length-8)))}`:eb>0?(0,a.jsxs)("span",{className:"text-text-muted italic",children:["Using stored key(s) \xb7 ",eb," connection",eb>1?"s":""]}):(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),"selfhosted-tts"===e&&(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:"e.g. kokoro or Qwen3-TTS-12Hz-1.7B-CustomVoice-bf16",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),"selfhosted-tts"!==e&&o.hasModelSelector&&(o.modelKey||(0,f.KC)(e).some(e=>"tts"===(0,f.CP)(e)))&&(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("select",{value:j,onChange:e=>w(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:((s=(0,f.KC)(e).filter(e=>"tts"===(0,f.CP)(e))).length?s:(0,f.KC)(o.modelKey)||[]).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),o.hasLanguageHint&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsxs)("select",{value:ex,onChange:e=>eh(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"Auto-detect"}),(o.languageOptions||I.I).map(e=>"string"==typeof e?(0,a.jsx)("option",{value:e,children:e},e):(0,a.jsx)("option",{value:e.name,children:e.name},e.id))]})}),o.hasBrowseButton&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("button",{onClick:ef,className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background font-mono truncate text-left hover:border-primary/40 transition-colors",children:g?(0,a.jsx)("span",{className:"text-text-main",children:er.find(e=>e.code===g)?.name||g}):(0,a.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,a.jsxs)("button",{onClick:ef,className:"flex w-full items-center justify-center gap-1 text-xs px-2.5 py-1.5 rounded-lg border border-border text-text-muted hover:text-primary hover:border-primary/40 transition-colors sm:w-auto sm:shrink-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),h.length>0&&(0,a.jsx)(N,{label:"Voice",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:h.map(e=>(0,a.jsxs)("button",{onClick:()=>{d(e.id),m(e.name),o.hasVoiceIdInput&&x(e.id)},className:`px-2.5 py-1 rounded-full text-xs border transition-colors ${l===e.id?"bg-primary/15 border-primary/40 text-primary font-medium":"border-border text-text-muted hover:text-primary hover:border-primary/40"}`,children:[e.name,e.language?` \xb7 ${e.language}`:"",e.gender?` \xb7 ${e.gender[0].toUpperCase()}`:"",!0===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-green-500/15 text-green-600 border border-green-500/20",children:"Free"}),!1===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-amber-500/15 text-amber-600 border border-amber-500/20",children:"Paid"})]},e.id))})}),o.hasVoiceIdInput&&(0,a.jsx)(N,{label:"Voice ID",children:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:p,onChange:e=>{x(e.target.value),d(e.target.value)},placeholder:"selfhosted-tts"===e?"e.g. af_heart or vivian (optional)":"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),p&&(0,a.jsx)("button",{type:"button",onClick:()=>{x(""),d("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),o.hasLanguageDropdown&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsx)("select",{value:l,onChange:t=>{let s=(0,f.KC)(e).filter(e=>"tts"===(0,f.CP)(e)).find(e=>e.id===t.target.value);d(t.target.value),m(s?.name||t.target.value)},className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(0,f.KC)(e).filter(e=>"tts"===(0,f.CP)(e)).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(N,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:k,onChange:e=>C(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),k&&(0,a.jsx)("button",{type:"button",onClick:()=>C(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),o.hasStyleInput&&(0,a.jsx)(N,{label:(0,_.Tl)("Style"),children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("textarea",{value:S,onChange:e=>E(e.target.value),placeholder:(0,_.Tl)("e.g. a warm, gentle voice, speaking slowly with a British accent"),rows:2,className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"}),S&&(0,a.jsx)("button",{type:"button",onClick:()=>E(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(N,{label:"Output Format",children:(0,a.jsxs)("select",{value:F,onChange:e=>q(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>et(ek),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ee?"check":"content_copy"}),ee?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eC,disabled:W||!k.trim()||!ew,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:W?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),W?"Generating...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:ek})]}),Y&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:Y}),z?(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",Z&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",Z,"ms"]})]}),(0,a.jsxs)("a",{href:z,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})]}),(0,a.jsx)("audio",{controls:!0,src:z,className:"w-full"}),V&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"JSON Response"})}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:JSON.stringify({format:V.format,audio:V.audio?`${V.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,a.jsx)("pre",{className:"mt-1.5 bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-50",children:T})]})]})]}),es&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-end justify-center sm:items-center",style:{backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(2px)"},onClick:()=>ea(!1),children:(0,a.jsxs)("div",{className:"border border-border rounded-xl shadow-2xl w-full max-w-md mx-4 flex flex-col max-h-[80vh]",style:{backgroundColor:"var(--color-bg)",isolation:"isolate"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Select Language"}),(0,a.jsx)("button",{onClick:()=>ea(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,a.jsx)("input",{autoFocus:!0,value:ei,onChange:e=>ed(e.target.value),placeholder:"Search language...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[ec&&(0,a.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:ec}),el?(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[ey.map(e=>(0,a.jsxs)("button",{onClick:()=>{let t;return ea(!1),v(e.code),void(b(t=em[e.code]?.voices||[]),t.length&&(d(t[0].id),m(t[0].name),o.hasVoiceIdInput&&x(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${g===e.code?"bg-primary/10 text-primary":""}`,children:[(0,a.jsx)("span",{className:"text-sm",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.voices.length," voices"]}),g===e.code&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===ey.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}let E="https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png";function R(e){let t="string"==typeof e?e.trim():"";return t?/^(data:image\/|https?:\/\/)/i.test(t)?t:`data:image/png;base64,${t}`:""}function M({providerId:e,kind:t}){let s=(0,c.wG)(e),r=(0,c.rs)(s)===e?s:e,o=c.rj.find(e=>e.id===t),l=k[t],d=l||{},u=(0,f.KC)(e).filter(e=>(0,f.CP)(e)===t),m=new Set(["image","video","music","imageToText","systemone"]).has(t),p=m&&0===u.length,[x,h]=(0,n.useState)(u[0]?.id??""),b=u.find(e=>e.id===x),g=!!b?.capabilities?.includes("edit"),v=!!b?.capabilities?.includes("mask"),[j,w]=(0,n.useState)(d.defaultInput||""),[C,S]=(0,n.useState)("Does this request require urgent attention?"),[$,_]=(0,n.useState)(""),[P,I]=(0,n.useState)(""),[T,A]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[O,K]=(0,n.useState)(""),[L,B]=(0,n.useState)(!1),[D,U]=(0,n.useState)(""),[F,q]=(0,n.useState)(""),[z,J]=(0,n.useState)(null),[V,H]=(0,n.useState)(null),[W,G]=(0,n.useState)(null),[Y,Q]=(0,n.useState)("json"),[Z,X]=(0,n.useState)(""),[ee,et]=(0,n.useState)(!1),[es,ea]=(0,n.useState)(""),[er,eo]=(0,n.useState)([]),[el,en]=(0,n.useState)(""),{copied:ei,copy:ed}=(0,y.C)(),{copied:ec,copy:eu}=(0,y.C)();if((0,n.useEffect)(()=>{U(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{K((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&q(e.publicUrl)}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{eo((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!o||!l)return null;let em=L?F:D,ep=o.endpoint.path,ex=m?x?`${r}/${x}`:p?"":r:r,eh="huggingface"===e?{image:E}:"cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===x?{image:E}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===x?{image:E,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},eb=$.trim()||eh.image||"",eg=P.trim()||eh.mask_image||"",ef=R(eb),ey=R(eg),ev=Object.entries(T).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),ej="systemone"===t?{questions:{is_urgent:{type:"noul",instructions:C.trim()||"Does this request require urgent attention?"}}}:{},ew={model:ex,[l.bodyKey]:j,...l.extraBody,...ev,...ej,...g&&eb?{image:eb}:{},...v&&eg?{mask_image:eg}:{}},eN="image"===t&&"binary"===Y,ek="image"===t&&"codex"===e&&!eN,eC=`${ep}${eN?"?response_format=binary":""}`,eS=`-H "Content-Type: application/json" \\
52
+ -H "Authorization: Bearer ${O||"YOUR_KEY"}"${el?` \\
53
53
  -H "x-connection-id: ${el}"`:""}${ek?` \\
54
54
  -H "Accept: text/event-stream"`:""}`,e$=`curl -X ${o.endpoint.method} ${em}${eC} \\
55
55
  ${eS.replace(/\\\n /g,"\\\n ")} \\
56
- -d '${JSON.stringify(ew)}'${eN?" \\\n --output image.png":""}`,eP=async()=>{if(!j.trim()||!ex)return;if(et(!0),ea(""),J(null),H(null),G(null),Q){try{URL.revokeObjectURL(Q)}catch{}X("")}let e=Date.now();try{let t={"Content-Type":"application/json"};M&&(t.Authorization=`Bearer ${M}`),el&&(t["x-connection-id"]=el),ek&&(t.Accept="text/event-stream");let s={...ew,model:ex},a=await fetch(`/api${eC}`,{method:o.endpoint.method,headers:t,body:JSON.stringify(s)});if(!a.ok){let e=await a.json().catch(()=>({}));ea(e?.error?.message||e?.error||`HTTP ${a.status}`);return}let r=a.headers.get("content-type")||"";if(r.startsWith("image/")){let t=await a.blob(),s=URL.createObjectURL(t);X(s),J({data:{binary:!0,mime:r,size:t.size},latencyMs:Date.now()-e});return}if(r.includes("text/event-stream")&&a.body){let t=a.body.getReader(),s=new TextDecoder,r="",o=null,l=null;for(;;){let e,{done:a,value:n}=await t.read();if(a)break;for(r+=s.decode(n,{stream:!0});-1!==(e=r.indexOf("\n\n"));){let t=r.slice(0,e);r=r.slice(e+2);let s=null,a="";for(let e of t.split("\n"))e.startsWith("event:")?s=e.slice(6).trim():e.startsWith("data:")&&(a+=e.slice(5).trim());if(s)try{let e=a?JSON.parse(a):{};"progress"===s?H(e):"partial_image"===s?G(e):"done"===s?o=e:"error"===s&&(l=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(l)return void ea(l);o&&J({data:o,latencyMs:n})}else{let t=await a.json(),s=Date.now()-e;J({data:t,latencyMs:s})}}catch(e){ea(e.message||"Network error")}finally{et(!1)}},e_=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(e_);let t={};for(let[s,a]of Object.entries(e))t[s]="b64_json"===s&&"string"==typeof a&&a.length>100?`<${a.length} chars base64>`:e_(a);return t},eI=z?JSON.stringify(e_(z.data),null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[u.length>0?(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("select",{value:x,onChange:e=>h(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:u.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):p?(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("input",{value:x,onChange:e=>h(e.target.value),placeholder:"Enter model id (provider-specific)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}):null,(0,a.jsx)(N,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[em,ep]}),F&&(0,a.jsxs)("button",{onClick:()=>B(e=>!e),title:L?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${L?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:M?`${M.slice(0,8)}${"•".repeat(Math.min(20,Math.max(0,M.length-8)))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),er.length>0&&(0,a.jsx)(N,{label:"Connection",children:(0,a.jsxs)("select",{value:el,onChange:e=>en(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"Auto (by priority)"}),er.map(e=>{let t=e.providerSpecificData?.chatgptPlanType,s=e.email||e.name||e.id.slice(0,8);return(0,a.jsxs)("option",{value:e.id,children:[s,t?` [${t}]`:""]},e.id)})]})}),(0,a.jsx)(N,{label:l.inputLabel,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:l.inputPlaceholder,className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),j&&(0,a.jsx)("button",{type:"button",onClick:()=>w(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),"systemone"===t&&(0,a.jsx)(N,{label:"Question",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:C,onChange:e=>S(e.target.value),placeholder:"Enter evaluation question or criteria",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),C&&(0,a.jsx)("button",{type:"button",onClick:()=>S(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),g&&(0,a.jsx)(N,{label:"Ref Image (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:$,onChange:e=>P(e.target.value),placeholder:eh.image||"https://example.com/source.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),$&&(0,a.jsx)("button",{type:"button",onClick:()=>P(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),ef&&(0,a.jsx)("img",{src:ef,alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"},loading:"lazy",decoding:"async"})]})}),v&&(0,a.jsx)(N,{label:"Mask (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:_,onChange:e=>I(e.target.value),placeholder:eh.mask_image||"https://example.com/mask.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),_&&(0,a.jsx)("button",{type:"button",onClick:()=>I(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),ey&&(0,a.jsx)("img",{src:ey,alt:"Mask",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"},loading:"lazy",decoding:"async"})]})}),(l.extraFields||[]).filter(e=>0===u.length||Array.isArray(b?.params)&&b.params.includes(e.key)).map(e=>(0,a.jsx)(N,{label:e.label,children:"select"===e.type?(0,a.jsx)("select",{value:T[e.key]??"",onChange:t=>A(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(e.options||[]).map(e=>(0,a.jsx)("option",{value:e,children:""===e?"(default)":e},e))}):"text"===e.type?(0,a.jsx)("input",{type:"text",value:T[e.key]??"",placeholder:e.placeholder,onChange:t=>A(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}):(0,a.jsx)("input",{type:"number",value:T[e.key]??"",min:e.min,max:e.max,onChange:t=>A(s=>({...s,[e.key]:""===t.target.value?"":Number(t.target.value)})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})},e.key)),"image"===t&&(0,a.jsx)(N,{label:"Output Format",children:(0,a.jsxs)("select",{value:Y,onChange:e=>Z(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"}),(0,a.jsx)("option",{value:"binary",children:"Binary File"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>ed(e$),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ei?"check":"content_copy"}),ei?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eP,disabled:ee||!j.trim()||!ex,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:ee?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),ee?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:e$})]}),(ee||V)&&ek&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 px-3 py-2 rounded-lg bg-sidebar border border-border sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",style:ee?{animation:"spin 1s linear infinite"}:void 0,children:ee?"progress_activity":"check_circle"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[V?.stage||"starting",!ee&&V?.bytesReceived?` \xb7 ${(V.bytesReceived/1024).toFixed(1)} KB`:""]})]}),W?.b64_json&&!z&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Partial preview"}),(0,a.jsx)("img",{src:`data:image/png;base64,${W.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80",loading:"lazy",decoding:"async"})]}),es&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:es}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",z&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",z.latencyMs,"ms"]})]}),z&&(0,a.jsxs)("button",{onClick:()=>eu(eI),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ec?"check":"content_copy"}),ec?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:z?eI:l.defaultResponse}),"image"===t&&(Q||z?.data?.data?.[0])&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:Q||(z?.data?.data?.[0]?.b64_json?`data:image/png;base64,${z.data.data[0].b64_json}`:z?.data?.data?.[0]?.url||""),download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:Q||(z?.data?.data?.[0]?.b64_json?`data:image/png;base64,${z.data.data[0].b64_json}`:z?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border",loading:"lazy",decoding:"async"})]})]})]})]})}function M({providerId:e}){let t=(0,c.wG)(e),s=(0,f.KC)(e).filter(e=>"stt"===(0,f.CP)(e)),[r,o]=(0,n.useState)([]),l=[...s,...r],[d,u]=(0,n.useState)(s[0]?.id??""),m=l.find(e=>e.id===d),p=Array.isArray(m?.params)?m.params:[],[x,h]=(0,n.useState)(null),[b,g]=(0,n.useState)(""),[v,j]=(0,n.useState)(""),[w,k]=(0,n.useState)("json"),[C,S]=(0,n.useState)(""),[$,P]=(0,n.useState)(""),[_,I]=(0,n.useState)(!1),[T,A]=(0,n.useState)(""),[E,R]=(0,n.useState)(""),[O,K]=(0,n.useState)(null),[L,B]=(0,n.useState)(null),[D,U]=(0,n.useState)(!1),[F,q]=(0,n.useState)(""),{copied:z,copy:J}=(0,y.C)(),{copied:V,copy:H}=(0,y.C)();(0,n.useEffect)(()=>{A(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{P((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&R(e.publicUrl)}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{o((e.models||[]).filter(e=>"stt"===(0,f.CP)(e)&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let W=_?E:T,G=d?`${t}/${d}`:"",Y=`curl -X POST ${W}/v1/audio/transcriptions \\
57
- -H "Authorization: Bearer ${$||"YOUR_KEY"}" \\
56
+ -d '${JSON.stringify(ew)}'${eN?" \\\n --output image.png":""}`,e_=async()=>{if(!j.trim()||!ex)return;if(et(!0),ea(""),J(null),H(null),G(null),Z){try{URL.revokeObjectURL(Z)}catch{}X("")}let e=Date.now();try{let t={"Content-Type":"application/json"};O&&(t.Authorization=`Bearer ${O}`),el&&(t["x-connection-id"]=el),ek&&(t.Accept="text/event-stream");let s={...ew,model:ex},a=await fetch(`/api${eC}`,{method:o.endpoint.method,headers:t,body:JSON.stringify(s)});if(!a.ok){let e=await a.json().catch(()=>({}));ea(e?.error?.message||e?.error||`HTTP ${a.status}`);return}let r=a.headers.get("content-type")||"";if(r.startsWith("image/")){let t=await a.blob(),s=URL.createObjectURL(t);X(s),J({data:{binary:!0,mime:r,size:t.size},latencyMs:Date.now()-e});return}if(r.includes("text/event-stream")&&a.body){let t=a.body.getReader(),s=new TextDecoder,r="",o=null,l=null;for(;;){let e,{done:a,value:n}=await t.read();if(a)break;for(r+=s.decode(n,{stream:!0});-1!==(e=r.indexOf("\n\n"));){let t=r.slice(0,e);r=r.slice(e+2);let s=null,a="";for(let e of t.split("\n"))e.startsWith("event:")?s=e.slice(6).trim():e.startsWith("data:")&&(a+=e.slice(5).trim());if(s)try{let e=a?JSON.parse(a):{};"progress"===s?H(e):"partial_image"===s?G(e):"done"===s?o=e:"error"===s&&(l=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(l)return void ea(l);o&&J({data:o,latencyMs:n})}else{let t=await a.json(),s=Date.now()-e;J({data:t,latencyMs:s})}}catch(e){ea(e.message||"Network error")}finally{et(!1)}},eP=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(eP);let t={};for(let[s,a]of Object.entries(e))t[s]="b64_json"===s&&"string"==typeof a&&a.length>100?`<${a.length} chars base64>`:eP(a);return t},eI=z?JSON.stringify(eP(z.data),null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[u.length>0?(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("select",{value:x,onChange:e=>h(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:u.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):p?(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("input",{value:x,onChange:e=>h(e.target.value),placeholder:"Enter model id (provider-specific)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}):null,(0,a.jsx)(N,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[em,ep]}),F&&(0,a.jsxs)("button",{onClick:()=>B(e=>!e),title:L?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${L?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:O?`${O.slice(0,8)}${"•".repeat(Math.min(20,Math.max(0,O.length-8)))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),er.length>0&&(0,a.jsx)(N,{label:"Connection",children:(0,a.jsxs)("select",{value:el,onChange:e=>en(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"Auto (by priority)"}),er.map(e=>{let t=e.providerSpecificData?.chatgptPlanType,s=e.email||e.name||e.id.slice(0,8);return(0,a.jsxs)("option",{value:e.id,children:[s,t?` [${t}]`:""]},e.id)})]})}),(0,a.jsx)(N,{label:l.inputLabel,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:l.inputPlaceholder,className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),j&&(0,a.jsx)("button",{type:"button",onClick:()=>w(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),"systemone"===t&&(0,a.jsx)(N,{label:"Question",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:C,onChange:e=>S(e.target.value),placeholder:"Enter evaluation question or criteria",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),C&&(0,a.jsx)("button",{type:"button",onClick:()=>S(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),g&&(0,a.jsx)(N,{label:"Ref Image (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:$,onChange:e=>_(e.target.value),placeholder:eh.image||"https://example.com/source.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),$&&(0,a.jsx)("button",{type:"button",onClick:()=>_(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),ef&&(0,a.jsx)("img",{src:ef,alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"},loading:"lazy",decoding:"async"})]})}),v&&(0,a.jsx)(N,{label:"Mask (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:P,onChange:e=>I(e.target.value),placeholder:eh.mask_image||"https://example.com/mask.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),P&&(0,a.jsx)("button",{type:"button",onClick:()=>I(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),ey&&(0,a.jsx)("img",{src:ey,alt:"Mask",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"},loading:"lazy",decoding:"async"})]})}),(l.extraFields||[]).filter(e=>0===u.length||Array.isArray(b?.params)&&b.params.includes(e.key)).map(e=>(0,a.jsx)(N,{label:e.label,children:"select"===e.type?(0,a.jsx)("select",{value:T[e.key]??"",onChange:t=>A(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(e.options||[]).map(e=>(0,a.jsx)("option",{value:e,children:""===e?"(default)":e},e))}):"text"===e.type?(0,a.jsx)("input",{type:"text",value:T[e.key]??"",placeholder:e.placeholder,onChange:t=>A(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}):(0,a.jsx)("input",{type:"number",value:T[e.key]??"",min:e.min,max:e.max,onChange:t=>A(s=>({...s,[e.key]:""===t.target.value?"":Number(t.target.value)})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})},e.key)),"image"===t&&(0,a.jsx)(N,{label:"Output Format",children:(0,a.jsxs)("select",{value:Y,onChange:e=>Q(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"}),(0,a.jsx)("option",{value:"binary",children:"Binary File"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>ed(e$),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ei?"check":"content_copy"}),ei?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:e_,disabled:ee||!j.trim()||!ex,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:ee?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),ee?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:e$})]}),(ee||V)&&ek&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 px-3 py-2 rounded-lg bg-sidebar border border-border sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",style:ee?{animation:"spin 1s linear infinite"}:void 0,children:ee?"progress_activity":"check_circle"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[V?.stage||"starting",!ee&&V?.bytesReceived?` \xb7 ${(V.bytesReceived/1024).toFixed(1)} KB`:""]})]}),W?.b64_json&&!z&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Partial preview"}),(0,a.jsx)("img",{src:`data:image/png;base64,${W.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80",loading:"lazy",decoding:"async"})]}),es&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:es}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",z&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",z.latencyMs,"ms"]})]}),z&&(0,a.jsxs)("button",{onClick:()=>eu(eI),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ec?"check":"content_copy"}),ec?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:z?eI:l.defaultResponse}),"image"===t&&(Z||z?.data?.data?.[0])&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:Z||(z?.data?.data?.[0]?.b64_json?`data:image/png;base64,${z.data.data[0].b64_json}`:z?.data?.data?.[0]?.url||""),download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:Z||(z?.data?.data?.[0]?.b64_json?`data:image/png;base64,${z.data.data[0].b64_json}`:z?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border",loading:"lazy",decoding:"async"})]})]})]})]})}function O({providerId:e}){let t=(0,c.wG)(e),s=(0,f.KC)(e).filter(e=>"stt"===(0,f.CP)(e)),[r,o]=(0,n.useState)([]),l=[...s,...r],[d,u]=(0,n.useState)(s[0]?.id??""),m=l.find(e=>e.id===d),p=Array.isArray(m?.params)?m.params:[],[x,h]=(0,n.useState)(null),[b,g]=(0,n.useState)(""),[v,j]=(0,n.useState)(""),[w,k]=(0,n.useState)("json"),[C,S]=(0,n.useState)(""),[$,_]=(0,n.useState)(""),[P,I]=(0,n.useState)(!1),[T,A]=(0,n.useState)(!1),[E,R]=(0,n.useState)(""),[M,K]=(0,n.useState)(""),[L,B]=(0,n.useState)(!1),[D,U]=(0,n.useState)(""),[F,q]=(0,n.useState)(""),[z,J]=(0,n.useState)(null),[V,H]=(0,n.useState)(null),[W,G]=(0,n.useState)(!1),[Y,Q]=(0,n.useState)(""),{copied:Z,copy:X}=(0,y.C)(),{copied:ee,copy:et}=(0,y.C)();(0,n.useEffect)(()=>{U(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{K((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&q(e.publicUrl)}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{o((e.models||[]).filter(e=>"stt"===(0,f.CP)(e)&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let es=L?F:D,ea=d?`${t}/${d}`:"",er=`curl -X POST ${es}/v1/audio/transcriptions \\
57
+ -H "Authorization: Bearer ${M||"YOUR_KEY"}" \\
58
58
  -F "file=@${x?.name||"audio.mp3"}" \\
59
- -F "model=${G}"${p.includes("language")&&b?` \\
59
+ -F "model=${ea}"${p.includes("language")&&b?` \\
60
60
  -F "language=${b}"`:""}${p.includes("response_format")?` \\
61
61
  -F "response_format=${w}"`:""}${p.includes("temperature")&&C?` \\
62
62
  -F "temperature=${C}"`:""}${p.includes("prompt")&&v?` \\
63
- -F "prompt=${v}"`:""}`,Z=async()=>{if(!x||!G)return;U(!0),q(""),K(null);let e=Date.now();try{let t=new FormData;t.append("file",x),t.append("model",G),p.includes("language")&&b&&t.append("language",b),p.includes("response_format")&&t.append("response_format",w),p.includes("temperature")&&C&&t.append("temperature",C),p.includes("prompt")&&v&&t.append("prompt",v);let s={};$&&(s.Authorization=`Bearer ${$}`);let a=await fetch("/api/v1/audio/transcriptions",{method:"POST",headers:s,body:t});B(Date.now()-e);let r=(a.headers.get("content-type")||"").includes("application/json")?await a.json():await a.text();if(!a.ok)return void q(r?.error?.message||r?.error||r||`HTTP ${a.status}`);K(r)}catch(e){q(e.message||"Network error")}finally{U(!1)}},Q="string"==typeof O?O:O?JSON.stringify(O,null,2):`{
63
+ -F "prompt=${v}"`:""}${p.includes("timestamps_granularity")&&$?` \\
64
+ -F "timestamps_granularity=${$}"`:""}${p.includes("tag_audio_events")&&P?` \\
65
+ -F "tag_audio_events=true"`:""}${p.includes("diarize")&&T?` \\
66
+ -F "diarize=true"`:""}${p.includes("num_speakers")&&!T&&E?` \\
67
+ -F "num_speakers=${E}"`:""}`,eo=async()=>{if(!x||!ea)return;G(!0),Q(""),J(null);let e=Date.now();try{let t=new FormData;t.append("file",x),t.append("model",ea),p.includes("language")&&b&&t.append("language",b),p.includes("response_format")&&t.append("response_format",w),p.includes("temperature")&&C&&t.append("temperature",C),p.includes("prompt")&&v&&t.append("prompt",v),p.includes("timestamps_granularity")&&$&&t.append("timestamps_granularity",$),p.includes("tag_audio_events")&&P&&t.append("tag_audio_events","true"),p.includes("diarize")&&T?t.append("diarize","true"):p.includes("num_speakers")&&E&&t.append("num_speakers",E);let s={};M&&(s.Authorization=`Bearer ${M}`);let a=await fetch("/api/v1/audio/transcriptions",{method:"POST",headers:s,body:t});H(Date.now()-e);let r=(a.headers.get("content-type")||"").includes("application/json")?await a.json():await a.text();if(!a.ok)return void Q(r?.error?.message||r?.error||r||`HTTP ${a.status}`);J(r)}catch(e){Q(e.message||"Network error")}finally{G(!1)}},el="string"==typeof z?z:z?JSON.stringify(z,null,2):`{
64
68
  "text": "Hello world..."
65
- }`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.length>0?(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>u(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>u(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(N,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[W,"/v1/audio/transcriptions"]}),E&&(0,a.jsxs)("button",{onClick:()=>I(e=>!e),title:_?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${_?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,Math.max(0,$.length-8)))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,a.jsx)(N,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),x&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[x.name," \xb7 ",(x.size/1024).toFixed(1)," KB"]})]})}),p.includes("language")&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsx)("input",{value:b,onChange:e=>g(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),p.includes("prompt")&&(0,a.jsx)(N,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("temperature")&&(0,a.jsx)(N,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:C,onChange:e=>S(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("response_format")&&(0,a.jsx)(N,{label:"Response Format",children:(0,a.jsxs)("select",{value:w,onChange:e=>k(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>J(Y),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:z?"check":"content_copy"}),z?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:Z,disabled:D||!x||!G,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:D?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),D?"Transcribing...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:Y})]}),F&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",O&&L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),O&&(0,a.jsxs)("button",{onClick:()=>H(Q),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:V?"check":"content_copy"}),V?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:Q})]})]})]})}function K(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=c.rj.find(t=>t.id===e),u=(0,c.gC)(t)&&"embedding"===e,m=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[p,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(u),[f,y]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!u)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),b(!1))}).catch(()=>{e||b(!1)}),()=>{e=!0}},[t,u]),!o)return(0,r.notFound)();let v=c.Q2[t],j=u?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!u&&!v||u&&!h&&!p)return(0,r.notFound)();if(u&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=u?["embedding"]:j.serviceKinds??["llm"];return u||N.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(l(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),o.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${j.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${j.id}.png`,alt:j.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:j.textIcon||j.id.slice(0,2).toUpperCase(),fallbackColor:j.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:j.name}),!u&&j.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:j.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[u&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",p?.prefix]}),N.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),u&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:m,children:"Delete"})]})]})]}),!u&&j.kindNotice?.[e]&&(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:j.kindNotice[e]})]}),!u&&j.notice?.text&&!j.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:j.notice.text}),j.notice.apiKeyUrl&&(0,a.jsx)("a",{href:j.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 →"})]}),!u&&j.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(g,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(w,{providerId:t,kindFilter:e,providerAliasOverride:u?p?.prefix:void 0}),!u&&(j.searchConfig||j.fetchConfig||j.ttsConfig||j.sttConfig||j.embeddingConfig||j.systemoneConfig||j.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?j.fetchConfig:"tts"===e?j.ttsConfig:"stt"===e?j.sttConfig:"embedding"===e?j.embeddingConfig:"systemone"===e?j.systemoneConfig:j.searchConfig||{mode:"chat-completions",defaultModel:j.searchViaChat?.defaultModel,pricingUrl:j.searchViaChat?.pricingUrl,freeTier:j.searchViaChat?.freeTier},provider:j,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(S,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(A,{providerId:t}),"stt"===e&&!u&&(0,a.jsx)(M,{providerId:t}),!u&&k[e]&&(0,a.jsx)(O,{providerId:t,kind:e}),u&&(0,a.jsx)(i.x0,{isOpen:f,node:p,onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})},94338:(e,t,s)=>{Promise.resolve().then(s.bind(s,41095))}},e=>{e.O(0,[763,1321,705,5497,8441,3794,7358],()=>e(e.s=94338)),_N_E=e.O()}]);
69
+ }`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.length>0?(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>u(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>u(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(N,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[es,"/v1/audio/transcriptions"]}),F&&(0,a.jsxs)("button",{onClick:()=>B(e=>!e),title:L?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${L?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:M?`${M.slice(0,8)}${"•".repeat(Math.min(20,Math.max(0,M.length-8)))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,a.jsx)(N,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),x&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[x.name," \xb7 ",(x.size/1024).toFixed(1)," KB"]})]})}),p.includes("language")&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsx)("input",{value:b,onChange:e=>g(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),p.includes("prompt")&&(0,a.jsx)(N,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("temperature")&&(0,a.jsx)(N,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:C,onChange:e=>S(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("response_format")&&(0,a.jsx)(N,{label:"Response Format",children:(0,a.jsxs)("select",{value:w,onChange:e=>k(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),p.includes("timestamps_granularity")&&(0,a.jsx)(N,{label:"Timestamps",children:(0,a.jsxs)("select",{value:$,onChange:e=>_(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"provider default"}),(0,a.jsx)("option",{value:"word",children:"word"}),(0,a.jsx)("option",{value:"character",children:"character"}),(0,a.jsx)("option",{value:"none",children:"none"})]})}),p.includes("tag_audio_events")&&(0,a.jsx)(N,{label:"Tag audio events",children:(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:P,onChange:e=>I(e.target.checked),className:"accent-primary"}),"Label non-speech sounds as [laughter], [applause], ..."]})}),p.includes("diarize")&&(0,a.jsx)(N,{label:"Speaker labels",children:(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:T,onChange:e=>A(e.target.checked),className:"accent-primary"}),"Detect speakers automatically (overrides speaker count)"]})}),p.includes("num_speakers")&&(0,a.jsx)(N,{label:"Speaker count",children:(0,a.jsx)("input",{type:"number",step:"1",min:"1",max:"32",value:E,onChange:e=>R(e.target.value),disabled:T,placeholder:"auto-detect",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary disabled:opacity-50"})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>X(er),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:Z?"check":"content_copy"}),Z?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eo,disabled:W||!x||!ea,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:W?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),W?"Transcribing...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:er})]}),Y&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:Y}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",z&&V&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",V,"ms"]})]}),z&&(0,a.jsxs)("button",{onClick:()=>et(el),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ee?"check":"content_copy"}),ee?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:el})]})]})]})}function K(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=c.rj.find(t=>t.id===e),u=(0,c.gC)(t)&&"embedding"===e,m=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[p,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(u),[f,y]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!u)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),b(!1))}).catch(()=>{e||b(!1)}),()=>{e=!0}},[t,u]),!o)return(0,r.notFound)();let v=c.Q2[t],j=u?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!u&&!v||u&&!h&&!p)return(0,r.notFound)();if(u&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=u?["embedding"]:j.serviceKinds??["llm"];return u||N.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(l(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),o.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${j.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${j.id}.png`,alt:j.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:j.textIcon||j.id.slice(0,2).toUpperCase(),fallbackColor:j.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:j.name}),!u&&j.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:j.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[u&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",p?.prefix]}),N.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),u&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:m,children:"Delete"})]})]})]}),!u&&j.kindNotice?.[e]&&(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:j.kindNotice[e]})]}),!u&&j.notice?.text&&!j.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:j.notice.text}),j.notice.apiKeyUrl&&(0,a.jsx)("a",{href:j.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 →"})]}),!u&&j.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(g,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(w,{providerId:t,kindFilter:e,providerAliasOverride:u?p?.prefix:void 0}),!u&&(j.searchConfig||j.fetchConfig||j.ttsConfig||j.sttConfig||j.embeddingConfig||j.systemoneConfig||j.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?j.fetchConfig:"tts"===e?j.ttsConfig:"stt"===e?j.sttConfig:"embedding"===e?j.embeddingConfig:"systemone"===e?j.systemoneConfig:j.searchConfig||{mode:"chat-completions",defaultModel:j.searchViaChat?.defaultModel,pricingUrl:j.searchViaChat?.pricingUrl,freeTier:j.searchViaChat?.freeTier},provider:j,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(S,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(A,{providerId:t}),"stt"===e&&!u&&(0,a.jsx)(O,{providerId:t}),!u&&k[e]&&(0,a.jsx)(M,{providerId:t,kind:e}),u&&(0,a.jsx)(i.x0,{isOpen:f,node:p,onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})},94338:(e,t,s)=>{Promise.resolve().then(s.bind(s,41095))}},e=>{e.O(0,[763,1321,705,5497,8441,3794,7358],()=>e(e.s=94338)),_N_E=e.O()}]);