@techysy/10router 1.1.0 → 1.1.1

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 (1028) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +11 -7
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +26 -26
  5. package/app/.next-cli-build/react-loadable-manifest.json +1540 -0
  6. package/app/.next-cli-build/routes-manifest.json +24 -0
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +28 -28
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +8 -8
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  77. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  85. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  88. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  89. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  90. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
  91. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  92. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +2 -2
  109. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js +1 -0
  115. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -0
  116. package/app/.next-cli-build/server/app/api/auth/verify-password/route_client-reference-manifest.js +1 -0
  117. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  118. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  120. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  124. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  126. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  138. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  146. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js +1 -0
  202. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -0
  203. package/app/.next-cli-build/server/app/api/models/custom/bulk/route_client-reference-manifest.js +1 -0
  204. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  225. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -0
  245. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -0
  246. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route_client-reference-manifest.js +1 -0
  247. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -0
  248. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -0
  249. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route_client-reference-manifest.js +1 -0
  250. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  253. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  287. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  289. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  295. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  297. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  299. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  301. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  303. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  305. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  307. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  309. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  327. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  349. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  369. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  383. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  423. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  425. package/app/.next-cli-build/server/app/callback.html +1 -1
  426. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  427. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  428. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  429. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  430. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  431. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  432. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  433. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  434. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  435. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  436. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  437. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
  438. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  439. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  440. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  442. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
  443. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  444. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  445. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  447. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  448. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  449. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  450. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  452. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
  453. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  454. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  455. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  456. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  457. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
  458. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  459. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  460. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  461. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  462. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
  463. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  464. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  465. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  467. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
  468. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  469. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  470. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  471. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  472. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
  473. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  474. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  475. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  477. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
  478. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  479. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  480. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
  482. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
  483. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
  484. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  485. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  486. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  487. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
  488. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  489. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  490. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  495. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  496. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  497. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  498. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  499. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  500. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
  501. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  502. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  503. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  505. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
  506. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  507. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  508. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  509. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  510. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
  511. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  512. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  515. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
  516. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  517. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  518. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  519. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  520. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  521. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  522. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  523. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  524. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  525. package/app/.next-cli-build/server/app/index.html +1 -1
  526. package/app/.next-cli-build/server/app/index.rsc +5 -5
  527. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  528. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  529. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  530. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  531. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  532. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  533. package/app/.next-cli-build/server/app/landing.html +1 -1
  534. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  535. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  536. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  537. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +6 -6
  538. package/app/.next-cli-build/server/app/login/page.js +1 -1
  539. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  540. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  541. package/app/.next-cli-build/server/app/login.html +1 -1
  542. package/app/.next-cli-build/server/app/login.rsc +6 -6
  543. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  544. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  545. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
  546. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  547. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  548. package/app/.next-cli-build/server/app/page.js +1 -1
  549. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  550. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  551. package/app/.next-cli-build/server/app-paths-manifest.json +11 -7
  552. package/app/.next-cli-build/server/chunks/1159.js +1 -0
  553. package/app/.next-cli-build/server/chunks/1260.js +1 -1
  554. package/app/.next-cli-build/server/chunks/1377.js +1 -1
  555. package/app/.next-cli-build/server/chunks/1937.js +1 -1
  556. package/app/.next-cli-build/server/chunks/{3212.js → 2112.js} +1 -1
  557. package/app/.next-cli-build/server/chunks/2120.js +1 -0
  558. package/app/.next-cli-build/server/chunks/2132.js +1 -1
  559. package/app/.next-cli-build/server/chunks/2179.js +1 -1
  560. package/app/.next-cli-build/server/chunks/3651.js +92 -0
  561. package/app/.next-cli-build/server/chunks/3662.js +1 -1
  562. package/app/.next-cli-build/server/chunks/3879.js +1 -0
  563. package/app/.next-cli-build/server/chunks/3901.js +1 -0
  564. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  565. package/app/.next-cli-build/server/chunks/3962.js +1 -1
  566. package/app/.next-cli-build/server/chunks/4037.js +1 -1
  567. package/app/.next-cli-build/server/chunks/4049.js +1 -1
  568. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  569. package/app/.next-cli-build/server/chunks/4293.js +1 -1
  570. package/app/.next-cli-build/server/chunks/436.js +1 -0
  571. package/app/.next-cli-build/server/chunks/4840.js +1 -0
  572. package/app/.next-cli-build/server/chunks/4862.js +1 -0
  573. package/app/.next-cli-build/server/chunks/4985.js +1 -1
  574. package/app/.next-cli-build/server/chunks/5182.js +1 -1
  575. package/app/.next-cli-build/server/chunks/5217.js +2 -2
  576. package/app/.next-cli-build/server/chunks/{318.js → 5330.js} +3 -3
  577. package/app/.next-cli-build/server/chunks/5433.js +1 -1
  578. package/app/.next-cli-build/server/chunks/5485.js +1 -0
  579. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  580. package/app/.next-cli-build/server/chunks/5781.js +2 -2
  581. package/app/.next-cli-build/server/chunks/595.js +1 -1
  582. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  583. package/app/.next-cli-build/server/chunks/615.js +1 -1
  584. package/app/.next-cli-build/server/chunks/6212.js +1 -0
  585. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  586. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  587. package/app/.next-cli-build/server/chunks/6457.js +2 -2
  588. package/app/.next-cli-build/server/chunks/653.js +1 -1
  589. package/app/.next-cli-build/server/chunks/6871.js +1 -1
  590. package/app/.next-cli-build/server/chunks/6960.js +7 -0
  591. package/app/.next-cli-build/server/chunks/7239.js +1 -1
  592. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  593. package/app/.next-cli-build/server/chunks/7322.js +2 -2
  594. package/app/.next-cli-build/server/chunks/7805.js +1 -1
  595. package/app/.next-cli-build/server/chunks/7843.js +51 -0
  596. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  597. package/app/.next-cli-build/server/chunks/8410.js +1 -0
  598. package/app/.next-cli-build/server/chunks/8499.js +3 -53
  599. package/app/.next-cli-build/server/chunks/8546.js +1 -1
  600. package/app/.next-cli-build/server/chunks/8635.js +3 -0
  601. package/app/.next-cli-build/server/chunks/869.js +1 -1
  602. package/app/.next-cli-build/server/chunks/877.js +65 -0
  603. package/app/.next-cli-build/server/chunks/8838.js +1 -1
  604. package/app/.next-cli-build/server/chunks/8990.js +1 -1
  605. package/app/.next-cli-build/server/chunks/937.js +1 -0
  606. package/app/.next-cli-build/server/chunks/939.js +1 -0
  607. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  608. package/app/.next-cli-build/server/chunks/9679.js +1 -0
  609. package/app/.next-cli-build/server/chunks/9713.js +1 -0
  610. package/app/.next-cli-build/server/instrumentation.js +1 -1
  611. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  612. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  613. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  614. package/app/.next-cli-build/server/middleware.js +7 -7
  615. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  616. package/app/.next-cli-build/server/pages/404.html +1 -1
  617. package/app/.next-cli-build/server/pages/500.html +1 -1
  618. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  619. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  620. package/app/.next-cli-build/static/ZVF_AsRusUqo_O-OyJWPo/_buildManifest.js +1 -0
  621. package/app/.next-cli-build/static/chunks/1243-220f1fd87235cb92.js +3 -0
  622. package/app/.next-cli-build/static/chunks/1321-ad1ba3dfb4f417dd.js +1 -0
  623. package/app/.next-cli-build/static/chunks/1728-9783950fd2b6ad81.js +65 -0
  624. package/app/.next-cli-build/static/chunks/3170-8dc71548e5b2cbf9.js +1 -0
  625. package/app/.next-cli-build/static/chunks/5497-8b67dd598415a05b.js +7 -0
  626. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-05baf24fe36fbd8f.js → page-5d45a84bf4178e23.js} +1 -1
  627. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-272386fb26fd75c3.js → page-d9b185c845eb0735.js} +1 -1
  628. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-f098adefd36910e1.js → page-baf9fb2b236ff509.js} +1 -1
  629. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-a2a6c56b7776af70.js → page-395c2359af9bc2a9.js} +1 -1
  630. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-cfdc0f6cf601fb4f.js → page-30c02c5c5eefddbd.js} +1 -1
  631. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-c748c385fd4207db.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-df8dac9c150f9f1e.js +59 -0
  633. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-23a27239721d0c86.js → page-502e7efb917191b9.js} +1 -1
  634. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-11b1e63e5750aa80.js → page-244f4c72b60bf0a0.js} +2 -2
  635. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-fa0de4d9f54eb3ef.js → page-720b5ab2e46fc6bb.js} +1 -1
  636. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-d4b67cdea67b89d0.js → page-12cb89849a36b78d.js} +1 -1
  637. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-6abbed908eb3721a.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-d8fb1a26657cc67f.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-f9d2dd98fde8ba67.js +14 -0
  640. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-a04315501559f028.js → page-40e882239717e69f.js} +1 -1
  641. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-c1757ed34595dcdb.js → page-e5e78bb5f4aa4063.js} +1 -1
  642. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-46d86481868d6900.js → page-4f50d3385b23743f.js} +1 -1
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-895a59d896e1399c.js → page-5f5434b22c7f7b73.js} +1 -1
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-1ce31613b04ec926.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-e16aaf24dc525a49.js → page-6a0eb15b8664e682.js} +1 -1
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-d17ab83ab811a84c.js → page-27bf96f0f2568f09.js} +1 -1
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-346541a45bcf828f.js → page-b2a5c4828ff3f6e0.js} +1 -1
  648. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-f3c3284e4b3cb324.js → page-a442053054654766.js} +1 -1
  649. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-1cffa0a228a79ad6.js → layout-158175db070fe14c.js} +1 -1
  650. package/app/.next-cli-build/static/chunks/app/_global-error/page-73a852c9be713797.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-73a852c9be713797.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-73a852c9be713797.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-73a852c9be713797.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-73a852c9be713797.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-73a852c9be713797.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-73a852c9be713797.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-73a852c9be713797.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-73a852c9be713797.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-73a852c9be713797.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-73a852c9be713797.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-73a852c9be713797.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-73a852c9be713797.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-73a852c9be713797.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-73a852c9be713797.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-73a852c9be713797.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-73a852c9be713797.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-73a852c9be713797.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-73a852c9be713797.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-73a852c9be713797.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-73a852c9be713797.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-73a852c9be713797.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-73a852c9be713797.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-73a852c9be713797.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-73a852c9be713797.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-73a852c9be713797.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-73a852c9be713797.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-73a852c9be713797.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-73a852c9be713797.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-73a852c9be713797.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-73a852c9be713797.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-73a852c9be713797.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-73a852c9be713797.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/combos/route-73a852c9be713797.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-73a852c9be713797.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-73a852c9be713797.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-73a852c9be713797.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-73a852c9be713797.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-73a852c9be713797.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-73a852c9be713797.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/health/route-73a852c9be713797.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/init/route-73a852c9be713797.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-73a852c9be713797.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-73a852c9be713797.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/keys/route-73a852c9be713797.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/locale/route-73a852c9be713797.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-73a852c9be713797.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-73a852c9be713797.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-73a852c9be713797.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-73a852c9be713797.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-73a852c9be713797.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-73a852c9be713797.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-73a852c9be713797.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-73a852c9be713797.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-73a852c9be713797.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-73a852c9be713797.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-73a852c9be713797.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-73a852c9be713797.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/models/route-73a852c9be713797.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/models/test/route-73a852c9be713797.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-73a852c9be713797.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-73a852c9be713797.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-73a852c9be713797.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-73a852c9be713797.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-73a852c9be713797.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-73a852c9be713797.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-73a852c9be713797.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-73a852c9be713797.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-73a852c9be713797.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-73a852c9be713797.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-73a852c9be713797.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-73a852c9be713797.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-73a852c9be713797.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-73a852c9be713797.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-73a852c9be713797.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-73a852c9be713797.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-73a852c9be713797.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-73a852c9be713797.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-73a852c9be713797.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-73a852c9be713797.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/pricing/route-73a852c9be713797.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-73a852c9be713797.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-73a852c9be713797.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-73a852c9be713797.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-73a852c9be713797.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-73a852c9be713797.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-73a852c9be713797.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-73a852c9be713797.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-73a852c9be713797.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-73a852c9be713797.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/providers/route-73a852c9be713797.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-73a852c9be713797.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-73a852c9be713797.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-73a852c9be713797.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-73a852c9be713797.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-73a852c9be713797.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-73a852c9be713797.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-73a852c9be713797.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-73a852c9be713797.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-73a852c9be713797.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-73a852c9be713797.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-73a852c9be713797.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-73a852c9be713797.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-73a852c9be713797.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-73a852c9be713797.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-73a852c9be713797.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-73a852c9be713797.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-73a852c9be713797.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-73a852c9be713797.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-73a852c9be713797.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-73a852c9be713797.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-73a852c9be713797.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/settings/route-73a852c9be713797.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-73a852c9be713797.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/tags/route-73a852c9be713797.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-73a852c9be713797.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-73a852c9be713797.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-73a852c9be713797.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-73a852c9be713797.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-73a852c9be713797.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-73a852c9be713797.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-73a852c9be713797.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-73a852c9be713797.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-73a852c9be713797.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-73a852c9be713797.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-73a852c9be713797.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-73a852c9be713797.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-73a852c9be713797.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-73a852c9be713797.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-73a852c9be713797.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-73a852c9be713797.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-73a852c9be713797.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-73a852c9be713797.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-73a852c9be713797.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-73a852c9be713797.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-73a852c9be713797.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-73a852c9be713797.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-73a852c9be713797.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-73a852c9be713797.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-73a852c9be713797.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-73a852c9be713797.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-73a852c9be713797.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-73a852c9be713797.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-73a852c9be713797.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-73a852c9be713797.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-73a852c9be713797.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-73a852c9be713797.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-73a852c9be713797.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-73a852c9be713797.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-73a852c9be713797.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-73a852c9be713797.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-73a852c9be713797.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/v1/route-73a852c9be713797.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-73a852c9be713797.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-73a852c9be713797.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-73a852c9be713797.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-73a852c9be713797.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-73a852c9be713797.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-73a852c9be713797.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-73a852c9be713797.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-73a852c9be713797.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/version/route-73a852c9be713797.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-73a852c9be713797.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/version/update/route-73a852c9be713797.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/landing/page-da7215e0796dbf9b.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/login/{page-f3c1df1fc132afda.js → page-0da5fcc5d841cbb9.js} +1 -1
  816. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-73a852c9be713797.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/page-73a852c9be713797.js +1 -0
  818. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-73a852c9be713797.js +1 -0
  819. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-73a852c9be713797.js +1 -0
  820. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-73a852c9be713797.js +1 -0
  821. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-73a852c9be713797.js +1 -0
  822. package/app/.next-cli-build/static/chunks/{webpack-f52125609b4734b6.js → webpack-77a7ed7beb6725df.js} +1 -1
  823. package/app/.next-cli-build/static/css/adecbbef384db8e1.css +1 -0
  824. package/app/custom-server.js +177 -167
  825. package/app/package.json +2 -1
  826. package/app/public/i18n/changelog/en.md +203 -179
  827. package/app/public/i18n/changelog/zh-CN.md +201 -177
  828. package/app/public/i18n/changelog/zh-TW.md +203 -179
  829. package/app/public/i18n/literals/zh-CN.json +85 -6
  830. package/app/public/i18n/literals/zh-TW.json +126 -4
  831. package/app/public/providers/amd.png +0 -0
  832. package/app/src/lib/consoleArchiveStandalone.mjs +73 -0
  833. package/app/src/sse/services/codebuddyCheckin.js +308 -54
  834. package/package.json +1 -1
  835. package/app/.next-cli-build/server/chunks/1636.js +0 -1
  836. package/app/.next-cli-build/server/chunks/2765.js +0 -1
  837. package/app/.next-cli-build/server/chunks/295.js +0 -1
  838. package/app/.next-cli-build/server/chunks/412.js +0 -7
  839. package/app/.next-cli-build/server/chunks/4665.js +0 -65
  840. package/app/.next-cli-build/server/chunks/525.js +0 -1
  841. package/app/.next-cli-build/server/chunks/6877.js +0 -1
  842. package/app/.next-cli-build/server/chunks/7211.js +0 -1
  843. package/app/.next-cli-build/server/chunks/7913.js +0 -92
  844. package/app/.next-cli-build/server/chunks/8363.js +0 -1
  845. package/app/.next-cli-build/server/chunks/8444.js +0 -3
  846. package/app/.next-cli-build/server/chunks/9896.js +0 -1
  847. package/app/.next-cli-build/static/chunks/1243-a9f0940294c15c24.js +0 -3
  848. package/app/.next-cli-build/static/chunks/1321-0167273f2d678ede.js +0 -1
  849. package/app/.next-cli-build/static/chunks/4614-de3422f98b83f305.js +0 -65
  850. package/app/.next-cli-build/static/chunks/5242-bb1a1a7ec3bfb62f.js +0 -1
  851. package/app/.next-cli-build/static/chunks/5497-a55c9d3d9f5b5cbf.js +0 -7
  852. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-36c5d10e7c244d2d.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-b475f81b3d89c963.js +0 -59
  854. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-237c096548d0981d.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-cd93d4f0b910293c.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-60c620ec082ed541.js +0 -14
  857. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c7ef8300ebeb4889.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/_global-error/page-f5ad4d359abeda22.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-f5ad4d359abeda22.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-f5ad4d359abeda22.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-f5ad4d359abeda22.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-f5ad4d359abeda22.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-f5ad4d359abeda22.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-f5ad4d359abeda22.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-f5ad4d359abeda22.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-f5ad4d359abeda22.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-f5ad4d359abeda22.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-f5ad4d359abeda22.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-f5ad4d359abeda22.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-f5ad4d359abeda22.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-f5ad4d359abeda22.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-f5ad4d359abeda22.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-f5ad4d359abeda22.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-f5ad4d359abeda22.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-f5ad4d359abeda22.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-f5ad4d359abeda22.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-f5ad4d359abeda22.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-f5ad4d359abeda22.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-f5ad4d359abeda22.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-f5ad4d359abeda22.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-f5ad4d359abeda22.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-f5ad4d359abeda22.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-f5ad4d359abeda22.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-f5ad4d359abeda22.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-f5ad4d359abeda22.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-f5ad4d359abeda22.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-f5ad4d359abeda22.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-f5ad4d359abeda22.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-f5ad4d359abeda22.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/combos/route-f5ad4d359abeda22.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-f5ad4d359abeda22.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-f5ad4d359abeda22.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-f5ad4d359abeda22.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-f5ad4d359abeda22.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-f5ad4d359abeda22.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-f5ad4d359abeda22.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/health/route-f5ad4d359abeda22.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/init/route-f5ad4d359abeda22.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-f5ad4d359abeda22.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-f5ad4d359abeda22.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/keys/route-f5ad4d359abeda22.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/locale/route-f5ad4d359abeda22.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-f5ad4d359abeda22.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-f5ad4d359abeda22.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-f5ad4d359abeda22.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-f5ad4d359abeda22.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-f5ad4d359abeda22.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-f5ad4d359abeda22.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-f5ad4d359abeda22.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-f5ad4d359abeda22.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-f5ad4d359abeda22.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-f5ad4d359abeda22.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-f5ad4d359abeda22.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/models/route-f5ad4d359abeda22.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/models/test/route-f5ad4d359abeda22.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-f5ad4d359abeda22.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-f5ad4d359abeda22.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-f5ad4d359abeda22.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-f5ad4d359abeda22.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-f5ad4d359abeda22.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-f5ad4d359abeda22.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-f5ad4d359abeda22.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-f5ad4d359abeda22.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-f5ad4d359abeda22.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-f5ad4d359abeda22.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-f5ad4d359abeda22.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-f5ad4d359abeda22.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-f5ad4d359abeda22.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-f5ad4d359abeda22.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-f5ad4d359abeda22.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-f5ad4d359abeda22.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-f5ad4d359abeda22.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-f5ad4d359abeda22.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/pricing/route-f5ad4d359abeda22.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-f5ad4d359abeda22.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-f5ad4d359abeda22.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-f5ad4d359abeda22.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-f5ad4d359abeda22.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-f5ad4d359abeda22.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-f5ad4d359abeda22.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-f5ad4d359abeda22.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-f5ad4d359abeda22.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-f5ad4d359abeda22.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/providers/route-f5ad4d359abeda22.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-f5ad4d359abeda22.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-f5ad4d359abeda22.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-f5ad4d359abeda22.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-f5ad4d359abeda22.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-f5ad4d359abeda22.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-f5ad4d359abeda22.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-f5ad4d359abeda22.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-f5ad4d359abeda22.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-f5ad4d359abeda22.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-f5ad4d359abeda22.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-f5ad4d359abeda22.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-f5ad4d359abeda22.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-f5ad4d359abeda22.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-f5ad4d359abeda22.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-f5ad4d359abeda22.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-f5ad4d359abeda22.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-f5ad4d359abeda22.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-f5ad4d359abeda22.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-f5ad4d359abeda22.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-f5ad4d359abeda22.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-f5ad4d359abeda22.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/settings/route-f5ad4d359abeda22.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-f5ad4d359abeda22.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/tags/route-f5ad4d359abeda22.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-f5ad4d359abeda22.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-f5ad4d359abeda22.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-f5ad4d359abeda22.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-f5ad4d359abeda22.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-f5ad4d359abeda22.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-f5ad4d359abeda22.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-f5ad4d359abeda22.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-f5ad4d359abeda22.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-f5ad4d359abeda22.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-f5ad4d359abeda22.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-f5ad4d359abeda22.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-f5ad4d359abeda22.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-f5ad4d359abeda22.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-f5ad4d359abeda22.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-f5ad4d359abeda22.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-f5ad4d359abeda22.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-f5ad4d359abeda22.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-f5ad4d359abeda22.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-f5ad4d359abeda22.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-f5ad4d359abeda22.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-f5ad4d359abeda22.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-f5ad4d359abeda22.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-f5ad4d359abeda22.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-f5ad4d359abeda22.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-f5ad4d359abeda22.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-f5ad4d359abeda22.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-f5ad4d359abeda22.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-f5ad4d359abeda22.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-f5ad4d359abeda22.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-f5ad4d359abeda22.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-f5ad4d359abeda22.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-f5ad4d359abeda22.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-f5ad4d359abeda22.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-f5ad4d359abeda22.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-f5ad4d359abeda22.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-f5ad4d359abeda22.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-f5ad4d359abeda22.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/v1/route-f5ad4d359abeda22.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-f5ad4d359abeda22.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-f5ad4d359abeda22.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-f5ad4d359abeda22.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-f5ad4d359abeda22.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-f5ad4d359abeda22.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-f5ad4d359abeda22.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-f5ad4d359abeda22.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-f5ad4d359abeda22.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/version/route-f5ad4d359abeda22.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-f5ad4d359abeda22.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/version/update/route-f5ad4d359abeda22.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/landing/page-abe5fbd51346146f.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-f5ad4d359abeda22.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/page-f5ad4d359abeda22.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-f5ad4d359abeda22.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-f5ad4d359abeda22.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-f5ad4d359abeda22.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-f5ad4d359abeda22.js +0 -1
  1025. package/app/.next-cli-build/static/css/87048d3b7e880a4f.css +0 -1
  1026. package/app/.next-cli-build/static/rBJbR_XYSlh3OgKbcSSXs/_buildManifest.js +0 -1
  1027. package/app/public/providers/apinex.png +0 -0
  1028. /package/app/.next-cli-build/static/{rBJbR_XYSlh3OgKbcSSXs → ZVF_AsRusUqo_O-OyJWPo}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{},_=>{_.O(0,[4614,1321,5497,1243,8441,3794,7358],()=>_(_.s=51243)),_N_E=_.O()}]);
