omniroute 2.4.1 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (850) hide show
  1. package/README.md +76 -76
  2. package/app/.next/BUILD_ID +1 -1
  3. package/app/.next/app-path-routes-manifest.json +74 -72
  4. package/app/.next/build-manifest.json +2 -2
  5. package/app/.next/routes-manifest.json +14 -0
  6. package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js.nft.json +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/a2a/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/agents/page.js +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/agents/page.js.nft.json +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js.nft.json +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
  18. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js +1 -1
  19. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js.nft.json +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js +1 -1
  22. package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js.nft.json +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
  24. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  25. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  28. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  30. package/app/.next/server/app/(dashboard)/dashboard/costs/page.js +1 -1
  31. package/app/.next/server/app/(dashboard)/dashboard/costs/page.js.nft.json +1 -1
  32. package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
  33. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  34. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  35. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  36. package/app/.next/server/app/(dashboard)/dashboard/health/page.js +1 -1
  37. package/app/.next/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  38. package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  39. package/app/.next/server/app/(dashboard)/dashboard/limits/page.js +1 -1
  40. package/app/.next/server/app/(dashboard)/dashboard/limits/page.js.nft.json +1 -1
  41. package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
  42. package/app/.next/server/app/(dashboard)/dashboard/logs/page.js +2 -2
  43. package/app/.next/server/app/(dashboard)/dashboard/logs/page.js.nft.json +1 -1
  44. package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
  45. package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js +1 -1
  46. package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js.nft.json +1 -1
  47. package/app/.next/server/app/(dashboard)/dashboard/mcp/page_client-reference-manifest.js +1 -1
  48. package/app/.next/server/app/(dashboard)/dashboard/media/page.js +1 -1
  49. package/app/.next/server/app/(dashboard)/dashboard/media/page.js.nft.json +1 -1
  50. package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
  51. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js +1 -1
  52. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js.nft.json +1 -1
  53. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
  54. package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
  55. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  56. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  57. package/app/.next/server/app/(dashboard)/dashboard/playground/page.js +3 -3
  58. package/app/.next/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  59. package/app/.next/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  60. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  61. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  62. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  63. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  64. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  65. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  66. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  67. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  68. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  69. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  70. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  71. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  72. package/app/.next/server/app/(dashboard)/dashboard/settings/page.js +1 -1
  73. package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +1 -1
  74. package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
  75. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
  76. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  77. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  78. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  79. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  80. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  81. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  82. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  83. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  84. package/app/.next/server/app/.well-known/agent.json/route_client-reference-manifest.js +1 -1
  85. package/app/.next/server/app/400/page.js +1 -1
  86. package/app/.next/server/app/400/page.js.nft.json +1 -1
  87. package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
  88. package/app/.next/server/app/401/page.js +1 -1
  89. package/app/.next/server/app/401/page.js.nft.json +1 -1
  90. package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
  91. package/app/.next/server/app/403/page.js +1 -1
  92. package/app/.next/server/app/403/page.js.nft.json +1 -1
  93. package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
  94. package/app/.next/server/app/408/page.js +1 -1
  95. package/app/.next/server/app/408/page.js.nft.json +1 -1
  96. package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
  97. package/app/.next/server/app/429/page.js +1 -1
  98. package/app/.next/server/app/429/page.js.nft.json +1 -1
  99. package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
  100. package/app/.next/server/app/500/page.js +1 -1
  101. package/app/.next/server/app/500/page.js.nft.json +1 -1
  102. package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
  103. package/app/.next/server/app/502/page.js +1 -1
  104. package/app/.next/server/app/502/page.js.nft.json +1 -1
  105. package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
  106. package/app/.next/server/app/503/page.js +1 -1
  107. package/app/.next/server/app/503/page.js.nft.json +1 -1
  108. package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
  109. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  110. package/app/.next/server/app/_global-error.html +2 -2
  111. package/app/.next/server/app/_global-error.rsc +1 -1
  112. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  113. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  114. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  115. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  116. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  117. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  118. package/app/.next/server/app/_not-found/page.js +1 -1
  119. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  120. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  121. package/app/.next/server/app/a2a/route_client-reference-manifest.js +1 -1
  122. package/app/.next/server/app/api/a2a/status/route_client-reference-manifest.js +1 -1
  123. package/app/.next/server/app/api/a2a/tasks/[id]/cancel/route_client-reference-manifest.js +1 -1
  124. package/app/.next/server/app/api/a2a/tasks/[id]/route_client-reference-manifest.js +1 -1
  125. package/app/.next/server/app/api/a2a/tasks/route_client-reference-manifest.js +1 -1
  126. package/app/.next/server/app/api/acp/agents/route.js +1 -1
  127. package/app/.next/server/app/api/acp/agents/route.js.nft.json +1 -1
  128. package/app/.next/server/app/api/acp/agents/route_client-reference-manifest.js +1 -1
  129. package/app/.next/server/app/api/auth/login/route.js +1 -1
  130. package/app/.next/server/app/api/auth/login/route.js.nft.json +1 -1
  131. package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  132. package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  133. package/app/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  134. package/app/.next/server/app/api/cache/route_client-reference-manifest.js +1 -1
  135. package/app/.next/server/app/api/cache/stats/route_client-reference-manifest.js +1 -1
  136. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  137. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  138. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  139. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  140. package/app/.next/server/app/api/cli-tools/backups/route_client-reference-manifest.js +1 -1
  141. package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  142. package/app/.next/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  143. package/app/.next/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -1
  144. package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  145. package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  146. package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route_client-reference-manifest.js +1 -1
  147. package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  148. package/app/.next/server/app/api/cli-tools/openclaw/auto-order/route_client-reference-manifest.js +1 -1
  149. package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  150. package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route_client-reference-manifest.js +1 -1
  151. package/app/.next/server/app/api/cli-tools/status/route_client-reference-manifest.js +1 -1
  152. package/app/.next/server/app/api/cloud/auth/route.js +1 -1
  153. package/app/.next/server/app/api/cloud/auth/route.js.nft.json +1 -1
  154. package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
  155. package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
  156. package/app/.next/server/app/api/cloud/credentials/update/route.js.nft.json +1 -1
  157. package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
  158. package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
  159. package/app/.next/server/app/api/cloud/model/resolve/route.js.nft.json +1 -1
  160. package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
  161. package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
  162. package/app/.next/server/app/api/cloud/models/alias/route.js.nft.json +1 -1
  163. package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
  164. package/app/.next/server/app/api/combos/[id]/route.js +1 -1
  165. package/app/.next/server/app/api/combos/[id]/route.js.nft.json +1 -1
  166. package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  167. package/app/.next/server/app/api/combos/auto/route_client-reference-manifest.js +1 -1
  168. package/app/.next/server/app/api/combos/metrics/route_client-reference-manifest.js +1 -1
  169. package/app/.next/server/app/api/combos/route.js +1 -1
  170. package/app/.next/server/app/api/combos/route.js.nft.json +1 -1
  171. package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
  172. package/app/.next/server/app/api/combos/test/route.js +1 -1
  173. package/app/.next/server/app/api/combos/test/route.js.nft.json +1 -1
  174. package/app/.next/server/app/api/combos/test/route_client-reference-manifest.js +1 -1
  175. package/app/.next/server/app/api/compliance/audit-log/route_client-reference-manifest.js +1 -1
  176. package/app/.next/server/app/api/db-backups/export/route.js +1 -1
  177. package/app/.next/server/app/api/db-backups/export/route.js.nft.json +1 -1
  178. package/app/.next/server/app/api/db-backups/export/route_client-reference-manifest.js +1 -1
  179. package/app/.next/server/app/api/db-backups/exportAll/route_client-reference-manifest.js +1 -1
  180. package/app/.next/server/app/api/db-backups/import/route.js +1 -1
  181. package/app/.next/server/app/api/db-backups/import/route.js.nft.json +1 -1
  182. package/app/.next/server/app/api/db-backups/import/route_client-reference-manifest.js +1 -1
  183. package/app/.next/server/app/api/db-backups/route.js +1 -1
  184. package/app/.next/server/app/api/db-backups/route.js.nft.json +1 -1
  185. package/app/.next/server/app/api/db-backups/route_client-reference-manifest.js +1 -1
  186. package/app/.next/server/app/api/evals/[suiteId]/route_client-reference-manifest.js +1 -1
  187. package/app/.next/server/app/api/evals/route_client-reference-manifest.js +1 -1
  188. package/app/.next/server/app/api/fallback/chains/route_client-reference-manifest.js +1 -1
  189. package/app/.next/server/app/api/init/route.js +1 -1
  190. package/app/.next/server/app/api/init/route.js.nft.json +1 -1
  191. package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  192. package/app/.next/server/app/api/keys/[id]/route.js +1 -1
  193. package/app/.next/server/app/api/keys/[id]/route.js.nft.json +1 -1
  194. package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  195. package/app/.next/server/app/api/keys/route.js +1 -1
  196. package/app/.next/server/app/api/keys/route.js.nft.json +1 -1
  197. package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
  198. package/app/.next/server/app/api/logs/console/route_client-reference-manifest.js +1 -1
  199. package/app/.next/server/app/api/mcp/audit/route_client-reference-manifest.js +1 -1
  200. package/app/.next/server/app/api/mcp/audit/stats/route_client-reference-manifest.js +1 -1
  201. package/app/.next/server/app/api/mcp/sse/route.js +1 -1
  202. package/app/.next/server/app/api/mcp/sse/route.js.nft.json +1 -1
  203. package/app/.next/server/app/api/mcp/sse/route_client-reference-manifest.js +1 -1
  204. package/app/.next/server/app/api/mcp/status/route.js +1 -1
  205. package/app/.next/server/app/api/mcp/status/route.js.nft.json +1 -1
  206. package/app/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
  207. package/app/.next/server/app/api/mcp/stream/route.js +1 -1
  208. package/app/.next/server/app/api/mcp/stream/route.js.nft.json +1 -1
  209. package/app/.next/server/app/api/mcp/stream/route_client-reference-manifest.js +1 -1
  210. package/app/.next/server/app/api/mcp/tools/route_client-reference-manifest.js +1 -1
  211. package/app/.next/server/app/api/models/alias/route.js +1 -1
  212. package/app/.next/server/app/api/models/alias/route.js.nft.json +1 -1
  213. package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  214. package/app/.next/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  215. package/app/.next/server/app/api/models/catalog/route.js +2 -2
  216. package/app/.next/server/app/api/models/catalog/route.js.nft.json +1 -1
  217. package/app/.next/server/app/api/models/catalog/route_client-reference-manifest.js +1 -1
  218. package/app/.next/server/app/api/models/openrouter-catalog/route.js +1 -1
  219. package/app/.next/server/app/api/models/openrouter-catalog/route.js.nft.json +1 -1
  220. package/app/.next/server/app/api/models/openrouter-catalog/route_client-reference-manifest.js +1 -1
  221. package/app/.next/server/app/api/models/route.js +1 -1
  222. package/app/.next/server/app/api/models/route.js.nft.json +1 -1
  223. package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
  224. package/app/.next/server/app/api/monitoring/health/route.js +1 -1
  225. package/app/.next/server/app/api/monitoring/health/route.js.nft.json +1 -1
  226. package/app/.next/server/app/api/monitoring/health/route_client-reference-manifest.js +1 -1
  227. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  228. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  229. package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  230. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  231. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  232. package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  233. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  234. package/app/.next/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  235. package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  236. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  237. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  238. package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  239. package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
  240. package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  241. package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  242. package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  243. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  244. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  245. package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  246. package/app/.next/server/app/api/policies/route_client-reference-manifest.js +1 -1
  247. package/app/.next/server/app/api/pricing/defaults/route_client-reference-manifest.js +1 -1
  248. package/app/.next/server/app/api/pricing/models/route.js +1 -1
  249. package/app/.next/server/app/api/pricing/models/route.js.nft.json +1 -1
  250. package/app/.next/server/app/api/pricing/models/route_client-reference-manifest.js +1 -1
  251. package/app/.next/server/app/api/pricing/route.js +1 -1
  252. package/app/.next/server/app/api/pricing/route.js.nft.json +1 -1
  253. package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  254. package/app/.next/server/app/api/provider-metrics/route_client-reference-manifest.js +1 -1
  255. package/app/.next/server/app/api/provider-models/route.js +1 -1
  256. package/app/.next/server/app/api/provider-models/route.js.nft.json +1 -1
  257. package/app/.next/server/app/api/provider-models/route_client-reference-manifest.js +1 -1
  258. package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
  259. package/app/.next/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  260. package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  261. package/app/.next/server/app/api/provider-nodes/route.js +2 -2
  262. package/app/.next/server/app/api/provider-nodes/route.js.nft.json +1 -1
  263. package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  264. package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  265. package/app/.next/server/app/api/providers/[id]/models/route.js +2 -2
  266. package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  267. package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  268. package/app/.next/server/app/api/providers/[id]/refresh/route.js +1 -0
  269. package/app/.next/server/app/api/providers/[id]/refresh/route.js.nft.json +1 -0
  270. package/app/.next/server/app/api/providers/[id]/refresh/route_client-reference-manifest.js +1 -0
  271. package/app/.next/server/app/api/providers/[id]/route.js +1 -1
  272. package/app/.next/server/app/api/providers/[id]/route.js.nft.json +1 -1
  273. package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  274. package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
  275. package/app/.next/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  276. package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  277. package/app/.next/server/app/api/providers/client/route.js +1 -1
  278. package/app/.next/server/app/api/providers/client/route.js.nft.json +1 -1
  279. package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  280. package/app/.next/server/app/api/providers/route.js +1 -1
  281. package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
  282. package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
  283. package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
  284. package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  285. package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  286. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  287. package/app/.next/server/app/api/providers/validate/route.js.nft.json +1 -1
  288. package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  289. package/app/.next/server/app/api/rate-limit/route_client-reference-manifest.js +1 -1
  290. package/app/.next/server/app/api/rate-limits/route.js +1 -1
  291. package/app/.next/server/app/api/rate-limits/route.js.nft.json +1 -1
  292. package/app/.next/server/app/api/rate-limits/route_client-reference-manifest.js +1 -1
  293. package/app/.next/server/app/api/resilience/reset/route_client-reference-manifest.js +1 -1
  294. package/app/.next/server/app/api/resilience/route.js +1 -1
  295. package/app/.next/server/app/api/resilience/route.js.nft.json +1 -1
  296. package/app/.next/server/app/api/resilience/route_client-reference-manifest.js +1 -1
  297. package/app/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
  298. package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  299. package/app/.next/server/app/api/settings/background-degradation/route.js +1 -1
  300. package/app/.next/server/app/api/settings/background-degradation/route.js.nft.json +1 -1
  301. package/app/.next/server/app/api/settings/background-degradation/route_client-reference-manifest.js +1 -1
  302. package/app/.next/server/app/api/settings/combo-defaults/route.js +1 -1
  303. package/app/.next/server/app/api/settings/combo-defaults/route.js.nft.json +1 -1
  304. package/app/.next/server/app/api/settings/combo-defaults/route_client-reference-manifest.js +1 -1
  305. package/app/.next/server/app/api/settings/ip-filter/route_client-reference-manifest.js +1 -1
  306. package/app/.next/server/app/api/settings/model-aliases/route.js +1 -1
  307. package/app/.next/server/app/api/settings/model-aliases/route.js.nft.json +1 -1
  308. package/app/.next/server/app/api/settings/model-aliases/route_client-reference-manifest.js +1 -1
  309. package/app/.next/server/app/api/settings/proxy/route.js +1 -1
  310. package/app/.next/server/app/api/settings/proxy/route.js.nft.json +1 -1
  311. package/app/.next/server/app/api/settings/proxy/route_client-reference-manifest.js +1 -1
  312. package/app/.next/server/app/api/settings/proxy/test/route.js +1 -1
  313. package/app/.next/server/app/api/settings/proxy/test/route_client-reference-manifest.js +1 -1
  314. package/app/.next/server/app/api/settings/require-login/route.js +1 -1
  315. package/app/.next/server/app/api/settings/require-login/route.js.nft.json +1 -1
  316. package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  317. package/app/.next/server/app/api/settings/route.js +1 -1
  318. package/app/.next/server/app/api/settings/route.js.nft.json +1 -1
  319. package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  320. package/app/.next/server/app/api/settings/system-prompt/route.js +1 -1
  321. package/app/.next/server/app/api/settings/system-prompt/route.js.nft.json +1 -1
  322. package/app/.next/server/app/api/settings/system-prompt/route_client-reference-manifest.js +1 -1
  323. package/app/.next/server/app/api/settings/task-routing/route.js +1 -0
  324. package/app/.next/server/app/api/settings/task-routing/route.js.nft.json +1 -0
  325. package/app/.next/server/app/api/settings/task-routing/route_client-reference-manifest.js +1 -0
  326. package/app/.next/server/app/api/settings/thinking-budget/route.js +1 -1
  327. package/app/.next/server/app/api/settings/thinking-budget/route.js.nft.json +1 -1
  328. package/app/.next/server/app/api/settings/thinking-budget/route_client-reference-manifest.js +1 -1
  329. package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  330. package/app/.next/server/app/api/storage/health/route_client-reference-manifest.js +1 -1
  331. package/app/.next/server/app/api/sync/cloud/route.js +1 -1
  332. package/app/.next/server/app/api/sync/cloud/route.js.nft.json +1 -1
  333. package/app/.next/server/app/api/sync/cloud/route_client-reference-manifest.js +1 -1
  334. package/app/.next/server/app/api/sync/initialize/route.js +1 -1
  335. package/app/.next/server/app/api/sync/initialize/route.js.nft.json +1 -1
  336. package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
  337. package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  338. package/app/.next/server/app/api/telemetry/summary/route_client-reference-manifest.js +1 -1
  339. package/app/.next/server/app/api/token-health/route.js +1 -1
  340. package/app/.next/server/app/api/token-health/route.js.nft.json +1 -1
  341. package/app/.next/server/app/api/token-health/route_client-reference-manifest.js +1 -1
  342. package/app/.next/server/app/api/translator/detect/route_client-reference-manifest.js +1 -1
  343. package/app/.next/server/app/api/translator/history/route_client-reference-manifest.js +1 -1
  344. package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  345. package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  346. package/app/.next/server/app/api/translator/send/route.js +1 -1
  347. package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
  348. package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  349. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  350. package/app/.next/server/app/api/translator/translate/route.js.nft.json +1 -1
  351. package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  352. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  353. package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  354. package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  355. package/app/.next/server/app/api/usage/analytics/route.js +1 -1
  356. package/app/.next/server/app/api/usage/analytics/route.js.nft.json +1 -1
  357. package/app/.next/server/app/api/usage/analytics/route_client-reference-manifest.js +1 -1
  358. package/app/.next/server/app/api/usage/budget/route_client-reference-manifest.js +1 -1
  359. package/app/.next/server/app/api/usage/call-logs/[id]/route.js.nft.json +1 -1
  360. package/app/.next/server/app/api/usage/call-logs/[id]/route_client-reference-manifest.js +1 -1
  361. package/app/.next/server/app/api/usage/call-logs/route.js.nft.json +1 -1
  362. package/app/.next/server/app/api/usage/call-logs/route_client-reference-manifest.js +1 -1
  363. package/app/.next/server/app/api/usage/history/route.js.nft.json +1 -1
  364. package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  365. package/app/.next/server/app/api/usage/logs/route.js.nft.json +1 -1
  366. package/app/.next/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
  367. package/app/.next/server/app/api/usage/proxy-logs/route.js +1 -1
  368. package/app/.next/server/app/api/usage/proxy-logs/route_client-reference-manifest.js +1 -1
  369. package/app/.next/server/app/api/usage/quota/route.js +1 -1
  370. package/app/.next/server/app/api/usage/quota/route.js.nft.json +1 -1
  371. package/app/.next/server/app/api/usage/quota/route_client-reference-manifest.js +1 -1
  372. package/app/.next/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  373. package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  374. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  375. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  376. package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  377. package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
  378. package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  379. package/app/.next/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  380. package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
  381. package/app/.next/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  382. package/app/.next/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  383. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  384. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  385. package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  386. package/app/.next/server/app/api/v1/completions/route.js +1 -1
  387. package/app/.next/server/app/api/v1/completions/route.js.nft.json +1 -1
  388. package/app/.next/server/app/api/v1/completions/route_client-reference-manifest.js +1 -1
  389. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  390. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  391. package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  392. package/app/.next/server/app/api/v1/images/generations/route.js +1 -1
  393. package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  394. package/app/.next/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  395. package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  396. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  397. package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
  398. package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  399. package/app/.next/server/app/api/v1/models/route.js +1 -1
  400. package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
  401. package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  402. package/app/.next/server/app/api/v1/moderations/route.js +1 -1
  403. package/app/.next/server/app/api/v1/moderations/route.js.nft.json +1 -1
  404. package/app/.next/server/app/api/v1/moderations/route_client-reference-manifest.js +1 -1
  405. package/app/.next/server/app/api/v1/music/generations/route.js +1 -1
  406. package/app/.next/server/app/api/v1/music/generations/route.js.nft.json +1 -1
  407. package/app/.next/server/app/api/v1/music/generations/route_client-reference-manifest.js +1 -1
  408. package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js +1 -1
  409. package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js.nft.json +1 -1
  410. package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route_client-reference-manifest.js +1 -1
  411. package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js +1 -1
  412. package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js.nft.json +1 -1
  413. package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route_client-reference-manifest.js +1 -1
  414. package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js +1 -1
  415. package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js.nft.json +1 -1
  416. package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route_client-reference-manifest.js +1 -1
  417. package/app/.next/server/app/api/v1/rerank/route.js +1 -1
  418. package/app/.next/server/app/api/v1/rerank/route.js.nft.json +1 -1
  419. package/app/.next/server/app/api/v1/rerank/route_client-reference-manifest.js +1 -1
  420. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  421. package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
  422. package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  423. package/app/.next/server/app/api/v1/route.js +1 -1
  424. package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
  425. package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
  426. package/app/.next/server/app/api/v1/videos/generations/route.js +1 -1
  427. package/app/.next/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  428. package/app/.next/server/app/api/v1/videos/generations/route_client-reference-manifest.js +1 -1
  429. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  430. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  431. package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  432. package/app/.next/server/app/api/v1beta/models/route.js +1 -1
  433. package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  434. package/app/.next/server/app/callback/page.js +1 -1
  435. package/app/.next/server/app/callback/page.js.nft.json +1 -1
  436. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  437. package/app/.next/server/app/docs/page.js +1 -1
  438. package/app/.next/server/app/docs/page.js.nft.json +1 -1
  439. package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  440. package/app/.next/server/app/forbidden/page.js +1 -1
  441. package/app/.next/server/app/forbidden/page.js.nft.json +1 -1
  442. package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
  443. package/app/.next/server/app/forgot-password/page.js +1 -1
  444. package/app/.next/server/app/forgot-password/page.js.nft.json +1 -1
  445. package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
  446. package/app/.next/server/app/landing/page.js +2 -2
  447. package/app/.next/server/app/landing/page.js.nft.json +1 -1
  448. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  449. package/app/.next/server/app/login/page.js +1 -1
  450. package/app/.next/server/app/login/page.js.nft.json +1 -1
  451. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  452. package/app/.next/server/app/maintenance/page.js +1 -1
  453. package/app/.next/server/app/maintenance/page.js.nft.json +1 -1
  454. package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
  455. package/app/.next/server/app/offline/page.js +1 -1
  456. package/app/.next/server/app/offline/page.js.nft.json +1 -1
  457. package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  458. package/app/.next/server/app/page.js +1 -1
  459. package/app/.next/server/app/page.js.nft.json +1 -1
  460. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  461. package/app/.next/server/app/privacy/page.js +1 -1
  462. package/app/.next/server/app/privacy/page.js.nft.json +1 -1
  463. package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
  464. package/app/.next/server/app/status/page.js +1 -1
  465. package/app/.next/server/app/status/page.js.nft.json +1 -1
  466. package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
  467. package/app/.next/server/app/terms/page.js +1 -1
  468. package/app/.next/server/app/terms/page.js.nft.json +1 -1
  469. package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
  470. package/app/.next/server/app-paths-manifest.json +74 -72
  471. package/app/.next/server/chunks/1308.js +1 -1
  472. package/app/.next/server/chunks/1714.js +135 -0
  473. package/app/.next/server/chunks/1909.js +1 -1
  474. package/app/.next/server/chunks/1960.js +1 -1
  475. package/app/.next/server/chunks/2391.js +1 -1
  476. package/app/.next/server/chunks/2476.js +1 -0
  477. package/app/.next/server/chunks/2767.js +3 -3
  478. package/app/.next/server/chunks/3061.js +2 -2
  479. package/app/.next/server/chunks/3596.js +1 -1
  480. package/app/.next/server/chunks/3648.js +5 -5
  481. package/app/.next/server/chunks/406.js +13 -13
  482. package/app/.next/server/chunks/4755.js +1 -1
  483. package/app/.next/server/chunks/5585.js +1 -0
  484. package/app/.next/server/chunks/595.js +1 -1
  485. package/app/.next/server/chunks/5979.js +1 -1
  486. package/app/.next/server/chunks/6094.js +1 -0
  487. package/app/.next/server/chunks/6197.js +46 -0
  488. package/app/.next/server/chunks/6440.js +1 -0
  489. package/app/.next/server/chunks/7109.js +2 -2
  490. package/app/.next/server/chunks/7136.js +1 -0
  491. package/app/.next/server/chunks/7327.js +1 -1
  492. package/app/.next/server/chunks/7544.js +1 -1
  493. package/app/.next/server/chunks/7669.js +1 -1
  494. package/app/.next/server/chunks/8369.js +1 -1
  495. package/app/.next/server/chunks/8907.js +1 -1
  496. package/app/.next/server/chunks/9631.js +1 -1
  497. package/app/.next/server/chunks/9704.js +2 -2
  498. package/app/.next/server/instrumentation.js +1 -1
  499. package/app/.next/server/middleware.js +4 -4
  500. package/app/.next/server/pages/500.html +2 -2
  501. package/app/.next/server/server-reference-manifest.js +1 -1
  502. package/app/.next/server/server-reference-manifest.json +1 -1
  503. package/app/.next/{server/chunks/3922.js → static/chunks/5846-dc138c1880db7dc4.js} +2 -1
  504. package/app/.next/static/chunks/647-bf8bc535ac3648d0.js +21 -0
  505. package/app/.next/static/chunks/app/(dashboard)/dashboard/agents/page-576b27a05c09fba5.js +1 -0
  506. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-3c3f3b0b558e9302.js +15 -0
  507. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-81244e4816fac7ea.js +1 -0
  508. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/{page-08c2aa1b8887ab74.js → page-8b96e2f6d76d6f2d.js} +1 -1
  509. package/app/.next/static/chunks/app/(dashboard)/dashboard/logs/page-2d456b7ddbf3d41e.js +1 -0
  510. package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-5ed5bdc9e926936c.js +1 -0
  511. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-799001b6cea7d5bc.js +1 -0
  512. package/app/.next/static/chunks/app/(dashboard)/dashboard/playground/page-0fff47edc56250ea.js +2 -0
  513. package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-a4c3bff638878498.js +1 -0
  514. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-01465d13a7217fd4.js +1 -0
  515. package/app/.next/static/chunks/app/.well-known/agent.json/route-a4c3bff638878498.js +1 -0
  516. package/app/.next/static/chunks/app/400/layout-a4c3bff638878498.js +1 -0
  517. package/app/.next/static/chunks/app/401/layout-a4c3bff638878498.js +1 -0
  518. package/app/.next/static/chunks/app/403/layout-a4c3bff638878498.js +1 -0
  519. package/app/.next/static/chunks/app/408/layout-a4c3bff638878498.js +1 -0
  520. package/app/.next/static/chunks/app/429/layout-a4c3bff638878498.js +1 -0
  521. package/app/.next/static/chunks/app/500/layout-a4c3bff638878498.js +1 -0
  522. package/app/.next/static/chunks/app/502/layout-a4c3bff638878498.js +1 -0
  523. package/app/.next/static/chunks/app/503/layout-a4c3bff638878498.js +1 -0
  524. package/app/.next/static/chunks/app/_global-error/page-a4c3bff638878498.js +1 -0
  525. package/app/.next/static/chunks/app/_not-found/page-a4c3bff638878498.js +1 -0
  526. package/app/.next/static/chunks/app/a2a/route-a4c3bff638878498.js +1 -0
  527. package/app/.next/static/chunks/app/api/a2a/status/route-a4c3bff638878498.js +1 -0
  528. package/app/.next/static/chunks/app/api/a2a/tasks/[id]/cancel/route-a4c3bff638878498.js +1 -0
  529. package/app/.next/static/chunks/app/api/a2a/tasks/[id]/route-a4c3bff638878498.js +1 -0
  530. package/app/.next/static/chunks/app/api/a2a/tasks/route-a4c3bff638878498.js +1 -0
  531. package/app/.next/static/chunks/app/api/acp/agents/route-a4c3bff638878498.js +1 -0
  532. package/app/.next/static/chunks/app/api/auth/login/route-a4c3bff638878498.js +1 -0
  533. package/app/.next/static/chunks/app/api/auth/logout/route-a4c3bff638878498.js +1 -0
  534. package/app/.next/static/chunks/app/api/auth/status/route-a4c3bff638878498.js +1 -0
  535. package/app/.next/static/chunks/app/api/cache/route-a4c3bff638878498.js +1 -0
  536. package/app/.next/static/chunks/app/api/cache/stats/route-a4c3bff638878498.js +1 -0
  537. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-a4c3bff638878498.js +1 -0
  538. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-a4c3bff638878498.js +1 -0
  539. package/app/.next/static/chunks/app/api/cli-tools/backups/route-a4c3bff638878498.js +1 -0
  540. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-a4c3bff638878498.js +1 -0
  541. package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-a4c3bff638878498.js +1 -0
  542. package/app/.next/static/chunks/app/api/cli-tools/codex-profiles/route-a4c3bff638878498.js +1 -0
  543. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-a4c3bff638878498.js +1 -0
  544. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-a4c3bff638878498.js +1 -0
  545. package/app/.next/static/chunks/app/api/cli-tools/guide-settings/[toolId]/route-a4c3bff638878498.js +1 -0
  546. package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-a4c3bff638878498.js +1 -0
  547. package/app/.next/static/chunks/app/api/cli-tools/openclaw/auto-order/route-a4c3bff638878498.js +1 -0
  548. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-a4c3bff638878498.js +1 -0
  549. package/app/.next/static/chunks/app/api/cli-tools/runtime/[toolId]/route-a4c3bff638878498.js +1 -0
  550. package/app/.next/static/chunks/app/api/cli-tools/status/route-a4c3bff638878498.js +1 -0
  551. package/app/.next/static/chunks/app/api/cloud/auth/route-a4c3bff638878498.js +1 -0
  552. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-a4c3bff638878498.js +1 -0
  553. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-a4c3bff638878498.js +1 -0
  554. package/app/.next/static/chunks/app/api/cloud/models/alias/route-a4c3bff638878498.js +1 -0
  555. package/app/.next/static/chunks/app/api/combos/[id]/route-a4c3bff638878498.js +1 -0
  556. package/app/.next/static/chunks/app/api/combos/auto/route-a4c3bff638878498.js +1 -0
  557. package/app/.next/static/chunks/app/api/combos/metrics/route-a4c3bff638878498.js +1 -0
  558. package/app/.next/static/chunks/app/api/combos/route-a4c3bff638878498.js +1 -0
  559. package/app/.next/static/chunks/app/api/combos/test/route-a4c3bff638878498.js +1 -0
  560. package/app/.next/static/chunks/app/api/compliance/audit-log/route-a4c3bff638878498.js +1 -0
  561. package/app/.next/static/chunks/app/api/db-backups/export/route-a4c3bff638878498.js +1 -0
  562. package/app/.next/static/chunks/app/api/db-backups/exportAll/route-a4c3bff638878498.js +1 -0
  563. package/app/.next/static/chunks/app/api/db-backups/import/route-a4c3bff638878498.js +1 -0
  564. package/app/.next/static/chunks/app/api/db-backups/route-a4c3bff638878498.js +1 -0
  565. package/app/.next/static/chunks/app/api/evals/[suiteId]/route-a4c3bff638878498.js +1 -0
  566. package/app/.next/static/chunks/app/api/evals/route-a4c3bff638878498.js +1 -0
  567. package/app/.next/static/chunks/app/api/fallback/chains/route-a4c3bff638878498.js +1 -0
  568. package/app/.next/static/chunks/app/api/init/route-a4c3bff638878498.js +1 -0
  569. package/app/.next/static/chunks/app/api/keys/[id]/route-a4c3bff638878498.js +1 -0
  570. package/app/.next/static/chunks/app/api/keys/route-a4c3bff638878498.js +1 -0
  571. package/app/.next/static/chunks/app/api/logs/console/route-a4c3bff638878498.js +1 -0
  572. package/app/.next/static/chunks/app/api/mcp/audit/route-a4c3bff638878498.js +1 -0
  573. package/app/.next/static/chunks/app/api/mcp/audit/stats/route-a4c3bff638878498.js +1 -0
  574. package/app/.next/static/chunks/app/api/mcp/sse/route-a4c3bff638878498.js +1 -0
  575. package/app/.next/static/chunks/app/api/mcp/status/route-a4c3bff638878498.js +1 -0
  576. package/app/.next/static/chunks/app/api/mcp/stream/route-a4c3bff638878498.js +1 -0
  577. package/app/.next/static/chunks/app/api/mcp/tools/route-a4c3bff638878498.js +1 -0
  578. package/app/.next/static/chunks/app/api/models/alias/route-a4c3bff638878498.js +1 -0
  579. package/app/.next/static/chunks/app/api/models/availability/route-a4c3bff638878498.js +1 -0
  580. package/app/.next/static/chunks/app/api/models/catalog/route-a4c3bff638878498.js +1 -0
  581. package/app/.next/static/chunks/app/api/models/openrouter-catalog/route-a4c3bff638878498.js +1 -0
  582. package/app/.next/static/chunks/app/api/models/route-a4c3bff638878498.js +1 -0
  583. package/app/.next/static/chunks/app/api/monitoring/health/route-a4c3bff638878498.js +1 -0
  584. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-a4c3bff638878498.js +1 -0
  585. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-a4c3bff638878498.js +1 -0
  586. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-a4c3bff638878498.js +1 -0
  587. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-a4c3bff638878498.js +1 -0
  588. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-a4c3bff638878498.js +1 -0
  589. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-a4c3bff638878498.js +1 -0
  590. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-a4c3bff638878498.js +1 -0
  591. package/app/.next/static/chunks/app/api/policies/route-a4c3bff638878498.js +1 -0
  592. package/app/.next/static/chunks/app/api/pricing/defaults/route-a4c3bff638878498.js +1 -0
  593. package/app/.next/static/chunks/app/api/pricing/models/route-a4c3bff638878498.js +1 -0
  594. package/app/.next/static/chunks/app/api/pricing/route-a4c3bff638878498.js +1 -0
  595. package/app/.next/static/chunks/app/api/provider-metrics/route-a4c3bff638878498.js +1 -0
  596. package/app/.next/static/chunks/app/api/provider-models/route-a4c3bff638878498.js +1 -0
  597. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-a4c3bff638878498.js +1 -0
  598. package/app/.next/static/chunks/app/api/provider-nodes/route-a4c3bff638878498.js +1 -0
  599. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-a4c3bff638878498.js +1 -0
  600. package/app/.next/static/chunks/app/api/providers/[id]/models/route-a4c3bff638878498.js +1 -0
  601. package/app/.next/static/chunks/app/api/providers/[id]/refresh/route-a4c3bff638878498.js +1 -0
  602. package/app/.next/static/chunks/app/api/providers/[id]/route-a4c3bff638878498.js +1 -0
  603. package/app/.next/static/chunks/app/api/providers/[id]/test/route-a4c3bff638878498.js +1 -0
  604. package/app/.next/static/chunks/app/api/providers/client/route-a4c3bff638878498.js +1 -0
  605. package/app/.next/static/chunks/app/api/providers/route-a4c3bff638878498.js +1 -0
  606. package/app/.next/static/chunks/app/api/providers/test-batch/route-a4c3bff638878498.js +1 -0
  607. package/app/.next/static/chunks/app/api/providers/validate/route-a4c3bff638878498.js +1 -0
  608. package/app/.next/static/chunks/app/api/rate-limit/route-a4c3bff638878498.js +1 -0
  609. package/app/.next/static/chunks/app/api/rate-limits/route-a4c3bff638878498.js +1 -0
  610. package/app/.next/static/chunks/app/api/resilience/reset/route-a4c3bff638878498.js +1 -0
  611. package/app/.next/static/chunks/app/api/resilience/route-a4c3bff638878498.js +1 -0
  612. package/app/.next/static/chunks/app/api/restart/route-a4c3bff638878498.js +1 -0
  613. package/app/.next/static/chunks/app/api/sessions/route-a4c3bff638878498.js +1 -0
  614. package/app/.next/static/chunks/app/api/settings/background-degradation/route-a4c3bff638878498.js +1 -0
  615. package/app/.next/static/chunks/app/api/settings/combo-defaults/route-a4c3bff638878498.js +1 -0
  616. package/app/.next/static/chunks/app/api/settings/ip-filter/route-a4c3bff638878498.js +1 -0
  617. package/app/.next/static/chunks/app/api/settings/model-aliases/route-a4c3bff638878498.js +1 -0
  618. package/app/.next/static/chunks/app/api/settings/proxy/route-a4c3bff638878498.js +1 -0
  619. package/app/.next/static/chunks/app/api/settings/proxy/test/route-a4c3bff638878498.js +1 -0
  620. package/app/.next/static/chunks/app/api/settings/require-login/route-a4c3bff638878498.js +1 -0
  621. package/app/.next/static/chunks/app/api/settings/route-a4c3bff638878498.js +1 -0
  622. package/app/.next/static/chunks/app/api/settings/system-prompt/route-a4c3bff638878498.js +1 -0
  623. package/app/.next/static/chunks/app/api/settings/task-routing/route-a4c3bff638878498.js +1 -0
  624. package/app/.next/static/chunks/app/api/settings/thinking-budget/route-a4c3bff638878498.js +1 -0
  625. package/app/.next/static/chunks/app/api/shutdown/route-a4c3bff638878498.js +1 -0
  626. package/app/.next/static/chunks/app/api/storage/health/route-a4c3bff638878498.js +1 -0
  627. package/app/.next/static/chunks/app/api/sync/cloud/route-a4c3bff638878498.js +1 -0
  628. package/app/.next/static/chunks/app/api/sync/initialize/route-a4c3bff638878498.js +1 -0
  629. package/app/.next/static/chunks/app/api/tags/route-a4c3bff638878498.js +1 -0
  630. package/app/.next/static/chunks/app/api/telemetry/summary/route-a4c3bff638878498.js +1 -0
  631. package/app/.next/static/chunks/app/api/token-health/route-a4c3bff638878498.js +1 -0
  632. package/app/.next/static/chunks/app/api/translator/detect/route-a4c3bff638878498.js +1 -0
  633. package/app/.next/static/chunks/app/api/translator/history/route-a4c3bff638878498.js +1 -0
  634. package/app/.next/static/chunks/app/api/translator/load/route-a4c3bff638878498.js +1 -0
  635. package/app/.next/static/chunks/app/api/translator/save/route-a4c3bff638878498.js +1 -0
  636. package/app/.next/static/chunks/app/api/translator/send/route-a4c3bff638878498.js +1 -0
  637. package/app/.next/static/chunks/app/api/translator/translate/route-a4c3bff638878498.js +1 -0
  638. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-a4c3bff638878498.js +1 -0
  639. package/app/.next/static/chunks/app/api/usage/analytics/route-a4c3bff638878498.js +1 -0
  640. package/app/.next/static/chunks/app/api/usage/budget/route-a4c3bff638878498.js +1 -0
  641. package/app/.next/static/chunks/app/api/usage/call-logs/[id]/route-a4c3bff638878498.js +1 -0
  642. package/app/.next/static/chunks/app/api/usage/call-logs/route-a4c3bff638878498.js +1 -0
  643. package/app/.next/static/chunks/app/api/usage/history/route-a4c3bff638878498.js +1 -0
  644. package/app/.next/static/chunks/app/api/usage/logs/route-a4c3bff638878498.js +1 -0
  645. package/app/.next/static/chunks/app/api/usage/proxy-logs/route-a4c3bff638878498.js +1 -0
  646. package/app/.next/static/chunks/app/api/usage/quota/route-a4c3bff638878498.js +1 -0
  647. package/app/.next/static/chunks/app/api/usage/request-logs/route-a4c3bff638878498.js +1 -0
  648. package/app/.next/static/chunks/app/api/v1/api/chat/route-a4c3bff638878498.js +1 -0
  649. package/app/.next/static/chunks/app/api/v1/audio/speech/route-a4c3bff638878498.js +1 -0
  650. package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-a4c3bff638878498.js +1 -0
  651. package/app/.next/static/chunks/app/api/v1/chat/completions/route-a4c3bff638878498.js +1 -0
  652. package/app/.next/static/chunks/app/api/v1/completions/route-a4c3bff638878498.js +1 -0
  653. package/app/.next/static/chunks/app/api/v1/embeddings/route-a4c3bff638878498.js +1 -0
  654. package/app/.next/static/chunks/app/api/v1/images/generations/route-a4c3bff638878498.js +1 -0
  655. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-a4c3bff638878498.js +1 -0
  656. package/app/.next/static/chunks/app/api/v1/messages/route-a4c3bff638878498.js +1 -0
  657. package/app/.next/static/chunks/app/api/v1/models/route-a4c3bff638878498.js +1 -0
  658. package/app/.next/static/chunks/app/api/v1/moderations/route-a4c3bff638878498.js +1 -0
  659. package/app/.next/static/chunks/app/api/v1/music/generations/route-a4c3bff638878498.js +1 -0
  660. package/app/.next/static/chunks/app/api/v1/providers/[provider]/chat/completions/route-a4c3bff638878498.js +1 -0
  661. package/app/.next/static/chunks/app/api/v1/providers/[provider]/embeddings/route-a4c3bff638878498.js +1 -0
  662. package/app/.next/static/chunks/app/api/v1/providers/[provider]/images/generations/route-a4c3bff638878498.js +1 -0
  663. package/app/.next/static/chunks/app/api/v1/rerank/route-a4c3bff638878498.js +1 -0
  664. package/app/.next/static/chunks/app/api/v1/responses/route-a4c3bff638878498.js +1 -0
  665. package/app/.next/static/chunks/app/api/v1/route-a4c3bff638878498.js +1 -0
  666. package/app/.next/static/chunks/app/api/v1/videos/generations/route-a4c3bff638878498.js +1 -0
  667. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-a4c3bff638878498.js +1 -0
  668. package/app/.next/static/chunks/app/api/v1beta/models/route-a4c3bff638878498.js +1 -0
  669. package/app/.next/static/chunks/app/landing/{page-75b0c988db383cfc.js → page-8f652c1fbc33efd2.js} +1 -1
  670. package/app/.next/static/chunks/app/page-a4c3bff638878498.js +1 -0
  671. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-a4c3bff638878498.js +1 -0
  672. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-a4c3bff638878498.js +1 -0
  673. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-a4c3bff638878498.js +1 -0
  674. package/app/.next/static/css/0a5545f707228079.css +1 -0
  675. package/app/.next/static/vyty8kP9IuZktMt159X9L/_buildManifest.js +1 -0
  676. package/app/package.json +1 -1
  677. package/package.json +1 -1
  678. package/app/.next/server/chunks/2901.js +0 -46
  679. package/app/.next/server/chunks/786.js +0 -135
  680. package/app/.next/server/chunks/9679.js +0 -1
  681. package/app/.next/static/chunks/5846-995a9fadc90d26d3.js +0 -2
  682. package/app/.next/static/chunks/647-27f02a9e225826d5.js +0 -21
  683. package/app/.next/static/chunks/app/(dashboard)/dashboard/agents/page-4ec5a1458c077143.js +0 -1
  684. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-ad968920ad7029fd.js +0 -15
  685. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-c92198822ec0da04.js +0 -1
  686. package/app/.next/static/chunks/app/(dashboard)/dashboard/logs/page-95e4b5e0bf023d76.js +0 -1
  687. package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-07cbc45d62a20735.js +0 -1
  688. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-23797ed1fe047ef7.js +0 -1
  689. package/app/.next/static/chunks/app/(dashboard)/dashboard/playground/page-4c93d045288f7d9e.js +0 -2
  690. package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-4fd91743f3ac831d.js +0 -1
  691. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-e3a0a2f5334efeed.js +0 -1
  692. package/app/.next/static/chunks/app/.well-known/agent.json/route-4fd91743f3ac831d.js +0 -1
  693. package/app/.next/static/chunks/app/400/layout-4fd91743f3ac831d.js +0 -1
  694. package/app/.next/static/chunks/app/401/layout-4fd91743f3ac831d.js +0 -1
  695. package/app/.next/static/chunks/app/403/layout-4fd91743f3ac831d.js +0 -1
  696. package/app/.next/static/chunks/app/408/layout-4fd91743f3ac831d.js +0 -1
  697. package/app/.next/static/chunks/app/429/layout-4fd91743f3ac831d.js +0 -1
  698. package/app/.next/static/chunks/app/500/layout-4fd91743f3ac831d.js +0 -1
  699. package/app/.next/static/chunks/app/502/layout-4fd91743f3ac831d.js +0 -1
  700. package/app/.next/static/chunks/app/503/layout-4fd91743f3ac831d.js +0 -1
  701. package/app/.next/static/chunks/app/_global-error/page-4fd91743f3ac831d.js +0 -1
  702. package/app/.next/static/chunks/app/_not-found/page-4fd91743f3ac831d.js +0 -1
  703. package/app/.next/static/chunks/app/a2a/route-4fd91743f3ac831d.js +0 -1
  704. package/app/.next/static/chunks/app/api/a2a/status/route-4fd91743f3ac831d.js +0 -1
  705. package/app/.next/static/chunks/app/api/a2a/tasks/[id]/cancel/route-4fd91743f3ac831d.js +0 -1
  706. package/app/.next/static/chunks/app/api/a2a/tasks/[id]/route-4fd91743f3ac831d.js +0 -1
  707. package/app/.next/static/chunks/app/api/a2a/tasks/route-4fd91743f3ac831d.js +0 -1
  708. package/app/.next/static/chunks/app/api/acp/agents/route-4fd91743f3ac831d.js +0 -1
  709. package/app/.next/static/chunks/app/api/auth/login/route-4fd91743f3ac831d.js +0 -1
  710. package/app/.next/static/chunks/app/api/auth/logout/route-4fd91743f3ac831d.js +0 -1
  711. package/app/.next/static/chunks/app/api/auth/status/route-4fd91743f3ac831d.js +0 -1
  712. package/app/.next/static/chunks/app/api/cache/route-4fd91743f3ac831d.js +0 -1
  713. package/app/.next/static/chunks/app/api/cache/stats/route-4fd91743f3ac831d.js +0 -1
  714. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-4fd91743f3ac831d.js +0 -1
  715. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-4fd91743f3ac831d.js +0 -1
  716. package/app/.next/static/chunks/app/api/cli-tools/backups/route-4fd91743f3ac831d.js +0 -1
  717. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-4fd91743f3ac831d.js +0 -1
  718. package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-4fd91743f3ac831d.js +0 -1
  719. package/app/.next/static/chunks/app/api/cli-tools/codex-profiles/route-4fd91743f3ac831d.js +0 -1
  720. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-4fd91743f3ac831d.js +0 -1
  721. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-4fd91743f3ac831d.js +0 -1
  722. package/app/.next/static/chunks/app/api/cli-tools/guide-settings/[toolId]/route-4fd91743f3ac831d.js +0 -1
  723. package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-4fd91743f3ac831d.js +0 -1
  724. package/app/.next/static/chunks/app/api/cli-tools/openclaw/auto-order/route-4fd91743f3ac831d.js +0 -1
  725. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-4fd91743f3ac831d.js +0 -1
  726. package/app/.next/static/chunks/app/api/cli-tools/runtime/[toolId]/route-4fd91743f3ac831d.js +0 -1
  727. package/app/.next/static/chunks/app/api/cli-tools/status/route-4fd91743f3ac831d.js +0 -1
  728. package/app/.next/static/chunks/app/api/cloud/auth/route-4fd91743f3ac831d.js +0 -1
  729. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-4fd91743f3ac831d.js +0 -1
  730. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-4fd91743f3ac831d.js +0 -1
  731. package/app/.next/static/chunks/app/api/cloud/models/alias/route-4fd91743f3ac831d.js +0 -1
  732. package/app/.next/static/chunks/app/api/combos/[id]/route-4fd91743f3ac831d.js +0 -1
  733. package/app/.next/static/chunks/app/api/combos/auto/route-4fd91743f3ac831d.js +0 -1
  734. package/app/.next/static/chunks/app/api/combos/metrics/route-4fd91743f3ac831d.js +0 -1
  735. package/app/.next/static/chunks/app/api/combos/route-4fd91743f3ac831d.js +0 -1
  736. package/app/.next/static/chunks/app/api/combos/test/route-4fd91743f3ac831d.js +0 -1
  737. package/app/.next/static/chunks/app/api/compliance/audit-log/route-4fd91743f3ac831d.js +0 -1
  738. package/app/.next/static/chunks/app/api/db-backups/export/route-4fd91743f3ac831d.js +0 -1
  739. package/app/.next/static/chunks/app/api/db-backups/exportAll/route-4fd91743f3ac831d.js +0 -1
  740. package/app/.next/static/chunks/app/api/db-backups/import/route-4fd91743f3ac831d.js +0 -1
  741. package/app/.next/static/chunks/app/api/db-backups/route-4fd91743f3ac831d.js +0 -1
  742. package/app/.next/static/chunks/app/api/evals/[suiteId]/route-4fd91743f3ac831d.js +0 -1
  743. package/app/.next/static/chunks/app/api/evals/route-4fd91743f3ac831d.js +0 -1
  744. package/app/.next/static/chunks/app/api/fallback/chains/route-4fd91743f3ac831d.js +0 -1
  745. package/app/.next/static/chunks/app/api/init/route-4fd91743f3ac831d.js +0 -1
  746. package/app/.next/static/chunks/app/api/keys/[id]/route-4fd91743f3ac831d.js +0 -1
  747. package/app/.next/static/chunks/app/api/keys/route-4fd91743f3ac831d.js +0 -1
  748. package/app/.next/static/chunks/app/api/logs/console/route-4fd91743f3ac831d.js +0 -1
  749. package/app/.next/static/chunks/app/api/mcp/audit/route-4fd91743f3ac831d.js +0 -1
  750. package/app/.next/static/chunks/app/api/mcp/audit/stats/route-4fd91743f3ac831d.js +0 -1
  751. package/app/.next/static/chunks/app/api/mcp/sse/route-4fd91743f3ac831d.js +0 -1
  752. package/app/.next/static/chunks/app/api/mcp/status/route-4fd91743f3ac831d.js +0 -1
  753. package/app/.next/static/chunks/app/api/mcp/stream/route-4fd91743f3ac831d.js +0 -1
  754. package/app/.next/static/chunks/app/api/mcp/tools/route-4fd91743f3ac831d.js +0 -1
  755. package/app/.next/static/chunks/app/api/models/alias/route-4fd91743f3ac831d.js +0 -1
  756. package/app/.next/static/chunks/app/api/models/availability/route-4fd91743f3ac831d.js +0 -1
  757. package/app/.next/static/chunks/app/api/models/catalog/route-4fd91743f3ac831d.js +0 -1
  758. package/app/.next/static/chunks/app/api/models/openrouter-catalog/route-4fd91743f3ac831d.js +0 -1
  759. package/app/.next/static/chunks/app/api/models/route-4fd91743f3ac831d.js +0 -1
  760. package/app/.next/static/chunks/app/api/monitoring/health/route-4fd91743f3ac831d.js +0 -1
  761. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-4fd91743f3ac831d.js +0 -1
  762. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-4fd91743f3ac831d.js +0 -1
  763. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-4fd91743f3ac831d.js +0 -1
  764. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-4fd91743f3ac831d.js +0 -1
  765. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-4fd91743f3ac831d.js +0 -1
  766. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-4fd91743f3ac831d.js +0 -1
  767. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-4fd91743f3ac831d.js +0 -1
  768. package/app/.next/static/chunks/app/api/policies/route-4fd91743f3ac831d.js +0 -1
  769. package/app/.next/static/chunks/app/api/pricing/defaults/route-4fd91743f3ac831d.js +0 -1
  770. package/app/.next/static/chunks/app/api/pricing/models/route-4fd91743f3ac831d.js +0 -1
  771. package/app/.next/static/chunks/app/api/pricing/route-4fd91743f3ac831d.js +0 -1
  772. package/app/.next/static/chunks/app/api/provider-metrics/route-4fd91743f3ac831d.js +0 -1
  773. package/app/.next/static/chunks/app/api/provider-models/route-4fd91743f3ac831d.js +0 -1
  774. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-4fd91743f3ac831d.js +0 -1
  775. package/app/.next/static/chunks/app/api/provider-nodes/route-4fd91743f3ac831d.js +0 -1
  776. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-4fd91743f3ac831d.js +0 -1
  777. package/app/.next/static/chunks/app/api/providers/[id]/models/route-4fd91743f3ac831d.js +0 -1
  778. package/app/.next/static/chunks/app/api/providers/[id]/route-4fd91743f3ac831d.js +0 -1
  779. package/app/.next/static/chunks/app/api/providers/[id]/test/route-4fd91743f3ac831d.js +0 -1
  780. package/app/.next/static/chunks/app/api/providers/client/route-4fd91743f3ac831d.js +0 -1
  781. package/app/.next/static/chunks/app/api/providers/route-4fd91743f3ac831d.js +0 -1
  782. package/app/.next/static/chunks/app/api/providers/test-batch/route-4fd91743f3ac831d.js +0 -1
  783. package/app/.next/static/chunks/app/api/providers/validate/route-4fd91743f3ac831d.js +0 -1
  784. package/app/.next/static/chunks/app/api/rate-limit/route-4fd91743f3ac831d.js +0 -1
  785. package/app/.next/static/chunks/app/api/rate-limits/route-4fd91743f3ac831d.js +0 -1
  786. package/app/.next/static/chunks/app/api/resilience/reset/route-4fd91743f3ac831d.js +0 -1
  787. package/app/.next/static/chunks/app/api/resilience/route-4fd91743f3ac831d.js +0 -1
  788. package/app/.next/static/chunks/app/api/restart/route-4fd91743f3ac831d.js +0 -1
  789. package/app/.next/static/chunks/app/api/sessions/route-4fd91743f3ac831d.js +0 -1
  790. package/app/.next/static/chunks/app/api/settings/background-degradation/route-4fd91743f3ac831d.js +0 -1
  791. package/app/.next/static/chunks/app/api/settings/combo-defaults/route-4fd91743f3ac831d.js +0 -1
  792. package/app/.next/static/chunks/app/api/settings/ip-filter/route-4fd91743f3ac831d.js +0 -1
  793. package/app/.next/static/chunks/app/api/settings/model-aliases/route-4fd91743f3ac831d.js +0 -1
  794. package/app/.next/static/chunks/app/api/settings/proxy/route-4fd91743f3ac831d.js +0 -1
  795. package/app/.next/static/chunks/app/api/settings/proxy/test/route-4fd91743f3ac831d.js +0 -1
  796. package/app/.next/static/chunks/app/api/settings/require-login/route-4fd91743f3ac831d.js +0 -1
  797. package/app/.next/static/chunks/app/api/settings/route-4fd91743f3ac831d.js +0 -1
  798. package/app/.next/static/chunks/app/api/settings/system-prompt/route-4fd91743f3ac831d.js +0 -1
  799. package/app/.next/static/chunks/app/api/settings/thinking-budget/route-4fd91743f3ac831d.js +0 -1
  800. package/app/.next/static/chunks/app/api/shutdown/route-4fd91743f3ac831d.js +0 -1
  801. package/app/.next/static/chunks/app/api/storage/health/route-4fd91743f3ac831d.js +0 -1
  802. package/app/.next/static/chunks/app/api/sync/cloud/route-4fd91743f3ac831d.js +0 -1
  803. package/app/.next/static/chunks/app/api/sync/initialize/route-4fd91743f3ac831d.js +0 -1
  804. package/app/.next/static/chunks/app/api/tags/route-4fd91743f3ac831d.js +0 -1
  805. package/app/.next/static/chunks/app/api/telemetry/summary/route-4fd91743f3ac831d.js +0 -1
  806. package/app/.next/static/chunks/app/api/token-health/route-4fd91743f3ac831d.js +0 -1
  807. package/app/.next/static/chunks/app/api/translator/detect/route-4fd91743f3ac831d.js +0 -1
  808. package/app/.next/static/chunks/app/api/translator/history/route-4fd91743f3ac831d.js +0 -1
  809. package/app/.next/static/chunks/app/api/translator/load/route-4fd91743f3ac831d.js +0 -1
  810. package/app/.next/static/chunks/app/api/translator/save/route-4fd91743f3ac831d.js +0 -1
  811. package/app/.next/static/chunks/app/api/translator/send/route-4fd91743f3ac831d.js +0 -1
  812. package/app/.next/static/chunks/app/api/translator/translate/route-4fd91743f3ac831d.js +0 -1
  813. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-4fd91743f3ac831d.js +0 -1
  814. package/app/.next/static/chunks/app/api/usage/analytics/route-4fd91743f3ac831d.js +0 -1
  815. package/app/.next/static/chunks/app/api/usage/budget/route-4fd91743f3ac831d.js +0 -1
  816. package/app/.next/static/chunks/app/api/usage/call-logs/[id]/route-4fd91743f3ac831d.js +0 -1
  817. package/app/.next/static/chunks/app/api/usage/call-logs/route-4fd91743f3ac831d.js +0 -1
  818. package/app/.next/static/chunks/app/api/usage/history/route-4fd91743f3ac831d.js +0 -1
  819. package/app/.next/static/chunks/app/api/usage/logs/route-4fd91743f3ac831d.js +0 -1
  820. package/app/.next/static/chunks/app/api/usage/proxy-logs/route-4fd91743f3ac831d.js +0 -1
  821. package/app/.next/static/chunks/app/api/usage/quota/route-4fd91743f3ac831d.js +0 -1
  822. package/app/.next/static/chunks/app/api/usage/request-logs/route-4fd91743f3ac831d.js +0 -1
  823. package/app/.next/static/chunks/app/api/v1/api/chat/route-4fd91743f3ac831d.js +0 -1
  824. package/app/.next/static/chunks/app/api/v1/audio/speech/route-4fd91743f3ac831d.js +0 -1
  825. package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-4fd91743f3ac831d.js +0 -1
  826. package/app/.next/static/chunks/app/api/v1/chat/completions/route-4fd91743f3ac831d.js +0 -1
  827. package/app/.next/static/chunks/app/api/v1/completions/route-4fd91743f3ac831d.js +0 -1
  828. package/app/.next/static/chunks/app/api/v1/embeddings/route-4fd91743f3ac831d.js +0 -1
  829. package/app/.next/static/chunks/app/api/v1/images/generations/route-4fd91743f3ac831d.js +0 -1
  830. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-4fd91743f3ac831d.js +0 -1
  831. package/app/.next/static/chunks/app/api/v1/messages/route-4fd91743f3ac831d.js +0 -1
  832. package/app/.next/static/chunks/app/api/v1/models/route-4fd91743f3ac831d.js +0 -1
  833. package/app/.next/static/chunks/app/api/v1/moderations/route-4fd91743f3ac831d.js +0 -1
  834. package/app/.next/static/chunks/app/api/v1/music/generations/route-4fd91743f3ac831d.js +0 -1
  835. package/app/.next/static/chunks/app/api/v1/providers/[provider]/chat/completions/route-4fd91743f3ac831d.js +0 -1
  836. package/app/.next/static/chunks/app/api/v1/providers/[provider]/embeddings/route-4fd91743f3ac831d.js +0 -1
  837. package/app/.next/static/chunks/app/api/v1/providers/[provider]/images/generations/route-4fd91743f3ac831d.js +0 -1
  838. package/app/.next/static/chunks/app/api/v1/rerank/route-4fd91743f3ac831d.js +0 -1
  839. package/app/.next/static/chunks/app/api/v1/responses/route-4fd91743f3ac831d.js +0 -1
  840. package/app/.next/static/chunks/app/api/v1/route-4fd91743f3ac831d.js +0 -1
  841. package/app/.next/static/chunks/app/api/v1/videos/generations/route-4fd91743f3ac831d.js +0 -1
  842. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-4fd91743f3ac831d.js +0 -1
  843. package/app/.next/static/chunks/app/api/v1beta/models/route-4fd91743f3ac831d.js +0 -1
  844. package/app/.next/static/chunks/app/page-4fd91743f3ac831d.js +0 -1
  845. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-4fd91743f3ac831d.js +0 -1
  846. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-4fd91743f3ac831d.js +0 -1
  847. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-4fd91743f3ac831d.js +0 -1
  848. package/app/.next/static/css/f8997b4d505d4a63.css +0 -1
  849. package/app/.next/static/ig97FitGiiNqfOhrQUGzh/_buildManifest.js +0 -1
  850. /package/app/.next/static/{ig97FitGiiNqfOhrQUGzh → vyty8kP9IuZktMt159X9L}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{21583:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>N});var a=t(95155),l=t(12115),i=t(40993),r=t(14051),n=t.n(r),o=t(98500),c=t.n(o),d=t(30949),m=t(20909),x=t(50910);let p=15e3;function u({machineId:e}){let s=(0,x.c)("endpoint"),t=(0,x.c)("common"),[r,n]=(0,l.useState)(!0),[o,m]=(0,l.useState)([]),[u,g]=(0,l.useState)(null),[f,j]=(0,l.useState)(!1),[y,v]=(0,l.useState)(!1),[N,k]=(0,l.useState)(!1),[w,C]=(0,l.useState)(!1),[S,T]=(0,l.useState)(null),[_,A]=(0,l.useState)(""),[P,E]=(0,l.useState)(!1),[$,M]=(0,l.useState)(null),[R,D]=(0,l.useState)("https://cloud.omniroute.online"),[O,I]=(0,l.useState)("api"),[q,U]=(0,l.useState)(null),[B,L]=(0,l.useState)(null),{copied:Q,copy:F}=(0,d.C)();(0,l.useEffect)(()=>{Promise.allSettled([H(),z(),W()]).finally(()=>{n(!1)})},[]);let z=async()=>{try{let e=await fetch("/v1/models");if(e.ok){let s=await e.json();m(s.data||[])}}catch(e){console.log("Error fetching models:",e)}},W=async()=>{try{let[e,s]=await Promise.allSettled([fetch("/api/mcp/status"),fetch("/api/a2a/status")]);"fulfilled"===e.status&&e.value.ok&&U(await e.value.json()),"fulfilled"===s.status&&s.value.ok&&L(await s.value.json())}catch{}},G=(0,l.useMemo)(()=>{let e=o.filter(e=>!e.type&&!e.parent),s=o.filter(e=>"embedding"===e.type&&!e.parent),t=o.filter(e=>"image"===e.type&&!e.parent),a=o.filter(e=>"rerank"===e.type&&!e.parent),l=o.filter(e=>"audio"===e.type&&"transcription"===e.subtype&&!e.parent),i=o.filter(e=>"audio"===e.type&&"speech"===e.subtype&&!e.parent);return{chat:e,embeddings:s,images:t,rerank:a,audioTranscription:l,audioSpeech:i,moderation:o.filter(e=>"moderation"===e.type&&!e.parent),music:o.filter(e=>"music"===e.type&&!e.parent)}},[o]),Z=async(e,t=p)=>{let a=new AbortController,l=setTimeout(()=>a.abort(),t);try{let s=await fetch("/api/sync/cloud",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e}),signal:a.signal}),t=await s.json().catch(()=>({}));return{ok:s.ok,status:s.status,data:t}}catch(e){if(e?.name==="AbortError")return{ok:!1,status:408,data:{error:s("cloudRequestTimeout")}};return{ok:!1,status:500,data:{error:e.message||s("cloudRequestFailed")}}}finally{clearTimeout(l)}},H=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();j(s.cloudEnabled||!1)}}catch(e){console.log("Error loading cloud settings:",e)}},J=e=>{e?v(!0):k(!0)};(0,l.useEffect)(()=>{if(S){let e=setTimeout(()=>T(null),5e3);return()=>clearTimeout(e)}},[S]),(0,l.useEffect)(()=>{let e=setInterval(W,3e4);return()=>clearInterval(e)},[]);let V=()=>{globalThis.dispatchEvent(new Event("cloud-status-changed"))},X=async()=>{C(!0),E(!1),A("syncing");try{let{ok:e,status:t,data:a}=await Z("enable");if(e)A("verifying"),await new Promise(e=>setTimeout(e,600)),j(!0),A("done"),E(!0),C(!1),V(),await new Promise(e=>setTimeout(e,1200)),v(!1),E(!1),a.verified?T({type:"success",message:s("cloudConnectedVerified")}):T({type:"warning",message:a.verifyError?s("connectedVerificationPendingWithError",{error:a.verifyError}):s("connectedVerificationPending")}),a.cloudUrl&&D(a.cloudUrl),await H();else{let e=a.error||s("failedEnable");(502===t||408===t)&&(e=s("cloudWorkerUnreachable")),T({type:"error",message:e}),v(!1)}}catch(e){T({type:"error",message:e.message||s("connectionFailed")}),v(!1)}finally{C(!1),A("")}},Y=async()=>{C(!0),A("syncing");try{await Z("sync"),A("disabling");let{ok:e,data:t}=await Z("disable");e?(j(!1),T({type:"success",message:s("cloudDisabledSuccess")}),k(!1),V(),await H()):T({type:"error",message:t.error||s("failedDisable")})}catch(e){console.log("Error disabling cloud:",e),T({type:"error",message:s("failedDisable")})}finally{C(!1),A("")}},[K,ee]=(0,l.useState)("/v1"),es=R?`${R}/v1`:null;if((0,l.useEffect)(()=>{ee(`${window.location.origin}/v1`)},[]),r)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(i.Qv,{}),(0,a.jsx)(i.Qv,{})]});let et=f&&es?es:K,ea=!!q?.online,el=B?.status==="ok",ei=Number(q?.heartbeat?.toolCount||0),er=Number(B?.tasks?.activeStreams||0);return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)(i.Zp,{className:"",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:s("title")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:f?s("usingCloudProxy"):s("usingLocalServer")}),e&&(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:s("machineId",{id:e.slice(0,8)})})]}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:f?(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"cloud_off",onClick:()=>J(!1),disabled:w,className:"bg-red-500/10! text-red-500! hover:bg-red-500/20! border-red-500/30!",children:s("disableCloud")}):(0,a.jsx)(i.$n,{variant:"primary",icon:"cloud_upload",onClick:()=>J(!0),disabled:w,className:"bg-linear-to-r from-primary to-blue-500 hover:from-primary-hover hover:to-blue-600",children:s("enableCloud")})})]}),S&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-4 py-2.5 rounded-lg mb-4 text-sm font-medium animate-in fade-in slide-in-from-top-2 duration-300 ${"success"===S.type?"bg-green-500/10 border border-green-500/30 text-green-400":"warning"===S.type?"bg-amber-500/10 border border-amber-500/30 text-amber-400":"bg-red-500/10 border border-red-500/30 text-red-400"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"success"===S.type?"check_circle":"warning"===S.type?"warning":"error"}),(0,a.jsx)("span",{className:"flex-1",children:S.message}),(0,a.jsx)("button",{onClick:()=>T(null),className:"p-0.5 hover:bg-white/10 rounded transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}),(0,a.jsxs)("div",{className:"flex gap-2 mb-3",children:[(0,a.jsx)(i.pd,{value:et,readOnly:!0,className:`flex-1 font-mono text-sm ${f?"animate-border-glow":""}`}),(0,a.jsx)(i.$n,{variant:"secondary",icon:"endpoint_url"===Q?"check":"content_copy",onClick:()=>F(et,"endpoint_url"),children:t("endpoint_url"===Q?"copied":"copy")})]})]}),(0,a.jsx)(i.Zp,{children:(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:s("sectionTitle")||"Integration Surface"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s("sectionDescription")||"OpenAI-compatible APIs and operational protocol endpoints"})]}),(0,a.jsx)(i.Iz,{options:[{value:"api",label:s("tabApis")||"OpenAI-compatible APIs",icon:"api"},{value:"protocols",label:s("tabProtocols")||"Protocols",icon:"hub"}],value:O,onChange:I,"aria-label":s("tabsAria")||"Endpoint sections"})]})}),"api"===O?(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:s("available")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s("modelsAcrossEndpoints",{models:Object.values(G).reduce((e,s)=>e+s.length,0),endpoints:[G.chat,G.embeddings,G.images,G.rerank,G.audioTranscription,G.audioSpeech,G.moderation,G.music].filter(e=>e.length>0).length+2})})]})}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm text-primary",children:"hub"}),(0,a.jsx)("h3",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:s("categoryCore")||"Core APIs"}),(0,a.jsx)("div",{className:"flex-1 h-px bg-border/50"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(h,{icon:"chat",iconColor:"text-blue-500",iconBg:"bg-blue-500/10",title:s("chatCompletions"),path:"/v1/chat/completions",description:s("chatDesc"),models:G.chat,expanded:"chat"===u,onToggle:()=>g("chat"===u?null:"chat"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"code",iconColor:"text-indigo-500",iconBg:"bg-indigo-500/10",title:s("responses")||"Responses API",path:"/v1/responses",description:s("responsesDesc")||"OpenAI Responses API for Codex and advanced agentic workflows",models:G.chat,expanded:"responses"===u,onToggle:()=>g("responses"===u?null:"responses"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"text_fields",iconColor:"text-orange-500",iconBg:"bg-orange-500/10",title:s("completionsLegacy")||"Completions (Legacy)",path:"/v1/completions",description:s("completionsLegacyDesc")||"Legacy OpenAI text completions — accepts both prompt and messages format",models:G.chat,expanded:"completions"===u,onToggle:()=>g("completions"===u?null:"completions"),copy:F,copied:Q,baseUrl:et})]})]}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm text-purple-400",children:"perm_media"}),(0,a.jsx)("h3",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:s("categoryMedia")||"Media & Multi-Modal"}),(0,a.jsx)("div",{className:"flex-1 h-px bg-border/50"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(h,{icon:"data_array",iconColor:"text-emerald-500",iconBg:"bg-emerald-500/10",title:s("embeddings"),path:"/v1/embeddings",description:s("embeddingsDesc"),models:G.embeddings,expanded:"embeddings"===u,onToggle:()=>g("embeddings"===u?null:"embeddings"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"image",iconColor:"text-purple-500",iconBg:"bg-purple-500/10",title:s("imageGeneration"),path:"/v1/images/generations",description:s("imageDesc"),models:G.images,expanded:"images"===u,onToggle:()=>g("images"===u?null:"images"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"mic",iconColor:"text-rose-500",iconBg:"bg-rose-500/10",title:s("audioTranscription"),path:"/v1/audio/transcriptions",description:s("audioTranscriptionDesc"),models:G.audioTranscription,expanded:"audioTranscription"===u,onToggle:()=>g("audioTranscription"===u?null:"audioTranscription"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"record_voice_over",iconColor:"text-cyan-500",iconBg:"bg-cyan-500/10",title:s("textToSpeech"),path:"/v1/audio/speech",description:s("textToSpeechDesc"),models:G.audioSpeech,expanded:"audioSpeech"===u,onToggle:()=>g("audioSpeech"===u?null:"audioSpeech"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"music_note",iconColor:"text-fuchsia-500",iconBg:"bg-fuchsia-500/10",title:s("musicGeneration")||"Music Generation",path:"/v1/music/generations",description:s("musicDesc")||"Generate music and audio tracks via ComfyUI (Stable Audio, MusicGen)",models:G.music,expanded:"music"===u,onToggle:()=>g("music"===u?null:"music"),copy:F,copied:Q,baseUrl:et})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm text-amber-400",children:"build"}),(0,a.jsx)("h3",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:s("categoryUtility")||"Utility & Management"}),(0,a.jsx)("div",{className:"flex-1 h-px bg-border/50"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(h,{icon:"sort",iconColor:"text-amber-500",iconBg:"bg-amber-500/10",title:s("rerank"),path:"/v1/rerank",description:s("rerankDesc"),models:G.rerank,expanded:"rerank"===u,onToggle:()=>g("rerank"===u?null:"rerank"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"shield",iconColor:"text-orange-500",iconBg:"bg-orange-500/10",title:s("moderations"),path:"/v1/moderations",description:s("moderationsDesc"),models:G.moderation,expanded:"moderation"===u,onToggle:()=>g("moderation"===u?null:"moderation"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"list",iconColor:"text-teal-500",iconBg:"bg-teal-500/10",title:s("listModels")||"List Models",path:"/v1/models",description:s("listModelsDesc")||"List all available models across all connected providers",models:[],expanded:"models"===u,onToggle:()=>g("models"===u?null:"models"),copy:F,copied:Q,baseUrl:et})]})]})]}):(0,a.jsx)(i.Zp,{children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:s("protocolsTitle")||"Protocols"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:s("protocolsDescription")||"MCP and A2A are first-class endpoints with dedicated observability and controls."})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4 bg-bg-subtle",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"hub"}),s("mcpCardTitle")||"MCP Server"]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:s("mcpCardDescription")||"Model Context Protocol over stdio"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-1 rounded-full font-semibold ${ea?"bg-green-500/15 text-green-500":"bg-red-500/15 text-red-500"}`,children:t(ea?"active":"inactive")})]}),(0,a.jsxs)("div",{className:"mt-3 text-xs text-text-muted space-y-1",children:[(0,a.jsxs)("p",{children:[s("protocolToolsLabel")||"Tools",":"," ",(0,a.jsx)("span",{className:"text-text-main font-semibold",children:ei||16})]}),(0,a.jsxs)("p",{children:[s("protocolLastActivity")||"Last activity",":"," ",(0,a.jsx)("span",{className:"text-text-main",children:q?.activity?.lastCallAt?new Date(q.activity.lastCallAt).toLocaleString():"—"})]})]}),(0,a.jsxs)("div",{className:"mt-3 rounded-lg bg-bg p-3 border border-border/70",children:[(0,a.jsx)("p",{className:"text-xs font-semibold mb-1",children:s("quickStart")||"Quick Start"}),(0,a.jsx)("code",{className:"text-xs font-mono break-all",children:"omniroute --mcp"})]}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(c(),{href:"/dashboard/mcp",className:"text-sm text-primary hover:text-primary-hover transition-colors",children:[s("openMcpDashboard")||"Open MCP management"," →"]})})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4 bg-bg-subtle",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"group_work"}),s("a2aCardTitle")||"A2A Server"]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:s("a2aCardDescription")||"Agent2Agent JSON-RPC endpoint"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-1 rounded-full font-semibold ${el?"bg-green-500/15 text-green-500":"bg-red-500/15 text-red-500"}`,children:t(el?"active":"inactive")})]}),(0,a.jsxs)("div",{className:"mt-3 text-xs text-text-muted space-y-1",children:[(0,a.jsxs)("p",{children:[s("protocolTasksLabel")||"Tasks",":"," ",(0,a.jsx)("span",{className:"text-text-main font-semibold",children:B?.tasks?.total||0})]}),(0,a.jsxs)("p",{children:[s("protocolActiveStreamsLabel")||"Active streams",":"," ",(0,a.jsx)("span",{className:"text-text-main font-semibold",children:er})]})]}),(0,a.jsxs)("div",{className:"mt-3 rounded-lg bg-bg p-3 border border-border/70",children:[(0,a.jsx)("p",{className:"text-xs font-semibold mb-1",children:s("quickStart")||"Quick Start"}),(0,a.jsxs)("code",{className:"text-xs font-mono break-all",children:[K.replace(/\/v1$/,""),"/a2a"]})]}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(c(),{href:"/dashboard/a2a",className:"text-sm text-primary hover:text-primary-hover transition-colors",children:[s("openA2aDashboard")||"Open A2A management"," →"]})})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4 bg-bg-subtle",children:[(0,a.jsx)("h4",{className:"font-semibold mb-2",children:s("mcpQuickStartTitle")||"MCP Quick Start"}),(0,a.jsxs)("ol",{className:"text-sm text-text-muted space-y-1 list-decimal list-inside",children:[(0,a.jsx)("li",{children:s("mcpQuickStartStep1")||"Run the MCP server via `omniroute --mcp`."}),(0,a.jsx)("li",{children:s("mcpQuickStartStep2")||"Configure your MCP client to connect over stdio transport."}),(0,a.jsx)("li",{children:s("mcpQuickStartStep3")||"Invoke tools such as `omniroute_get_health` and `omniroute_list_combos`."})]})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4 bg-bg-subtle",children:[(0,a.jsx)("h4",{className:"font-semibold mb-2",children:s("a2aQuickStartTitle")||"A2A Quick Start"}),(0,a.jsxs)("ol",{className:"text-sm text-text-muted space-y-1 list-decimal list-inside",children:[(0,a.jsx)("li",{children:s("a2aQuickStartStep1")||"Discover the agent card at `/.well-known/agent.json`."}),(0,a.jsx)("li",{children:s("a2aQuickStartStep2")||"Send JSON-RPC requests to `POST /a2a` using `message/send` or `message/stream`."}),(0,a.jsx)("li",{children:s("a2aQuickStartStep3")||"Track and control tasks using `tasks/get` and `tasks/cancel`."})]})]})]})]})}),(0,a.jsx)(i.aF,{isOpen:y,title:s("enableCloudTitle"),onClose:()=>v(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200 font-medium mb-2",children:s("whatYouGet")}),(0,a.jsxs)("ul",{className:"text-sm text-blue-700 dark:text-blue-300 space-y-1",children:[(0,a.jsxs)("li",{children:["• ",s("cloudBenefitAccess")]}),(0,a.jsxs)("li",{children:["• ",s("cloudBenefitShare")]}),(0,a.jsxs)("li",{children:["• ",s("cloudBenefitPorts")]}),(0,a.jsxs)("li",{children:["• ",s("cloudBenefitEdge")]})]})]}),(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 font-medium mb-1",children:t("note")}),(0,a.jsxs)("ul",{className:"text-sm text-yellow-700 dark:text-yellow-300 space-y-1",children:[(0,a.jsxs)("li",{children:["• ",s("cloudSessionNote")]}),(0,a.jsxs)("li",{children:["• ",s("cloudUnstableNote")]})]})]}),(w||P)&&(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border transition-all duration-300 ${P?"bg-green-500/10 border-green-500/30":"bg-primary/10 border-primary/30"}`,children:[P?(0,a.jsx)("span",{className:"material-symbols-outlined text-green-500 text-xl",children:"check_circle"}):(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-primary",children:"progress_activity"}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)("p",{className:`text-sm font-medium ${P?"text-green-500":"text-primary"}`,children:[P&&s("cloudConnected"),!P&&"syncing"===_&&s("connectingToCloud"),!P&&"verifying"===_&&s("verifyingConnection")]})})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:X,fullWidth:!0,disabled:w||P,children:w?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"syncing"===_?s("connecting"):s("verifying")]}):P?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"}),s("connected")]}):s("enableCloud")}),(0,a.jsx)(i.$n,{onClick:()=>v(!1),variant:"ghost",fullWidth:!0,disabled:w||P,children:t("cancel")})]})]})}),(0,a.jsx)(i.aF,{isOpen:N,title:s("disableCloudTitle"),onClose:()=>!w&&k(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-600 dark:text-red-400",children:"warning"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium mb-1",children:t("warning")}),(0,a.jsx)("p",{className:"text-sm text-red-700 dark:text-red-300",children:s("disableWarning")})]})]})}),w&&(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-primary/10 border border-primary/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-primary",children:"progress_activity"}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)("p",{className:"text-sm font-medium text-primary",children:["syncing"===_&&s("syncingData"),"disabling"===_&&s("disablingCloud")]})})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s("disableConfirm")}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:Y,fullWidth:!0,disabled:w,className:"bg-red-500! hover:bg-red-600! text-white!",children:w?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"syncing"===_?s("syncing"):s("disabling")]}):s("disableCloud")}),(0,a.jsx)(i.$n,{onClick:()=>k(!1),variant:"ghost",fullWidth:!0,disabled:w,children:t("cancel")})]})]})}),$&&(0,a.jsx)(b,{provider:$,models:o,copy:F,copied:Q,onClose:()=>M(null)})]})}function b({provider:e,models:s,copy:t,copied:r,onClose:n}){let o=(0,x.c)("endpoint"),c=(0,x.c)("common"),d=e.provider.alias||e.id,m=(0,l.useMemo)(()=>s.filter(s=>!s.parent&&(s.owned_by===d||s.owned_by===e.id)),[s,d,e.id]),p=m.filter(e=>!e.type),u=m.filter(e=>"embedding"===e.type),b=m.filter(e=>"image"===e.type),h=(e,s,l)=>0===l.length?null:(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2 flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s}),e," (",l.length,")"]}),(0,a.jsx)("div",{className:"flex flex-col gap-1",children:l.map(e=>{let s=`modal-${e.id}`;return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-surface/60 group",children:[(0,a.jsx)("code",{className:"text-sm font-mono flex-1 truncate",children:e.id}),e.custom&&(0,a.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-primary/10 text-primary",children:o("custom")}),(0,a.jsx)("button",{onClick:()=>t(e.id,s),className:"p-1 hover:bg-sidebar rounded text-text-muted hover:text-primary opacity-0 group-hover:opacity-100 transition-opacity",title:c("copy"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:r===s?"check":"content_copy"})})]},e.id)})})]});return(0,a.jsx)(i.aF,{isOpen:!0,onClose:n,title:o("providerModelsTitle",{provider:e.provider.name}),children:(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:0===m.length?(0,a.jsx)("p",{className:"text-sm text-text-muted py-4 text-center",children:o("noModelsForProvider")}):(0,a.jsxs)(a.Fragment,{children:[h(o("chat"),"chat",p),h(o("embedding"),"data_array",u),h(o("image"),"image",b)]})})})}function h({icon:e,iconColor:s,iconBg:t,title:i,path:r,description:n,models:o,expanded:c,onToggle:d,copy:p,copied:u,baseUrl:b}){let h=(0,x.c)("endpoint"),g=(0,l.useMemo)(()=>{let e={};for(let s of o){let t=s.owned_by||"unknown";e[t]||(e[t]=[]),e[t].push(s)}return Object.entries(e).sort((e,s)=>s[1].length-e[1].length)},[o]),f=e=>m.Q2[e]||(0,m.zt)(e),j=`endpoint_${r}`;return(0,a.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,a.jsxs)("button",{onClick:d,className:"w-full flex items-center gap-3 p-4 hover:bg-surface/50 transition-colors text-left",children:[(0,a.jsx)("div",{className:`flex items-center justify-center size-10 rounded-lg ${t} shrink-0`,children:(0,a.jsx)("span",{className:`material-symbols-outlined text-xl ${s}`,children:e})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-semibold text-sm",children:i}),(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-full bg-surface text-text-muted font-medium",children:h("modelsCount",{count:o.length})})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:n})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-lg transition-transform ${c?"rotate-180":""}`,children:"expand_more"})]}),c&&(0,a.jsxs)("div",{className:"border-t border-border px-4 pb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-3 mb-3",children:[(0,a.jsxs)("code",{className:"flex-1 text-xs font-mono text-text-muted bg-surface/80 px-3 py-1.5 rounded-lg truncate",children:[b.replace(/\/v1$/,""),r]}),(0,a.jsx)("button",{onClick:()=>p(`${b.replace(/\/v1$/,"")}${r}`,j),className:"p-1.5 hover:bg-surface rounded-lg text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:u===j?"check":"content_copy"})})]}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:g.map(([e,s])=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("div",{className:"size-2.5 rounded-full shrink-0",style:{backgroundColor:f(e)?.color||"#888"}}),(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main",children:f(e)?.name||e}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["(",s.length,")"]})]}),(0,a.jsx)("div",{className:"ml-5 flex flex-wrap gap-1.5",children:s.map(e=>(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-md bg-surface/80 text-text-muted font-mono",title:e.id,children:e.root||e.id.split("/").pop()},e.id))})]},e))})]})]})}u.propTypes={machineId:n().string.isRequired},b.propTypes={provider:n().object.isRequired,models:n().array.isRequired,copy:n().func.isRequired,copied:n().string,onClose:n().func.isRequired},h.propTypes={icon:n().string.isRequired,iconColor:n().string.isRequired,iconBg:n().string.isRequired,title:n().string.isRequired,path:n().string.isRequired,description:n().string.isRequired,models:n().array.isRequired,expanded:n().bool.isRequired,onToggle:n().func.isRequired,copy:n().func.isRequired,copied:n().string,baseUrl:n().string.isRequired};var g=t(24726),f=t(14816);function j(){let e=(0,x.c)("endpoints");return(0,a.jsxs)("div",{className:"p-6 max-w-5xl mx-auto space-y-6",children:[(0,a.jsxs)(i.Zp,{className:"p-8 text-center space-y-4",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-16 rounded-2xl bg-primary/10 text-primary mx-auto",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"code"})}),(0,a.jsx)("h2",{className:"text-xl font-semibold",children:e("apiEndpointsTitle")}),(0,a.jsx)("p",{className:"text-sm text-text-muted max-w-md mx-auto",children:e("apiEndpointsDescription")}),(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-amber-500/10 text-amber-500 text-sm font-medium",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"construction"}),e("comingSoon")]})]}),(0,a.jsxs)(i.Zp,{className:"p-5",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold mb-3",children:e("plannedFeatures")}),(0,a.jsxs)("ul",{className:"space-y-2 text-sm text-text-muted",children:[(0,a.jsxs)("li",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check_circle"}),e("featureRestApi")]}),(0,a.jsxs)("li",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check_circle"}),e("featureWebhooks")]}),(0,a.jsxs)("li",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check_circle"}),e("featureSwagger")]}),(0,a.jsxs)("li",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check_circle"}),e("featureAuth")]})]})]})]})}function y({label:e,status:s,enabled:t,onToggle:l,toggling:i}){return(0,a.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium border",style:{borderColor:s.loading?"var(--color-border)":s.online?"rgba(34,197,94,0.3)":"rgba(239,68,68,0.3)",background:s.loading?"transparent":s.online?"rgba(34,197,94,0.1)":"rgba(239,68,68,0.1)",color:s.loading?"var(--color-text-muted)":s.online?"rgb(34,197,94)":"rgb(239,68,68)"},children:[(0,a.jsx)("span",{className:"inline-block w-2 h-2 rounded-full",style:{background:s.loading?"var(--color-text-muted)":s.online?"rgb(34,197,94)":"rgb(239,68,68)",animation:s.online?"pulse 2s infinite":"none"}}),s.loading?"...":s.online?"Online":"Offline"]}),(0,a.jsx)("button",{onClick:l,disabled:i,className:"relative inline-flex items-center h-7 w-[52px] rounded-full transition-all duration-300 focus:outline-none border",style:{background:t?"rgb(34,197,94)":"var(--color-bg-tertiary)",borderColor:t?"rgba(34,197,94,0.5)":"var(--color-border)",opacity:i?.6:1,cursor:i?"wait":"pointer"},title:t?`Disable ${e}`:`Enable ${e}`,children:(0,a.jsx)("span",{className:"inline-block w-5 h-5 rounded-full shadow-md transition-all duration-300",style:{transform:t?"translateX(26px)":"translateX(3px)",background:t?"#fff":"var(--color-text-muted)"}})}),(0,a.jsx)("span",{className:"text-xs font-medium min-w-[24px]",style:{color:t?"rgb(34,197,94)":"var(--color-text-muted)"},children:i?"...":t?"ON":"OFF"})]})}function v({value:e,onChange:s,disabled:t,baseUrl:l}){let i={stdio:"omniroute --mcp",sse:`${l}/api/mcp/sse`,"streamable-http":`${l}/api/mcp/stream`};return(0,a.jsxs)("div",{className:"rounded-lg border p-4 mt-3",style:{borderColor:"var(--color-border)",background:"var(--color-bg-secondary)"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-rounded text-base",style:{color:"var(--color-primary)"},children:"swap_horiz"}),(0,a.jsx)("span",{className:"text-sm font-medium",style:{color:"var(--color-text)"},children:"Transport Mode"})]}),(0,a.jsx)("div",{className:"flex gap-2 flex-wrap",children:[{value:"stdio",label:"stdio",desc:"Local — IDE spawns process via omniroute --mcp"},{value:"sse",label:"SSE",desc:"Remote — Server-Sent Events over HTTP"},{value:"streamable-http",label:"Streamable HTTP",desc:"Remote — Modern bidirectional HTTP"}].map(l=>(0,a.jsxs)("button",{onClick:()=>s(l.value),disabled:t,className:"flex flex-col items-start px-4 py-2.5 rounded-lg border transition-all duration-200 text-left",style:{borderColor:e===l.value?"var(--color-primary)":"var(--color-border)",background:e===l.value?"rgba(var(--color-primary-rgb, 99,102,241), 0.1)":"transparent",opacity:t?.5:1,cursor:t?"wait":"pointer"},children:[(0,a.jsx)("span",{className:"text-sm font-semibold",style:{color:e===l.value?"var(--color-primary)":"var(--color-text)"},children:l.label}),(0,a.jsx)("span",{className:"text-xs mt-0.5",style:{color:"var(--color-text-muted)"},children:l.desc})]},l.value))}),(0,a.jsxs)("div",{className:"mt-3 rounded-md px-3 py-2 flex items-center gap-2",style:{background:"var(--color-bg-tertiary)"},children:[(0,a.jsx)("span",{className:"material-symbols-rounded text-sm",style:{color:"var(--color-text-muted)"},children:"stdio"===e?"terminal":"link"}),(0,a.jsx)("code",{className:"text-xs break-all",style:{color:"var(--color-text-muted)"},children:i[e]}),"stdio"!==e&&(0,a.jsx)("button",{className:"ml-auto text-xs px-2 py-0.5 rounded border hover:opacity-80 transition-opacity",style:{borderColor:"var(--color-border)",color:"var(--color-text-muted)"},onClick:()=>void navigator.clipboard.writeText(i[e]),title:"Copy URL",children:"Copy"})]})]})}function N(){let[e,s]=(0,l.useState)("endpoint-proxy"),t=(0,x.c)("endpoints"),[r,n]=(0,l.useState)({online:!1,loading:!0}),[o,c]=(0,l.useState)({online:!1,loading:!0}),[d,m]=(0,l.useState)(!1),[p,b]=(0,l.useState)(!1),[h,N]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[C,S]=(0,l.useState)("stdio"),[T,_]=(0,l.useState)(!1),[A,P]=(0,l.useState)("");(0,l.useEffect)(()=>{P(`${window.location.protocol}//${window.location.host}`)},[]),(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();m(!!s.mcpEnabled),b(!!s.a2aEnabled),S(s.mcpTransport||"stdio")}}catch{}})()},[]);let E=(0,l.useCallback)(async e=>fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),[]),$=(0,l.useCallback)(async e=>{let s="mcp"===e?N:w,t=!("mcp"===e?d:p);s(!0);try{(await E({["mcp"===e?"mcpEnabled":"a2aEnabled"]:t})).ok&&("mcp"===e?m:b)(t)}catch{}finally{s(!1)}},[d,p,E]),M=(0,l.useCallback)(async e=>{_(!0);try{(await E({mcpTransport:e})).ok&&S(e)}catch{}finally{_(!1)}},[E]),R=(0,l.useCallback)(async()=>{n(e=>({...e,loading:!0}));try{let e=await fetch("/api/mcp/status");if(e.ok){let s=await e.json();n({online:!!s.online,loading:!1})}else n({online:!1,loading:!1})}catch{n({online:!1,loading:!1})}},[]),D=(0,l.useCallback)(async()=>{c(e=>({...e,loading:!0}));try{let e=await fetch("/api/a2a/status");if(e.ok){let s=await e.json();c({online:"ok"===s.status,loading:!1})}else c({online:!1,loading:!1})}catch{c({online:!1,loading:!1})}},[]);return(0,l.useEffect)(()=>{let e=()=>{R(),D()};e();let s=setInterval(e,3e4);return()=>clearInterval(s)},[R,D]),(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsx)(i.Iz,{options:[{value:"endpoint-proxy",label:t("tabProxy"),icon:"api"},{value:"mcp",label:"MCP",icon:"hub"},{value:"a2a",label:"A2A",icon:"group_work"},{value:"api-endpoints",label:t("tabApiEndpoints"),icon:"code"}],value:e,onChange:s}),"mcp"===e&&(0,a.jsx)(y,{label:"MCP",status:r,enabled:d,onToggle:()=>void $("mcp"),toggling:h}),"a2a"===e&&(0,a.jsx)(y,{label:"A2A",status:o,enabled:p,onToggle:()=>void $("a2a"),toggling:k})]}),"mcp"===e&&d&&(0,a.jsx)(v,{value:C,onChange:e=>void M(e),disabled:T,baseUrl:A}),"endpoint-proxy"===e&&(0,a.jsx)(u,{machineId:""}),"mcp"===e&&(0,a.jsx)(g.default,{}),"a2a"===e&&(0,a.jsx)(f.default,{}),"api-endpoints"===e&&(0,a.jsx)(j,{})]})}},96944:(e,s,t)=>{Promise.resolve().then(t.bind(t,21583))}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,4726,4816,8441,3794,7358],()=>e(e.s=96944)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{21583:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>k});var a=t(95155),l=t(12115),i=t(40993),r=t(14051),n=t.n(r),o=t(98500),c=t.n(o),d=t(30949),m=t(20909),x=t(50910);let p=15e3;function u({machineId:e}){let s=(0,x.c)("endpoint"),t=(0,x.c)("common"),[r,n]=(0,l.useState)(!0),[o,m]=(0,l.useState)([]),[u,g]=(0,l.useState)(null),[f,j]=(0,l.useState)(!1),[y,v]=(0,l.useState)(!1),[N,k]=(0,l.useState)(!1),[w,C]=(0,l.useState)(!1),[S,T]=(0,l.useState)(null),[_,A]=(0,l.useState)(""),[P,E]=(0,l.useState)(!1),[$,M]=(0,l.useState)(null),[R,D]=(0,l.useState)("https://cloud.omniroute.online"),[O,I]=(0,l.useState)("api"),[q,U]=(0,l.useState)(null),[B,L]=(0,l.useState)(null),{copied:Q,copy:F}=(0,d.C)();(0,l.useEffect)(()=>{Promise.allSettled([H(),z(),W()]).finally(()=>{n(!1)})},[]);let z=async()=>{try{let e=await fetch("/v1/models");if(e.ok){let s=await e.json();m(s.data||[])}}catch(e){console.log("Error fetching models:",e)}},W=async()=>{try{let[e,s]=await Promise.allSettled([fetch("/api/mcp/status"),fetch("/api/a2a/status")]);"fulfilled"===e.status&&e.value.ok&&U(await e.value.json()),"fulfilled"===s.status&&s.value.ok&&L(await s.value.json())}catch{}},G=(0,l.useMemo)(()=>{let e=o.filter(e=>!e.type&&!e.parent),s=o.filter(e=>"embedding"===e.type&&!e.parent),t=o.filter(e=>"image"===e.type&&!e.parent),a=o.filter(e=>"rerank"===e.type&&!e.parent),l=o.filter(e=>"audio"===e.type&&"transcription"===e.subtype&&!e.parent),i=o.filter(e=>"audio"===e.type&&"speech"===e.subtype&&!e.parent);return{chat:e,embeddings:s,images:t,rerank:a,audioTranscription:l,audioSpeech:i,moderation:o.filter(e=>"moderation"===e.type&&!e.parent),music:o.filter(e=>"music"===e.type&&!e.parent)}},[o]),Z=async(e,t=p)=>{let a=new AbortController,l=setTimeout(()=>a.abort(),t);try{let s=await fetch("/api/sync/cloud",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e}),signal:a.signal}),t=await s.json().catch(()=>({}));return{ok:s.ok,status:s.status,data:t}}catch(e){if(e?.name==="AbortError")return{ok:!1,status:408,data:{error:s("cloudRequestTimeout")}};return{ok:!1,status:500,data:{error:e.message||s("cloudRequestFailed")}}}finally{clearTimeout(l)}},H=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();j(s.cloudEnabled||!1)}}catch(e){console.log("Error loading cloud settings:",e)}},J=e=>{e?v(!0):k(!0)};(0,l.useEffect)(()=>{if(S){let e=setTimeout(()=>T(null),5e3);return()=>clearTimeout(e)}},[S]),(0,l.useEffect)(()=>{let e=setInterval(W,3e4);return()=>clearInterval(e)},[]);let V=()=>{globalThis.dispatchEvent(new Event("cloud-status-changed"))},X=async()=>{C(!0),E(!1),A("syncing");try{let{ok:e,status:t,data:a}=await Z("enable");if(e)A("verifying"),await new Promise(e=>setTimeout(e,600)),j(!0),A("done"),E(!0),C(!1),V(),await new Promise(e=>setTimeout(e,1200)),v(!1),E(!1),a.verified?T({type:"success",message:s("cloudConnectedVerified")}):T({type:"warning",message:a.verifyError?s("connectedVerificationPendingWithError",{error:a.verifyError}):s("connectedVerificationPending")}),a.cloudUrl&&D(a.cloudUrl),await H();else{let e=a.error||s("failedEnable");(502===t||408===t)&&(e=s("cloudWorkerUnreachable")),T({type:"error",message:e}),v(!1)}}catch(e){T({type:"error",message:e.message||s("connectionFailed")}),v(!1)}finally{C(!1),A("")}},Y=async()=>{C(!0),A("syncing");try{await Z("sync"),A("disabling");let{ok:e,data:t}=await Z("disable");e?(j(!1),T({type:"success",message:s("cloudDisabledSuccess")}),k(!1),V(),await H()):T({type:"error",message:t.error||s("failedDisable")})}catch(e){console.log("Error disabling cloud:",e),T({type:"error",message:s("failedDisable")})}finally{C(!1),A("")}},[K,ee]=(0,l.useState)("/v1"),es=R?`${R}/v1`:null;if((0,l.useEffect)(()=>{ee(`${window.location.origin}/v1`)},[]),r)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(i.Qv,{}),(0,a.jsx)(i.Qv,{})]});let et=f&&es?es:K,ea=!!q?.online,el=B?.status==="ok",ei=Number(q?.heartbeat?.toolCount||0),er=Number(B?.tasks?.activeStreams||0);return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)(i.Zp,{className:"",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:s("title")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:f?s("usingCloudProxy"):s("usingLocalServer")}),e&&(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:s("machineId",{id:e.slice(0,8)})})]}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:f?(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"cloud_off",onClick:()=>J(!1),disabled:w,className:"bg-red-500/10! text-red-500! hover:bg-red-500/20! border-red-500/30!",children:s("disableCloud")}):(0,a.jsx)(i.$n,{variant:"primary",icon:"cloud_upload",onClick:()=>J(!0),disabled:w,className:"bg-linear-to-r from-primary to-blue-500 hover:from-primary-hover hover:to-blue-600",children:s("enableCloud")})})]}),S&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-4 py-2.5 rounded-lg mb-4 text-sm font-medium animate-in fade-in slide-in-from-top-2 duration-300 ${"success"===S.type?"bg-green-500/10 border border-green-500/30 text-green-400":"warning"===S.type?"bg-amber-500/10 border border-amber-500/30 text-amber-400":"bg-red-500/10 border border-red-500/30 text-red-400"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"success"===S.type?"check_circle":"warning"===S.type?"warning":"error"}),(0,a.jsx)("span",{className:"flex-1",children:S.message}),(0,a.jsx)("button",{onClick:()=>T(null),className:"p-0.5 hover:bg-white/10 rounded transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}),(0,a.jsxs)("div",{className:"flex gap-2 mb-3",children:[(0,a.jsx)(i.pd,{value:et,readOnly:!0,className:`flex-1 font-mono text-sm ${f?"animate-border-glow":""}`}),(0,a.jsx)(i.$n,{variant:"secondary",icon:"endpoint_url"===Q?"check":"content_copy",onClick:()=>F(et,"endpoint_url"),children:t("endpoint_url"===Q?"copied":"copy")})]})]}),(0,a.jsx)(i.Zp,{children:(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:s("sectionTitle")||"Integration Surface"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s("sectionDescription")||"OpenAI-compatible APIs and operational protocol endpoints"})]}),(0,a.jsx)(i.Iz,{options:[{value:"api",label:s("tabApis")||"OpenAI-compatible APIs",icon:"api"},{value:"protocols",label:s("tabProtocols")||"Protocols",icon:"hub"}],value:O,onChange:I,"aria-label":s("tabsAria")||"Endpoint sections"})]})}),"api"===O?(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:s("available")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s("modelsAcrossEndpoints",{models:Object.values(G).reduce((e,s)=>e+s.length,0),endpoints:[G.chat,G.embeddings,G.images,G.rerank,G.audioTranscription,G.audioSpeech,G.moderation,G.music].filter(e=>e.length>0).length+2})})]})}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm text-primary",children:"hub"}),(0,a.jsx)("h3",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:s("categoryCore")||"Core APIs"}),(0,a.jsx)("div",{className:"flex-1 h-px bg-border/50"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(h,{icon:"chat",iconColor:"text-blue-500",iconBg:"bg-blue-500/10",title:s("chatCompletions"),path:"/v1/chat/completions",description:s("chatDesc"),models:G.chat,expanded:"chat"===u,onToggle:()=>g("chat"===u?null:"chat"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"code",iconColor:"text-indigo-500",iconBg:"bg-indigo-500/10",title:s("responses")||"Responses API",path:"/v1/responses",description:s("responsesDesc")||"OpenAI Responses API for Codex and advanced agentic workflows",models:G.chat,expanded:"responses"===u,onToggle:()=>g("responses"===u?null:"responses"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"text_fields",iconColor:"text-orange-500",iconBg:"bg-orange-500/10",title:s("completionsLegacy")||"Completions (Legacy)",path:"/v1/completions",description:s("completionsLegacyDesc")||"Legacy OpenAI text completions — accepts both prompt and messages format",models:G.chat,expanded:"completions"===u,onToggle:()=>g("completions"===u?null:"completions"),copy:F,copied:Q,baseUrl:et})]})]}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm text-purple-400",children:"perm_media"}),(0,a.jsx)("h3",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:s("categoryMedia")||"Media & Multi-Modal"}),(0,a.jsx)("div",{className:"flex-1 h-px bg-border/50"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(h,{icon:"data_array",iconColor:"text-emerald-500",iconBg:"bg-emerald-500/10",title:s("embeddings"),path:"/v1/embeddings",description:s("embeddingsDesc"),models:G.embeddings,expanded:"embeddings"===u,onToggle:()=>g("embeddings"===u?null:"embeddings"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"image",iconColor:"text-purple-500",iconBg:"bg-purple-500/10",title:s("imageGeneration"),path:"/v1/images/generations",description:s("imageDesc"),models:G.images,expanded:"images"===u,onToggle:()=>g("images"===u?null:"images"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"mic",iconColor:"text-rose-500",iconBg:"bg-rose-500/10",title:s("audioTranscription"),path:"/v1/audio/transcriptions",description:s("audioTranscriptionDesc"),models:G.audioTranscription,expanded:"audioTranscription"===u,onToggle:()=>g("audioTranscription"===u?null:"audioTranscription"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"record_voice_over",iconColor:"text-cyan-500",iconBg:"bg-cyan-500/10",title:s("textToSpeech"),path:"/v1/audio/speech",description:s("textToSpeechDesc"),models:G.audioSpeech,expanded:"audioSpeech"===u,onToggle:()=>g("audioSpeech"===u?null:"audioSpeech"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"music_note",iconColor:"text-fuchsia-500",iconBg:"bg-fuchsia-500/10",title:s("musicGeneration")||"Music Generation",path:"/v1/music/generations",description:s("musicDesc")||"Generate music and audio tracks via ComfyUI (Stable Audio, MusicGen)",models:G.music,expanded:"music"===u,onToggle:()=>g("music"===u?null:"music"),copy:F,copied:Q,baseUrl:et})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm text-amber-400",children:"build"}),(0,a.jsx)("h3",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:s("categoryUtility")||"Utility & Management"}),(0,a.jsx)("div",{className:"flex-1 h-px bg-border/50"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(h,{icon:"sort",iconColor:"text-amber-500",iconBg:"bg-amber-500/10",title:s("rerank"),path:"/v1/rerank",description:s("rerankDesc"),models:G.rerank,expanded:"rerank"===u,onToggle:()=>g("rerank"===u?null:"rerank"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"shield",iconColor:"text-orange-500",iconBg:"bg-orange-500/10",title:s("moderations"),path:"/v1/moderations",description:s("moderationsDesc"),models:G.moderation,expanded:"moderation"===u,onToggle:()=>g("moderation"===u?null:"moderation"),copy:F,copied:Q,baseUrl:et}),(0,a.jsx)(h,{icon:"list",iconColor:"text-teal-500",iconBg:"bg-teal-500/10",title:s("listModels")||"List Models",path:"/v1/models",description:s("listModelsDesc")||"List all available models across all connected providers",models:[],expanded:"models"===u,onToggle:()=>g("models"===u?null:"models"),copy:F,copied:Q,baseUrl:et})]})]})]}):(0,a.jsx)(i.Zp,{children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:s("protocolsTitle")||"Protocols"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:s("protocolsDescription")||"MCP and A2A are first-class endpoints with dedicated observability and controls."})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4 bg-bg-subtle",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"hub"}),s("mcpCardTitle")||"MCP Server"]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:s("mcpCardDescription")||"Model Context Protocol over stdio"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-1 rounded-full font-semibold ${ea?"bg-green-500/15 text-green-500":"bg-red-500/15 text-red-500"}`,children:t(ea?"active":"inactive")})]}),(0,a.jsxs)("div",{className:"mt-3 text-xs text-text-muted space-y-1",children:[(0,a.jsxs)("p",{children:[s("protocolToolsLabel")||"Tools",":"," ",(0,a.jsx)("span",{className:"text-text-main font-semibold",children:ei||16})]}),(0,a.jsxs)("p",{children:[s("protocolLastActivity")||"Last activity",":"," ",(0,a.jsx)("span",{className:"text-text-main",children:q?.activity?.lastCallAt?new Date(q.activity.lastCallAt).toLocaleString():"—"})]})]}),(0,a.jsxs)("div",{className:"mt-3 rounded-lg bg-bg p-3 border border-border/70",children:[(0,a.jsx)("p",{className:"text-xs font-semibold mb-1",children:s("quickStart")||"Quick Start"}),(0,a.jsx)("code",{className:"text-xs font-mono break-all",children:"omniroute --mcp"})]}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(c(),{href:"/dashboard/mcp",className:"text-sm text-primary hover:text-primary-hover transition-colors",children:[s("openMcpDashboard")||"Open MCP management"," →"]})})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4 bg-bg-subtle",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"group_work"}),s("a2aCardTitle")||"A2A Server"]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:s("a2aCardDescription")||"Agent2Agent JSON-RPC endpoint"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-1 rounded-full font-semibold ${el?"bg-green-500/15 text-green-500":"bg-red-500/15 text-red-500"}`,children:t(el?"active":"inactive")})]}),(0,a.jsxs)("div",{className:"mt-3 text-xs text-text-muted space-y-1",children:[(0,a.jsxs)("p",{children:[s("protocolTasksLabel")||"Tasks",":"," ",(0,a.jsx)("span",{className:"text-text-main font-semibold",children:B?.tasks?.total||0})]}),(0,a.jsxs)("p",{children:[s("protocolActiveStreamsLabel")||"Active streams",":"," ",(0,a.jsx)("span",{className:"text-text-main font-semibold",children:er})]})]}),(0,a.jsxs)("div",{className:"mt-3 rounded-lg bg-bg p-3 border border-border/70",children:[(0,a.jsx)("p",{className:"text-xs font-semibold mb-1",children:s("quickStart")||"Quick Start"}),(0,a.jsxs)("code",{className:"text-xs font-mono break-all",children:[K.replace(/\/v1$/,""),"/a2a"]})]}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(c(),{href:"/dashboard/a2a",className:"text-sm text-primary hover:text-primary-hover transition-colors",children:[s("openA2aDashboard")||"Open A2A management"," →"]})})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4 bg-bg-subtle",children:[(0,a.jsx)("h4",{className:"font-semibold mb-2",children:s("mcpQuickStartTitle")||"MCP Quick Start"}),(0,a.jsxs)("ol",{className:"text-sm text-text-muted space-y-1 list-decimal list-inside",children:[(0,a.jsx)("li",{children:s("mcpQuickStartStep1")||"Run the MCP server via `omniroute --mcp`."}),(0,a.jsx)("li",{children:s("mcpQuickStartStep2")||"Configure your MCP client to connect over stdio transport."}),(0,a.jsx)("li",{children:s("mcpQuickStartStep3")||"Invoke tools such as `omniroute_get_health` and `omniroute_list_combos`."})]})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4 bg-bg-subtle",children:[(0,a.jsx)("h4",{className:"font-semibold mb-2",children:s("a2aQuickStartTitle")||"A2A Quick Start"}),(0,a.jsxs)("ol",{className:"text-sm text-text-muted space-y-1 list-decimal list-inside",children:[(0,a.jsx)("li",{children:s("a2aQuickStartStep1")||"Discover the agent card at `/.well-known/agent.json`."}),(0,a.jsx)("li",{children:s("a2aQuickStartStep2")||"Send JSON-RPC requests to `POST /a2a` using `message/send` or `message/stream`."}),(0,a.jsx)("li",{children:s("a2aQuickStartStep3")||"Track and control tasks using `tasks/get` and `tasks/cancel`."})]})]})]})]})}),(0,a.jsx)(i.aF,{isOpen:y,title:s("enableCloudTitle"),onClose:()=>v(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200 font-medium mb-2",children:s("whatYouGet")}),(0,a.jsxs)("ul",{className:"text-sm text-blue-700 dark:text-blue-300 space-y-1",children:[(0,a.jsxs)("li",{children:["• ",s("cloudBenefitAccess")]}),(0,a.jsxs)("li",{children:["• ",s("cloudBenefitShare")]}),(0,a.jsxs)("li",{children:["• ",s("cloudBenefitPorts")]}),(0,a.jsxs)("li",{children:["• ",s("cloudBenefitEdge")]})]})]}),(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 font-medium mb-1",children:t("note")}),(0,a.jsxs)("ul",{className:"text-sm text-yellow-700 dark:text-yellow-300 space-y-1",children:[(0,a.jsxs)("li",{children:["• ",s("cloudSessionNote")]}),(0,a.jsxs)("li",{children:["• ",s("cloudUnstableNote")]})]})]}),(w||P)&&(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border transition-all duration-300 ${P?"bg-green-500/10 border-green-500/30":"bg-primary/10 border-primary/30"}`,children:[P?(0,a.jsx)("span",{className:"material-symbols-outlined text-green-500 text-xl",children:"check_circle"}):(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-primary",children:"progress_activity"}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)("p",{className:`text-sm font-medium ${P?"text-green-500":"text-primary"}`,children:[P&&s("cloudConnected"),!P&&"syncing"===_&&s("connectingToCloud"),!P&&"verifying"===_&&s("verifyingConnection")]})})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:X,fullWidth:!0,disabled:w||P,children:w?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"syncing"===_?s("connecting"):s("verifying")]}):P?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"}),s("connected")]}):s("enableCloud")}),(0,a.jsx)(i.$n,{onClick:()=>v(!1),variant:"ghost",fullWidth:!0,disabled:w||P,children:t("cancel")})]})]})}),(0,a.jsx)(i.aF,{isOpen:N,title:s("disableCloudTitle"),onClose:()=>!w&&k(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-600 dark:text-red-400",children:"warning"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium mb-1",children:t("warning")}),(0,a.jsx)("p",{className:"text-sm text-red-700 dark:text-red-300",children:s("disableWarning")})]})]})}),w&&(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-primary/10 border border-primary/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-primary",children:"progress_activity"}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)("p",{className:"text-sm font-medium text-primary",children:["syncing"===_&&s("syncingData"),"disabling"===_&&s("disablingCloud")]})})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s("disableConfirm")}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:Y,fullWidth:!0,disabled:w,className:"bg-red-500! hover:bg-red-600! text-white!",children:w?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"syncing"===_?s("syncing"):s("disabling")]}):s("disableCloud")}),(0,a.jsx)(i.$n,{onClick:()=>k(!1),variant:"ghost",fullWidth:!0,disabled:w,children:t("cancel")})]})]})}),$&&(0,a.jsx)(b,{provider:$,models:o,copy:F,copied:Q,onClose:()=>M(null)})]})}function b({provider:e,models:s,copy:t,copied:r,onClose:n}){let o=(0,x.c)("endpoint"),c=(0,x.c)("common"),d=e.provider.alias||e.id,m=(0,l.useMemo)(()=>s.filter(s=>!s.parent&&(s.owned_by===d||s.owned_by===e.id)),[s,d,e.id]),p=m.filter(e=>!e.type),u=m.filter(e=>"embedding"===e.type),b=m.filter(e=>"image"===e.type),h=(e,s,l)=>0===l.length?null:(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2 flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s}),e," (",l.length,")"]}),(0,a.jsx)("div",{className:"flex flex-col gap-1",children:l.map(e=>{let s=`modal-${e.id}`;return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-surface/60 group",children:[(0,a.jsx)("code",{className:"text-sm font-mono flex-1 truncate",children:e.id}),e.custom&&(0,a.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-primary/10 text-primary",children:o("custom")}),(0,a.jsx)("button",{onClick:()=>t(e.id,s),className:"p-1 hover:bg-sidebar rounded text-text-muted hover:text-primary opacity-0 group-hover:opacity-100 transition-opacity",title:c("copy"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:r===s?"check":"content_copy"})})]},e.id)})})]});return(0,a.jsx)(i.aF,{isOpen:!0,onClose:n,title:o("providerModelsTitle",{provider:e.provider.name}),children:(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:0===m.length?(0,a.jsx)("p",{className:"text-sm text-text-muted py-4 text-center",children:o("noModelsForProvider")}):(0,a.jsxs)(a.Fragment,{children:[h(o("chat"),"chat",p),h(o("embedding"),"data_array",u),h(o("image"),"image",b)]})})})}function h({icon:e,iconColor:s,iconBg:t,title:i,path:r,description:n,models:o,expanded:c,onToggle:d,copy:p,copied:u,baseUrl:b}){let h=(0,x.c)("endpoint"),g=(0,l.useMemo)(()=>{let e={};for(let s of o){let t=s.owned_by||"unknown";e[t]||(e[t]=[]),e[t].push(s)}return Object.entries(e).sort((e,s)=>s[1].length-e[1].length)},[o]),f=e=>m.Q2[e]||(0,m.zt)(e),j=`endpoint_${r}`;return(0,a.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,a.jsxs)("button",{onClick:d,className:"w-full flex items-center gap-3 p-4 hover:bg-surface/50 transition-colors text-left",children:[(0,a.jsx)("div",{className:`flex items-center justify-center size-10 rounded-lg ${t} shrink-0`,children:(0,a.jsx)("span",{className:`material-symbols-outlined text-xl ${s}`,children:e})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-semibold text-sm",children:i}),(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-full bg-surface text-text-muted font-medium",children:h("modelsCount",{count:o.length})})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:n})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-lg transition-transform ${c?"rotate-180":""}`,children:"expand_more"})]}),c&&(0,a.jsxs)("div",{className:"border-t border-border px-4 pb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-3 mb-3",children:[(0,a.jsxs)("code",{className:"flex-1 text-xs font-mono text-text-muted bg-surface/80 px-3 py-1.5 rounded-lg truncate",children:[b.replace(/\/v1$/,""),r]}),(0,a.jsx)("button",{onClick:()=>p(`${b.replace(/\/v1$/,"")}${r}`,j),className:"p-1.5 hover:bg-surface rounded-lg text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:u===j?"check":"content_copy"})})]}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:g.map(([e,s])=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("div",{className:"size-2.5 rounded-full shrink-0",style:{backgroundColor:f(e)?.color||"#888"}}),(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main",children:f(e)?.name||e}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["(",s.length,")"]})]}),(0,a.jsx)("div",{className:"ml-5 flex flex-wrap gap-1.5",children:s.map(e=>(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-md bg-surface/80 text-text-muted font-mono",title:e.id,children:e.root||e.id.split("/").pop()},e.id))})]},e))})]})]})}u.propTypes={machineId:n().string.isRequired},b.propTypes={provider:n().object.isRequired,models:n().array.isRequired,copy:n().func.isRequired,copied:n().string,onClose:n().func.isRequired},h.propTypes={icon:n().string.isRequired,iconColor:n().string.isRequired,iconBg:n().string.isRequired,title:n().string.isRequired,path:n().string.isRequired,description:n().string.isRequired,models:n().array.isRequired,expanded:n().bool.isRequired,onToggle:n().func.isRequired,copy:n().func.isRequired,copied:n().string,baseUrl:n().string.isRequired};var g=t(24726),f=t(14816);function j(){let e=(0,x.c)("endpoints");return(0,a.jsxs)("div",{className:"p-6 max-w-5xl mx-auto space-y-6",children:[(0,a.jsxs)(i.Zp,{className:"p-8 text-center space-y-4",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-16 rounded-2xl bg-primary/10 text-primary mx-auto",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"code"})}),(0,a.jsx)("h2",{className:"text-xl font-semibold",children:e("apiEndpointsTitle")}),(0,a.jsx)("p",{className:"text-sm text-text-muted max-w-md mx-auto",children:e("apiEndpointsDescription")}),(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-amber-500/10 text-amber-500 text-sm font-medium",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"construction"}),e("comingSoon")]})]}),(0,a.jsxs)(i.Zp,{className:"p-5",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold mb-3",children:e("plannedFeatures")}),(0,a.jsxs)("ul",{className:"space-y-2 text-sm text-text-muted",children:[(0,a.jsxs)("li",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check_circle"}),e("featureRestApi")]}),(0,a.jsxs)("li",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check_circle"}),e("featureWebhooks")]}),(0,a.jsxs)("li",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check_circle"}),e("featureSwagger")]}),(0,a.jsxs)("li",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check_circle"}),e("featureAuth")]})]})]})]})}var y=t(32661);function v({label:e,status:s,enabled:t,onToggle:l,toggling:i}){return(0,a.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium border",style:{borderColor:s.loading?"var(--color-border)":s.online?"rgba(34,197,94,0.3)":"rgba(239,68,68,0.3)",background:s.loading?"transparent":s.online?"rgba(34,197,94,0.1)":"rgba(239,68,68,0.1)",color:s.loading?"var(--color-text-muted)":s.online?"rgb(34,197,94)":"rgb(239,68,68)"},children:[(0,a.jsx)("span",{className:"inline-block w-2 h-2 rounded-full",style:{background:s.loading?"var(--color-text-muted)":s.online?"rgb(34,197,94)":"rgb(239,68,68)",animation:s.online?"pulse 2s infinite":"none"}}),s.loading?"...":s.online?"Online":"Offline"]}),(0,a.jsx)("button",{onClick:l,disabled:i,className:"relative inline-flex items-center h-7 w-[52px] rounded-full transition-all duration-300 focus:outline-none border",style:{background:t?"rgb(34,197,94)":"var(--color-bg-tertiary)",borderColor:t?"rgba(34,197,94,0.5)":"var(--color-border)",opacity:i?.6:1,cursor:i?"wait":"pointer"},title:t?`Disable ${e}`:`Enable ${e}`,children:(0,a.jsx)("span",{className:"inline-block w-5 h-5 rounded-full shadow-md transition-all duration-300",style:{transform:t?"translateX(26px)":"translateX(3px)",background:t?"#fff":"var(--color-text-muted)"}})}),(0,a.jsx)("span",{className:"text-xs font-medium min-w-[24px]",style:{color:t?"rgb(34,197,94)":"var(--color-text-muted)"},children:i?"...":t?"ON":"OFF"})]})}function N({value:e,onChange:s,disabled:t,baseUrl:l}){let i={stdio:"omniroute --mcp",sse:`${l}/api/mcp/sse`,"streamable-http":`${l}/api/mcp/stream`};return(0,a.jsxs)("div",{className:"rounded-lg border p-4 mt-3",style:{borderColor:"var(--color-border)",background:"var(--color-bg-secondary)"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-rounded text-base",style:{color:"var(--color-primary)"},children:"swap_horiz"}),(0,a.jsx)("span",{className:"text-sm font-medium",style:{color:"var(--color-text)"},children:"Transport Mode"})]}),(0,a.jsx)("div",{className:"flex gap-2 flex-wrap",children:[{value:"stdio",label:"stdio",desc:"Local — IDE spawns process via omniroute --mcp"},{value:"sse",label:"SSE",desc:"Remote — Server-Sent Events over HTTP"},{value:"streamable-http",label:"Streamable HTTP",desc:"Remote — Modern bidirectional HTTP"}].map(l=>(0,a.jsxs)("button",{onClick:()=>s(l.value),disabled:t,className:"flex flex-col items-start px-4 py-2.5 rounded-lg border transition-all duration-200 text-left",style:{borderColor:e===l.value?"var(--color-primary)":"var(--color-border)",background:e===l.value?"rgba(var(--color-primary-rgb, 99,102,241), 0.1)":"transparent",opacity:t?.5:1,cursor:t?"wait":"pointer"},children:[(0,a.jsx)("span",{className:"text-sm font-semibold",style:{color:e===l.value?"var(--color-primary)":"var(--color-text)"},children:l.label}),(0,a.jsx)("span",{className:"text-xs mt-0.5",style:{color:"var(--color-text-muted)"},children:l.desc})]},l.value))}),(0,a.jsxs)("div",{className:"mt-3 rounded-md px-3 py-2 flex items-center gap-2",style:{background:"var(--color-bg-tertiary)"},children:[(0,a.jsx)("span",{className:"material-symbols-rounded text-sm",style:{color:"var(--color-text-muted)"},children:"stdio"===e?"terminal":"link"}),(0,a.jsx)("code",{className:"text-xs break-all",style:{color:"var(--color-text-muted)"},children:i[e]}),"stdio"!==e&&(0,a.jsx)("button",{className:"ml-auto text-xs px-2 py-0.5 rounded border hover:opacity-80 transition-opacity",style:{borderColor:"var(--color-border)",color:"var(--color-text-muted)"},onClick:()=>void(0,y.l)(i[e]),title:"Copy URL",children:"Copy"})]})]})}function k(){let[e,s]=(0,l.useState)("endpoint-proxy"),t=(0,x.c)("endpoints"),[r,n]=(0,l.useState)({online:!1,loading:!0}),[o,c]=(0,l.useState)({online:!1,loading:!0}),[d,m]=(0,l.useState)(!1),[p,b]=(0,l.useState)(!1),[h,y]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[C,S]=(0,l.useState)("stdio"),[T,_]=(0,l.useState)(!1),[A,P]=(0,l.useState)("");(0,l.useEffect)(()=>{P(`${window.location.protocol}//${window.location.host}`)},[]),(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();m(!!s.mcpEnabled),b(!!s.a2aEnabled),S(s.mcpTransport||"stdio")}}catch{}})()},[]);let E=(0,l.useCallback)(async e=>fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),[]),$=(0,l.useCallback)(async e=>{let s="mcp"===e?y:w,t=!("mcp"===e?d:p);s(!0);try{(await E({["mcp"===e?"mcpEnabled":"a2aEnabled"]:t})).ok&&("mcp"===e?m:b)(t)}catch{}finally{s(!1)}},[d,p,E]),M=(0,l.useCallback)(async e=>{_(!0);try{(await E({mcpTransport:e})).ok&&S(e)}catch{}finally{_(!1)}},[E]),R=(0,l.useCallback)(async()=>{n(e=>({...e,loading:!0}));try{let e=await fetch("/api/mcp/status");if(e.ok){let s=await e.json();n({online:!!s.online,loading:!1})}else n({online:!1,loading:!1})}catch{n({online:!1,loading:!1})}},[]),D=(0,l.useCallback)(async()=>{c(e=>({...e,loading:!0}));try{let e=await fetch("/api/a2a/status");if(e.ok){let s=await e.json();c({online:"ok"===s.status,loading:!1})}else c({online:!1,loading:!1})}catch{c({online:!1,loading:!1})}},[]);return(0,l.useEffect)(()=>{let e=()=>{R(),D()};e();let s=setInterval(e,3e4);return()=>clearInterval(s)},[R,D]),(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsx)(i.Iz,{options:[{value:"endpoint-proxy",label:t("tabProxy"),icon:"api"},{value:"mcp",label:"MCP",icon:"hub"},{value:"a2a",label:"A2A",icon:"group_work"},{value:"api-endpoints",label:t("tabApiEndpoints"),icon:"code"}],value:e,onChange:s}),"mcp"===e&&(0,a.jsx)(v,{label:"MCP",status:r,enabled:d,onToggle:()=>void $("mcp"),toggling:h}),"a2a"===e&&(0,a.jsx)(v,{label:"A2A",status:o,enabled:p,onToggle:()=>void $("a2a"),toggling:k})]}),"mcp"===e&&d&&(0,a.jsx)(N,{value:C,onChange:e=>void M(e),disabled:T,baseUrl:A}),"endpoint-proxy"===e&&(0,a.jsx)(u,{machineId:""}),"mcp"===e&&(0,a.jsx)(g.default,{}),"a2a"===e&&(0,a.jsx)(f.default,{}),"api-endpoints"===e&&(0,a.jsx)(j,{})]})}},96944:(e,s,t)=>{Promise.resolve().then(t.bind(t,21583))}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,4726,4816,8441,3794,7358],()=>e(e.s=96944)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8013],{40993:(e,t,r)=>{"use strict";r.d(t,{Ex:()=>i.default,$n:()=>l.default,Zp:()=>s.default,Qv:()=>c.CardSkeleton,G9:()=>f.default,bQ:()=>w.default,pp:()=>j.default,Qn:()=>N.default,pd:()=>a.default,Mh:()=>v.default,uR:()=>m.default,aF:()=>n.default,rq:()=>u.default,LF:()=>x.default,KN:()=>g.default,Lo:()=>h.default,y7:()=>b.default,Iz:()=>y.default,l6:()=>o.default,lM:()=>d.default,cn:()=>p.default});var l=r(35806),a=r(34422),o=r(42994),s=r(81060),n=r(71361),c=r(92542);r(17705);var i=r(80927),d=r(19790);r(6261),r(55846),r(34243),r(89938),r(99023);var x=r(80178),u=r(85444),m=r(91961);r(25112);var p=r(45624),b=r(37415),g=r(48643),h=r(8287);r(1652);var v=r(92701);r(18150);var f=r(71689),y=r(33709);r(76332);var j=r(66200);r(61580);var N=r(51503);r(54128);var w=r(44638);r(21720),r(97050)},56646:(e,t,r)=>{Promise.resolve().then(r.bind(r,58802))},58802:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var l=r(95155),a=r(12115),o=r(40993),s=r(50910),n=r(32661);let c={debug:"text-gray-400",trace:"text-gray-500",info:"text-cyan-400",warn:"text-yellow-400",error:"text-red-400",fatal:"text-fuchsia-400"},i={debug:"bg-gray-500/10 border-gray-500/20",trace:"bg-gray-500/10 border-gray-500/20",info:"bg-cyan-500/10 border-cyan-500/20",warn:"bg-yellow-500/10 border-yellow-500/20",error:"bg-red-500/10 border-red-500/20",fatal:"bg-fuchsia-500/10 border-fuchsia-500/20"};function d(){let e=(0,s.c)("loggers"),[t,r]=(0,a.useState)([]),[o,d]=(0,a.useState)(!0),[x,u]=(0,a.useState)(null),[m,p]=(0,a.useState)("all"),[b,g]=(0,a.useState)(""),[h,v]=(0,a.useState)(!0),[f,y]=(0,a.useState)(null),[j,N]=(0,a.useState)(null),w=(0,a.useRef)(null),S=(0,a.useCallback)(async()=>{try{let e=new URLSearchParams;"all"!==m&&e.set("level",m),e.set("limit","500");let t=await fetch(`/api/logs/console?${e.toString()}`);if(!t.ok)throw Error(`HTTP ${t.status}`);let l=await t.json();r(l),y(new Date),u(null)}catch(e){u(e.message||"Failed to fetch logs")}finally{d(!1)}},[m]);(0,a.useEffect)(()=>{S();let e=setInterval(S,5e3);return()=>clearInterval(e)},[S]),(0,a.useEffect)(()=>{h&&w.current&&(w.current.scrollTop=w.current.scrollHeight)},[t,h]);let k=async(e,t)=>{let r=JSON.stringify(e,null,2);await (0,n.l)(r)?(u(null),N(t),setTimeout(()=>N(null),2e3)):u("Failed to copy log entry")},L=b?t.filter(e=>JSON.stringify(e).toLowerCase().includes(b.toLowerCase())):t;return(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-3 p-4 rounded-xl bg-[var(--color-surface)] border border-[var(--color-border)]",children:[(0,l.jsxs)("select",{value:m,onChange:e=>p(e.target.value),"aria-label":"Filter by log level",className:"px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] focus:outline-2 focus:outline-[var(--color-accent)]",children:[(0,l.jsx)("option",{value:"all",children:e("allLevels")}),(0,l.jsx)("option",{value:"debug",children:"Debug+"}),(0,l.jsx)("option",{value:"info",children:"Info+"}),(0,l.jsx)("option",{value:"warn",children:"Warn+"}),(0,l.jsx)("option",{value:"error",children:"Error+"})]}),(0,l.jsx)("input",{type:"text",placeholder:"Search logs...",value:b,onChange:e=>g(e.target.value),"aria-label":"Search log entries",className:"flex-1 min-w-[200px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,l.jsxs)("button",{onClick:()=>v(!h),title:h?"Disable auto-scroll":"Enable auto-scroll",className:`px-3 py-2 rounded-lg text-sm font-medium border transition-colors ${h?"bg-cyan-500/15 text-cyan-400 border-cyan-500/30":"bg-[var(--color-bg)] text-[var(--color-text-muted)] border-[var(--color-border)]"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle mr-1",children:h?"vertical_align_bottom":"lock"}),"Auto-scroll"]}),(0,l.jsx)("button",{onClick:S,disabled:o,className:"px-3 py-2 rounded-lg text-sm font-medium bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-50 transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle",children:"refresh"})}),(0,l.jsxs)("div",{className:"flex items-center gap-2 ml-auto text-xs text-[var(--color-text-muted)]",children:[(0,l.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500 animate-pulse"}),(0,l.jsxs)("span",{children:[L.length," entries"]}),(0,l.jsx)("span",{className:"text-[var(--color-text-muted)]/50",children:"•"}),(0,l.jsx)("span",{children:"Last 1h"}),f&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"text-[var(--color-text-muted)]/50",children:"•"}),(0,l.jsxs)("span",{children:["Updated ",f.toLocaleTimeString()]})]})]})]}),x&&(0,l.jsxs)("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 text-red-400 text-sm",role:"alert",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle mr-2",children:"error"}),x,(0,l.jsx)("span",{className:"text-xs ml-2 opacity-70",children:"— Make sure the application is writing logs to file (LOG_TO_FILE=true)"})]}),(0,l.jsxs)("div",{ref:w,className:"rounded-xl border border-[var(--color-border)] bg-[#0d1117] overflow-auto font-mono text-xs leading-relaxed",style:{maxHeight:"calc(100vh - 340px)",minHeight:"400px"},role:"log","aria-label":"Application console logs","aria-live":"polite",children:[(0,l.jsxs)("div",{className:"sticky top-0 z-10 px-4 py-2 bg-[#161b22] border-b border-[#30363d] flex items-center gap-2",children:[(0,l.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,l.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,l.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"}),(0,l.jsx)("span",{className:"ml-3 text-[#8b949e] text-[11px]",children:"OmniRoute — Application Console"})]}),(0,l.jsxs)("div",{className:"p-3 space-y-px",children:[0!==L.length||o?L.map((e,t)=>{let r=(e.level||"info").toLowerCase(),a=c[r]||c.info,o=i[r]||"",s=e.component||e.module||"",n=e.msg||e.message||"";return(0,l.jsxs)("div",{className:`group flex items-start gap-2 px-2 py-1 rounded hover:bg-white/5 transition-colors ${"error"===r||"fatal"===r?"bg-red-500/5":""}`,children:[(0,l.jsx)("span",{className:"text-[#484f58] whitespace-nowrap shrink-0 select-none",children:(e=>{try{return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}catch{return e}})(e.timestamp)}),(0,l.jsx)("span",{className:`inline-block px-1.5 py-0 rounded text-[10px] font-semibold uppercase border shrink-0 ${a} ${o}`,children:r.padEnd(5)}),s&&(0,l.jsxs)("span",{className:"text-purple-400/80 shrink-0",children:["[",s,"]"]}),(0,l.jsxs)("span",{className:"text-[#c9d1d9] flex-1 break-all",children:[n,e.correlationId&&(0,l.jsxs)("span",{className:"text-[#484f58] ml-2",children:["cid:",e.correlationId.slice(0,8)]})]}),(0,l.jsx)("button",{onClick:()=>k(e,t),title:"Copy log entry",className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0 text-[#8b949e] hover:text-white",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:j===t?"check":"content_copy"})})]},t)}):(0,l.jsxs)("div",{className:"text-[#8b949e] text-center py-12",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[40px] block mb-2 opacity-30",children:"terminal"}),(0,l.jsx)("p",{children:e("noLogEntries")}),(0,l.jsx)("p",{className:"text-[10px] mt-1 opacity-60",children:"Ensure LOG_TO_FILE=true is set in your .env file"})]}),o&&0===L.length&&(0,l.jsxs)("div",{className:"text-[#8b949e] text-center py-12",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[24px] animate-spin block mb-2",children:"progress_activity"}),"Loading logs..."]})]})]})]})}function x(){let[e,t]=(0,a.useState)([]),[r,o]=(0,a.useState)(!0),[n,c]=(0,a.useState)(null),[i,d]=(0,a.useState)(""),[x,u]=(0,a.useState)(""),[m,p]=(0,a.useState)(0),[b,g]=(0,a.useState)(!1),h=(0,s.c)("logs"),v=(0,a.useCallback)(async()=>{o(!0),c(null);try{let e=new URLSearchParams;i&&e.set("action",i),x&&e.set("actor",x),e.set("limit",String(26)),e.set("offset",String(m));let r=await fetch(`/api/compliance/audit-log?${e.toString()}`);if(!r.ok)throw Error(h("failedFetchAuditLog"));let l=await r.json();g(l.length>25),t(l.slice(0,25))}catch(e){c(e.message||h("failedFetchAuditLog"))}finally{o(!1)}},[i,x,m,h]);(0,a.useEffect)(()=>{v()},[v]);let f=()=>{p(0),v()};return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-xl font-bold text-[var(--color-text-main)]",children:h("auditLog")}),(0,l.jsx)("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:h("auditLogDesc")})]}),(0,l.jsx)("button",{onClick:v,disabled:r,"aria-label":h("refreshAuditLogAria"),className:"px-4 py-2 rounded-lg text-sm font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] transition-colors disabled:opacity-50",children:r?h("loading"):h("refresh")})]}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-3 p-4 rounded-xl bg-[var(--color-surface)] border border-[var(--color-border)]",role:"search","aria-label":h("filterEntriesAria"),children:[(0,l.jsx)("input",{type:"text",placeholder:h("filterByAction"),value:i,onChange:e=>d(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),"aria-label":h("filterByActionTypeAria"),className:"flex-1 min-w-[180px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,l.jsx)("input",{type:"text",placeholder:h("filterByActor"),value:x,onChange:e=>u(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),"aria-label":h("filterByActorAria"),className:"flex-1 min-w-[180px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,l.jsx)("button",{onClick:f,className:"px-4 py-2 rounded-lg text-sm font-medium bg-[var(--color-accent)] text-white hover:bg-[var(--color-accent-hover)] transition-colors focus:outline-2 focus:outline-offset-2 focus:outline-[var(--color-accent)]",children:h("search")})]}),n&&(0,l.jsx)("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 text-red-400 text-sm",role:"alert",children:n}),(0,l.jsx)("div",{className:"overflow-x-auto rounded-xl border border-[var(--color-border)]",children:(0,l.jsxs)("table",{className:"w-full text-sm",role:"table","aria-label":h("tableAria"),children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{className:"bg-[var(--color-bg-alt)] border-b border-[var(--color-border)]",children:[(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("timestamp")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("action")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("actor")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("target")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("details")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("ipAddress")})]})}),(0,l.jsx)("tbody",{children:0!==e.length||r?e.map(e=>{var t;return(0,l.jsxs)("tr",{className:"border-b border-[var(--color-border)] hover:bg-[var(--color-bg-alt)] transition-colors",children:[(0,l.jsx)("td",{className:"px-4 py-3 whitespace-nowrap text-[var(--color-text-muted)] font-mono text-xs",children:(e=>{try{return new Date(e).toLocaleString()}catch{return e}})(e.timestamp)}),(0,l.jsx)("td",{className:"px-4 py-3",children:(0,l.jsx)("span",{className:`inline-block px-2 py-0.5 rounded-md text-xs font-medium border ${(t=e.action).includes("delete")||t.includes("remove")?"bg-red-500/15 text-red-400 border-red-500/20":t.includes("create")||t.includes("add")?"bg-green-500/15 text-green-400 border-green-500/20":t.includes("update")||t.includes("change")?"bg-blue-500/15 text-blue-400 border-blue-500/20":t.includes("login")||t.includes("auth")?"bg-purple-500/15 text-purple-400 border-purple-500/20":"bg-gray-500/15 text-gray-400 border-gray-500/20"}`,children:e.action})}),(0,l.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-main)]",children:e.actor}),(0,l.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] max-w-[200px] truncate",children:e.target||h("notAvailable")}),(0,l.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] max-w-[300px] truncate font-mono text-xs",children:e.details?JSON.stringify(e.details):h("notAvailable")}),(0,l.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] font-mono text-xs whitespace-nowrap",children:e.ip_address||h("notAvailable")})]},e.id)}):(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:6,className:"px-4 py-8 text-center text-[var(--color-text-muted)]",children:h("noEntries")})})})]})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("p",{className:"text-xs text-[var(--color-text-muted)]",children:h("showing",{count:e.length,offset:m})}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsxs)("button",{onClick:()=>p(Math.max(0,m-25)),disabled:0===m,className:"px-3 py-1.5 rounded-lg text-xs font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-30 transition-colors",children:["← ",h("previous")]}),(0,l.jsxs)("button",{onClick:()=>p(m+25),disabled:!b,className:"px-3 py-1.5 rounded-lg text-xs font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-30 transition-colors",children:[h("next")," →"]})]})]})]})}function u(){let[e,t]=(0,a.useState)("request-logs"),r=(0,s.c)("logs");return(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(o.Iz,{options:[{value:"request-logs",label:r("requestLogs")},{value:"proxy-logs",label:r("proxyLogs")},{value:"audit-logs",label:r("auditLog")},{value:"console",label:r("console")}],value:e,onChange:t}),"request-logs"===e&&(0,l.jsx)(o.y7,{}),"proxy-logs"===e&&(0,l.jsx)(o.Lo,{}),"audit-logs"===e&&(0,l.jsx)(x,{}),"console"===e&&(0,l.jsx)(d,{})]})}}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=56646)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1606],{20433:(e,a,t)=>{Promise.resolve().then(t.bind(t,38701))},38701:(e,a,t)=>{"use strict";t.d(a,{default:()=>b});var i=t(95155),r=t(12115),s=t(50910),n=t(98500),l=t.n(n);let d={image:{icon:"image",endpoint:"/api/v1/images/generations",label:"Image Generation",placeholder:"A serene landscape with mountains at sunset...",color:"from-purple-500 to-pink-500",needsCredentials:["openai","xai","fireworks","nebius","hyperbolic"]},video:{icon:"videocam",endpoint:"/api/v1/videos/generations",label:"Video Generation",placeholder:"A timelapse of a flower blooming...",color:"from-blue-500 to-cyan-500",needsCredentials:[]},music:{icon:"music_note",endpoint:"/api/v1/music/generations",label:"Music Generation",placeholder:"Upbeat electronic music with synth pads...",color:"from-orange-500 to-yellow-500",needsCredentials:[]},speech:{icon:"record_voice_over",endpoint:"/api/v1/audio/speech",label:"Text to Speech",placeholder:"Hello! Welcome to OmniRoute, your intelligent AI gateway...",color:"from-green-500 to-teal-500",textLabel:"Text",needsCredentials:["openai","elevenlabs","deepgram"]},transcription:{icon:"mic",endpoint:"/api/v1/audio/transcriptions",label:"Transcription",placeholder:"Upload an audio file to transcribe...",color:"from-indigo-500 to-blue-500",needsCredentials:["deepgram","groq","openai"]}},o={image:[{id:"openai",name:"OpenAI",models:[{id:"openai/dall-e-3",name:"DALL-E 3"},{id:"openai/dall-e-2",name:"DALL-E 2"}]},{id:"xai",name:"xAI (Grok)",models:[{id:"xai/grok-2-image",name:"Grok 2 Image"}]},{id:"together",name:"Together AI",models:[{id:"together/stable-diffusion-xl",name:"SDXL"},{id:"together/FLUX.1-schnell-Free",name:"FLUX.1 Schnell"}]},{id:"fireworks",name:"Fireworks AI",models:[{id:"fireworks/stable-diffusion-xl-1024-v1-0",name:"SDXL 1024"},{id:"fireworks/flux-1-dev-fp8",name:"FLUX.1 Dev"}]},{id:"nebius",name:"Nebius AI",models:[{id:"nebius/flux-dev",name:"FLUX Dev"},{id:"nebius/sdxl",name:"SDXL"}]},{id:"hyperbolic",name:"Hyperbolic",models:[{id:"hyperbolic/SDXL1.0-base",name:"SDXL Base"},{id:"hyperbolic/stable-diffusion-2",name:"SD 2"}]},{id:"nanobanana",name:"NanoBanana",models:[{id:"nanobanana/flux-schnell",name:"FLUX Schnell"}]},{id:"sdwebui",name:"SD WebUI",models:[{id:"sdwebui/sd_xl_base_1.0",name:"SDXL Base (Local)"}]},{id:"comfyui",name:"ComfyUI",models:[{id:"comfyui/flux-dev",name:"FLUX Dev (Local)"},{id:"comfyui/sdxl",name:"SDXL (Local)"}]}],video:[{id:"comfyui",name:"ComfyUI",models:[{id:"comfyui/animatediff",name:"AnimateDiff"},{id:"comfyui/svd",name:"Stable Video Diffusion"}]},{id:"sdwebui",name:"SD WebUI",models:[{id:"sdwebui/animatediff",name:"AnimateDiff (Local)"}]}],music:[{id:"comfyui",name:"ComfyUI",models:[{id:"comfyui/stable-audio",name:"Stable Audio Open"},{id:"comfyui/musicgen",name:"MusicGen"}]}],speech:[{id:"openai",name:"OpenAI",models:[{id:"openai/tts-1",name:"TTS-1"},{id:"openai/tts-1-hd",name:"TTS-1 HD"},{id:"openai/gpt-4o-mini-tts",name:"GPT-4o Mini TTS"}]},{id:"elevenlabs",name:"ElevenLabs",models:[{id:"elevenlabs/eleven_multilingual_v2",name:"Eleven Multilingual v2"},{id:"elevenlabs/eleven_turbo_v2_5",name:"Eleven Turbo v2.5"}]},{id:"deepgram",name:"Deepgram",models:[{id:"deepgram/aura-asteria-en",name:"Aura Asteria (EN)"},{id:"deepgram/aura-luna-en",name:"Aura Luna (EN)"},{id:"deepgram/aura-stella-en",name:"Aura Stella (EN)"}]},{id:"hyperbolic",name:"Hyperbolic",models:[{id:"hyperbolic/melo-tts",name:"Melo TTS"}]},{id:"nvidia",name:"NVIDIA NIM",models:[{id:"nvidia/fastpitch",name:"FastPitch"},{id:"nvidia/tacotron2",name:"Tacotron2"}]},{id:"inworld",name:"Inworld",models:[{id:"inworld/inworld-tts-1.5-max",name:"Inworld TTS Max"},{id:"inworld/inworld-tts-1.5-mini",name:"Inworld TTS Mini"}]},{id:"cartesia",name:"Cartesia",models:[{id:"cartesia/sonic-2",name:"Sonic 2"},{id:"cartesia/sonic-3",name:"Sonic 3"}]},{id:"playht",name:"PlayHT",models:[{id:"playht/PlayDialog",name:"PlayDialog"},{id:"playht/Play3.0-mini",name:"Play3.0 Mini"}]},{id:"huggingface",name:"HuggingFace",models:[{id:"huggingface/espnet/kan-bayashi_ljspeech_vits",name:"VITS LJSpeech"}]},{id:"qwen",name:"Qwen",models:[{id:"qwen/qwen3-tts",name:"Qwen3 TTS"}]}],transcription:[{id:"deepgram",name:"Deepgram ($200 free)",models:[{id:"deepgram/nova-3",name:"Nova 3 (Best)"},{id:"deepgram/nova-2",name:"Nova 2"},{id:"deepgram/enhanced",name:"Enhanced"},{id:"deepgram/base",name:"Base"}]},{id:"assemblyai",name:"AssemblyAI ($50 free)",models:[{id:"assemblyai/universal-3-pro",name:"Universal 3 Pro (Best)"},{id:"assemblyai/universal-2",name:"Universal 2"},{id:"assemblyai/nano",name:"Nano (Fast)"}]},{id:"groq",name:"Groq (Free — Whisper)",models:[{id:"groq/whisper-large-v3",name:"Whisper Large v3 (Free)"},{id:"groq/whisper-large-v3-turbo",name:"Whisper Turbo (Free)"}]},{id:"openai",name:"OpenAI",models:[{id:"openai/whisper-1",name:"Whisper 1"},{id:"openai/gpt-4o-transcription",name:"GPT-4o Transcription"}]},{id:"nvidia",name:"NVIDIA NIM",models:[{id:"nvidia/nvidia/parakeet-ctc-1.1b-asr",name:"Parakeet CTC 1.1B"}]},{id:"huggingface",name:"HuggingFace",models:[{id:"huggingface/openai/whisper-large-v3",name:"Whisper Large v3 (HF)"}]},{id:"qwen",name:"Qwen",models:[{id:"qwen/qwen3-asr",name:"Qwen3 ASR"}]}]},m={default:[{id:"alloy",label:"Alloy"},{id:"echo",label:"Echo"},{id:"fable",label:"Fable"},{id:"onyx",label:"Onyx"},{id:"nova",label:"Nova"},{id:"shimmer",label:"Shimmer"}],elevenlabs:[{id:"21m00Tcm4TlvDq8ikWAM",label:"Rachel (EN)"},{id:"AZnzlk1XvdvUeBnXmlld",label:"Domi (EN)"},{id:"EXAVITQu4vr4xnSDxMaL",label:"Bella (EN)"},{id:"ErXwobaYiN019PkySvjV",label:"Antoni (EN)"},{id:"MF3mGyEYCl7XYWbV9V6O",label:"Elli (EN)"},{id:"TxGEqnHWrfWFTfGW9XjX",label:"Josh (EN)"},{id:"VR6AewLTigWG4xSOukaG",label:"Arnold (EN)"},{id:"pNInz6obpgDQGcFmaJgB",label:"Adam (EN)"},{id:"yoZ06aMxZJJ28mfd3POQ",label:"Sam (EN)"}],cartesia:[{id:"a0e99841-438c-4a64-b679-ae501e7d6091",label:"Barbershop Man"},{id:"694f9389-aac1-45b6-b726-9d9369183238",label:"Friendly Reading Man"},{id:"b7d50908-b17c-442d-ad8d-810c63997ed9",label:"California Girl"}],deepgram:[{id:"aura-asteria-en",label:"Asteria (EN)"},{id:"aura-luna-en",label:"Luna (EN)"},{id:"aura-stella-en",label:"Stella (EN)"},{id:"aura-zeus-en",label:"Zeus (EN)"},{id:"aura-orion-en",label:"Orion (EN)"}],inworld:[{id:"Eva",label:"Eva (EN)"},{id:"Marcus",label:"Marcus (EN)"}]},c=["mp3","wav","opus","flac","pcm"];function u(e){return m[e]??m.default}function p(e,a){let t=e?.error?.message||e?.error||e?.message||e?.detail||("string"==typeof e?e:null)||`Request failed (${a})`,i="string"==typeof t&&(t.toLowerCase().includes("no credentials")||t.toLowerCase().includes("invalid api key")||t.toLowerCase().includes("unauthorized")||t.toLowerCase().includes("authentication")||401===a||403===a);return{message:String(t),isCredentials:i}}function x({data:e}){let a=e?.data||[];return 0===a.length?(0,i.jsx)("p",{className:"text-sm text-text-muted italic",children:"No images returned. The provider might have accepted the request but returned empty data."}):(0,i.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:a.map((e,a)=>{let t=e.url||(e.b64_json?`data:image/png;base64,${e.b64_json}`:null);return t?(0,i.jsxs)("div",{className:"relative group rounded-lg overflow-hidden border border-black/10 dark:border-white/10",children:[(0,i.jsx)("img",{src:t,alt:e.revised_prompt||`Generated image ${a+1}`,className:"w-full"}),(0,i.jsxs)("a",{href:t,download:`image-${a+1}.png`,className:"absolute bottom-2 right-2 bg-black/60 text-white text-xs px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-1",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"download"}),"Save"]}),e.revised_prompt&&(0,i.jsx)("p",{className:"text-[11px] text-text-muted px-2 py-1 bg-surface/80 truncate",title:e.revised_prompt,children:e.revised_prompt})]},a):null})})}function b(){let e=(0,s.c)("media"),[a,t]=(0,r.useState)("image"),[n,m]=(0,r.useState)(""),[b,h]=(0,r.useState)(""),[g,f]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1),[w,N]=(0,r.useState)(null),[j,k]=(0,r.useState)(null),[S,T]=(0,r.useState)(!1),[E,A]=(0,r.useState)("alloy"),[L,D]=(0,r.useState)("mp3"),[I,C]=(0,r.useState)(null),_=o[a]??[],P=_.find(e=>e.id===b)?.models??[],F=(0,r.useRef)(!1);if(!F.current){F.current=!0;let e=(o.image??[])[0];h(e?.id??""),f(e?.models[0]?.id??"")}let O=async()=>{y(!0),k(null),T(!1),N(null);try{let e=d[a];if("speech"===a){if(!n.trim()){k("Please enter text to synthesize."),y(!1);return}let a=await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:g,input:n.trim(),voice:E,response_format:L})});if(!a.ok){let e=await a.json().catch(()=>({})),{message:t,isCredentials:i}=p(e,a.status);throw T(i),Error(t)}let t=await a.blob(),i=URL.createObjectURL(t);N({type:"speech",data:{format:L},timestamp:Date.now(),audioUrl:i}),y(!1);return}if("transcription"===a){if(!I){k("Please select an audio file to transcribe."),y(!1);return}let a=new FormData;a.append("file",I),a.append("model",g);let t=await fetch(e.endpoint,{method:"POST",body:a});if(!t.ok){let e=await t.json().catch(()=>({})),{message:a,isCredentials:i}=p(e,t.status);throw T(i),Error(a)}let i=await t.json();if(i&&"string"==typeof i.text&&""===i.text.trim()){k(`Transcription returned empty text. Make sure you have a valid API key for "${b}" configured in /dashboard/providers.`),T(!0),y(!1);return}N({type:"transcription",data:i,timestamp:Date.now()}),y(!1);return}if(!n.trim()){k("Please enter a prompt."),y(!1);return}let t=await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:g,prompt:n.trim(),..."image"===a?{size:"1024x1024",n:1}:{}})});if(!t.ok){let e=await t.json().catch(()=>({})),{message:a,isCredentials:i}=p(e,t.status);throw T(i),Error(a)}let i=await t.json();N({type:a,data:i,timestamp:Date.now()})}catch(e){k(e.message||"Generation failed")}y(!1)},U=d[a],M=u(b);return(0,i.jsxs)("div",{className:"space-y-6",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:e("title")}),(0,i.jsx)("p",{className:"text-text-muted text-sm mt-1",children:e("subtitle")})]}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2 p-1 bg-surface/50 rounded-xl border border-black/5 dark:border-white/5",children:Object.keys(d).map(e=>{let r=d[e],s=e===a;return(0,i.jsxs)("button",{onClick:()=>{let a;return t(e),m(""),N(null),k(null),T(!1),C(null),a=(o[e]??[])[0],void(h(a?.id??""),f(a?.models[0]?.id??""),"speech"===e&&A(u(a?.id??"")[0]?.id??"alloy"))},className:`flex-1 min-w-[110px] flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium transition-all ${s?"bg-primary/10 text-primary shadow-sm border border-primary/20":"text-text-muted hover:text-text-main hover:bg-surface/80"}`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r.icon}),r.label]},e)})}),(0,i.jsxs)("div",{className:"bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-6 space-y-4",children:[(0,i.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:"Provider"}),(0,i.jsx)("select",{value:b,onChange:e=>{var t;let i;return h(t=e.target.value),i=o[a]?.find(e=>e.id===t)?.models??[],void(f(i[0]?.id??""),"speech"===a&&A(u(t)[0]?.id??"alloy"))},className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30",children:_.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:e("model")}),(0,i.jsx)("select",{value:g,onChange:e=>f(e.target.value),className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30",children:P.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))})]})]}),b&&!["sdwebui","comfyui","qwen"].includes(b)&&(0,i.jsxs)("p",{className:"text-xs text-text-muted flex items-center gap-1.5",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[14px] text-amber-500",children:"info"}),"Requires ",(0,i.jsx)("strong",{className:"capitalize",children:b})," API key in"," ",(0,i.jsx)(l(),{href:"/dashboard/providers",className:"text-primary underline underline-offset-2 hover:text-primary/80",children:"Providers"})]}),"speech"===a&&(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:"Voice"}),(0,i.jsx)("select",{value:E,onChange:e=>A(e.target.value),className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30",children:M.map(e=>(0,i.jsx)("option",{value:e.id,children:e.label},e.id))})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:"Format"}),(0,i.jsx)("select",{value:L,onChange:e=>D(e.target.value),className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30",children:c.map(e=>(0,i.jsx)("option",{value:e,children:e},e))})]})]}),"transcription"===a?(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:"Audio File"}),(0,i.jsx)("input",{type:"file",accept:"audio/*,video/*",onChange:e=>C(e.target.files?.[0]??null),className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 file:mr-3 file:py-1 file:px-3 file:rounded file:border-0 file:bg-primary/10 file:text-primary file:text-sm"}),I&&(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:[I.name," (",(I.size/1024).toFixed(0)," KB)"]})]}):(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:"speech"===a?"Text":e("prompt")}),(0,i.jsx)("textarea",{rows:3,value:n,onChange:e=>m(e.target.value),placeholder:U.placeholder,className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/30 resize-none"})]}),(0,i.jsx)("button",{onClick:O,disabled:v||("transcription"===a?!I:!n.trim()),className:`w-full flex items-center justify-center gap-2 px-4 py-3 rounded-lg text-white font-medium transition-all bg-gradient-to-r ${U.color} ${v||("transcription"===a?!I:!n.trim())?"opacity-50 cursor-not-allowed":"hover:opacity-90 hover:shadow-lg"}`,children:v?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),"speech"===a?"Synthesizing...":"transcription"===a?"Transcribing...":e("generating")]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"speech"===a?"volume_up":"transcription"===a?"mic":"auto_awesome"}),"speech"===a?"Synthesize Speech":"transcription"===a?"Transcribe Audio":`${e("generate")} ${U.label}`]})})]}),j&&(0,i.jsxs)("div",{className:`rounded-xl p-4 flex items-start gap-3 ${S?"bg-amber-500/10 border border-amber-500/20":"bg-red-500/10 border border-red-500/20"}`,children:[(0,i.jsx)("span",{className:`material-symbols-outlined text-[20px] mt-0.5 ${S?"text-amber-500":"text-red-500"}`,children:S?"key":"error"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:`text-sm font-medium ${S?"text-amber-500":"text-red-500"}`,children:S?"API Key Required":e("error")}),(0,i.jsx)("p",{className:"text-sm text-text-muted mt-1 break-words",children:j}),S&&(0,i.jsxs)(l(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 mt-2 text-xs text-primary hover:underline",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"open_in_new"}),"Configure API keys in Providers →"]})]})]}),w&&(0,i.jsxs)("div",{className:"bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,i.jsx)("span",{className:`material-symbols-outlined text-[20px] bg-gradient-to-r ${U.color} bg-clip-text text-transparent`,children:U.icon}),(0,i.jsx)("h3",{className:"text-sm font-medium text-text-main",children:e("result")}),(0,i.jsx)("span",{className:"text-xs text-text-muted ml-auto",children:new Date(w.timestamp).toLocaleTimeString()})]}),"speech"===w.type&&w.audioUrl?(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)("audio",{controls:!0,src:w.audioUrl,className:"w-full rounded-lg",autoPlay:!0}),(0,i.jsxs)("a",{href:w.audioUrl,download:`speech.${w.data?.format||"mp3"}`,className:"inline-flex items-center gap-2 text-sm text-primary hover:underline",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"download"}),"Download ",w.data?.format?.toUpperCase()||"MP3"]})]}):"image"===w.type?(0,i.jsx)(x,{data:w.data}):"transcription"===w.type?(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)("div",{className:"bg-surface rounded-lg p-4 text-sm text-text-main leading-relaxed whitespace-pre-wrap",children:w.data?.text||(0,i.jsx)("span",{className:"text-text-muted italic",children:"No text returned"})}),w.data?.words&&(0,i.jsxs)("details",{className:"mt-2",children:[(0,i.jsxs)("summary",{className:"text-xs text-text-muted cursor-pointer hover:text-text-main",children:["Word-level timestamps (",w.data.words.length," words)"]}),(0,i.jsx)("pre",{className:"bg-surface rounded mt-2 p-3 text-xs text-text-muted overflow-auto max-h-48 custom-scrollbar",children:JSON.stringify(w.data.words,null,2)})]})]}):(0,i.jsx)("pre",{className:"bg-surface rounded-lg p-4 text-xs text-text-muted overflow-auto max-h-96 custom-scrollbar",children:JSON.stringify(w.data,null,2)})]}),(0,i.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:Object.keys(d).map(e=>{let a=d[e],t=o[e]?.length??0;return(0,i.jsxs)("div",{className:"bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-4",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,i.jsx)("div",{className:`flex items-center justify-center size-8 rounded-lg bg-gradient-to-r ${a.color}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-white text-[16px]",children:a.icon})}),(0,i.jsx)("span",{className:"text-sm font-medium text-text-main",children:a.label})]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:[t," providers"]}),(0,i.jsxs)("code",{className:"block mt-2 text-xs text-primary/70 bg-primary/5 rounded px-2 py-1",children:["POST ",a.endpoint]})]},e)})})]})}},50910:(e,a,t)=>{"use strict";t.d(a,{c:()=>s});var i=t(33418);function r(e,a){return(...e)=>{try{return a(...e)}catch{throw Error(void 0)}}}let s=r(0,i.c3);r(0,i.kc)}},e=>{e.O(0,[8500,3418,8441,3794,7358],()=>e(e.s=20433)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{40993:(e,s,t)=>{"use strict";t.d(s,{Ex:()=>d.default,$n:()=>r.default,Zp:()=>i.default,Qv:()=>o.CardSkeleton,G9:()=>v.default,bQ:()=>k.default,pp:()=>N.default,Qn:()=>y.default,pd:()=>l.default,Mh:()=>g.default,uR:()=>u.default,aF:()=>n.default,rq:()=>m.default,LF:()=>x.default,KN:()=>b.default,Lo:()=>f.default,y7:()=>h.default,Iz:()=>j.default,l6:()=>a.default,lM:()=>c.default,cn:()=>p.default});var r=t(35806),l=t(34422),a=t(42994),i=t(81060),n=t(71361),o=t(92542);t(17705);var d=t(80927),c=t(19790);t(6261),t(55846),t(34243),t(89938),t(99023);var x=t(80178),m=t(85444),u=t(91961);t(25112);var p=t(45624),h=t(37415),b=t(48643),f=t(8287);t(1652);var g=t(92701);t(18150);var v=t(71689),j=t(33709);t(76332);var N=t(66200);t(61580);var y=t(51503);t(54128);var k=t(44638);t(21720),t(97050)},49433:(e,s,t)=>{"use strict";t.d(s,{default:()=>b});var r=t(95155),l=t(50910),a=t(12115),i=t(14051),n=t.n(i),o=t(5772),d=t(98500),c=t.n(d),x=t(73321),m=t(40993),u=t(20909),p=t(67671),h=t(32661);function b({machineId:e}){let s=(0,l.c)("home"),t=(0,l.c)("common"),i=(0,l.c)("sidebar"),[n,o]=(0,a.useState)([]),[d,x]=(0,a.useState)([]),[p,h]=(0,a.useState)(!0),[b,v]=(0,a.useState)("/v1"),[j,N]=(0,a.useState)(null),[y,k]=(0,a.useState)({});(0,a.useEffect)(()=>{v(`${window.location.origin}/v1`)},[]);let w=(0,a.useCallback)(async()=>{try{let[e,s,t]=await Promise.all([fetch("/api/providers"),fetch("/api/models"),fetch("/api/provider-metrics")]);if(e.ok){let s=await e.json();o(s.connections||[])}if(s.ok){let e=await s.json();x(e.models||[])}if(t.ok){let e=await t.json();k(e.metrics||{})}}catch(e){console.log("Error fetching data:",e)}finally{h(!1)}},[]);(0,a.useEffect)(()=>{w()},[w]);let R=(0,a.useMemo)(()=>Object.entries(u.Q2).map(([e,s])=>{let t=n.filter(s=>s.provider===e),r=t.filter(e=>!1!==e.isActive&&("active"===e.testStatus||"success"===e.testStatus||"unknown"===e.testStatus)).length,l=t.filter(e=>!1!==e.isActive&&("error"===e.testStatus||"expired"===e.testStatus||"unavailable"===e.testStatus)).length,a=new Set([e,s.alias].filter(Boolean)),i=d.filter(e=>a.has(e.provider)),o=u.IS[e]?"free":u.zN[e]?"oauth":"apikey";return{id:e,provider:s,total:t.length,connected:r,errors:l,modelCount:i.length,authType:o}}),[n,d]),S=(0,a.useMemo)(()=>{if(!j)return[];let e=new Set([j.id,j.provider?.alias].filter(Boolean));return d.filter(s=>e.has(s.provider))},[j,d]),q=[{label:s("documentation"),href:"/docs",icon:"menu_book"},{label:i("providers"),href:"/dashboard/providers",icon:"dns"},{label:i("combos"),href:"/dashboard/combos",icon:"layers"},{label:i("analytics"),href:"/dashboard/analytics",icon:"analytics"},{label:s("healthMonitor"),href:"/dashboard/health",icon:"health_and_safety"},{label:i("cliTools"),href:"/dashboard/cli-tools",icon:"terminal"},{label:s("reportIssue"),href:"https://github.com/diegosouzapw/OmniRoute/issues",external:!0,icon:"bug_report"}];return p?(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(m.Qv,{}),(0,r.jsx)(m.Qv,{})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(m.Zp,{children:(0,r.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:s("quickStart")}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:s("quickStartDesc")})]}),(0,r.jsxs)(c(),{href:"/docs",className:"hidden sm:inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border border-border text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"menu_book"}),s("fullDocs")]})]}),(0,r.jsxs)("ol",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 text-sm",children:[(0,r.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"key"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-semibold",children:s("step1Title")}),(0,r.jsx)("p",{className:"text-text-muted mt-0.5",children:s.rich("step1Desc",{endpoint:e=>(0,r.jsx)(c(),{href:"/dashboard/endpoint",className:"text-primary hover:underline",children:e})})})]})]}),(0,r.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-green-500/10 text-green-500 shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"dns"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-semibold",children:s("step2Title")}),(0,r.jsx)("p",{className:"text-text-muted mt-0.5",children:s.rich("step2Desc",{providers:e=>(0,r.jsx)(c(),{href:"/dashboard/providers",className:"text-primary hover:underline",children:e})})})]})]}),(0,r.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"link"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-semibold",children:s("step3Title")}),(0,r.jsx)("p",{className:"text-text-muted mt-0.5",children:s("step3Desc",{url:b})})]})]}),(0,r.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-amber-500/10 text-amber-500 shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"analytics"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-semibold",children:s("step4Title")}),(0,r.jsx)("p",{className:"text-text-muted mt-0.5",children:s.rich("step4Desc",{logs:e=>(0,r.jsx)(c(),{href:"/dashboard/usage",className:"text-primary hover:underline",children:e}),analytics:e=>(0,r.jsx)(c(),{href:"/dashboard/analytics",className:"text-primary hover:underline",children:e})})})]})]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:q.map(e=>(0,r.jsxs)("a",{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border border-border text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:e.icon||(e.external?"open_in_new":"arrow_forward")}),e.label]},e.href))})]})}),(0,r.jsxs)(m.Zp,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:s("providersOverview")}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:s("configuredOf",{configured:R.filter(e=>e.total>0).length,total:R.length})})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)("div",{className:"hidden sm:flex items-center gap-3 text-[11px] text-text-muted",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-green-500"})," ",t("free")]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-blue-500"})," ",s("oauthLabel")]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-amber-500"})," ",s("apiKeyLabel")]})]}),(0,r.jsxs)(c(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border border-border text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"settings"}),t("manage")]})]})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3",children:R.map(e=>(0,r.jsx)(f,{item:e,metrics:y[e.provider.alias]||y[e.id],onClick:()=>N(e)},e.id))})]}),j&&(0,r.jsx)(g,{provider:j,models:S,onClose:()=>N(null)})]})}function f({item:e,metrics:s,onClick:t}){let[i,n]=(0,a.useState)(!1),d=(0,l.c)("home"),c=(0,l.c)("common"),x=e.errors>0?"text-red-500":e.connected>0?"text-green-500":"text-text-muted",m={free:{color:"bg-green-500",label:c("free")},oauth:{color:"bg-blue-500",label:d("oauthLabel")},apikey:{color:"bg-amber-500",label:d("apiKeyLabel")}},u=m[e.authType]||m.apikey;return(0,r.jsx)("button",{onClick:t,className:"border border-border rounded-lg p-3 hover:bg-surface/40 transition-colors text-left cursor-pointer w-full",children:(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.provider.color||"#888"}15`},children:i?(0,r.jsx)("span",{className:"text-[10px] font-bold",style:{color:e.provider.color||"#888"},children:e.provider.textIcon||e.provider.id.slice(0,2).toUpperCase()}):(0,r.jsx)(o.default,{src:`/providers/${e.provider.id}.png`,alt:e.provider.name,width:26,height:26,className:"object-contain rounded-lg",sizes:"26px",onError:()=>n(!0)})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm font-semibold truncate",children:e.provider.name}),(0,r.jsx)("span",{className:`size-2 rounded-full ${u.color} shrink-0`,title:u.label})]}),(0,r.jsx)("p",{className:`text-xs ${x}`,children:0===e.total?c("notConfigured"):d("activeError",{active:e.connected,errors:e.errors})}),s&&s.totalRequests>0&&(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:[(0,r.jsx)("span",{className:"text-emerald-500",children:s.totalSuccesses}),"/",d("requestsShort",{count:s.totalRequests})]}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:[s.successRate,"%"]}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:["~",s.avgLatencyMs,"ms"]})]})]}),(0,r.jsxs)("div",{className:"text-right shrink-0",children:[(0,r.jsx)("p",{className:"text-xs font-medium text-text-main",children:e.modelCount}),(0,r.jsx)("p",{className:"text-[10px] text-text-muted",children:c("models")})]})]})})}function g({provider:e,models:s,onClose:t}){let[i,n]=(0,a.useState)(null),o=(0,p.i)(),d=(0,x.useRouter)(),c=(0,l.c)("home"),u=(0,l.c)("common"),b=(0,l.c)("sidebar"),f=async e=>{await (0,h.l)(e),n(e),o.success(c("copiedModel",{model:e})),setTimeout(()=>n(null),2e3)};return(0,r.jsx)(m.aF,{isOpen:!0,title:c("providerModelsTitle",{provider:e.provider.name}),onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"token"}),1===s.length?c("modelAvailable",{count:s.length}):c("modelsAvailable",{count:s.length}),e.total>0&&(0,r.jsxs)("span",{className:"ml-auto text-xs text-green-500",children:["●"," ",1===e.connected?c("connectionsActive",{count:e.connected}):c("connectionsActivePlural",{count:e.connected})]})]}),0===s.length?(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:c("noModelsAvailable")}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:c("configureFirst",{providers:b("providers")})})]}):(0,r.jsx)("div",{className:"flex flex-col gap-1 max-h-[400px] overflow-y-auto",children:s.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 rounded-lg hover:bg-surface/50 transition-colors group",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"font-mono text-sm text-text-main truncate",children:e.fullModel}),e.alias!==e.model&&(0,r.jsxs)("p",{className:"text-[10px] text-text-muted",children:[c("aliasLabel"),": ",e.alias]})]}),(0,r.jsx)("button",{onClick:()=>f(e.fullModel),className:"shrink-0 ml-2 p-1.5 rounded-lg text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors opacity-0 group-hover:opacity-100",title:c("copyModelName"),children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:i===e.fullModel?"check":"content_copy"})})]},e.fullModel))}),(0,r.jsxs)("div",{className:"flex gap-2 pt-2 border-t border-border",children:[(0,r.jsxs)(m.$n,{variant:"secondary",fullWidth:!0,size:"sm",onClick:()=>{var s;return s=`/dashboard/providers/${e.id}`,void(t(),d.push(s))},className:"flex-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"settings"}),c("configureProvider")]}),(0,r.jsx)(m.$n,{variant:"ghost",size:"sm",onClick:t,children:u("close")})]})]})})}b.propTypes={machineId:n().string},f.propTypes={item:n().shape({id:n().string.isRequired,provider:n().shape({id:n().string.isRequired,name:n().string.isRequired,color:n().string,textIcon:n().string,alias:n().string}).isRequired,total:n().number.isRequired,connected:n().number.isRequired,errors:n().number.isRequired,modelCount:n().number.isRequired,authType:n().string.isRequired}).isRequired,metrics:n().shape({totalRequests:n().number,totalSuccesses:n().number,successRate:n().number,avgLatencyMs:n().number}),onClick:n().func.isRequired},g.propTypes={provider:n().object.isRequired,models:n().array.isRequired,onClose:n().func.isRequired}},87880:(e,s,t)=>{"use strict";t.d(s,{default:()=>a});var r=t(95155),l=t(12115);function a(){let[e,s]=(0,l.useState)(!1);if(e)return null;let t="u">typeof navigator&&navigator.platform?.startsWith("Win")?"%APPDATA%\\omniroute\\server.env":"~/.omniroute/server.env";return(0,r.jsxs)("div",{role:"alert",className:"flex items-start gap-3 rounded-lg border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm text-amber-200 mb-4",children:[(0,r.jsx)("span",{className:"text-amber-400 text-base shrink-0 mt-0.5",children:"⚠️"}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("p",{className:"font-semibold text-amber-300",children:"Running in zero-config mode"}),(0,r.jsxs)("p",{className:"mt-0.5 text-amber-200/80",children:["OmniRoute auto-generated secure encryption keys on first launch. They are persisted to"," ",(0,r.jsx)("code",{className:"font-mono bg-amber-500/20 px-1 rounded text-xs",children:t}),". No action is required — your data is encrypted and safe. To use custom keys, add"," ",(0,r.jsx)("code",{className:"font-mono bg-amber-500/20 px-1 rounded text-xs",children:"JWT_SECRET"})," and"," ",(0,r.jsx)("code",{className:"font-mono bg-amber-500/20 px-1 rounded text-xs",children:"STORAGE_ENCRYPTION_KEY"})," ","to that file."]})]}),(0,r.jsx)("button",{onClick:()=>s(!0),className:"shrink-0 text-amber-400/60 hover:text-amber-300 transition-colors ml-1","aria-label":"Dismiss",children:"✕"})]})}},91392:(e,s,t)=>{Promise.resolve().then(t.bind(t,87880)),Promise.resolve().then(t.bind(t,49433))}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=91392)),_N_E=e.O()}]);
@@ -0,0 +1,2 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1287],{5214:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return l.workAsyncStorageInstance}});let l=a(17828)},13059:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>p});var l=a(95155),s=a(12115),n=a(40993);let r=(0,a(37206).default)(()=>a.e(8202).then(a.bind(a,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1}),i=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses"},{value:"images",label:"Image Generation"},{value:"embeddings",label:"Embeddings"},{value:"speech",label:"Text to Speech"},{value:"transcription",label:"Audio Transcription"},{value:"video",label:"Video Generation"},{value:"music",label:"Music Generation"},{value:"rerank",label:"Rerank"}],o={chat:{model:"",messages:[{role:"user",content:"Hello! Say hi in one sentence."}],max_tokens:100,stream:!1},responses:{model:"",input:"Hello! Say hi in one sentence.",stream:!1},images:{model:"",prompt:"A beautiful sunset over mountains",n:1,size:"1024x1024"},embeddings:{model:"",input:"Hello world",encoding_format:"float"},speech:{model:"openai/tts-1",input:"Hello, this is a test of the text-to-speech endpoint.",voice:"alloy",response_format:"mp3"},transcription:{model:"deepgram/nova-3",language:"en"},video:{model:"comfyui/animatediff",prompt:"A timelapse of a sunset over the ocean",n:1},music:{model:"comfyui/stable-audio",prompt:"Calm ambient piano music with soft reverb",duration:10},rerank:{model:"cohere/rerank-english-v3.0",query:"What is the capital of France?",documents:["Paris is the capital of France.","London is the capital of England.","Berlin is the capital of Germany."],top_n:2}},d={chat:"/v1/chat/completions",responses:"/v1/responses",images:"/v1/images/generations",embeddings:"/v1/embeddings",speech:"/v1/audio/speech",transcription:"/v1/audio/transcriptions",video:"/v1/videos/generations",music:"/v1/music/generations",rerank:"/v1/rerank"},c=["gpt-4o","gpt-4o-mini","gpt-4-turbo","gpt-4-vision","claude-3","claude-sonnet","claude-opus","claude-haiku","gemini","llava","bakllava","pixtral","qwen-vl","qvq","mistral-pixtral"];async function u(e){return new Promise((t,a)=>{let l=new FileReader;l.onload=()=>t(l.result),l.onerror=a,l.readAsDataURL(e)})}function m({data:e}){let t=e?.data||[];return 0===t.length?null:(0,l.jsxs)("div",{className:"p-4 space-y-3",children:[(0,l.jsxs)("p",{className:"text-xs text-text-muted font-medium uppercase tracking-wider",children:[t.length," image",t.length>1?"s":""," generated"]}),(0,l.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:t.map((e,t)=>{let a=e.url||(e.b64_json?`data:image/png;base64,${e.b64_json}`:null);return a?(0,l.jsxs)("div",{className:"relative group rounded-lg overflow-hidden border border-border",children:[(0,l.jsx)("img",{src:a,alt:e.revised_prompt||`Generated image ${t+1}`,className:"w-full"}),(0,l.jsxs)("a",{href:a,download:`image-${t+1}.png`,className:"absolute bottom-2 right-2 bg-black/60 text-white text-xs px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"download"}),"Save"]})]},t):null})})]})}function p(){let e,[t,a]=(0,s.useState)([]),[p,x]=(0,s.useState)([]),[f,h]=(0,s.useState)(""),[b,g]=(0,s.useState)(""),[v,y]=(0,s.useState)("chat"),[j,N]=(0,s.useState)(""),[w,k]=(0,s.useState)(""),[S,_]=(0,s.useState)(null),[O,C]=(0,s.useState)(null),[P,A]=(0,s.useState)(null),[L,E]=(0,s.useState)(!1),[R,T]=(0,s.useState)(null),[M,z]=(0,s.useState)(null),F=(0,s.useRef)(null),[$,D]=(0,s.useState)(null),[J,G]=(0,s.useState)([]),q="transcription"===v,W="images"===v,B="chat"===v&&(e=b.toLowerCase(),c.some(t=>e.includes(t)));(0,s.useEffect)(()=>{fetch("/v1/models").then(e=>e.json()).then(e=>{let t=e?.data||[];a(t);let l=new Set;t.forEach(e=>{let t=e.id.split("/");t.length>=2&&l.add(t[0])});let s=Array.from(l).sort().map(e=>({value:e,label:e}));x(s),s.length>0&&h(s[0].value)}).catch(()=>{})},[]);let I=t.filter(e=>!f||e.id.startsWith(f+"/")).map(e=>({value:e.id,label:e.id})),Z=(e,t)=>{let a={...o[e]};return"model"in a&&(a.model=t),JSON.stringify(a,null,2)},H=()=>{k(""),T(null),z(null),_(null),C(null),A(null)},U=async e=>{let t=Array.from(e.target.files||[]),a=await Promise.all(t.map(u));G(e=>[...e,...a].slice(0,4))},Q=async()=>{if(!j.trim()&&!q)return;E(!0),H();let e=new AbortController;F.current=e;let t=Date.now();try{let a,l=d[v];if(q){let t=new FormData;$&&t.append("file",$);try{let e=JSON.parse(j||"{}");for(let[a,l]of Object.entries(e))"file"!==a&&t.append(a,String(l))}catch{}a=await fetch(`/api${l}`,{method:"POST",body:t,signal:e.signal})}else{let t=JSON.parse(j);B&&J.length>0&&(t=((e,t)=>{if(!t.length)return e;let a=[...e.messages||[]];if(0===a.length)return e;let l=a[a.length-1],s="string"==typeof l.content?l.content:"";return a[a.length-1]={...l,content:[{type:"text",text:s},...t.map(e=>({type:"image_url",image_url:{url:e}}))]},{...e,messages:a}})(t,J)),a=await fetch(`/api${l}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),signal:e.signal})}T(a.status),z(Date.now()-t);let s=a.headers.get("content-type")||"";if(s.startsWith("audio/")){let e=await a.blob(),t=URL.createObjectURL(e);_(t),k(`// Audio response (${s})
2
+ // Click play below to listen.`)}else if(s.includes("text/event-stream")){let e=a.body?.getReader(),t=new TextDecoder,l="";if(e)for(;;){let{done:a,value:s}=await e.read();if(a)break;l+=t.decode(s,{stream:!0}),k(l)}}else{let e=await a.json();k(JSON.stringify(e,null,2)),W&&e?.data&&Array.isArray(e.data)&&a.ok&&C(e),q&&"string"==typeof e?.text&&A(e.text||"(empty result — check provider credentials)")}}catch(e){"AbortError"===e.name?k(JSON.stringify({cancelled:!0},null,2)):k(JSON.stringify({error:e.message},null,2)),z(Date.now()-t)}E(!1)},K=async e=>{try{await navigator.clipboard.writeText(e)}catch{}};return(0,l.jsxs)("div",{className:"space-y-5",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-primary/5 border border-primary/10 text-sm text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px] mt-0.5 shrink-0",children:"science"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-text-main mb-0.5",children:"Model Playground"}),(0,l.jsx)("p",{children:"Test any model directly from the dashboard. Pick a provider, model, and endpoint type, then send a request to see the raw response."})]})]}),(0,l.jsx)(n.Zp,{children:(0,l.jsxs)("div",{className:"p-4 flex flex-col sm:flex-row items-end gap-4",children:[(0,l.jsxs)("div",{className:"flex-1 w-full",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:"Provider"}),(0,l.jsx)(n.l6,{value:f,onChange:e=>{var a;let l;return h(a=e.target.value),void(g(l=t.filter(e=>!a||e.id.startsWith(a+"/")).map(e=>e.id)[0]||""),N(Z(v,l)),H())},options:p,className:"w-full"})]}),(0,l.jsxs)("div",{className:"flex-1 w-full",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:"Model"}),(0,l.jsx)(n.l6,{value:b,onChange:e=>{var t;g(t=e.target.value),N(Z(v,t)),H()},options:I,className:"w-full"})]}),(0,l.jsxs)("div",{className:"flex-1 w-full",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:"Endpoint"}),(0,l.jsx)(n.l6,{value:v,onChange:e=>{var t;y(t=e.target.value),N(Z(t,b)),D(null),G([]),H()},options:i,className:"w-full"})]}),(0,l.jsx)("div",{className:"shrink-0",children:L?(0,l.jsx)(n.$n,{icon:"stop",variant:"secondary",onClick:()=>{F.current&&F.current.abort()},children:"Cancel"}):(0,l.jsx)(n.$n,{icon:"send",onClick:Q,disabled:!j.trim()&&!q||!b&&!q,children:"Send"})})]})}),(q||B)&&(0,l.jsx)(n.Zp,{children:(0,l.jsxs)("div",{className:"p-4 space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"attach_file"}),(0,l.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:q?"Audio File":"Attach Images (Vision)"}),q&&(0,l.jsx)(n.Ex,{variant:"info",size:"sm",children:"multipart/form-data"}),B&&(0,l.jsx)(n.Ex,{variant:"info",size:"sm",children:"up to 4 images"})]}),q&&(0,l.jsxs)("div",{children:[(0,l.jsx)("input",{type:"file",accept:"audio/*,video/*",onChange:e=>{D(e.target.files?.[0]??null)},className:"w-full px-3 py-2 rounded-lg bg-surface border border-border text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 file:mr-3 file:py-1 file:px-3 file:rounded file:border-0 file:bg-primary/10 file:text-primary file:text-sm"}),$&&(0,l.jsxs)("p",{className:"text-xs text-text-muted mt-1 flex items-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px] text-green-500",children:"check_circle"}),$.name," (",($.size/1024).toFixed(0)," KB)"]}),!$&&(0,l.jsxs)("p",{className:"text-xs text-amber-500 mt-1 flex items-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"info"}),"Select an audio file to transcribe (mp3, wav, m4a, ogg, flac…)"]})]}),B&&(0,l.jsxs)("div",{children:[(0,l.jsx)("input",{type:"file",accept:"image/*",multiple:!0,onChange:U,className:"w-full px-3 py-2 rounded-lg bg-surface border border-border text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 file:mr-3 file:py-1 file:px-3 file:rounded file:border-0 file:bg-primary/10 file:text-primary file:text-sm"}),J.length>0&&(0,l.jsxs)("div",{className:"flex gap-2 mt-2 flex-wrap",children:[J.map((e,t)=>(0,l.jsxs)("div",{className:"relative group size-16 rounded overflow-hidden border border-border",children:[(0,l.jsx)("img",{src:e,alt:`Attached ${t+1}`,className:"w-full h-full object-cover"}),(0,l.jsx)("button",{onClick:()=>G(e=>e.filter((e,a)=>a!==t)),className:"absolute inset-0 bg-black/50 text-white opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t)),(0,l.jsx)("button",{onClick:()=>G([]),className:"text-xs text-text-muted hover:text-red-500 self-center ml-1",children:"Clear all"})]})]})]})}),(0,l.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,l.jsx)(n.Zp,{children:(0,l.jsxs)("div",{className:"p-4 space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"upload"}),(0,l.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Request"}),(0,l.jsxs)(n.Ex,{variant:"info",size:"sm",children:["POST ",d[v]]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)("button",{onClick:()=>K(j),className:"p-1.5 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-text-main transition-colors",title:"Copy",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"content_copy"})}),(0,l.jsx)("button",{onClick:()=>{let e={...o[v]};"model"in e&&(e.model=b),N(JSON.stringify(e,null,2))},className:"p-1.5 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-text-main transition-colors",title:"Reset to default",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"restart_alt"})})]})]}),q&&(0,l.jsxs)("p",{className:"text-xs text-text-muted bg-amber-500/10 border border-amber-500/20 rounded px-2 py-1.5 flex items-start gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px] text-amber-500 mt-0.5",children:"info"}),"Transcription uses multipart/form-data. Upload the audio file above — JSON below controls extra params (model, language)."]}),(0,l.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,l.jsx)(r,{height:"400px",defaultLanguage:"json",value:j,onChange:e=>N(e||""),theme:"vs-dark",options:{minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,formatOnPaste:!0}})})]})}),(0,l.jsx)(n.Zp,{children:(0,l.jsxs)("div",{className:"p-4 space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"download"}),(0,l.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Response"}),null!==R&&(0,l.jsx)(n.Ex,{variant:R>=200&&R<300?"success":"error",size:"sm",children:R}),null!==M&&(0,l.jsxs)("span",{className:"text-xs text-text-muted",children:[M,"ms"]}),L&&(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] text-primary animate-spin",children:"progress_activity"})]}),(0,l.jsx)("div",{className:"flex items-center gap-1",children:(0,l.jsx)("button",{onClick:()=>K(w),className:"p-1.5 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-text-main transition-colors",title:"Copy",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"content_copy"})})})]}),(0,l.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:S?(0,l.jsxs)("div",{className:"p-4 space-y-3",children:[(0,l.jsx)("audio",{controls:!0,src:S,className:"w-full rounded-lg",autoPlay:!0}),(0,l.jsxs)("a",{href:S,download:"speech.mp3",className:"inline-flex items-center gap-2 text-sm text-primary hover:underline",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"download"}),"Download audio"]})]}):O?(0,l.jsx)(m,{data:O}):null!==P?(0,l.jsxs)("div",{className:"p-4 space-y-2",children:[(0,l.jsx)("p",{className:"text-xs text-text-muted font-medium uppercase tracking-wider",children:"Transcription"}),(0,l.jsx)("div",{className:"bg-surface/50 rounded p-3 text-sm text-text-main leading-relaxed whitespace-pre-wrap",children:P}),(0,l.jsxs)("button",{onClick:()=>K(P),className:"text-xs text-primary hover:underline flex items-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"content_copy"}),"Copy text"]})]}):(0,l.jsx)(r,{height:"400px",defaultLanguage:"json",value:w,theme:"vs-dark",options:{minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,readOnly:!0}})})]})})]})]})}},17828:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return l}});let l=(0,a(64054).createAsyncLocalStorage)()},21957:(e,t,a)=>{"use strict";function l({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return l}}),a(95155),a(47650),a(5214),a(2451),a(53887)},37206:(e,t,a)=>{"use strict";a.d(t,{default:()=>s.a});var l=a(75707),s=a.n(l)},40993:(e,t,a)=>{"use strict";a.d(t,{Ex:()=>d.default,$n:()=>l.default,Zp:()=>r.default,Qv:()=>o.CardSkeleton,G9:()=>v.default,bQ:()=>w.default,pp:()=>j.default,Qn:()=>N.default,pd:()=>s.default,Mh:()=>g.default,uR:()=>p.default,aF:()=>i.default,rq:()=>m.default,LF:()=>u.default,KN:()=>h.default,Lo:()=>b.default,y7:()=>f.default,Iz:()=>y.default,l6:()=>n.default,lM:()=>c.default,cn:()=>x.default});var l=a(35806),s=a(34422),n=a(42994),r=a(81060),i=a(71361),o=a(92542);a(17705);var d=a(80927),c=a(19790);a(6261),a(55846),a(34243),a(89938),a(99023);var u=a(80178),m=a(85444),p=a(91961);a(25112);var x=a(45624),f=a(37415),h=a(48643),b=a(8287);a(1652);var g=a(92701);a(18150);var v=a(71689),y=a(33709);a(76332);var j=a(66200);a(61580);var N=a(51503);a(54128);var w=a(44638);a(21720),a(97050)},41112:(e,t,a)=>{"use strict";function l({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}}),a(1980)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={bindSnapshot:function(){return o},createAsyncLocalStorage:function(){return i},createSnapshot:function(){return d}};for(var l in a)Object.defineProperty(t,l,{enumerable:!0,get:a[l]});let s=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class n{disable(){throw s}getStore(){}run(){throw s}exit(){throw s}enterWith(){throw s}static bind(e){return e}}let r="u">typeof globalThis&&globalThis.AsyncLocalStorage;function i(){return r?new r:new n}function o(e){return r?r.bind(e):n.bind(e)}function d(){return r?r.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let l=a(95155),s=a(12115),n=a(41112);function r(e){return{default:e&&"default"in e?e.default:e}}a(21957);let i={loader:()=>Promise.resolve(r(()=>null)),loading:null,ssr:!0},o=function(e){let t={...i,...e},a=(0,s.lazy)(()=>t.loader().then(r)),o=t.loading;function d(e){let r=o?(0,l.jsx)(o,{isLoading:!0,pastDelay:!0,error:null}):null,i=!t.ssr||!!t.loading,d=i?s.Suspense:s.Fragment,c=t.ssr?(0,l.jsxs)(l.Fragment,{children:[null,(0,l.jsx)(a,{...e})]}):(0,l.jsx)(n.BailoutToCSR,{reason:"next/dynamic",children:(0,l.jsx)(a,{...e})});return(0,l.jsx)(d,{...i?{fallback:r}:{},children:c})}return d.displayName="LoadableComponent",d}},70016:(e,t,a)=>{Promise.resolve().then(a.bind(a,13059))},75707:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let l=a(31836)._(a(68635));function s(e,t){let a={};"function"==typeof e&&(a.loader=e);let s={...a,...t};return(0,l.default)({...s,modules:s.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=70016)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[174,204,335,449,516,552,712,747,748,853,907,931,992,1070,1097,1110,1150,1288,1450,1451,1512,1566,1624,1625,1666,1701,1860,1873,1910,1949,2067,2121,2296,2310,2398,2410,2687,2708,2720,2797,2969,2970,3008,3015,3025,3038,3079,3102,3111,3246,3254,3394,3461,3471,3472,3499,3549,3585,3665,3857,3954,4062,4120,4286,4503,4554,4612,4866,4890,4896,4901,5018,5045,5079,5107,5177,5211,5396,5466,5568,5616,5677,5693,5696,5730,5745,5867,5922,5982,6105,6162,6217,6268,6392,6442,6479,6529,6580,6671,6740,6819,6853,6988,6996,7176,7241,7249,7295,7346,7429,7442,7457,7473,7520,7545,7597,7607,7741,7758,7791,7855,7892,7899,7957,8167,8198,8199,8207,8246,8406,8453,8461,8489,8573,8592,8611,8648,8777,8809,8814,8870,8948,8974,8975,9027,9049,9069,9088,9097,9139,9141,9214,9321,9370,9389,9461,9492,9794,9998],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{3751:(e,t,r)=>{Promise.resolve().then(r.bind(r,88618))},40993:(e,t,r)=>{"use strict";r.d(t,{Ex:()=>d.default,$n:()=>s.default,Zp:()=>l.default,Qv:()=>n.CardSkeleton,G9:()=>y.default,bQ:()=>C.default,pp:()=>j.default,Qn:()=>N.default,pd:()=>a.default,Mh:()=>b.default,uR:()=>u.default,aF:()=>o.default,rq:()=>m.default,LF:()=>p.default,KN:()=>f.default,Lo:()=>g.default,y7:()=>h.default,Iz:()=>v.default,l6:()=>i.default,lM:()=>c.default,cn:()=>x.default});var s=r(35806),a=r(34422),i=r(42994),l=r(81060),o=r(71361),n=r(92542);r(17705);var d=r(80927),c=r(19790);r(6261),r(55846),r(34243),r(89938),r(99023);var p=r(80178),m=r(85444),u=r(91961);r(25112);var x=r(45624),h=r(37415),f=r(48643),g=r(8287);r(1652);var b=r(92701);r(18150);var y=r(71689),v=r(33709);r(76332);var j=r(66200);r(61580);var N=r(51503);r(54128);var C=r(44638);r(21720),r(97050)},88618:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var s=r(95155),a=r(12115),i=r(67671),l=r(14051),o=r.n(l),n=r(73321),d=r(98500),c=r.n(d),p=r(5772),m=r(50910),u=r(40993),x=r(20909),h=r(81135),f=r(30949);function g(){let e=(0,n.useParams)(),t=(0,n.useRouter)(),r=e.id,[l,o]=(0,a.useState)([]),[d,g]=(0,a.useState)(!0),[v,C]=(0,a.useState)(null),[k,A]=(0,a.useState)(!1),[R,$]=(0,a.useState)(!1),[M,P]=(0,a.useState)(!1),[O,_]=(0,a.useState)(!1),[I,K]=(0,a.useState)(null),[F,U]=(0,a.useState)(null),[q,L]=(0,a.useState)({}),[D,z]=(0,a.useState)(!1),{copied:J,copy:B}=(0,f.C)(),W=(0,m.c)("providers"),V=(0,a.useRef)(!1),H=(0,a.useRef)(!1),[Q,G]=(0,a.useState)(null),[Z,Y]=(0,a.useState)(null),[X,ee]=(0,a.useState)(!1),[et,er]=(0,a.useState)(!1),[es,ea]=(0,a.useState)({current:0,total:0,phase:"idle",status:"",logs:[],error:"",importedCount:0}),ei=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?W("anthropicCompatibleName"):W("openaiCompatibleName")),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:x.IS[r]||x.zN[r]||x.fg[r],el=!!x.IS[r]||!!x.zN[r],eo=(0,h.KC)(r),en=(0,x.wG)(r),ed=(0,x.mq)(r),ec=(0,x.gb)(r),ep=ed||ec,em=ep?r:en,eu=ep?v?.prefix||r:en,ex=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&L(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),eh=(0,a.useCallback)(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"})]),s=await e.json(),a=await t.json();if(e.ok){let e=(s.connections||[]).filter(e=>e.provider===r);o(e)}if(t.ok){let e=(a.nodes||[]).find(e=>e.id===r)||null;if(!e&&ep)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}C(e)}}catch(e){console.log("Error fetching connections:",e)}finally{g(!1)}},[r,ep]),ef=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(C(s.node),await eh(),_(!1))}catch(e){console.log("Error updating provider node:",e)}};(0,a.useEffect)(()=>{eh(),ex(),fetch("/api/settings/proxy").then(e=>e.ok?e.json():null).then(e=>Y(e)).catch(()=>{})},[eh,ex]),(0,a.useEffect)(()=>{d||0!==l.length||!ei||ep||V.current||H.current||(V.current=!0,el?A(!0):$(!0))},[d]);let eg=async(e,t,r=en)=>{let s=`${r}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await ex();else{let t=await e.json();alert(t.error||W("failedSetAlias"))}}catch(e){console.log("Error setting alias:",e)}},eb=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await ex()}catch(e){console.log("Error deleting alias:",e)}},ey=async e=>{if(confirm(W("deleteConnectionConfirm")))try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&o(l.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}},ev=(0,a.useCallback)(()=>{eh(),A(!1)},[eh]),ej=async e=>{try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})});if(t.ok)return await eh(),$(!1),null;let s=await t.json().catch(()=>({}));return s.error?.message||s.error||W("failedSaveConnection")}catch(e){return console.log("Error saving connection:",e),W("failedSaveConnectionRetry")}},eN=async e=>{try{(await fetch(`/api/providers/${I.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eh(),P(!1))}catch(e){console.log("Error updating connection:",e)}},eC=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&o(r=>r.map(r=>r.id===e?{...r,isActive:t}:r))}catch(e){console.log("Error updating connection status:",e)}},ek=async(e,t)=>{try{(await fetch("/api/rate-limits",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:e,enabled:t})})).ok&&o(r=>r.map(r=>r.id===e?{...r,rateLimitProtection:t}:r))}catch(e){console.error("Error toggling rate limit:",e)}},ew=async e=>{if(e&&!F){U(e);try{let t=await fetch(`/api/providers/${e}/test`,{method:"POST"});if(!t.ok){let e=await t.json().catch(()=>({}));alert(e.error||W("failedRetestConnection"));return}await eh()}catch(e){console.error("Error retesting connection:",e)}finally{U(null)}}},[eS,eT]=(0,a.useState)(null),eE=(0,i.i)(),eA=async e=>{if(!eS){eT(e);try{let t=await fetch(`/api/providers/${e}/refresh`,{method:"POST"}),r=await t.json().catch(()=>({}));t.ok&&r.success?(eE.success(W("tokenRefreshed")),await eh()):eE.error(r.error||W("tokenRefreshFailed"))}catch(e){console.error("Error refreshing token:",e),eE.error(W("tokenRefreshFailed"))}finally{eT(null)}}},eR=async(e,t)=>{if(e&&t)try{let r=t.priority,s=e.priority;r===s&&(r=l.indexOf(e)>l.indexOf(t)?t.priority-.5:t.priority+.5),await Promise.all([fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:r})}),fetch(`/api/providers/${t.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:s})})]),await eh()}catch(e){console.log("Error swapping priority:",e)}},e$=async()=>{if(X)return;let e=l.find(e=>!1!==e.isActive);if(e){ee(!0),er(!0),ea({current:0,total:0,phase:"fetching",status:W("fetchingModels"),logs:[],error:"",importedCount:0});try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void ea(e=>({...e,phase:"error",status:W("failedFetchModels"),error:s.error||W("failedImportModels")}));let a=s.models||[];if(0===a.length)return void ea(e=>({...e,phase:"done",status:W("noModelsFound"),logs:[W("noModelsReturnedFromEndpoint")]}));ea(e=>({...e,phase:"importing",total:a.length,status:W("importingModelsProgress",{current:0,total:a.length}),logs:[W("foundModelsStartingImport",{count:a.length})]}));let i=0;for(let e=0;e<a.length;e++){let t=a[e],s=t.id||t.name||t.model;if(!s)continue;let l=s.split("/"),o=l[l.length-1];ea(t=>({...t,current:e+1,status:W("importingModelsProgress",{current:e+1,total:a.length}),logs:[...t.logs,W("importingModelById",{modelId:s})]})),await fetch("/api/provider-models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,modelId:s,modelName:t.name||s,source:"imported"})}),q[o]||await eg(s,o,em),i+=1}await ex(),ea(e=>({...e,phase:"done",current:a.length,status:i>0?W("importSuccessCount",{count:i}):W("noNewModelsAddedExisting"),logs:[...e.logs,i>0?W("importDoneCount",{count:i}):W("noNewModelsAdded")],importedCount:i})),i>0&&setTimeout(()=>{window.location.reload()},2e3)}catch(e){console.log("Error importing models:",e),ea(t=>({...t,phase:"error",status:W("importFailed"),error:e instanceof Error?e.message:W("unexpectedErrorOccurred")}))}finally{ee(!1)}}},eM=async(e,t)=>{er(!0),ea({current:0,total:0,phase:"fetching",status:W("fetchingModels"),logs:[],error:"",importedCount:0});try{let r=(await e()).models||[];if(0===r.length)return void ea(e=>({...e,phase:"done",status:W("noModelsFound"),logs:[W("noModelsReturnedFromEndpoint")]}));ea(e=>({...e,phase:"importing",total:r.length,status:W("importingModelsProgress",{current:0,total:r.length}),logs:[W("foundModelsStartingImport",{count:r.length})]}));let s=0;for(let e=0;e<r.length;e++){let a=r[e],i=a.id||a.name||a.model;i&&(ea(t=>({...t,current:e+1,status:W("importingModelsProgress",{current:e+1,total:r.length}),logs:[...t.logs,W("importingModelById",{modelId:i})]})),await t(a)&&(s+=1))}ea(e=>({...e,phase:"done",current:r.length,status:s>0?W("importSuccessCount",{count:s}):W("noNewModelsAdded"),logs:[...e.logs,s>0?W("importDoneCount",{count:s}):W("noNewModelsAdded")],importedCount:s})),s>0&&setTimeout(()=>{window.location.reload()},2e3)}catch(e){console.log("Error importing models:",e),ea(t=>({...t,phase:"error",status:W("importFailed"),error:e instanceof Error?e.message:W("unexpectedErrorOccurred")}))}},eP=l.some(e=>!1!==e.isActive);return d?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(u.Qv,{}),(0,s.jsx)(u.Qv,{})]}):ei?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(c(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),W("backToProviders")]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("div",{className:"rounded-lg flex items-center justify-center",style:{backgroundColor:`${ei.color}15`},children:D?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:ei.color},children:ei.textIcon||ei.id.slice(0,2).toUpperCase()}):(0,s.jsx)(p.default,{src:ed&&ei.apiType?"responses"===ei.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ec?"/providers/anthropic-m.png":`/providers/${ei.id}.png`,alt:ei.name,width:48,height:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",sizes:"48px",onError:()=>z(!0)})}),(0,s.jsxs)("div",{children:[ei.website?(0,s.jsxs)("a",{href:ei.website,target:"_blank",rel:"noopener noreferrer",className:"text-3xl font-semibold tracking-tight hover:underline inline-flex items-center gap-2",style:{color:ei.color},children:[ei.name,(0,s.jsx)("span",{className:"material-symbols-outlined text-lg opacity-60",children:"open_in_new"})]}):(0,s.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:ei.name}),(0,s.jsx)("p",{className:"text-text-muted",children:W("connectionCountLabel",{count:l.length})})]})]})]}),ep&&v&&(0,s.jsxs)(u.Zp,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:ec?W("anthropicCompatibleDetails"):W("openaiCompatibleDetails")}),(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:[ec?W("messagesApi"):"responses"===v.apiType?W("responsesApi"):W("chatCompletions")," ","\xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",ec?W("messagesPath"):"responses"===v.apiType?W("responsesPath"):W("chatCompletionsPath")]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(u.$n,{size:"sm",icon:"add",onClick:()=>$(!0),disabled:l.length>0,children:W("add")}),(0,s.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>_(!0),children:W("edit")}),(0,s.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{if(confirm(W("deleteCompatibleNodeConfirm",{type:ec?W("anthropic"):W("openai")})))try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&t.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}},children:W("delete")})]})]}),l.length>0&&(0,s.jsx)("p",{className:"text-sm text-text-muted",children:W("singleConnectionPerCompatible")})]}),(0,s.jsxs)(u.Zp,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:W("connections")}),(0,s.jsxs)("button",{onClick:()=>G({level:"provider",id:r,label:ei?.name||r}),className:`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-all ${Z?.providers?.[r]?"bg-amber-500/15 text-amber-500 hover:bg-amber-500/25":"bg-black/[0.03] dark:bg-white/[0.03] text-text-muted/50 hover:text-text-muted hover:bg-black/[0.06] dark:hover:bg-white/[0.06]"}`,title:Z?.providers?.[r]?W("providerProxyTitleConfigured",{host:Z.providers[r].host||W("configured")}):W("providerProxyConfigureHint"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"vpn_lock"}),Z?.providers?.[r]&&Z.providers[r].host||W("providerProxy")]})]}),ep?0===l.length&&(0,s.jsx)(u.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:W("add")}):(0,s.jsx)(u.$n,{size:"sm",icon:"add",onClick:()=>el?A(!0):$(!0),children:W("add")})]}),0===l.length?(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:el?"lock":"key"})}),(0,s.jsx)("p",{className:"text-text-main font-medium mb-1",children:W("noConnectionsYet")}),(0,s.jsx)("p",{className:"text-sm text-text-muted mb-4",children:W("addFirstConnectionHint")}),!ep&&(0,s.jsx)(u.$n,{icon:"add",onClick:()=>el?A(!0):$(!0),children:W("addConnection")})]}):(0,s.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:l.sort((e,t)=>(e.priority||0)-(t.priority||0)).map((e,t)=>(0,s.jsx)(w,{connection:e,isOAuth:el,isFirst:0===t,isLast:t===l.length-1,onMoveUp:()=>eR(e,l[t-1]),onMoveDown:()=>eR(e,l[t+1]),onToggleActive:t=>eC(e.id,t),onToggleRateLimit:t=>ek(e.id,t),onRetest:()=>ew(e.id),isRetesting:F===e.id,onEdit:()=>{K(e),P(!0)},onDelete:()=>ey(e.id),onReauth:el?()=>A(!0):void 0,onRefreshToken:el?()=>eA(e.id):void 0,isRefreshing:eS===e.id,onProxy:()=>G({level:"key",id:e.id,label:e.name||e.email||e.id}),hasProxy:!!(Z?.keys?.[e.id]||Z?.providers?.[r]||Z?.global),proxySource:Z?.keys?.[e.id]?"key":Z?.providers?.[r]?"provider":Z?.global?"global":null,proxyHost:(Z?.keys?.[e.id]||Z?.providers?.[r]||Z?.global)?.host||null},e.id))})]}),(0,s.jsxs)(u.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:W("availableModels")}),(()=>{if(ep)return(0,s.jsx)(N,{providerStorageAlias:em,providerDisplayAlias:eu,modelAliases:q,copied:J,onCopy:B,onSetAlias:eg,onDeleteAlias:eb,connections:l,isAnthropic:ec,onImportWithProgress:eM});if(ei.passthroughModels)return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,s.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"download",onClick:e$,disabled:!eP||X,children:X?W("importingModels"):W("importFromModels")}),!eP&&(0,s.jsx)("span",{className:"text-xs text-text-muted",children:W("addConnectionToImport")})]}),(0,s.jsx)(y,{providerAlias:en,modelAliases:q,copied:J,onCopy:B,onSetAlias:eg,onDeleteAlias:eb})]});let e=(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,s.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"download",onClick:e$,disabled:!eP||X,children:X?W("importingModels"):W("importFromModels")}),!eP&&(0,s.jsx)("span",{className:"text-xs text-text-muted",children:W("addConnectionToImport")})]});return 0===eo.length?(0,s.jsxs)("div",{children:[e,(0,s.jsx)("p",{className:"text-sm text-text-muted",children:W("noModelsConfigured")})]}):(0,s.jsxs)("div",{children:[e,(0,s.jsx)("div",{className:"flex flex-wrap gap-3",children:eo.map(e=>{let t=`${em}/${e.id}`,a=`${r}/${e.id}`,i=Object.entries(q).find(([,e])=>e===t||e===a)?.[0];return(0,s.jsx)(b,{model:e,fullModel:`${eu}/${e.id}`,alias:i,copied:J,onCopy:B,onSetAlias:t=>eg(e.id,t,em),onDeleteAlias:()=>eb(i)},e.id)})})]})})(),!ep&&(0,s.jsx)(j,{providerId:r,providerAlias:eu,copied:J,onCopy:B})]}),"kiro"===r?(0,s.jsx)(u.Mh,{isOpen:k,providerInfo:ei,onSuccess:ev,onClose:()=>{H.current=!0,A(!1)}}):"cursor"===r?(0,s.jsx)(u.G9,{isOpen:k,onSuccess:ev,onClose:()=>{H.current=!0,A(!1)}}):(0,s.jsx)(u.LF,{isOpen:k,provider:r,providerInfo:ei,onSuccess:ev,onClose:()=>{H.current=!0,A(!1)}}),(0,s.jsx)(S,{isOpen:R,provider:r,providerName:ei.name,isCompatible:ep,isAnthropic:ec,onSave:ej,onClose:()=>$(!1)}),(0,s.jsx)(T,{isOpen:M,connection:I,onSave:eN,onClose:()=>P(!1)}),ep&&(0,s.jsx)(E,{isOpen:O,node:v,onSave:ef,onClose:()=>_(!1),isAnthropic:ec}),Q&&(0,s.jsx)(u.KN,{isOpen:!!Q,onClose:()=>G(null),level:Q.level,levelId:Q.id,levelLabel:Q.label}),(0,s.jsx)(u.aF,{isOpen:et,onClose:()=>{("done"===es.phase||"error"===es.phase)&&er(!1)},title:W("importingModelsTitle"),size:"md",closeOnOverlay:!1,showCloseButton:"done"===es.phase||"error"===es.phase,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:["fetching"===es.phase&&(0,s.jsx)("span",{className:"material-symbols-outlined text-primary animate-spin",children:"progress_activity"}),"importing"===es.phase&&(0,s.jsx)("span",{className:"material-symbols-outlined text-primary animate-spin",children:"progress_activity"}),"done"===es.phase&&(0,s.jsx)("span",{className:"material-symbols-outlined text-green-500",children:"check_circle"}),"error"===es.phase&&(0,s.jsx)("span",{className:"material-symbols-outlined text-red-500",children:"error"}),(0,s.jsx)("span",{className:"text-sm font-medium text-text-main",children:es.status})]}),("importing"===es.phase||"done"===es.phase)&&es.total>0&&(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:[es.current," / ",es.total]}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:[Math.round(es.current/es.total*100),"%"]})]}),(0,s.jsx)("div",{className:"w-full h-2.5 bg-black/10 dark:bg-white/10 rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full rounded-full transition-all duration-300 ease-out",style:{width:`${es.current/es.total*100}%`,background:"done"===es.phase?"linear-gradient(90deg, #22c55e, #16a34a)":"linear-gradient(90deg, var(--color-primary), var(--color-primary-hover, var(--color-primary)))"}})})]}),"fetching"===es.phase&&(0,s.jsx)("div",{className:"w-full h-2.5 bg-black/10 dark:bg-white/10 rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full rounded-full animate-pulse",style:{width:"60%",background:"linear-gradient(90deg, var(--color-primary), var(--color-primary-hover, var(--color-primary)))"}})}),"error"===es.phase&&es.error&&(0,s.jsx)("div",{className:"p-3 rounded-lg bg-red-500/10 border border-red-500/20",children:(0,s.jsx)("p",{className:"text-sm text-red-400",children:es.error})}),es.logs.length>0&&(0,s.jsx)("div",{className:"max-h-48 overflow-y-auto rounded-lg bg-black/5 dark:bg-white/5 p-3 border border-black/5 dark:border-white/5",children:(0,s.jsx)("div",{className:"flex flex-col gap-1",children:es.logs.map((e,t)=>(0,s.jsx)("p",{className:`text-xs font-mono ${e.startsWith("✓")?"text-green-500 font-semibold":"text-text-muted"}`,children:e},t))})}),"done"===es.phase&&es.importedCount>0&&(0,s.jsx)("p",{className:"text-xs text-text-muted text-center animate-pulse",children:W("pageAutoRefresh")})]})})]}):(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:W("providerNotFound")}),(0,s.jsx)(c(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:W("backToProviders")})]})}function b({model:e,fullModel:t,alias:r,copied:a,onCopy:i,onSetAlias:l,onDeleteAlias:o}){let n=(0,m.c)("providers");return(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg border border-border hover:bg-sidebar/50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:"smart_toy"}),(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsx)("button",{onClick:()=>i(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:n("copyModel"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})})]})}function y({providerAlias:e,modelAliases:t,copied:r,onCopy:i,onSetAlias:l,onDeleteAlias:o}){let n=(0,m.c)("providers"),[d,c]=(0,a.useState)(""),[p,x]=(0,a.useState)(!1),h=Object.entries(t).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,r])=>({modelId:r.replace(`${e}/`,""),fullModel:r,alias:t})),f=async()=>{let e;if(!d.trim()||p)return;let r=d.trim(),s=(e=r.split("/"))[e.length-1];if(t[s])return void alert(n("aliasExistsAlert",{alias:s}));x(!0);try{await l(r,s),c("")}catch(e){console.log("Error adding model:",e)}finally{x(!1)}};return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:n("openRouterAnyModelHint")}),(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("label",{htmlFor:"new-model-input",className:"text-xs text-text-muted mb-1 block",children:n("modelIdFromOpenRouter")}),(0,s.jsx)("input",{id:"new-model-input",type:"text",value:d,onChange:e=>c(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),placeholder:n("openRouterModelPlaceholder"),className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,s.jsx)(u.$n,{size:"sm",icon:"add",onClick:f,disabled:!d.trim()||p,children:p?n("adding"):n("add")})]}),h.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:h.map(({modelId:e,fullModel:t,alias:a})=>(0,s.jsx)(v,{modelId:e,fullModel:t,copied:r,onCopy:i,onDeleteAlias:()=>o(a)},t))})]})}function v({modelId:e,fullModel:t,copied:r,onCopy:a,onDeleteAlias:i}){let l=(0,m.c)("providers");return(0,s.jsxs)("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-border hover:bg-sidebar/50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:"smart_toy"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsx)("button",{onClick:()=>a(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:l("copyModel"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:r===`model-${e}`?"check":"content_copy"})})]})]}),(0,s.jsx)("button",{onClick:i,className:"p-1 hover:bg-red-50 rounded text-red-500",title:l("removeModel"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function j({providerId:e,providerAlias:t,copied:r,onCopy:l}){let o=(0,m.c)("providers"),n=(0,i.i)(),[d,c]=(0,a.useState)([]),[p,x]=(0,a.useState)(""),[h,f]=(0,a.useState)(""),[g,b]=(0,a.useState)("chat-completions"),[y,v]=(0,a.useState)(["chat"]),[j,N]=(0,a.useState)(!1),[C,k]=(0,a.useState)(!0),[w,S]=(0,a.useState)(null),[T,E]=(0,a.useState)("chat-completions"),[A,R]=(0,a.useState)(["chat"]),[$,M]=(0,a.useState)(null),P=(0,a.useCallback)(async()=>{try{let t=await fetch(`/api/provider-models?provider=${encodeURIComponent(e)}`);if(t.ok){let e=await t.json();c(e.models||[])}}catch(e){console.error("Failed to fetch custom models:",e)}finally{k(!1)}},[e]);(0,a.useEffect)(()=>{P()},[P]);let O=async()=>{if(p.trim()&&!j){N(!0);try{(await fetch("/api/provider-models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,modelId:p.trim(),modelName:h.trim()||void 0,apiFormat:g,supportedEndpoints:y})})).ok&&(x(""),f(""),b("chat-completions"),v(["chat"]),await P())}catch(e){console.error("Failed to add custom model:",e)}finally{N(!1)}}},_=async t=>{try{await fetch(`/api/provider-models?provider=${encodeURIComponent(e)}&model=${encodeURIComponent(t)}`,{method:"DELETE"}),await P()}catch(e){console.error("Failed to remove custom model:",e)}},I=()=>{S(null),E("chat-completions"),R(["chat"]),M(null)},K=async t=>{if(w&&w===t){if(!A.length)return void n.error("Select at least one supported endpoint");M(t);try{let r=d.find(e=>e.id===t);if(!(await fetch("/api/provider-models",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,modelId:t,modelName:r?.name||t,source:r?.source||"manual",apiFormat:T,supportedEndpoints:A})})).ok)throw Error("Failed to save model endpoint settings");await P(),n.success("Saved model endpoint settings"),I()}catch(e){console.error("Failed to save custom model:",e),n.error("Failed to save model endpoint settings")}finally{M(null)}}};return(0,s.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[(0,s.jsxs)("h3",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-primary",children:"tune"}),o("customModels")]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mb-3",children:o("customModelsHint")}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 mb-3",children:[(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("label",{htmlFor:"custom-model-id",className:"text-xs text-text-muted mb-1 block",children:o("modelId")}),(0,s.jsx)("input",{id:"custom-model-id",type:"text",value:p,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&O(),placeholder:o("customModelPlaceholder"),className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,s.jsxs)("div",{className:"w-40",children:[(0,s.jsx)("label",{htmlFor:"custom-model-name",className:"text-xs text-text-muted mb-1 block",children:o("displayName")}),(0,s.jsx)("input",{id:"custom-model-name",type:"text",value:h,onChange:e=>f(e.target.value),onKeyDown:e=>"Enter"===e.key&&O(),placeholder:o("optional"),className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,s.jsx)(u.$n,{size:"sm",icon:"add",onClick:O,disabled:!p.trim()||j,children:j?o("adding"):o("add")})]}),(0,s.jsxs)("div",{className:"flex items-end gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"w-48",children:[(0,s.jsx)("label",{htmlFor:"custom-api-format",className:"text-xs text-text-muted mb-1 block",children:"API Format"}),(0,s.jsxs)("select",{id:"custom-api-format",value:g,onChange:e=>b(e.target.value),className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"chat-completions",children:"Chat Completions"}),(0,s.jsx)("option",{value:"responses",children:"Responses API"})]})]}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted mb-1 block",children:"Supported Endpoints"}),(0,s.jsx)("div",{className:"flex items-center gap-3",children:["chat","embeddings","images","audio"].map(e=>(0,s.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-main cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:y.includes(e),onChange:t=>{t.target.checked?v(t=>[...t,e]):v(t=>t.filter(t=>t!==e))},className:"rounded border-border"}),"chat"===e?"\uD83D\uDCAC Chat":"embeddings"===e?"\uD83D\uDCD0 Embeddings":"images"===e?"\uD83D\uDDBC️ Images":"\uD83D\uDD0A Audio"]},e))})]})]})]}),C?(0,s.jsx)("p",{className:"text-xs text-text-muted",children:o("loading")}):d.length>0?(0,s.jsx)("div",{className:"flex flex-col gap-2",children:d.map(e=>{let a=`${t}/${e.id}`,i=`custom-${e.id}`;return(0,s.jsxs)("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-border hover:bg-sidebar/50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-primary",children:"tune"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e.name||e.id}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-1 flex-wrap",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:a}),(0,s.jsx)("button",{onClick:()=>l(a,i),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:o("copyModel"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:r===i?"check":"content_copy"})}),"responses"===e.apiFormat&&(0,s.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-blue-500/15 text-blue-400 font-medium",children:"Responses"}),e.supportedEndpoints?.includes("embeddings")&&(0,s.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-purple-500/15 text-purple-400 font-medium",children:"\uD83D\uDCD0 Embed"}),e.supportedEndpoints?.includes("images")&&(0,s.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-amber-500/15 text-amber-400 font-medium",children:"\uD83D\uDDBC️ Images"}),e.supportedEndpoints?.includes("audio")&&(0,s.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-green-500/15 text-green-400 font-medium",children:"\uD83D\uDD0A Audio"})]}),w===e.id&&(0,s.jsxs)("div",{className:"mt-3 p-3 rounded-lg border border-border bg-sidebar/40",children:[(0,s.jsxs)("div",{className:"flex items-end gap-3 flex-wrap",children:[(0,s.jsxs)("div",{className:"w-44",children:[(0,s.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Format"}),(0,s.jsxs)("select",{value:T,onChange:e=>E(e.target.value),className:"w-full px-2.5 py-2 text-xs border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"chat-completions",children:"Chat Completions"}),(0,s.jsx)("option",{value:"responses",children:"Responses API"})]})]}),(0,s.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted mb-1 block",children:"Supported Endpoints"}),(0,s.jsx)("div",{className:"flex items-center gap-3 flex-wrap",children:["chat","embeddings","images","audio"].map(e=>(0,s.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-main cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:A.includes(e),onChange:t=>{t.target.checked?R(t=>t.includes(e)?t:[...t,e]):R(t=>t.filter(t=>t!==e))},className:"rounded border-border"}),"chat"===e?"\uD83D\uDCAC Chat":"embeddings"===e?"\uD83D\uDCD0 Embeddings":"images"===e?"\uD83D\uDDBC️ Images":"\uD83D\uDD0A Audio"]},e))})]})]}),(0,s.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,s.jsx)(u.$n,{size:"sm",onClick:()=>K(e.id),disabled:$===e.id,children:$===e.id?o("saving"):o("save")}),(0,s.jsx)(u.$n,{size:"sm",variant:"ghost",onClick:I,children:o("cancel")})]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("button",{onClick:()=>{S(e.id),E(e.apiFormat||"chat-completions"),R(Array.isArray(e.supportedEndpoints)&&e.supportedEndpoints.length?e.supportedEndpoints:["chat"])},className:"p-1 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:o("edit"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"edit"})}),(0,s.jsx)("button",{onClick:()=>_(e.id),className:"p-1 hover:bg-red-50 rounded text-red-500",title:o("removeCustomModel"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})]},e.id)})}):(0,s.jsx)("p",{className:"text-xs text-text-muted",children:o("noCustomModels")})]})}function N({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:r,copied:l,onCopy:o,onSetAlias:n,onDeleteAlias:d,connections:c,isAnthropic:p,onImportWithProgress:x}){let h=(0,m.c)("providers"),[f,g]=(0,a.useState)(""),[b,y]=(0,a.useState)(!1),[j,N]=(0,a.useState)(!1),C=(0,i.i)(),k=Object.entries(r).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,r])=>({modelId:r.replace(`${e}/`,""),fullModel:r,alias:t})),w=e=>{let s,a=(s=e.split("/"))[s.length-1];if(!r[a])return a;let i=`${t}-${a}`;return r[i]?null:i},S=async()=>{if(!f.trim()||b)return;let t=f.trim(),r=w(t);if(!r)return void C.error(h("allSuggestedAliasesExist"));y(!0);try{let s=await fetch("/api/provider-models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,modelId:t,modelName:t,source:"manual"})});if(!s.ok){let e={};try{e=await s.json()}catch(e){console.error("Failed to parse error response from custom model API:",e)}throw Error(e.error?.message||h("failedSaveCustomModel"))}await n(t,r,e),g(""),C.success(h("modelAddedSuccess",{modelId:t}))}catch(e){console.error("Error adding model:",e),C.error(e instanceof Error?e.message:h("failedAddModelTryAgain"))}finally{y(!1)}},T=async()=>{if(j)return;let t=c.find(e=>!1!==e.isActive);if(t){N(!0);try{await x(async()=>{let e=await fetch(`/api/providers/${t.id}/models`),r=await e.json();if(!e.ok)throw Error(r.error||h("failedImportModels"));return r},async t=>{let r=t.id||t.name||t.model;if(!r)return!1;let s=w(r);return!!s&&((await fetch("/api/provider-models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,modelId:r,modelName:t.name||r,source:"imported"})})).ok?(await n(r,s,e),!0):(C.error(h("failedSaveImportedModel")),!1))})}catch(e){console.error("Error importing models:",e),C.error(h("failedImportModelsTryAgain"))}finally{N(!1)}}},E=c.some(e=>!1!==e.isActive),A=async(t,r)=>{try{if(!(await fetch(`/api/provider-models?provider=${encodeURIComponent(e)}&model=${encodeURIComponent(t)}`,{method:"DELETE"})).ok)throw Error(h("failedRemoveModelFromDatabase"));await d(r),C.success(h("modelRemovedSuccess"))}catch(e){console.error("Error deleting model:",e),C.error(e instanceof Error?e.message:h("failedDeleteModelTryAgain"))}};return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:h("compatibleModelsDescription",{type:p?h("anthropic"):h("openai")})}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,s.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:h("modelId")}),(0,s.jsx)("input",{id:"new-compatible-model-input",type:"text",value:f,onChange:e=>g(e.target.value),onKeyDown:e=>"Enter"===e.key&&S(),placeholder:p?h("anthropicCompatibleModelPlaceholder"):h("openaiCompatibleModelPlaceholder"),className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,s.jsx)(u.$n,{size:"sm",icon:"add",onClick:S,disabled:!f.trim()||b,children:b?h("adding"):h("add")}),(0,s.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"download",onClick:T,disabled:!E||j,children:j?h("importingModels"):h("importFromModels")})]}),!E&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:h("addConnectionToImport")}),k.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:k.map(({modelId:e,fullModel:r,alias:a})=>(0,s.jsx)(v,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:o,onDeleteAlias:()=>A(e,a)},r))})]})}function C({until:e}){let[t,r]=(0,a.useState)("");return((0,a.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void r("");let s=Math.floor(t/1e3);if(s<60)r(`${s}s`);else if(s<3600)r(`${Math.floor(s/60)}m ${s%60}s`);else{let e=Math.floor(s/3600),t=Math.floor(s%3600/60);r(`${e}h ${t}m`)}};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),t)?(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}b.propTypes={model:o().shape({id:o().string.isRequired}).isRequired,fullModel:o().string.isRequired,alias:o().string,copied:o().string,onCopy:o().func.isRequired},y.propTypes={providerAlias:o().string.isRequired,modelAliases:o().object.isRequired,copied:o().string,onCopy:o().func.isRequired,onSetAlias:o().func.isRequired,onDeleteAlias:o().func.isRequired},v.propTypes={modelId:o().string.isRequired,fullModel:o().string.isRequired,copied:o().string,onCopy:o().func.isRequired,onDeleteAlias:o().func.isRequired},j.propTypes={providerId:o().string.isRequired,providerAlias:o().string.isRequired,copied:o().string,onCopy:o().func.isRequired},N.propTypes={providerStorageAlias:o().string.isRequired,providerDisplayAlias:o().string.isRequired,modelAliases:o().object.isRequired,copied:o().string,onCopy:o().func.isRequired,onSetAlias:o().func.isRequired,onDeleteAlias:o().func.isRequired,connections:o().arrayOf(o().shape({id:o().string,isActive:o().bool})).isRequired,isAnthropic:o().bool,onImportWithProgress:o().func.isRequired},C.propTypes={until:o().string.isRequired};let k={runtime_error:{labelKey:"errorTypeRuntime",variant:"warning"},upstream_auth_error:{labelKey:"errorTypeUpstreamAuth",variant:"error"},auth_missing:{labelKey:"errorTypeMissingCredential",variant:"warning"},token_refresh_failed:{labelKey:"errorTypeRefreshFailed",variant:"warning"},token_expired:{labelKey:"errorTypeTokenExpired",variant:"warning"},upstream_rate_limited:{labelKey:"errorTypeRateLimited",variant:"warning"},upstream_unavailable:{labelKey:"errorTypeUpstreamUnavailable",variant:"error"},network_error:{labelKey:"errorTypeNetworkError",variant:"warning"},unsupported:{labelKey:"errorTypeTestUnsupported",variant:"default"},upstream_error:{labelKey:"errorTypeUpstreamError",variant:"error"}};function w({connection:e,isOAuth:t,isFirst:r,isLast:i,onMoveUp:l,onMoveDown:o,onToggleActive:n,onToggleRateLimit:d,onRetest:c,isRetesting:p,onEdit:x,onDelete:h,onReauth:f,onProxy:g,hasProxy:b,proxySource:y,proxyHost:v,onRefreshToken:j,isRefreshing:N}){let w,S=(0,m.c)("providers"),T=t?e.name||e.email||e.displayName||S("oauthAccount"):e.name,[E,A]=(0,a.useState)(!1),[R,$]=(0,a.useState)(()=>t&&e.expiresAt?Math.floor((new Date(e.expiresAt).getTime()-Date.now())/6e4):null);(0,a.useEffect)(()=>{if(!t||!e.expiresAt)return;let r=setInterval(()=>{$(Math.floor((new Date(e.expiresAt).getTime()-Date.now())/6e4))},3e4);return()=>clearInterval(r)},[t,e.expiresAt]),(0,a.useEffect)(()=>{let t=()=>{A(e.rateLimitedUntil&&new Date(e.rateLimitedUntil).getTime()>Date.now())};t();let r=e.rateLimitedUntil?setInterval(t,1e3):null;return()=>{r&&clearInterval(r)}},[e.rateLimitedUntil]);let M="unavailable"!==e.testStatus||E?e.testStatus:"active",P=function(e,t,r,s){if(!1===e.isActive)return{statusVariant:"default",statusLabel:s("statusDisabled"),errorType:null,errorBadge:null,errorTextClass:"text-text-muted"};if("active"===t||"success"===t)return{statusVariant:"success",statusLabel:s("statusConnected"),errorType:null,errorBadge:null,errorTextClass:"text-text-muted"};let a=function(e,t){if(t)return"upstream_rate_limited";if(e.lastErrorType)return e.lastErrorType;let r=Number(e.errorCode);if(401===r||403===r)return"upstream_auth_error";if(429===r)return"upstream_rate_limited";if(r>=500)return"upstream_unavailable";let s=(e.lastError||"").toLowerCase();return s?s.includes("runtime")||s.includes("not runnable")||s.includes("not installed")||s.includes("healthcheck")?"runtime_error":s.includes("refresh failed")?"token_refresh_failed":s.includes("token expired")||s.includes("expired")?"token_expired":s.includes("invalid api key")||s.includes("token invalid")||s.includes("revoked")||s.includes("access denied")||s.includes("unauthorized")?"upstream_auth_error":s.includes("rate limit")||s.includes("quota")||s.includes("too many requests")||s.includes("429")?"upstream_rate_limited":s.includes("fetch failed")||s.includes("network")||s.includes("timeout")||s.includes("econn")||s.includes("enotfound")?"network_error":s.includes("not supported")?"unsupported":"upstream_error":null}(e,r),i=a&&k[a]||null;return"runtime_error"===a?{statusVariant:"warning",statusLabel:s("statusRuntimeIssue"),errorType:a,errorBadge:i,errorTextClass:"text-yellow-600 dark:text-yellow-400"}:"upstream_auth_error"===a||"auth_missing"===a||"token_refresh_failed"===a||"token_expired"===a?{statusVariant:"error",statusLabel:s("statusAuthFailed"),errorType:a,errorBadge:i,errorTextClass:"text-red-500"}:"upstream_rate_limited"===a?{statusVariant:"warning",statusLabel:s("statusRateLimited"),errorType:a,errorBadge:i,errorTextClass:"text-yellow-600 dark:text-yellow-400"}:"network_error"===a?{statusVariant:"warning",statusLabel:s("statusNetworkIssue"),errorType:a,errorBadge:i,errorTextClass:"text-yellow-600 dark:text-yellow-400"}:"unsupported"===a?{statusVariant:"default",statusLabel:s("statusTestUnsupported"),errorType:a,errorBadge:i,errorTextClass:"text-text-muted"}:{statusVariant:"error",statusLabel:({unavailable:s("statusUnavailable"),failed:s("statusFailed"),error:s("statusError")})[t]||t||s("statusError"),errorType:a,errorBadge:i,errorTextClass:"text-red-500"}}(e,M,E,S),O=!!e.rateLimitProtection;return(0,s.jsxs)("div",{className:`group flex items-center justify-between p-3 rounded-lg hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.jsx)("button",{onClick:o,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:t?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:T}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1 flex-wrap",children:[(0,s.jsx)(u.Ex,{variant:P.statusVariant,size:"sm",dot:!0,children:P.statusLabel}),null!==R&&(R<0?(0,s.jsxs)("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs font-medium bg-red-500/15 text-red-500",title:`Token expired: ${e.expiresAt}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"error"}),"expired"]}):R<30?(0,s.jsxs)("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs font-medium bg-amber-500/15 text-amber-500",title:`Token expires in ${R}m`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"warning"}),`~${R}m`]}):null),E&&!1!==e.isActive&&(0,s.jsx)(C,{until:e.rateLimitedUntil}),P.errorBadge&&!1!==e.isActive&&(0,s.jsx)(u.Ex,{variant:P.errorBadge.variant,size:"sm",children:S(P.errorBadge.labelKey)}),e.lastError&&!1!==e.isActive&&(0,s.jsx)("span",{className:`text-xs truncate max-w-[300px] ${P.errorTextClass}`,title:e.lastError,children:e.lastError}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,s.jsx)("span",{className:"text-xs text-text-muted",children:S("autoPriority",{priority:e.globalPriority})}),(0,s.jsx)("span",{className:"text-text-muted/30 select-none",children:"|"}),(0,s.jsxs)("button",{onClick:()=>d(!O),className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium transition-all cursor-pointer ${O?"bg-emerald-500/15 text-emerald-500 hover:bg-emerald-500/25":"bg-black/[0.03] dark:bg-white/[0.03] text-text-muted/50 hover:text-text-muted hover:bg-black/[0.06] dark:hover:bg-white/[0.06]"}`,title:S(O?"disableRateLimitProtection":"enableRateLimitProtection"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"shield"}),S(O?"rateLimitProtected":"rateLimitUnprotected")]}),b&&(w=S("global"===y?"proxySourceGlobal":"provider"===y?"proxySourceProvider":"proxySourceKey"),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-text-muted/30 select-none",children:"|"}),(0,s.jsxs)("span",{className:`inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs font-medium ${"global"===y?"bg-emerald-500/15 text-emerald-500":"provider"===y?"bg-amber-500/15 text-amber-500":"bg-blue-500/15 text-blue-500"}`,title:S("proxyConfiguredBySource",{source:w,host:v||S("configured")}),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"vpn_lock"}),v||S("proxy")]})]}))]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(u.$n,{size:"sm",variant:"ghost",icon:"refresh",loading:p,disabled:!1===e.isActive,onClick:c,className:"!h-7 !px-2 text-xs",title:S("retestAuthentication"),children:S("retest")}),j&&(0,s.jsx)(u.$n,{size:"sm",variant:"ghost",icon:"token",loading:N,disabled:!1===e.isActive||N,onClick:j,className:"!h-7 !px-2 text-xs text-amber-500 hover:text-amber-400",title:"Refresh OAuth token manually",children:"Token"}),(0,s.jsx)(u.lM,{size:"sm",checked:e.isActive??!0,onChange:n,title:S(e.isActive??!0?"disableConnection":"enableConnection")}),(0,s.jsxs)("div",{className:"flex gap-1 ml-1 transition-opacity",children:[f&&(0,s.jsx)("button",{onClick:f,className:"p-2 hover:bg-amber-500/10 rounded text-amber-600 hover:text-amber-500",title:S("reauthenticateConnection"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"passkey"})}),(0,s.jsx)("button",{onClick:x,className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary",title:S("edit"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,s.jsx)("button",{onClick:g,className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary",title:S("proxyConfig"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"vpn_lock"})}),(0,s.jsx)("button",{onClick:h,className:"p-2 hover:bg-red-500/10 rounded text-red-500",title:S("deleteConnection"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]})]})}function S({isOpen:e,provider:t,providerName:r,isCompatible:i,isAnthropic:l,onSave:o,onClose:n}){let d=(0,m.c)("providers"),[c,p]=(0,a.useState)({name:"",apiKey:"",priority:1}),[x,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),[b,y]=(0,a.useState)(!1),[v,j]=(0,a.useState)(null),N=async()=>{h(!0),j(null);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),r=await e.json();g(r.valid?"success":"failed")}catch{g("failed")}finally{h(!1)}},C=async()=>{if(t&&c.apiKey){y(!0),j(null);try{let e=!1;try{h(!0),g(null);let r=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await r.json()).valid,g(e?"success":"failed")}catch{g("failed")}finally{h(!1)}if(!e)return void j(d("apiKeyValidationFailed"));let r=await o({name:c.name,apiKey:c.apiKey,priority:c.priority,testStatus:"active"});r&&j("string"==typeof r?r:d("failedSaveConnection"))}finally{y(!1)}}};return t?(0,s.jsx)(u.aF,{isOpen:e,title:d("addProviderApiKeyTitle",{provider:r||t}),onClose:n,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(u.pd,{label:d("nameLabel"),value:c.name,onChange:e=>p({...c,name:e.target.value}),placeholder:d("productionKey")}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(u.pd,{label:d("apiKeyLabel"),type:"password",value:c.apiKey,onChange:e=>p({...c,apiKey:e.target.value}),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(u.$n,{onClick:N,disabled:!c.apiKey||x||b,variant:"secondary",children:x?d("checking"):d("check")})})]}),f&&(0,s.jsx)(u.Ex,{variant:"success"===f?"success":"error",children:"success"===f?d("valid"):d("invalid")}),v&&(0,s.jsx)("div",{className:"text-sm text-red-500 bg-red-500/10 border border-red-500/20 rounded-lg px-3 py-2",children:v}),i&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:l?d("validationChecksAnthropicCompatible",{provider:r||d("anthropicCompatibleName")}):d("validationChecksOpenAiCompatible",{provider:r||d("openaiCompatibleName")})}),(0,s.jsx)(u.pd,{label:d("priorityLabel"),type:"number",value:c.priority,onChange:e=>p({...c,priority:Number.parseInt(e.target.value)||1})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(u.$n,{onClick:C,fullWidth:!0,disabled:!c.name||!c.apiKey||b,children:b?d("saving"):d("save")}),(0,s.jsx)(u.$n,{onClick:n,variant:"ghost",fullWidth:!0,children:d("cancel")})]})]})}):null}function T({isOpen:e,connection:t,onSave:r,onClose:i}){let l=(0,m.c)("providers"),[o,n]=(0,a.useState)({name:"",priority:1,apiKey:"",healthCheckInterval:60}),[d,c]=(0,a.useState)(!1),[p,h]=(0,a.useState)(null),[f,g]=(0,a.useState)(!1),[b,y]=(0,a.useState)(null),[v,j]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t&&(n({name:t.name||"",priority:t.priority||1,apiKey:"",healthCheckInterval:t.healthCheckInterval??60}),h(null),y(null))},[t]);let N=async()=>{if(t?.provider){c(!0),h(null);try{let e=await fetch(`/api/providers/${t.id}/test`,{method:"POST"}),r=await e.json();h({valid:!!r.valid,diagnosis:r.diagnosis||null,message:r.error||null})}catch{h({valid:!1,diagnosis:{type:"network_error"},message:l("failedTestConnection")})}finally{c(!1)}}},C=async()=>{if(t?.provider&&o.apiKey){g(!0),y(null);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:o.apiKey})}),r=await e.json();y(r.valid?"success":"failed")}catch{y("failed")}finally{g(!1)}}},w=async()=>{j(!0);try{let e={name:o.name,priority:o.priority,healthCheckInterval:o.healthCheckInterval};if(!S&&o.apiKey){e.apiKey=o.apiKey;let r="success"===b;if(!r)try{g(!0),y(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:o.apiKey})});r=!!(await e.json()).valid,y(r?"success":"failed")}catch{y("failed")}finally{g(!1)}r&&(e.testStatus="active",e.lastError=null,e.lastErrorAt=null,e.lastErrorType=null,e.lastErrorSource=null,e.errorCode=null,e.rateLimitedUntil=null)}await r(e)}finally{j(!1)}};if(!t)return null;let S="oauth"===t.authType,T=(0,x.mq)(t.provider)||(0,x.gb)(t.provider),E=!p?.valid&&p?.diagnosis?.type&&k[p.diagnosis.type]||null;return(0,s.jsx)(u.aF,{isOpen:e,title:l("editConnection"),onClose:i,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(u.pd,{label:l("nameLabel"),value:o.name,onChange:e=>n({...o,name:e.target.value}),placeholder:S?l("accountName"):l("productionKey")}),S&&t.email&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-3 rounded-lg",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted mb-1",children:l("email")}),(0,s.jsx)("p",{className:"font-medium",children:t.email})]}),S&&(0,s.jsx)(u.pd,{label:l("healthCheckMinutes"),type:"number",value:o.healthCheckInterval,onChange:e=>n({...o,healthCheckInterval:Math.max(0,Number.parseInt(e.target.value)||0)}),hint:l("healthCheckHint")}),(0,s.jsx)(u.pd,{label:l("priorityLabel"),type:"number",value:o.priority,onChange:e=>n({...o,priority:Number.parseInt(e.target.value)||1})}),!S&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(u.pd,{label:l("apiKeyLabel"),type:"password",value:o.apiKey,onChange:e=>n({...o,apiKey:e.target.value}),placeholder:l("enterNewApiKey"),hint:l("leaveBlankKeepCurrentApiKey"),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(u.$n,{onClick:C,disabled:!o.apiKey||f||v,variant:"secondary",children:f?l("checking"):l("check")})})]}),b&&(0,s.jsx)(u.Ex,{variant:"success"===b?"success":"error",children:"success"===b?l("valid"):l("invalid")})]}),!T&&(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(u.$n,{onClick:N,variant:"secondary",disabled:d,children:d?l("testing"):l("testConnection")}),p&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Ex,{variant:p.valid?"success":"error",children:p.valid?l("valid"):l("failed")}),E&&(0,s.jsx)(u.Ex,{variant:E.variant,children:l(E.labelKey)})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(u.$n,{onClick:w,fullWidth:!0,disabled:v,children:v?l("saving"):l("save")}),(0,s.jsx)(u.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:l("cancel")})]})]})})}function E({isOpen:e,node:t,onSave:r,onClose:i,isAnthropic:l}){let o=(0,m.c)("providers"),[n,d]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,p]=(0,a.useState)(!1),[x,h]=(0,a.useState)(""),[f,g]=(0,a.useState)(!1),[b,y]=(0,a.useState)(null);(0,a.useEffect)(()=>{t&&d({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(l?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,l]);let v=[{value:"chat",label:o("chatCompletions")},{value:"responses",label:o("responsesApi")}],j=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};l||(e.apiType=n.apiType),await r(e)}finally{p(!1)}}},N=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:x,type:l?"anthropic-compatible":"openai-compatible"})}),t=await e.json();y(t.valid?"success":"failed")}catch{y("failed")}finally{g(!1)}};return t?(0,s.jsx)(u.aF,{isOpen:e,title:o("editCompatibleTitle",{type:o(l?"anthropic":"openai")}),onClose:i,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(u.pd,{label:o("nameLabel"),value:n.name,onChange:e=>d({...n,name:e.target.value}),placeholder:o("compatibleProdPlaceholder",{type:o(l?"anthropic":"openai")}),hint:o("nameHint")}),(0,s.jsx)(u.pd,{label:o("prefixLabel"),value:n.prefix,onChange:e=>d({...n,prefix:e.target.value}),placeholder:o(l?"anthropicPrefixPlaceholder":"openaiPrefixPlaceholder"),hint:o("prefixHint")}),!l&&(0,s.jsx)(u.l6,{label:o("apiTypeLabel"),options:v,value:n.apiType,onChange:e=>d({...n,apiType:e.target.value})}),(0,s.jsx)(u.pd,{label:o("baseUrlLabel"),value:n.baseUrl,onChange:e=>d({...n,baseUrl:e.target.value}),placeholder:o(l?"anthropicBaseUrlPlaceholder":"openaiBaseUrlPlaceholder"),hint:o("compatibleBaseUrlHint",{type:o(l?"anthropic":"openai")})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(u.pd,{label:o("apiKeyForCheck"),type:"password",value:x,onChange:e=>h(e.target.value),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(u.$n,{onClick:N,disabled:!x||f||!n.baseUrl.trim(),variant:"secondary",children:o(f?"checking":"check")})})]}),b&&(0,s.jsx)(u.Ex,{variant:"success"===b?"success":"error",children:o("success"===b?"valid":"invalid")}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(u.$n,{onClick:j,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:o(c?"saving":"save")}),(0,s.jsx)(u.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:o("cancel")})]})]})}):null}w.propTypes={connection:o().shape({id:o().string,name:o().string,email:o().string,displayName:o().string,rateLimitedUntil:o().string,rateLimitProtection:o().bool,testStatus:o().string,isActive:o().bool,priority:o().number,lastError:o().string,lastErrorType:o().string,lastErrorSource:o().string,errorCode:o().oneOfType([o().string,o().number]),globalPriority:o().number}).isRequired,isOAuth:o().bool.isRequired,isFirst:o().bool.isRequired,isLast:o().bool.isRequired,onMoveUp:o().func.isRequired,onMoveDown:o().func.isRequired,onToggleActive:o().func.isRequired,onToggleRateLimit:o().func.isRequired,onRetest:o().func.isRequired,isRetesting:o().bool,onEdit:o().func.isRequired,onDelete:o().func.isRequired,onReauth:o().func},S.propTypes={isOpen:o().bool.isRequired,provider:o().string,providerName:o().string,isCompatible:o().bool,isAnthropic:o().bool,onSave:o().func.isRequired,onClose:o().func.isRequired},T.propTypes={isOpen:o().bool.isRequired,connection:o().shape({id:o().string,name:o().string,email:o().string,priority:o().number,authType:o().string,provider:o().string}),onSave:o().func.isRequired,onClose:o().func.isRequired},E.propTypes={isOpen:o().bool.isRequired,node:o().shape({id:o().string,name:o().string,prefix:o().string,apiType:o().string,baseUrl:o().string}),onSave:o().func.isRequired,onClose:o().func.isRequired,isAnthropic:o().bool}}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=3751)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[174,204,335,449,516,552,712,747,748,853,907,931,992,1070,1097,1110,1150,1288,1450,1451,1512,1566,1624,1625,1666,1701,1860,1873,1910,1949,2067,2121,2296,2310,2398,2410,2687,2708,2720,2797,2969,2970,3008,3015,3025,3038,3079,3102,3111,3246,3254,3394,3461,3471,3472,3499,3549,3585,3665,3857,3954,4062,4120,4286,4503,4554,4612,4866,4890,4896,4901,5018,5045,5079,5107,5177,5211,5396,5466,5568,5616,5677,5693,5696,5730,5745,5867,5922,5982,6105,6162,6217,6268,6392,6442,6479,6529,6580,6671,6740,6819,6853,6988,6996,7176,7241,7249,7295,7346,7429,7442,7457,7473,7520,7545,7597,7607,7741,7758,7791,7855,7892,7899,7957,8167,8198,8199,8207,8246,8406,8453,8461,8489,8573,8592,8611,8648,8777,8809,8814,8870,8948,8974,8975,9027,9049,9069,9088,9097,9139,9141,9214,9321,9370,9389,9461,9492,9794,9998],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);