@@ -1,59 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{35139:(e,t,s)=>{Promise.resolve().then(s.bind(s,41095))},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),m=s(70217),u=s(14051),p=s.n(u);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:u,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 u("__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,m.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,m]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[u,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=>m({...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=>m({...c,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!c.apiKey||u||g,variant:"secondary",children:u?"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=>m({...c,priority:Number.parseInt(e.target.value)||1})})]}),(0,a.jsx)(i.l6,{label:"Proxy Pool",value:c.proxyPoolId,onChange:e=>m({...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),[m,u]=(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(),u(!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:()=>u(!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]",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:()=>u(!0),children:"Add"})})]})]}),(0,a.jsx)(b,{isOpen:m,provider:e,proxyPools:o,onSave:A,onClose:()=>u(!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 m="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:m?{color:m}: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)({}),[m,u]=(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&&u(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=m.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:`{
2
- "results": [
3
- { "title": "...", "url": "...", "snippet": "..." }
4
- ]
5
- }`,extraFields:[{key:"search_type",label:"Type",type:"select",default:"web",options:["web","news"]},{key:"max_results",label:"Max results",type:"number",default:5,min:1,max:100},{key:"country",label:"Country",type:"text",default:""},{key:"language",label:"Language",type:"text",default:""}]},webFetch:{inputLabel:"URL",inputPlaceholder:"https://example.com",defaultInput:"https://example.com",bodyKey:"url",defaultResponse:`{
6
- "content": "...",
7
- "title": "...",
8
- "url": "..."
9
- }`,extraFields:[{key:"format",label:"Format",type:"select",default:"markdown",options:["markdown","text","html"]},{key:"max_characters",label:"Max chars",type:"number",default:0,min:0}]},image:{inputLabel:"Prompt",inputPlaceholder:"A cute cat wearing a hat",defaultInput:"A cute cat wearing a hat",bodyKey:"prompt",defaultResponse:`{
10
- "data": [
11
- { "url": "...", "b64_json": "..." }
12
- ]
13
- }`,extraFields:[{key:"n",label:"n",type:"number",default:1,min:1,max:4},{key:"size",label:"Size",type:"select",default:"auto",options:["auto","1024x1024","1024x1536","1536x1024","1024x1792","1792x1024"]},{key:"quality",label:"Quality",type:"select",default:"auto",options:["auto","low","medium","high","standard","hd"]},{key:"background",label:"Background",type:"select",default:"auto",options:["auto","transparent","opaque"]},{key:"style",label:"Style",type:"select",default:"",options:["","vivid","natural"]},{key:"response_format",label:"Format",type:"select",default:"",options:["","url","b64_json"]},{key:"image_detail",label:"Image Detail",type:"select",default:"high",options:["auto","low","high","original"]},{key:"output_format",label:"Codec",type:"select",default:"png",options:["png","jpeg","webp"]}]},imageToText:{inputLabel:"Image URL",inputPlaceholder:"https://example.com/image.png",defaultInput:"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg",bodyKey:"url",extraBody:{prompt:"Describe this image in detail"},defaultResponse:`{
14
- "text": "A cat sitting on a windowsill...",
15
- "model": "..."
16
- }`},video:{inputLabel:"Prompt",inputPlaceholder:"A serene lake at sunset",defaultInput:"A serene lake at sunset",bodyKey:"prompt",defaultResponse:`{
17
- "data": [
18
- { "url": "..." }
19
- ]
20
- }`},music:{inputLabel:"Prompt",inputPlaceholder:"A calm piano melody",defaultInput:"A calm piano melody",bodyKey:"prompt",defaultResponse:`{
21
- "data": [
22
- { "url": "...", "format": "mp3" }
23
- ]
24
- }`}},C=`{
25
- "object": "list",
26
- "data": [{
27
- "object": "embedding",
28
- "index": 0,
29
- "embedding": [0.002301, -0.019212, 0.004815, -0.031249, ...]
30
- }],
31
- "model": "...",
32
- "usage": { "prompt_tokens": 9, "total_tokens": 9 }
33
- }`;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??""),[m,u]=(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}`:"",U=()=>{let e={model:B,input:m.trim()},t=Number(p);return p&&Number.isFinite(t)&&t>0&&(e.dimensions=t),e},D=`curl -X POST ${L}/v1/embeddings \\
34
- -H "Content-Type: application/json" \\
35
- -H "Authorization: Bearer ${h||"YOUR_KEY"}" \\
36
- -d '${JSON.stringify(U())}'`,F=async()=>{if(!m.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(U())}),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:m,onChange:e=>u(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"}),m&&(0,a.jsx)("button",{type:"button",onClick:()=>u(""),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(D),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||!m.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:D})]}),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.
37
- // Example JSON response (response_format=json):
38
- {
39
- "format": "mp3",
40
- "audio": "//NExAANaAIIAUAAANNNNNNNN..." // base64 encoded MP3
41
- }`;function A({providerId:e}){let t,s,r=(0,c.wG)(e),o=$[e]||$["edge-tts"],[l,d]=(0,n.useState)(o.defaultVoiceId||""),[m,u]=(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)(""),[U,D]=(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,em]=(0,n.useState)(""),[eu,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&&D(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),u(e.name),b([{id:e.id,name:e.name}])}else b(s),d(s[0].id),u(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),u(t[0].name||t[0].id)):(d(""),u(""))},[j]);let ef=async()=>{if(ea(!0),ed(""),em(""),!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 em(a.error);eo(a.languages||[]),ep(a.byLang||{})}}catch(e){em(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?U: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":""} \\
42
- -H "Content-Type: application/json" \\
43
- -H "Authorization: Bearer ${R||"YOUR_KEY"}" \\
44
- -d '${JSON.stringify(eN)}' \\
45
- ${"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"]}),U&&(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,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),u(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),u(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=eu[e.code]?.voices||[]),t.length&&(d(t[0].id),u(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||{},m=(0,f.KC)(e).filter(e=>(0,f.CP)(e)===t),u=new Set(["image","video","music","imageToText"]).has(t),p=u&&0===m.length,[x,h]=(0,n.useState)(m[0]?.id??""),b=m.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)(""),[$,P]=(0,n.useState)(""),[_,I]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[T,A]=(0,n.useState)(""),[M,K]=(0,n.useState)(!1),[L,B]=(0,n.useState)(""),[U,D]=(0,n.useState)(""),[F,q]=(0,n.useState)(null),[z,J]=(0,n.useState)(null),[V,H]=(0,n.useState)(null),[W,G]=(0,n.useState)("json"),[Y,Z]=(0,n.useState)(""),[Q,X]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(""),[es,ea]=(0,n.useState)([]),[er,eo]=(0,n.useState)(""),{copied:el,copy:en}=(0,y.C)(),{copied:ei,copy:ed}=(0,y.C)();if((0,n.useEffect)(()=>{B(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{A((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&D(e.publicUrl)}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{ea((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!o||!l)return null;let ec=M?U:L,em=o.endpoint.path,eu=u?x?`${r}/${x}`:p?"":r:r,ep="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"}:{},ex=C.trim()||ep.image||"",eh=$.trim()||ep.mask_image||"",eb=R(ex),eg=R(eh),ef=Object.entries(_).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),ey={model:eu,[l.bodyKey]:j,...l.extraBody,...ef,...g&&ex?{image:ex}:{},...v&&eh?{mask_image:eh}:{}},ev="image"===t&&"binary"===W,ej="image"===t&&"codex"===e&&!ev,ew=`${em}${ev?"?response_format=binary":""}`,eN=`-H "Content-Type: application/json" \\
46
- -H "Authorization: Bearer ${T||"YOUR_KEY"}"${er?` \\
47
- -H "x-connection-id: ${er}"`:""}${ej?` \\
48
- -H "Accept: text/event-stream"`:""}`,ek=`curl -X ${o.endpoint.method} ${ec}${ew} \\
49
- ${eN.replace(/\\\n /g,"\\\n ")} \\
50
- -d '${JSON.stringify(ey)}'${ev?" \\\n --output image.png":""}`,eC=async()=>{if(!j.trim()||!eu)return;if(X(!0),et(""),q(null),J(null),H(null),Y){try{URL.revokeObjectURL(Y)}catch{}Z("")}let e=Date.now();try{let t={"Content-Type":"application/json"};T&&(t.Authorization=`Bearer ${T}`),er&&(t["x-connection-id"]=er),ej&&(t.Accept="text/event-stream");let s={...ey,model:eu},a=await fetch(`/api${ew}`,{method:o.endpoint.method,headers:t,body:JSON.stringify(s)});if(!a.ok){let e=await a.json().catch(()=>({}));et(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);Z(s),q({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?J(e):"partial_image"===s?H(e):"done"===s?o=e:"error"===s&&(l=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(l)return void et(l);o&&q({data:o,latencyMs:n})}else{let t=await a.json(),s=Date.now()-e;q({data:t,latencyMs:s})}}catch(e){et(e.message||"Network error")}finally{X(!1)}},eS=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(eS);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>`:eS(a);return t},e$=F?JSON.stringify(eS(F.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:[m.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:m.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:[ec,em]}),U&&(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:T?`${T.slice(0,8)}${"•".repeat(Math.min(20,T.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),es.length>0&&(0,a.jsx)(N,{label:"Connection",children:(0,a.jsxs)("select",{value:er,onChange:e=>eo(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)"}),es.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"})})]})}),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:C,onChange:e=>S(e.target.value),placeholder:ep.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"}),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"})})]}),eb&&(0,a.jsx)("img",{src:eb,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=>P(e.target.value),placeholder:ep.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:()=>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"})})]}),eg&&(0,a.jsx)("img",{src:eg,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===m.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:_[e.key]??"",onChange:t=>I(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:_[e.key]??"",placeholder:e.placeholder,onChange:t=>I(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:_[e.key]??"",min:e.min,max:e.max,onChange:t=>I(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:W,onChange:e=>G(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:()=>en(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:el?"check":"content_copy"}),el?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eC,disabled:Q||!j.trim()||!eu,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:Q?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),Q?"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:ek})]}),(Q||z)&&ej&&(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:Q?{animation:"spin 1s linear infinite"}:void 0,children:Q?"progress_activity":"check_circle"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[z?.stage||"starting",!Q&&z?.bytesReceived?` \xb7 ${(z.bytesReceived/1024).toFixed(1)} KB`:""]})]}),V?.b64_json&&!F&&(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,${V.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80",loading:"lazy",decoding:"async"})]}),ee&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:ee}),(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 ",F&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",F.latencyMs,"ms"]})]}),F&&(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.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:F?e$:l.defaultResponse}),"image"===t&&(Y||F?.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:Y||(F?.data?.data?.[0]?.b64_json?`data:image/png;base64,${F.data.data[0].b64_json}`:F?.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:Y||(F?.data?.data?.[0]?.b64_json?`data:image/png;base64,${F.data.data[0].b64_json}`:F?.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,m]=(0,n.useState)(s[0]?.id??""),u=l.find(e=>e.id===d),p=Array.isArray(u?.params)?u.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),[U,D]=(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 \\
51
- -H "Authorization: Bearer ${$||"YOUR_KEY"}" \\
52
- -F "file=@${x?.name||"audio.mp3"}" \\
53
- -F "model=${G}"${p.includes("language")&&b?` \\
54
- -F "language=${b}"`:""}${p.includes("response_format")?` \\
55
- -F "response_format=${w}"`:""}${p.includes("temperature")&&C?` \\
56
- -F "temperature=${C}"`:""}${p.includes("prompt")&&v?` \\
57
- -F "prompt=${v}"`:""}`,Z=async()=>{if(!x||!G)return;D(!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{D(!1)}},Q="string"==typeof O?O:O?JSON.stringify(O,null,2):`{
58
- "text": "Hello world..."
59
- }`;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=>m(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=>m(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,$.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:U||!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:U?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),U?"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),m=(0,c.gC)(t)&&"embedding"===e,u=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)(m),[f,y]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!m)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,m]),!o)return(0,r.notFound)();let v=c.Q2[t],j=m?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!h&&!p)return(0,r.notFound)();if(m&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=m?["embedding"]:j.serviceKinds??["llm"];return m||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}),!m&&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:[m&&(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))]})]}),m&&(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:u,children:"Delete"})]})]})]}),!m&&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]})]}),!m&&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 →"})]}),!m&&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:m?p?.prefix:void 0}),!m&&(j.searchConfig||j.fetchConfig||j.ttsConfig||j.sttConfig||j.embeddingConfig||j.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?j.fetchConfig:"tts"===e?j.ttsConfig:"stt"===e?j.sttConfig:"embedding"===e?j.embeddingConfig: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&&!m&&(0,a.jsx)(M,{providerId:t}),!m&&k[e]&&(0,a.jsx)(O,{providerId:t,kind:e}),m&&(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})}},e=>{e.O(0,[4614,1321,5497,8441,3794,7358],()=>e(e.s=35139)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[4614,1321,5497,1243,8441,3794,7358],()=>_(_.s=51243)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{13966:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),r=s(12115),l=s(35497),i=s(81127),o=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202),p=s(45496),u=s(73006);function h(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}function b(){let{theme:e,setTheme:t,isDark:s}=(0,n.D)(),[m,b]=(0,r.useState)(()=>h()),[g,f]=(0,r.useState)(!0),[y,j]=(0,r.useState)(!1),[N,w]=(0,r.useState)(!1),[v,S]=(0,r.useState)(!1),[C,k]=(0,r.useState)({fallbackStrategy:"fill-first"}),[L,A]=(0,r.useState)(!0),[I,P]=(0,r.useState)({current:"",new:"",confirm:""}),[O,M]=(0,r.useState)({type:"",message:""}),[T,E]=(0,r.useState)(!1),[R,D]=(0,r.useState)(!1),[$,U]=(0,r.useState)({type:"",message:""}),[F,q]=(0,r.useState)({open:!1,mode:"",password:""}),J=(0,r.useRef)(null),[B,_]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[H,z]=(0,r.useState)(""),[X,K]=(0,r.useState)({type:"",message:""}),[Z,W]=(0,r.useState)(!1),[Q,G]=(0,r.useState)(!1),[V,Y]=(0,r.useState)({type:"",message:""}),[ee,et]=(0,r.useState)(!1),es=window.location.origin,ea=es?`${es}/api/auth/oidc/callback`:"/api/auth/oidc/callback",er=es?`${es}/api/auth/saml/acs`:"/api/auth/saml/acs",el=es?`${es}/api/auth/saml/metadata`:"/api/auth/saml/metadata",[ei,eo]=(0,r.useState)("saml"),[en,ed]=(0,r.useState)({samlEntryPoint:"",samlIssuer:"urn:10router:sp",samlCert:"",samlLoginLabel:"Sign in with SAML SSO",samlAttributeEmail:"email",samlAttributeName:"name"}),[ec,em]=(0,r.useState)({type:"",message:""}),[ex,ep]=(0,r.useState)(!1),[eu,eh]=(0,r.useState)(!1),[eb,eg]=(0,r.useState)({type:"",message:""}),[ef,ey]=(0,r.useState)(!1),ej=(0,r.useRef)(null),eN=(0,r.useRef)(null),ew=(0,r.useRef)(null),ev=(0,r.useRef)(null),eS=(0,r.useRef)(null),[eC,ek]=(0,r.useState)({type:"",message:""}),[eL,eA]=(0,r.useState)(!1),[eI,eP]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[eO,eM]=(0,r.useState)({type:"",message:""}),[eT,eE]=(0,r.useState)(!1),[eR,eD]=(0,r.useState)(!1),[e$,eU]=(0,r.useState)(!1);(0,r.useEffect)(()=>{eU(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]),(0,r.useEffect)(()=>{b(h()),f((0,p.i)())},[y]);let eF=async()=>{let e=!0!==C.providerDisabledLastSort;try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerDisabledLastSort:e})}),s=await t.json();t.ok&&k(e=>({...e,...s}))}catch(e){console.log("Error toggling provider disabled-last sort:",e)}},eq=async()=>{let e=!1===C.showCommunityProviders;try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({showCommunityProviders:e})}),s=await t.json();t.ok&&k(e=>({...e,...s}))}catch(e){console.log("Error toggling show-community-providers:",e)}},eJ=async()=>{let e=!0!==C.codeBuddyOAuthImport;try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({codeBuddyOAuthImport:e})}),s=await t.json();t.ok&&k(e=>({...e,...s}))}catch(e){console.log("Error toggling codebuddy OAuth import:",e)}},eB=async()=>{let e=!0!==C.codeBuddyCheckin;try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({codeBuddyCheckin:e})}),s=await t.json();t.ok&&k(e=>({...e,...s}))}catch(e){console.log("Error toggling codebuddy auto check-in:",e)}};(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{k(e),_({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),z(""),eo(e?.ssoType||"saml"),ed({samlEntryPoint:e?.samlEntryPoint||"",samlIssuer:e?.samlIssuer||"urn:10router:sp",samlCert:e?.samlCert||"",samlLoginLabel:e?.samlLoginLabel||"Sign in with SAML SSO",samlAttributeEmail:e?.samlAttributeEmail||"email",samlAttributeName:e?.samlAttributeName||"name"}),(e?.authMode==="sso"||e?.authMode==="saml"||e?.authMode==="oidc"||e?.authMode==="both")&&et(!0),eP({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),A(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),A(!1)})},[]);let e_=async e=>{if(e.preventDefault(),!0===C.outboundProxyEnabled){eE(!0),eM({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:eI.outboundProxyUrl,outboundNoProxy:eI.outboundNoProxy})}),t=await e.json();e.ok?(k(e=>({...e,...t})),eM({type:"success",message:"Proxy settings applied"})):eM({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){eM({type:"error",message:"An error occurred"})}finally{eE(!1)}}},eH=async()=>{if(!0!==C.outboundProxyEnabled)return;let e=(eI.outboundProxyUrl||"").trim();if(!e)return void eM({type:"error",message:"Please enter a Proxy URL to test"});eD(!0),eM({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?eM({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):eM({type:"error",message:s?.error||"Proxy test failed"})}catch(e){eM({type:"error",message:"An error occurred"})}finally{eD(!1)}},ez=async e=>{eE(!0),eM({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(k(e=>({...e,...s})),eP(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),eM({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):eM({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){eM({type:"error",message:"An error occurred"})}finally{eE(!1)}},eX=async e=>{if(e.preventDefault(),I.new!==I.confirm)return void M({type:"error",message:"Passwords do not match"});E(!0),M({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:I.current,newPassword:I.new})}),t=await e.json();e.ok?(M({type:"success",message:"Password updated successfully"}),P({current:"",new:"",confirm:""})):M({type:"error",message:t.error||"Failed to update password"})}catch(e){M({type:"error",message:"An error occurred"})}finally{E(!1)}},eK=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&k(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eZ=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&k(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eW=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&k(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eQ=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&k(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eG=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&k(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},eV=(e,t)=>{_(s=>({...s,[e]:t}))},eY=async(e=B.authMode||"password")=>{let t=B.oidcIssuerUrl.trim(),s=B.oidcClientId.trim(),a=B.oidcScopes.trim(),r=B.oidcLoginLabel.trim(),l=H.trim();if("password"!==e&&(!t||!s||!l)&&!C.oidcConfigured)return void K({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});W(!0),K({type:"",message:""}),Y({type:"",message:""});try{let i={authMode:e,ssoType:"oidc",oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};l&&(i.oidcClientSecret=l);let o=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await o.json();o.ok?(k(e=>({...e,...n})),_({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),z(""),K({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):K({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){K({type:"error",message:"An error occurred"})}finally{W(!1)}},e0=async()=>{let e=B.oidcIssuerUrl.trim(),t=B.oidcClientId.trim(),s=B.oidcScopes.trim(),a=H.trim();if(!e||!t)return void Y({type:"error",message:"Issuer URL and client ID are required to test the connection."});G(!0),K({type:"",message:""}),Y({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:B.authMode||C.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:B.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),l=await r.json().catch(()=>({}));if(!r.ok)return void Y({type:"error",message:l.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:l.oidcIssuerUrl||e,clientId:l.oidcClientId||t,scopes:l.oidcScopes||s||"openid profile email"})}),o=await i.json().catch(()=>({}));if(i.ok&&o?.ok){let e=o.clientSecretTested?!0===o.clientSecretValid?`Connection OK. Discovery loaded from ${o.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${o.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${o.issuerUrl}.`;Y({type:"success",message:e})}else Y({type:"error",message:o.error||"OIDC connection test failed"})}catch(e){Y({type:"error",message:"An error occurred"})}finally{G(!1)}},e1=(e,t)=>{ed(s=>({...s,[e]:t}))},e5=async(e=B.authMode||"password")=>{ep(!0),em({type:"",message:""}),eg({type:"",message:""});try{let t={authMode:e,ssoType:"saml",samlEntryPoint:en.samlEntryPoint.trim(),samlIssuer:en.samlIssuer.trim()||"urn:10router:sp",samlCert:en.samlCert.trim(),samlLoginLabel:en.samlLoginLabel.trim()||"Sign in with SAML SSO",samlAttributeEmail:en.samlAttributeEmail.trim()||"email",samlAttributeName:en.samlAttributeName.trim()||"name"},s=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),a=await s.json();s.ok?(k(e=>({...e,...a})),ed({samlEntryPoint:a?.samlEntryPoint||t.samlEntryPoint,samlIssuer:a?.samlIssuer||t.samlIssuer,samlCert:a?.samlCert||t.samlCert,samlLoginLabel:a?.samlLoginLabel||t.samlLoginLabel,samlAttributeEmail:a?.samlAttributeEmail||t.samlAttributeEmail,samlAttributeName:a?.samlAttributeName||t.samlAttributeName}),em({type:"success",message:"sso"===e||"saml"===e?"SAML SSO login enabled":"both"===e?"Password and SAML SSO login enabled":"SAML 2.0 settings saved"})):em({type:"error",message:a.error||"Failed to save SAML settings"})}catch{em({type:"error",message:"An error occurred while saving SAML settings"})}finally{ep(!1)}},e2=async()=>{eh(!0),em({type:"",message:""}),eg({type:"",message:""});try{let e=await fetch("/api/auth/saml/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({samlEntryPoint:en.samlEntryPoint.trim(),samlIssuer:en.samlIssuer.trim(),samlCert:en.samlCert.trim()})}),t=await e.json();e.ok&&t.ok?eg({type:"success",message:t.message||"SAML configuration verified!"}):eg({type:"error",message:t.error||"SAML configuration test failed"})}catch{eg({type:"error",message:"An error occurred while testing SAML configuration"})}finally{eh(!1)}},e4=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&k(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},e3=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();k(t)}catch(e){console.error("Failed to reload settings:",e)}},e6=async e=>{D(!0),U({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),l=URL.createObjectURL(r),i=document.createElement("a"),o=new Date().toISOString().replace(/[.:]/g,"-");i.href=l,i.download=`10router-backup-${o}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(l),U({type:"success",message:"Database backup downloaded"})}catch(e){U({type:"error",message:e.message||"Failed to export database"})}finally{D(!1)}},e9=e=>/\\.(sqlite|sqlite3|db)$/i.test(e.name)||"application/x-sqlite3"===e.type||"application/vnd.sqlite3"===e.type||"application/octet-stream"===e.type,e7=e=>/\\.(json)$/i.test(e.name)||"application/json"===e.type,e8=async(e,t=null)=>{eA(!0),ek({type:"",message:""});try{let s,a=e7(e)&&!e9(e),r={};if(t&&(r["x-9r-password"]=t),a){let t;try{let s=await e.text();t=JSON.parse(s)}catch{eA(!1),ek({type:"error",message:(0,u.Tl)("Invalid JSON usage file")});return}s=JSON.stringify(Array.isArray(t)?{usageHistory:t}:t),r["Content-Type"]="application/json"}else{let t=new FormData;t.append("file",e),s=t}let l=await fetch("/api/settings/database/import-usage",{method:"POST",body:s,headers:r}),i=await l.json();if(!l.ok){if(401===l.status&&!t){eS.current=e,q({open:!0,mode:"usage-import",password:""});return}throw Error(i.error||"Failed to import usage")}ek({type:"success",message:`${(0,u.Tl)("Imported")} ${i.imported} ${(0,u.Tl)("usage records")} (${(0,u.Tl)("skipped")} ${i.skipped}, ${(0,u.Tl)("total")} ${i.total})`})}catch(e){ek({type:"error",message:e.message||"Failed to import usage"})}finally{eA(!1)}},te=async e=>{let t=J.current;if(t){D(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),l=await r.json().catch(()=>({}));if(!r.ok)throw Error(l.error||"Failed to import database");await e3(),U({type:"success",message:"Database imported successfully"})}catch(e){U({type:"error",message:e.message||"Invalid backup file"})}finally{J.current=null,D(!1)}}},tt=async()=>{let{mode:e,password:t}=F;if(q({open:!1,mode:"",password:""}),"export"===e)await e6(t);else if("import"===e)await te(t);else if("usage-import"===e){let e=eS.current;eS.current=null,e&&await e8(e,t)}},ts=!0===C.enableObservability,ta=async()=>{S(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}S(!1),w(!1)},tr=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.10router/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(l.$n,{variant:"secondary",icon:"download",onClick:()=>q({open:!0,mode:"export",password:""}),loading:R,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(l.$n,{variant:"outline",icon:"upload",onClick:()=>ew.current?.click(),disabled:R,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)(l.$n,{variant:"outline",icon:"history",onClick:()=>ev.current?.click(),loading:eL,className:"w-full sm:w-auto",children:(0,u.Tl)("Import Usage")}),(0,a.jsx)("input",{ref:ew,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];ew.current&&(ew.current.value=""),t&&(J.current=t,U({type:"",message:""}),q({open:!0,mode:"import",password:""}))}}),(0,a.jsx)("input",{ref:ev,type:"file",accept:".sqlite,.db,.sqlite3,.json,application/json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(ev.current&&(ev.current.value=""),t){if(!e9(t)&&!e7(t))return void ek({type:"error",message:(0,u.Tl)("Only SQLite (.sqlite/.db) or JSON (.json) usage files can be imported")});e8(t)}}})]}),$.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===$.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:$.message}),eC.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===eC.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:eC.message})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Language")})]}),(0,a.jsxs)("button",{onClick:()=>j(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:(0,u.Tl)("Display language")}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[m]||"\uD83C\uDF10"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4 mt-3 p-3 rounded-lg bg-bg border border-border",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:(0,u.Tl)("Regional currency")}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Show costs in local currency (\xa5/NT$/₩/₫); off → $"})]}),(0,a.jsx)(l.lM,{checked:g,onChange:()=>{let e=!(0,p.i)();"u">typeof localStorage&&localStorage.setItem("useRegionalCurrency",e?"1":"0"),f(e)}})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Security")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:(0,u.Tl)("Require login")}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:(0,u.Tl)("When ON, dashboard requires password. When OFF, access without login.")})]}),(0,a.jsx)(l.lM,{checked:!0===C.requireLogin,onChange:()=>eG(!C.requireLogin),disabled:L})]}),!0===C.requireLogin&&(0,a.jsxs)("form",{onSubmit:eX,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[C.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Enter current password",value:I.current,onChange:e=>P({...I,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Enter new password",value:I.new,onChange:e=>P({...I,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Confirm new password",value:I.confirm,onChange:e=>P({...I,confirm:e.target.value}),required:!0})]})]}),O.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===O.type?"text-red-500":"text-green-500"}`,children:O.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(l.$n,{type:"submit",variant:"primary",loading:T,className:"w-full sm:w-auto",children:C.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>et(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Single Sign-On (SSO)")}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"sso"===C.authMode||"oidc"===C.authMode||"saml"===C.authMode?`${"saml"===C.ssoType?"SAML 2.0":"OIDC"} SSO active`:"both"===C.authMode?`Password + ${"saml"===C.ssoType?"SAML 2.0":"OIDC"} active`:"Optional SSO via Okta, Entra ID, Keycloak, or OIDC"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:ee?"expand_less":"expand_more"})]}),ee&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:(0,u.Tl)("Configure enterprise Single Sign-On (SSO) for dashboard access using SAML 2.0 or OIDC.")}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"SSO Protocol"}),(0,a.jsxs)("div",{className:"flex p-1 rounded-lg bg-black/5 dark:bg-white/5 border border-border",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eo("saml"),className:(0,d.cn)("flex-1 py-1.5 px-3 rounded-md font-medium text-xs sm:text-sm transition-all text-center","saml"===ei?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:"SAML 2.0"}),(0,a.jsx)("button",{type:"button",onClick:()=>eo("oidc"),className:(0,d.cn)("flex-1 py-1.5 px-3 rounded-md font-medium text-xs sm:text-sm transition-all text-center","oidc"===ei?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:"OIDC"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep legacy password login."},{value:"sso",title:`${"saml"===ei?"SAML":"OIDC"} only`,desc:"Require SSO for dashboard access."},{value:"both",title:"Both",desc:"Allow password or SSO login."}].map(e=>{let t=B.authMode,s="password"===e.value?"password"===t:"sso"===e.value?"sso"===t||"saml"===t||"oidc"===t:"both"===t;return(0,a.jsxs)("button",{type:"button",onClick:()=>eV("authMode",e.value),className:(0,d.cn)("text-left rounded-lg border p-3 transition-colors",s?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:L||Z||ex,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),"saml"===ei?(0,a.jsxs)("div",{className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg/80 overflow-hidden",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>ey(e=>!e),className:"w-full p-3 flex items-center justify-between gap-2 text-left hover:bg-surface/50 transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-lg",children:"menu_book"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-xs sm:text-sm text-text-main",children:"IdP Setup Guidelines & Provider Configuration Instructions"}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:"Click to view setup steps for AWS IAM Identity Center, Okta, Entra ID, Keycloak, & Authentik"})]})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted transition-transform text-lg",style:{transform:ef?"rotate(180deg)":"none"},children:"expand_more"})]}),ef&&(0,a.jsxs)("div",{className:"p-4 border-t border-border bg-surface/30 text-xs text-text-main flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"p-2.5 rounded border border-primary/20 bg-primary/5 text-primary text-xs",children:[(0,a.jsx)("p",{className:"font-semibold mb-1",children:"\uD83D\uDD11 Required Service Provider (SP) Values for your IdP Setup:"}),(0,a.jsxs)("ul",{className:"list-disc pl-4 space-y-1 font-mono text-[11px]",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Assertion Consumer Service (ACS) URL:"})," ",(0,a.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded break-all",children:er})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"SP Entity ID / Audience URI:"})," ",(0,a.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded break-all",children:en.samlIssuer||"urn:10router:sp"})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"NameID Format:"})," ",(0,a.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded",children:"EmailAddress"})," or ",(0,a.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded",children:"Unspecified"})]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 pt-1",children:[(0,a.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,a.jsxs)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:[(0,a.jsx)("span",{children:"☁️"})," AWS IAM Identity Center"]}),(0,a.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,a.jsxs)("li",{children:["Applications → ",(0,a.jsx)("b",{children:"Add application"})," → Select ",(0,a.jsx)("b",{children:"Add custom SAML 2.0 application"}),"."]}),(0,a.jsxs)("li",{children:["Set ",(0,a.jsx)("b",{children:"Application ACS URL"})," to ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:er}),"."]}),(0,a.jsxs)("li",{children:["Set ",(0,a.jsx)("b",{children:"Application SAML audience"})," to ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:en.samlIssuer||"urn:10router:sp"}),"."]}),(0,a.jsxs)("li",{children:["Under ",(0,a.jsx)("i",{children:"Attribute mappings"}),", map ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:"Subject"})," or ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:"email"})," to ",(0,a.jsxs)("code",{className:"text-text-main font-mono",children:["$","{user:email}"]}),"."]}),(0,a.jsxs)("li",{children:["Download ",(0,a.jsx)("b",{children:"IAM Identity Center SAML metadata XML"})," file and use 1-Click Import below!"]})]})]}),(0,a.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,a.jsxs)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:[(0,a.jsx)("span",{children:"\uD83D\uDD37"})," Microsoft Entra ID (Azure AD)"]}),(0,a.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,a.jsxs)("li",{children:["Enterprise Applications → ",(0,a.jsx)("b",{children:"New application"})," → ",(0,a.jsx)("b",{children:"Create your own application"}),"."]}),(0,a.jsxs)("li",{children:["Select ",(0,a.jsx)("b",{children:"Single sign-on"})," → ",(0,a.jsx)("b",{children:"SAML"}),"."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Identifier (Entity ID):"})," ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:en.samlIssuer||"urn:10router:sp"})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Reply URL (ACS):"})," ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:er})]}),(0,a.jsxs)("li",{children:["Download ",(0,a.jsx)("b",{children:"Federation Metadata XML"})," and import or copy X.509 Certificate."]})]})]}),(0,a.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,a.jsxs)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:[(0,a.jsx)("span",{children:"\uD83D\uDFE2"})," Okta / Auth0"]}),(0,a.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,a.jsxs)("li",{children:["Applications → ",(0,a.jsx)("b",{children:"Create App Integration"})," → Select ",(0,a.jsx)("b",{children:"SAML 2.0"}),"."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Single Sign-On URL:"})," ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:er})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Audience URI (SP Entity ID):"})," ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:en.samlIssuer||"urn:10router:sp"})]}),(0,a.jsxs)("li",{children:["Name ID format: ",(0,a.jsx)("i",{children:"EmailAddress"}),"."]}),(0,a.jsx)("li",{children:"Download Identity Provider metadata XML or copy the X.509 cert."})]})]}),(0,a.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,a.jsxs)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:[(0,a.jsx)("span",{children:"\uD83D\uDEE1️"})," Keycloak / Authentik"]}),(0,a.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,a.jsxs)("li",{children:["Clients → ",(0,a.jsx)("b",{children:"Create client"})," → Select ",(0,a.jsx)("b",{children:"SAML"}),"."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Client ID:"})," ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:en.samlIssuer||"urn:10router:sp"})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("b",{children:"Master SAML Processing URL:"})," ",(0,a.jsx)("code",{className:"text-text-main font-mono",children:er})]}),(0,a.jsx)("li",{children:"Export SAML Descriptor XML or copy IDP Certificate PEM."})]})]})]})]})]}),(0,a.jsxs)("div",{className:"p-3 rounded-lg border border-dashed border-primary/40 bg-primary/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm text-text-main",children:"1-Click IdP Metadata XML Import"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Auto-fill SSO URL, Issuer & Cert from XML metadata"})]}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",size:"sm",icon:"upload_file",onClick:()=>ej.current?.click(),children:"Upload Metadata XML"}),(0,a.jsx)("input",{ref:ej,type:"file",accept:".xml,application/xml,text/xml",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(ej.current&&(ej.current.value=""),!t)return;let s=new FileReader;s.onload=e=>{try{let t=e.target?.result||"",s=new DOMParser().parseFromString(t,"text/xml");if(s.querySelector("parsererror"))return void em({type:"error",message:"Unable to parse valid SAML IdP metadata from XML file"});let a=s.documentElement.getAttribute("entityID")||"",r=Array.from(s.querySelectorAll("SingleSignOnService, *|SingleSignOnService")),l="";for(let e of r){let t=e.getAttribute("Binding")||"",s=e.getAttribute("Location")||"";if(s&&(l=s,t.includes("HTTP-Redirect")))break}let i=Array.from(s.querySelectorAll("X509Certificate, *|X509Certificate")),o="";i.length>0&&(o=i[0].textContent.trim()),ed(e=>({...e,samlEntryPoint:l||e.samlEntryPoint,samlIssuer:e.samlIssuer||"urn:10router:sp",samlCert:o||e.samlCert})),em({type:"success",message:`IdP Metadata imported! (SSO URL: ${l?"found":"not found"}, EntityID: ${a?"found":"not found"}, Cert: ${o?"found":"not found"})`})}catch(e){em({type:"error",message:"Error reading IdP Metadata XML file"})}},s.readAsText(t)}})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Single Sign-On Service URL (samlEntryPoint)"}),(0,a.jsx)(l.pd,{placeholder:"https://idp.example.com/app/saml/sso/...",value:en.samlEntryPoint,onChange:e=>e1("samlEntryPoint",e.target.value),disabled:L||ex})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"SP Entity ID / Audience (samlIssuer)"}),(0,a.jsx)(l.pd,{placeholder:"urn:10router:sp",value:en.samlIssuer,onChange:e=>e1("samlIssuer",e.target.value),disabled:L||ex})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"IdP X.509 Certificate (samlCert)"}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",size:"sm",icon:"file_upload",onClick:()=>eN.current?.click(),children:"Upload Certificate"}),(0,a.jsx)("input",{ref:eN,type:"file",accept:".crt,.pem,.cer,text/plain",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(eN.current&&(eN.current.value=""),!t)return;let s=new FileReader;s.onload=e=>{let t=e.target?.result||"";ed(e=>({...e,samlCert:t.trim()})),em({type:"success",message:"Certificate file loaded into configuration."})},s.readAsText(t)}})]}),(0,a.jsx)("textarea",{rows:4,placeholder:"-----BEGIN CERTIFICATE-----\nMIIC...\n-----END CERTIFICATE-----",value:en.samlCert,onChange:e=>e1("samlCert",e.target.value),className:"w-full p-2.5 rounded-lg border border-border bg-bg text-xs font-mono text-text-main focus:outline-none focus:border-primary",disabled:L||ex}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Paste raw Base64 certificate or PEM block."})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(l.pd,{placeholder:"Sign in with SAML SSO",value:en.samlLoginLabel,onChange:e=>e1("samlLoginLabel",e.target.value),disabled:L||ex})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Email Claim Attribute"}),(0,a.jsx)(l.pd,{placeholder:"email",value:en.samlAttributeEmail,onChange:e=>e1("samlAttributeEmail",e.target.value),disabled:L||ex})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Display Name Claim"}),(0,a.jsx)(l.pd,{placeholder:"name",value:en.samlAttributeName,onChange:e=>e1("samlAttributeName",e.target.value),disabled:L||ex})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 p-3 rounded-lg border border-border bg-bg text-xs sm:text-sm text-text-muted",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main",children:"ACS Callback URL"}),(0,a.jsx)("code",{className:"block break-all font-mono text-xs",children:er})]}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",size:"sm",icon:"content_copy",onClick:()=>{navigator.clipboard.writeText(er),em({type:"success",message:"ACS URL copied to clipboard!"})},children:"Copy"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main",children:"SP XML Metadata"}),(0,a.jsx)("code",{className:"block break-all font-mono text-xs",children:el})]}),(0,a.jsxs)("a",{href:el,target:"_blank",rel:"noopener noreferrer",download:"10router-sp-metadata.xml",className:"inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"download"}),"Download XML"]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(l.$n,{type:"button",variant:"primary",loading:ex,onClick:()=>e5(B.authMode),className:"w-full sm:w-auto",children:"Save SAML settings"}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",loading:eu,onClick:e2,className:"w-full sm:w-auto",children:"Test SAML settings"})]}),eb.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===eb.type?"text-red-500":"text-green-500"}`,children:eb.message}),ec.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ec.type?"text-red-500":"text-green-500"}`,children:ec.message})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(l.pd,{placeholder:"https://auth.example.com/application/o/10router/",value:B.oidcIssuerUrl,onChange:e=>eV("oidcIssuerUrl",e.target.value),disabled:L||Z})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(l.pd,{placeholder:"10router-dashboard",value:B.oidcClientId,onChange:e=>eV("oidcClientId",e.target.value),disabled:L||Z})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:H,onChange:e=>z(e.target.value),disabled:L||Z}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(l.pd,{placeholder:"openid profile email",value:B.oidcScopes,onChange:e=>eV("oidcScopes",e.target.value),disabled:L||Z})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(l.pd,{placeholder:"Sign in with OIDC",value:B.oidcLoginLabel,onChange:e=>eV("oidcLoginLabel",e.target.value),disabled:L||Z})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:ea})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(l.$n,{type:"button",variant:"primary",loading:Z,onClick:()=>eY(),className:"w-full sm:w-auto",children:"Save OIDC settings"}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",loading:Q,onClick:e0,className:"w-full sm:w-auto",children:"Test connection"})]}),V.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===V.type?"text-red-500":"text-green-500"}`,children:V.message}),X.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===X.type?"text-red-500":"text-green-500"}`,children:X.message})]}),"oidc"===C.authMode||"saml"===C.authMode||"sso"===C.authMode?(0,a.jsxs)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:["SSO login (","saml"===C.ssoType?"SAML 2.0":"OIDC",") is currently active. Password login is disabled until you switch back."]}):null,"both"===C.authMode&&(0,a.jsxs)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:["Password and SSO login (","saml"===C.ssoType?"SAML 2.0":"OIDC",") are both active."]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(l.lM,{checked:"round-robin"===C.fallbackStrategy,onChange:()=>eK("round-robin"===C.fallbackStrategy?"fill-first":"round-robin"),disabled:L})]}),"round-robin"===C.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(l.pd,{type:"number",min:"1",max:"10",value:C.stickyRoundRobinLimit||3,onChange:e=>eW(e.target.value),disabled:L,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(l.lM,{checked:"round-robin"===C.comboStrategy,onChange:()=>eZ("round-robin"===C.comboStrategy?"fallback":"round-robin"),disabled:L})]}),"round-robin"===C.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(l.pd,{type:"number",min:"1",max:"100",value:C.comboStickyRoundRobinLimit||1,onChange:e=>eQ(e.target.value),disabled:L,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===C.fallbackStrategy?`Currently distributing requests across all available accounts with ${C.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===C.comboStrategy?` Combos rotate after ${C.comboStickyRoundRobinLimit||1} call${1===(C.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-cyan-500/10 text-cyan-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"device_hub"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Providers")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:(0,u.Tl)("Disabled providers sort last")}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Push providers with all connections disabled behind those with no connections"})]}),(0,a.jsx)(l.lM,{checked:!0===C.providerDisabledLastSort,onChange:eF})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:(0,u.Tl)("Show community welfare providers")}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Show free community gateways with no recharge entry (GoRouter / TaBiAI)"})]}),(0,a.jsx)(l.lM,{checked:!1!==C.showCommunityProviders,onChange:eq})]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-amber-500/10 text-amber-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"science"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Experimental")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:(0,u.Tl)("CodeBuddy CN OAuth import / export")}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:(0,u.Tl)("Show Import / Export buttons on the CodeBuddy CN page (experimental)")})]}),(0,a.jsx)(l.lM,{checked:!0===C.codeBuddyOAuthImport,onChange:eJ})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:(0,u.Tl)("CodeBuddy CN auto daily check-in")}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:(0,u.Tl)("Automatically check in accounts once a day (random 00:00–06:00 local)")})]}),(0,a.jsx)(l.lM,{checked:!0===C.codeBuddyCheckin,onChange:eB})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:(0,u.Tl)("When enabled, the Import / Export buttons on the CodeBuddy CN page are replaced")})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Network")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(l.lM,{checked:!0===C.outboundProxyEnabled,onChange:()=>ez(!0!==C.outboundProxyEnabled),disabled:L||eT})]}),!0===C.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:e_,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(l.pd,{placeholder:"http://127.0.0.1:7897",value:eI.outboundProxyUrl,onChange:e=>eP(t=>({...t,outboundProxyUrl:e.target.value})),disabled:L||eT}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(l.pd,{placeholder:"localhost,127.0.0.1",value:eI.outboundNoProxy,onChange:e=>eP(t=>({...t,outboundNoProxy:e.target.value})),disabled:L||eT}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(l.$n,{type:"button",variant:"secondary",loading:eR,disabled:L||eT,onClick:eH,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(l.$n,{type:"submit",variant:"primary",loading:eT,className:"w-full sm:w-auto",children:"Apply"})]})]}),eO.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===eO.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:eO.message})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:(0,u.Tl)("Observability")})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(l.lM,{checked:ts,onChange:e4,disabled:L})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(l.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>w(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(l.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:tr,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:e$?"Remote Mode":"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(o.default,{hideTrigger:!0,isOpen:y,onClose:e=>{j(!1),b(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:N,onClose:()=>w(!1),onConfirm:ta,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:v}),(0,a.jsxs)(i.default,{isOpen:F.open,onClose:()=>q({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.$n,{variant:"ghost",onClick:()=>q({open:!1,mode:"",password:""}),disabled:R,children:"Cancel"}),(0,a.jsx)(l.$n,{variant:"primary",onClick:tt,loading:R,disabled:!F.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===F.mode?"export":"import"," the database."]}),(0,a.jsx)(l.pd,{type:"password",value:F.password,onChange:e=>q(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&F.password&&tt()},placeholder:"Current password",autoFocus:!0})]})]})}}},e=>{e.O(0,[4614,1321,5497,8441,3794,7358],()=>e(e.s=13966)),_N_E=e.O()}]);