zevairouter 1.1.60 → 1.1.62

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 (855) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +9 -9
  4. package/cli/app/.next-cli-build/build-manifest.json +3 -3
  5. package/cli/app/.next-cli-build/prerender-manifest.json +5 -5
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  62. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  63. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  64. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  65. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  66. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  67. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  68. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  69. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  70. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  71. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  72. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
  73. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  74. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  75. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  76. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  77. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  78. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +2 -2
  79. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  80. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  81. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  82. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  83. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  84. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  85. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  86. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  87. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  88. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  90. package/cli/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  91. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  92. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  93. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  94. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  95. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  96. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  97. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  98. package/cli/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  99. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  100. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  101. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  102. package/cli/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  103. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  104. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  105. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  106. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +2 -2
  121. package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/changelog/route.js +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  133. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  135. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  139. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +2 -2
  143. package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  151. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  153. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  155. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
  159. package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  161. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
  163. package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  165. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -2
  167. package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  169. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  173. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  175. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  177. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
  179. package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js +2 -2
  181. package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js.nft.json +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  183. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  185. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
  187. package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/context/test/route.js +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/context/test/route.js.nft.json +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/health/route.js +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +2 -2
  247. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +2 -2
  253. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/metrics/route.js +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +2 -2
  271. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js +1 -1
  299. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js +1 -1
  317. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js +1 -1
  319. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
  338. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  339. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  340. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js +1 -1
  341. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
  342. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/json-import/route.js +1 -1
  343. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/json-import/route.js.nft.json +1 -1
  344. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  345. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  346. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  347. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  348. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  349. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  350. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +1 -1
  351. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  352. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  353. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  354. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js +1 -1
  355. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  356. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js +1 -1
  357. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  358. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js +1 -1
  359. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  360. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  361. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  362. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  363. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  364. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  365. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  366. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  367. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  368. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +1 -1
  369. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  370. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  371. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  372. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js +1 -1
  373. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  374. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js +1 -1
  375. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  376. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js +1 -1
  377. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  378. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  379. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  380. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
  381. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  382. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js +1 -1
  383. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  384. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js +1 -1
  385. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  386. package/cli/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  387. package/cli/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  388. package/cli/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  389. package/cli/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  390. package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  391. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  392. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  393. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  394. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  395. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  396. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  397. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  398. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  399. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  400. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  401. package/cli/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  402. package/cli/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  403. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  404. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  405. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  406. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  407. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  408. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  409. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
  410. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  411. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  412. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  413. package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js +1 -1
  414. package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js.nft.json +1 -1
  415. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js +1 -1
  416. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js.nft.json +1 -1
  417. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-cn/discover-models/route.js +1 -1
  418. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-cn/discover-models/route.js.nft.json +1 -1
  419. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-intl/discover-models/route.js +1 -1
  420. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-intl/discover-models/route.js.nft.json +1 -1
  421. package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js +1 -1
  422. package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js.nft.json +1 -1
  423. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js +1 -1
  424. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js.nft.json +1 -1
  425. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js +1 -1
  426. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js.nft.json +1 -1
  427. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  428. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  429. package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js +1 -1
  430. package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js.nft.json +1 -1
  431. package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js +1 -1
  432. package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js.nft.json +1 -1
  433. package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js +1 -1
  434. package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js.nft.json +1 -1
  435. package/cli/app/.next-cli-build/server/app/api/providers/openrouter/discover-models/route.js +1 -1
  436. package/cli/app/.next-cli-build/server/app/api/providers/openrouter/discover-models/route.js.nft.json +1 -1
  437. package/cli/app/.next-cli-build/server/app/api/providers/route.js +2 -2
  438. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  439. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  440. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  441. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  442. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  443. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  444. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  445. package/cli/app/.next-cli-build/server/app/api/providers/web-login/route.js +1 -1
  446. package/cli/app/.next-cli-build/server/app/api/providers/web-login/route.js.nft.json +1 -1
  447. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  448. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  449. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  450. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  451. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  452. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  453. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  454. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  455. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  456. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  457. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  458. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  459. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  460. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  461. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  462. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  463. package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  464. package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  465. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  466. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  467. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  468. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  469. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  470. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  471. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  472. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  473. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  474. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  475. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  476. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  477. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  478. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  479. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  480. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  481. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  482. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  483. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  484. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  485. package/cli/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  486. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  487. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js +1 -1
  488. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  489. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js +1 -1
  490. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  491. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js +1 -1
  492. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  493. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js +1 -1
  494. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  495. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js +1 -1
  496. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  497. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js +1 -1
  498. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  499. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js +2 -2
  500. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  501. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js +1 -1
  502. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  503. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  504. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  505. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  506. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  507. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  508. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  509. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  510. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  511. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  512. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  513. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  514. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  515. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  516. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  517. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  518. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  519. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  520. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  521. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  522. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  523. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  524. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  525. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  526. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  527. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  528. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  529. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  530. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  531. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  532. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  533. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  534. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  535. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  536. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  537. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  538. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  539. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  540. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  541. package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  542. package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  543. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  544. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  545. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js +2 -2
  546. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js.nft.json +1 -1
  547. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  548. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  549. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  550. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  551. package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js +2 -2
  552. package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js.nft.json +1 -1
  553. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  554. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  555. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  556. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  557. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  558. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  559. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  560. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  561. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  562. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  563. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  564. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  565. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  566. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  567. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  568. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  569. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  570. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  571. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  572. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  573. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  574. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  575. package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  576. package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  577. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  578. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  579. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  580. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  581. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  582. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  583. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  584. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  585. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  586. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  587. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +2 -2
  588. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  589. package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  590. package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  591. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js +1 -1
  592. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js.nft.json +1 -1
  593. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  594. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  595. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  596. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  597. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  598. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  599. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  600. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  601. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +2 -2
  602. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  603. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  604. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  605. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  606. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  607. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  608. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  609. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  610. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  611. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  612. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  613. package/cli/app/.next-cli-build/server/app/callback/page.js +1 -1
  614. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  615. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  616. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  617. package/cli/app/.next-cli-build/server/app/callback.rsc +5 -5
  618. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  619. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  620. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  621. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  622. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
  623. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +5 -5
  624. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
  625. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  626. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  627. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  628. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  629. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  630. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  631. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  632. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  633. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +5 -5
  634. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  635. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  636. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  637. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  638. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +5 -5
  639. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  640. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  641. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  642. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
  643. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +5 -5
  644. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
  645. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  646. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  647. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  648. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  649. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  650. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  651. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  652. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  653. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +5 -5
  654. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  655. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  656. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  657. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  658. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +5 -5
  659. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  660. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  661. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  662. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +7 -7
  663. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +7 -7
  664. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +7 -7
  665. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  666. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  667. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  668. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +5 -5
  669. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  670. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  671. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  672. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  673. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +5 -5
  674. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  675. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  676. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  677. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  678. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +5 -5
  679. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  680. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  681. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  682. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  683. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +5 -5
  684. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  685. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  686. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  687. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  688. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +5 -5
  689. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  690. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  691. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  692. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +5 -5
  693. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +5 -5
  694. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +5 -5
  695. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  696. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  697. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  698. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  699. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  700. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  701. package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  702. package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  703. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +5 -5
  704. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  705. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  706. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  707. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  708. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +5 -5
  709. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  710. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  711. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  712. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  713. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +5 -5
  714. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  715. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  716. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  717. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  718. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +5 -5
  719. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  720. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  721. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  722. package/cli/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  723. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  724. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  725. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  726. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  727. package/cli/app/.next-cli-build/server/app/index.rsc +4 -4
  728. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  729. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  730. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  731. package/cli/app/.next-cli-build/server/app/landing/page.js +1 -1
  732. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  733. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  734. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  735. package/cli/app/.next-cli-build/server/app/landing.rsc +5 -5
  736. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  737. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  738. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
  739. package/cli/app/.next-cli-build/server/app/login/page.js +1 -1
  740. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  741. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  742. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  743. package/cli/app/.next-cli-build/server/app/login.rsc +5 -5
  744. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  745. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  746. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
  747. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  748. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  749. package/cli/app/.next-cli-build/server/app/page.js +1 -1
  750. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  751. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  752. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js +2 -2
  753. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -1
  754. package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js +1 -1
  755. package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js.nft.json +1 -1
  756. package/cli/app/.next-cli-build/server/app-paths-manifest.json +9 -9
  757. package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
  758. package/cli/app/.next-cli-build/server/chunks/1757.js +1 -1
  759. package/cli/app/.next-cli-build/server/chunks/1809.js +1 -0
  760. package/cli/app/.next-cli-build/server/chunks/3190.js +1 -1
  761. package/cli/app/.next-cli-build/server/chunks/3711.js +1 -0
  762. package/cli/app/.next-cli-build/server/chunks/412.js +1 -1
  763. package/cli/app/.next-cli-build/server/chunks/4780.js +1 -1
  764. package/cli/app/.next-cli-build/server/chunks/5019.js +1 -1
  765. package/cli/app/.next-cli-build/server/chunks/5626.js +1 -1
  766. package/cli/app/.next-cli-build/server/chunks/5728.js +1 -1
  767. package/cli/app/.next-cli-build/server/chunks/5905.js +3 -3
  768. package/cli/app/.next-cli-build/server/chunks/{4721.js → 6133.js} +2 -2
  769. package/cli/app/.next-cli-build/server/chunks/7135.js +1 -1
  770. package/cli/app/.next-cli-build/server/chunks/7319.js +9 -9
  771. package/cli/app/.next-cli-build/server/chunks/7401.js +1 -1
  772. package/cli/app/.next-cli-build/server/chunks/7726.js +1 -1
  773. package/cli/app/.next-cli-build/server/chunks/7793.js +1 -1
  774. package/cli/app/.next-cli-build/server/chunks/8238.js +1 -1
  775. package/cli/app/.next-cli-build/server/chunks/8852.js +1 -0
  776. package/cli/app/.next-cli-build/server/chunks/8895.js +4 -4
  777. package/cli/app/.next-cli-build/server/chunks/9679.js +1 -1
  778. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  779. package/cli/app/.next-cli-build/server/middleware.js +8 -8
  780. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  781. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  782. package/cli/app/.next-cli-build/server/preview-props.json +3 -3
  783. package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  784. package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  785. package/cli/app/.next-cli-build/static/chunks/{620-2dbbacd7e6de3def.js → 620-8b24dc33f653e657.js} +1 -1
  786. package/cli/app/.next-cli-build/static/chunks/6202-e364f4d5fefadd3f.js +3 -0
  787. package/cli/app/.next-cli-build/static/chunks/{9126-449f231ec89e0c8b.js → 9041-70659da305d33949.js} +1 -1
  788. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/automation/{page-71a382ed81559482.js → page-bd1157fec388ec95.js} +1 -1
  789. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-59b4e1d04b034922.js +1 -0
  790. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-25b44f613f1ad6ab.js +1 -0
  791. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-2b90c3377dc1b803.js +1 -0
  792. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b73e02cc2f278a1c.js +1 -0
  793. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-4d578c66f4f83c4b.js +1 -0
  794. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/context/{page-b80f4b05920eb3eb.js → page-e0feb2dcf297b1d3.js} +1 -1
  795. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-14ff4e34b3569e7d.js +1 -0
  796. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-f6d7c9ab2bbcaa0c.js → page-6822935d3352c990.js} +2 -2
  797. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-83103184cbba481f.js → page-6ebcd05a89f2c192.js} +1 -1
  798. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-739bdc9961949f1b.js → page-a4cb0e8fb5edb847.js} +1 -1
  799. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-ce6dece0a314f25b.js +1 -0
  800. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-291c6ac2c795f8c8.js → page-f2473ffe65aa2418.js} +1 -1
  801. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-fc2385100618cb11.js +1 -0
  802. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-8345390557a29481.js +1 -0
  803. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-52350091b31c2ec1.js +1 -0
  804. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-7f6579c9e603c1c7.js → page-d9769ad72eaab7ff.js} +2 -2
  805. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-40562bf4cd105f0a.js → page-663d97e32ff4abb9.js} +1 -1
  806. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-542de72fb45553c1.js → page-9eddc754a0ed05c4.js} +1 -1
  807. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-6a803728f5920906.js → page-834c9924ad1adfea.js} +2 -2
  808. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-27b424c2fe11112c.js → page-3e98755c0114d653.js} +1 -1
  809. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-29126aa56241d330.js +1 -0
  810. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/settings/pricing/{page-3ed909159e70307f.js → page-aedd94cfeaef7612.js} +1 -1
  811. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-d401da171aaa05ac.js +1 -0
  812. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/terminal/{page-99f08859cae41572.js → page-f20641b18fe31018.js} +1 -1
  813. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-c70ac5f25262fb6f.js +1 -0
  814. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-a855862272bd37db.js +1 -0
  815. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-a205615e648f47a1.js → page-7ed7a9155f0550b3.js} +1 -1
  816. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-baca0356b5cacc31.js → layout-4cc7b6fd22e7992c.js} +1 -1
  817. package/cli/app/.next-cli-build/static/chunks/app/_not-found/page-2b9bf697de64adcf.js +1 -0
  818. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-de0023d65aebf11f.js +1 -0
  819. package/cli/app/.next-cli-build/static/chunks/app/callback/{page-b1ca389e20348cce.js → page-ba0d852b637994d3.js} +1 -1
  820. package/cli/app/.next-cli-build/static/chunks/app/landing/{page-4e2e956db07b7959.js → page-0a01ecaa2116b10b.js} +1 -1
  821. package/cli/app/.next-cli-build/static/chunks/app/layout-8a7a8baa77f1b488.js +1 -0
  822. package/cli/app/.next-cli-build/static/chunks/app/login/page-dda88ecbdba79a80.js +1 -0
  823. package/cli/app/.next-cli-build/static/chunks/{main-app-88e09177034d71e7.js → main-app-e20479f3b5d674b0.js} +1 -1
  824. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-db43f3befc51b654.js +1 -0
  825. package/cli/app/CHANGELOG.md +16 -0
  826. package/cli/app/package.json +1 -1
  827. package/cli/app/standalone_modules/next/dist/compiled/@next/font/dist/google/find-font-files-in-css.js +23 -0
  828. package/cli/app/standalone_modules/next/dist/compiled/@next/font/dist/google/loader.js +2 -2
  829. package/cli/package.json +1 -1
  830. package/package.json +1 -1
  831. package/cli/app/.next-cli-build/server/chunks/1384.js +0 -1
  832. package/cli/app/.next-cli-build/server/chunks/4039.js +0 -1
  833. package/cli/app/.next-cli-build/server/chunks/5469.js +0 -1
  834. package/cli/app/.next-cli-build/static/chunks/523-3899a7f5cde3f3e8.js +0 -3
  835. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-f7c8c91f9fb6de93.js +0 -1
  836. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-f5fc4b8a8801e804.js +0 -1
  837. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-bccb233dc48b2cf1.js +0 -1
  838. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a2bfbf57ba4e0369.js +0 -1
  839. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-58c9f8c35b7eaed8.js +0 -1
  840. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-a1e30adbdbf2cafd.js +0 -1
  841. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-39062565f11d2c60.js +0 -1
  842. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-92cf3c5c13a0ea25.js +0 -1
  843. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-27ec8458a4c8bcb2.js +0 -1
  844. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-e629adca114de10a.js +0 -1
  845. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-a0e271ee32723312.js +0 -1
  846. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-608c603e6ece959c.js +0 -1
  847. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-b523fbffb64dcdae.js +0 -1
  848. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-511564f8398ceb23.js +0 -1
  849. package/cli/app/.next-cli-build/static/chunks/app/_not-found/page-499de2bdd91e139f.js +0 -1
  850. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-847859b983aaa314.js +0 -1
  851. package/cli/app/.next-cli-build/static/chunks/app/layout-f31fedc5a6f6c6a1.js +0 -1
  852. package/cli/app/.next-cli-build/static/chunks/app/login/page-764e655e11326b92.js +0 -1
  853. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-06f8cd887d9b83e5.js +0 -1
  854. /package/cli/app/.next-cli-build/static/{3-eQhzZSwRODZv8TdZa2x → p5nLDGqmrEZKLp2847bs8}/_buildManifest.js +0 -0
  855. /package/cli/app/.next-cli-build/static/{3-eQhzZSwRODZv8TdZa2x → p5nLDGqmrEZKLp2847bs8}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{62311:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>N});var l=a(95155),s=a(12115),r=a(44923),i=a(87256),n=a(39768),o=a(5020),d=a(35497),c=a(11059);a(1791);var m=a(14051),x=a.n(m),u=a(29366);let p=[{key:"vision",label:"Vision",icon:"visibility",desc:"images"},{key:"pdf",label:"PDF",icon:"picture_as_pdf",desc:"PDF documents"},{key:"audioInput",label:"Audio",icon:"graphic_eq",desc:"audio input"},{key:"videoInput",label:"Video",icon:"videocam",desc:"video input"}];function h(e){let t={};for(let a of p)t[a.key]=function(e){if(Array.isArray(e)){let t=e.filter(e=>e&&!1!==e.enabled).map(e=>"string"==typeof e?e:e.model).filter(e=>"string"==typeof e&&e.trim()).map(e=>e.trim());return{enabled:t.length>0,roundRobin:!1,models:t}}if(e&&"object"==typeof e){let t=Array.isArray(e.models)?e.models.filter(e=>"string"==typeof e&&e.trim()).map(e=>e.trim()):[];return{enabled:!0===e.enabled,roundRobin:!0===e.roundRobin,models:t}}return{enabled:!1,roundRobin:!1,models:[]}}(e?.[a.key]);return t}function b({cap:e,entry:t,onChange:a,activeProviders:r,getCaps:i}){let[n,o]=(0,s.useState)(!1),c=t.models||[],m=e=>a({...t,...e}),x=e=>e?.value||e?.name||e,p=(e,t)=>{let a=e+t;if(a<0||a>=c.length)return;let l=[...c];[l[e],l[a]]=[l[a],l[e]],m({models:l})};return(0,l.jsxs)(d.Zp,{padding:"sm",className:t.enabled?"":"opacity-60",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,l.jsx)(d.lM,{checked:!0===t.enabled,onChange:e=>m({enabled:e}),"aria-label":`Enable ${e.label} adapter`}),(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:e.icon}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("p",{className:"text-sm font-medium",children:e.label}),(0,l.jsx)("p",{className:"text-[11px] text-text-muted",children:e.desc})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted",children:[(0,l.jsx)(d.lM,{checked:!0===t.roundRobin,onChange:e=>m({roundRobin:e}),disabled:!t.enabled,"aria-label":`Round-robin ${e.label} adapter`}),"Round"]}),(0,l.jsx)(d.$n,{icon:"add",variant:"ghost",size:"sm",disabled:!t.enabled,onClick:()=>o(!0),children:"Add Model"})]})]}),0===c.length?(0,l.jsx)("p",{className:"mt-3 text-xs text-text-muted",children:"No models in this pool. The adapter stays off until you add one."}):(0,l.jsx)("ul",{className:"mt-3 flex flex-col gap-1",children:c.map((e,a)=>(0,l.jsxs)("li",{className:"flex items-center gap-2 rounded border border-border/50 px-2 py-1 text-xs",children:[(0,l.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono",children:e}),(0,l.jsx)(u.A,{caps:i?.(e),size:12}),(0,l.jsx)("button",{type:"button",className:"text-text-muted disabled:opacity-30",disabled:!t.enabled||0===a,onClick:()=>p(a,-1),"aria-label":"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,l.jsx)("button",{type:"button",className:"text-text-muted disabled:opacity-30",disabled:!t.enabled||a===c.length-1,onClick:()=>p(a,1),"aria-label":"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,l.jsx)("button",{type:"button",className:"text-text-muted hover:text-red-500 disabled:opacity-30",disabled:!t.enabled,onClick:()=>{m({models:c.filter((e,t)=>t!==a)})},"aria-label":"Remove model",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},`${e}-${a}`))}),n&&(0,l.jsx)(d.rq,{isOpen:!0,onClose:()=>o(!1),onSelect:e=>{let t=x(e);"string"!=typeof t||!t.includes("/")||c.includes(t)||m({models:[...c,t]})},onDeselect:e=>m({models:c.filter(t=>t!==x(e))}),activeProviders:r,title:`Add ${e.label} model`,addedModelValues:c,capFilter:e.key,closeOnSelect:!1,includeCombos:!1})]})}function g({capacityAdapter:e,onChange:t,activeProviders:a,getCaps:s}){return(0,l.jsxs)("section",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-sm font-medium",children:"Capacity adapter"}),(0,l.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:"When a request needs an input the selected model cannot read, try the models in that pool first. An empty pool does nothing."})]}),p.map(r=>(0,l.jsx)(b,{cap:r,entry:e[r.key],onChange:a=>t({...e,[r.key]:a}),activeProviders:a,getCaps:s},r.key))]})}b.propTypes={cap:x().shape({key:x().string,label:x().string,icon:x().string,desc:x().string}).isRequired,entry:x().shape({enabled:x().bool,roundRobin:x().bool,models:x().arrayOf(x().string)}).isRequired,onChange:x().func.isRequired,activeProviders:x().array,getCaps:x().func},g.propTypes={capacityAdapter:x().object.isRequired,onChange:x().func.isRequired,activeProviders:x().array,getCaps:x().func};var f=a(929);function y(e,t){let a=new Set(t);return Object.fromEntries(Object.entries(e||{}).filter(([e])=>!a.has(e)))}var j=a(66430),v=a(40728);let w=/^[a-zA-Z0-9_.\-]+$/;function N(){let e,[t,a]=(0,s.useState)([]),[r,i]=(0,s.useState)(!0),[n,o]=(0,s.useState)(!1),[m,x]=(0,s.useState)(null),[u,p]=(0,s.useState)([]),[b,w]=(0,s.useState)({}),[N,S]=(0,s.useState)(()=>h(null)),{getCaps:E}=(0,f.y)(),[M,P]=(0,s.useState)(null),[D,O]=(0,s.useState)(1),[F,T]=(0,s.useState)(20),[A,R]=(0,s.useState)(""),[_,z]=(0,s.useState)([]),[q,J]=(0,s.useState)(!1),[I,L]=(0,s.useState)(null),{copied:B,copy:G}=(0,c.C)();(0,s.useEffect)(()=>{V()},[]);let V=async()=>{try{let[e,t,l]=await Promise.all([fetch("/api/combos"),(0,j.b7)("providers:list",v.t7),fetch("/api/settings")]),s=await e.json(),r=l.ok?await l.json():{};e.ok&&a((s.combos||[]).filter(e=>!e.kind)),p(t.connections||[]),w(r.comboStrategies||{}),S(h(r.capacityAdapter))}catch(e){console.log("Error fetching data:",e)}finally{i(!1)}},Z=async e=>{let t="cursor"===e?"Cursor":"Claude";L(e);try{let a=await fetch(`/api/combos/presets?source=${e}`),l=await a.json();if(!a.ok)return void alert(l.error||`Failed to preview ${t} presets`);let s=l.toCreate??0,r=l.toSkip??0;if(!l.items?.length)return void alert(`No ${t} models are available to generate.`);if(0===s)return void alert(`All ${l.items.length} ${t} combos already exist.`);P({title:`Generate ${t} combos`,message:`Create ${s} combo${1===s?"":"s"} named like ${t} model ids. ${r} already exist and will be skipped.`,confirmText:"Generate",variant:"primary",onConfirm:async()=>{P(e=>e?{...e,loading:!0}:null);try{let a=await fetch("/api/combos/presets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:e})}),l=await a.json();if(!a.ok){alert(l.error||`Failed to generate ${t} presets`),P(e=>e?{...e,loading:!1}:null);return}await V(),P(null)}catch(e){console.log(`Error generating ${t} presets:`,e),alert(`Failed to generate ${t} presets`),P(e=>e?{...e,loading:!1}:null)}}})}catch(e){console.log(`Error previewing ${t} presets:`,e),alert(`Failed to preview ${t} presets`)}finally{L(null)}},K=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await V(),o(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},Q=async(e,t)=>{try{let a=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(a.ok)await V(),x(null);else{let e=await a.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},W=async e=>{S(e);try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({capacityAdapter:e})})).ok)throw Error("Failed to update capacity adapter")}catch(e){console.log("Error updating capacity adapter:",e)}},H=async e=>{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:e})})).ok)throw Error("Failed to update combo strategy");w(e)},U=async e=>{P({title:"Delete Combo",message:"Delete this combo?",confirmText:"Delete",onConfirm:async()=>{P(null);try{(await fetch(`/api/combos/${e.id}`,{method:"DELETE"})).ok&&(a(t.filter(t=>t.id!==e.id)),z(t=>t.filter(t=>t!==e.id)),await H(y(b,[e.name])))}catch(e){console.log("Error deleting combo:",e)}}})},X=async e=>{let a=t.filter(e=>_.includes(e.id)).map(e=>e.name);if(0!==a.length&&e){J(!0);try{await H(function(e,t,a){let l={...e||{}};for(let e of t)e&&(a&&"fallback"!==a?l[e]={...l[e]||{},fallbackStrategy:a}:delete l[e]);return l}(b,a,e))}catch(e){console.log("Error bulk updating combo strategy:",e),alert("Failed to update strategy for selected combos")}finally{J(!1)}}},Y=async(e,t)=>{try{let a={...b},l={...a[e]||{},...t};l.fallbackStrategy&&"fallback"!==l.fallbackStrategy?a[e]=l:delete a[e],await H(a)}catch(e){console.log("Error updating combo strategy:",e)}},ee=(e=String(A||"").trim().toLowerCase())?(t||[]).filter(t=>!!String(t?.name||"").toLowerCase().includes(e)||(t?.models||[]).some(t=>String(t).toLowerCase().includes(e))):t||[],et=t.filter(e=>_.includes(e.id));(0,s.useEffect)(()=>{O(e=>Math.min(e,Math.max(1,Math.ceil(ee.length/F))))},[ee.length,F]);let ea=Math.min(D,Math.max(1,Math.ceil(ee.length/F))),el=ee.slice((ea-1)*F,ea*F),es=el.length>0&&el.every(e=>_.includes(e.id));return r?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(d.Qv,{}),(0,l.jsx)(d.Qv,{})]}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h1",{className:"text-2xl font-semibold",children:"Combos"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Group models under one name and choose fallback, round-robin, or fusion routing."}),(0,l.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Capability auto-switch prioritizes models that support the current image, PDF, audio, video, or search request."})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row",children:[(0,l.jsx)(d.$n,{variant:"secondary",icon:"edit_note",loading:"cursor"===I,disabled:!!I,onClick:()=>Z("cursor"),children:"Cursor presets"}),(0,l.jsx)(d.$n,{variant:"secondary",icon:"smart_toy",loading:"claude"===I,disabled:!!I,onClick:()=>Z("claude"),children:"Claude presets"}),(0,l.jsx)(d.$n,{icon:"add",onClick:()=>o(!0),children:"Create Combo"})]})]}),t.length>0&&(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 rounded-lg border border-black/5 bg-black/[0.015] px-3 py-2 dark:border-white/5 dark:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-xs text-text-muted hover:text-primary select-none",children:[(0,l.jsx)("input",{type:"checkbox",checked:es,ref:e=>{e&&(e.indeterminate=et.length>0&&!es)},onChange:()=>z(function(e,t){let a=e.map(e=>e.id);if(e.length>0&&e.every(e=>t.includes(e.id))){let e=new Set(a);return t.filter(t=>!e.has(t))}return[...new Set([...t,...a])]}(el,_)),className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary","aria-label":"Select combos on this page"}),(0,l.jsx)("span",{children:et.length>0?`${et.length} selected`:`Select page (${el.length})`})]}),et.length>0&&(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("div",{className:"w-full min-w-[160px] sm:w-[200px]",children:(0,l.jsx)(d.l6,{options:k,value:"",placeholder:"Set strategy…",disabled:q,onChange:e=>{e.target.value&&X(e.target.value)},selectClassName:"py-1.5 text-xs","aria-label":"Set strategy for selected combos"})}),(0,l.jsxs)(d.$n,{size:"sm",variant:"danger",icon:"delete",disabled:q,loading:q,onClick:()=>{let e=t.filter(e=>_.includes(e.id));0!==e.length&&P({title:"Delete Selected Combos",message:`Delete ${e.length} selected combo${1===e.length?"":"s"}? This cannot be undone.`,confirmText:"Delete",onConfirm:async()=>{J(!0),P(e=>e?{...e,loading:!0}:null);try{let t=await Promise.all(e.map(async e=>({combo:e,ok:(await fetch(`/api/combos/${e.id}`,{method:"DELETE"})).ok}))),l=t.filter(e=>e?.ok&&e.combo).map(e=>e.combo),s=new Set(l.map(e=>e.id));a(e=>e.filter(e=>!s.has(e.id))),z(e=>e.filter(e=>!s.has(e))),l.length>0&&await H(y(b,l.map(e=>e.name)));let r=t.length-l.length;P(null),r>0&&alert(`Deleted with ${r} failure${1===r?"":"s"}.`)}catch(e){console.log("Error bulk deleting combos:",e),alert("Failed to delete selected combos"),P(e=>e?{...e,loading:!1}:null)}finally{J(!1)}}})},children:["Delete (",et.length,")"]}),(0,l.jsx)(d.$n,{size:"sm",variant:"ghost",onClick:()=>z([]),disabled:q,children:"Clear"})]})]}),t.length>0&&(0,l.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,l.jsx)(d.pd,{value:A,onChange:e=>{R(e.target.value),O(1)},placeholder:"Search name or model",icon:"search",className:"min-w-0 flex-1","aria-label":"Search combos"}),A&&(0,l.jsx)(d.$n,{variant:"ghost",onClick:()=>{R(""),O(1)},children:"Clear"}),(0,l.jsxs)("span",{className:"text-xs text-text-muted",children:[ee.length," of ",t.length]})]}),0===t.length?(0,l.jsx)(d.Zp,{children:(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,l.jsx)(d.$n,{icon:"add",onClick:()=>o(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[0===el.length?(0,l.jsx)(d.Zp,{children:(0,l.jsxs)("p",{className:"py-8 text-center text-sm text-text-muted",children:["No combos match “",A.trim(),"”."]})}):el.map(e=>(0,l.jsx)(C,{combo:e,copied:B,activeProviders:u,onCopy:G,onEdit:()=>x(e),onDelete:()=>U(e),strategy:b[e.name]||{},onSetStrategy:t=>Y(e.name,t),selected:_.includes(e.id),onToggleSelect:()=>z(t=>{var a;return a=e.id,t.includes(a)?t.filter(e=>e!==a):[...t,a]})},e.id)),(0,l.jsx)(d.dK,{currentPage:ea,pageSize:F,totalItems:ee.length,onPageChange:O,onPageSizeChange:e=>{T(e),O(1)}})]}),(0,l.jsx)(g,{capacityAdapter:N,onChange:W,activeProviders:u,getCaps:E}),(0,l.jsx)($,{isOpen:n,onClose:()=>o(!1),onSave:K,activeProviders:u},"create"),(0,l.jsx)($,{isOpen:!!m,combo:m,onClose:()=>x(null),onSave:e=>Q(m.id,e),activeProviders:u},m?.id||"new"),(0,l.jsx)(d.uo,{isOpen:!!M,onClose:()=>P(null),onConfirm:M?.onConfirm,title:M?.title||"Confirm",message:M?.message,confirmText:M?.confirmText||"Delete",loading:!!M?.loading,variant:M?.variant||"danger"})]})}let k=[{value:"fallback",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate"},{value:"fusion",label:"Fusion — panel + judge"},{value:"smart",label:"Smart — System One picks"}];function C({combo:e,activeProviders:t,copied:a,onCopy:r,onEdit:i,onDelete:n,strategy:o,onSetStrategy:c,selected:m=!1,onToggleSelect:x}){let[u,p]=(0,s.useState)(!1),h=o.fallbackStrategy||"fallback",b=o.judgeModel||"";return(0,l.jsxs)(d.Zp,{padding:"sm",className:`group ${m?"ring-1 ring-primary/40 bg-primary/[0.03]":""}`,children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,l.jsx)("label",{className:"flex shrink-0 cursor-pointer items-center pt-1 sm:pt-0",title:"Select combo",children:(0,l.jsx)("input",{type:"checkbox",checked:m,onChange:x,className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary","aria-label":`Select ${e.name}`})}),(0,l.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,t)=>(0,l.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1.5 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[220px]",children:e},t)),e.models.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]}),"fusion"===h&&(0,l.jsxs)("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Judge"}),(0,l.jsxs)("button",{type:"button",onClick:()=>p(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary transition-colors hover:border-primary hover:bg-primary/5",title:"Pick the model that synthesizes the panel answers",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"gavel"}),(0,l.jsx)("span",{className:"truncate",children:b||`Auto — ${e.models[0]||"first model"}`})]}),b&&(0,l.jsx)("button",{type:"button",onClick:()=>c({judgeModel:""}),className:"rounded p-0.5 text-text-muted transition-colors hover:bg-red-500/10 hover:text-red-500",title:"Reset judge to the first combo model",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]})]})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsx)("div",{className:"w-full sm:w-[200px]",children:(0,l.jsx)(d.l6,{options:k,value:h,onChange:e=>c({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),r(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:a===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:i,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,l.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),u&&(0,l.jsx)(d.rq,{isOpen:u,onClose:()=>p(!1),onSelect:e=>{c({judgeModel:e?.value||""}),p(!1)},activeProviders:t,title:"Select Judge Model",addedModelValues:b?[b]:[],closeOnSelect:!0})]})}function S({id:e,index:t,model:a,isFirst:r,isLast:o,onEdit:d,onMoveUp:c,onMoveDown:m,onRemove:x}){let{attributes:u,listeners:p,setNodeRef:h,transform:b,isDragging:g}=(0,i.gl)({id:e}),f={transform:n.Ks.Transform.toString(b),opacity:g?.4:1,zIndex:g?999:void 0},[y,j]=(0,s.useState)(!1),[v,w]=(0,s.useState)(a),N=()=>{let e=v.trim();e&&e!==a?d(e):w(a),j(!1)};return(0,l.jsxs)("div",{ref:h,style:f,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${g?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,l.jsx)("button",{...u,...p,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,l.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,l.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,l.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),y?(0,l.jsx)("input",{autoFocus:!0,value:v,onChange:e=>w(e.target.value),onBlur:N,onKeyDown:e=>{"Enter"===e.key&&N(),"Escape"===e.key&&(w(a),j(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,l.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>j(!0),title:"Click to edit",children:a}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,l.jsx)("button",{onClick:c,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:m,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,l.jsx)("button",{onClick:x,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function $({isOpen:e,combo:t,onClose:a,onSave:n,activeProviders:c,kindFilter:m=null}){let[x,u]=(0,s.useState)(t?.name||""),[p,h]=(0,s.useState)(t?.models||[]),[b,g]=(0,s.useState)(!1),[f,y]=(0,s.useState)(!1),[N,k]=(0,s.useState)(""),[C,E]=(0,s.useState)({}),M=(0,r.FR)((0,r.MS)(r.AN,{activationConstraint:{distance:5}}),(0,r.MS)(r.uN,{coordinateGetter:i.JR})),P=p.map((e,t)=>({uid:`item-${t}`,model:e})),D=async()=>{try{let e=await (0,j.b7)("models:aliases",v.QF);E(e.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,s.useEffect)(()=>{e&&D()},[e]);let O=e=>e.trim()?w.test(e)?(k(""),!0):(k("Only letters, numbers, -, _ and . allowed"),!1):(k("Name is required"),!1),F=async()=>{O(x)&&(y(!0),await n({name:x.trim(),models:p}),y(!1))},T=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.aF,{isOpen:e,onClose:a,title:T?"Edit Combo":"Create Combo",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(d.pd,{label:"Combo Name",value:x,onChange:e=>{let t=e.target.value;u(t),t?O(t):k("")},placeholder:"my-combo",error:N}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===p.length?(0,l.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,l.jsx)(r.Mp,{sensors:M,collisionDetection:r.fp,onDragEnd:e=>{let{active:t,over:a}=e;if(a&&t.id!==a.id){let e=P.findIndex(e=>e.uid===t.id),l=P.findIndex(e=>e.uid===a.id);-1!==e&&-1!==l&&h(t=>(0,i.be)(t,e,l))}},modifiers:[o.FN,o.gj],children:(0,l.jsx)(i.gB,{items:P.map(e=>e.uid),strategy:i._G,children:(0,l.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:P.map(({uid:e,model:t},a)=>(0,l.jsx)(S,{id:e,index:a,model:t,isFirst:0===a,isLast:a===P.length-1,onEdit:e=>{let t=[...p];t[a]=e,h(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...p];[t[e-1],t[e]]=[t[e],t[e-1]],h(t)})(a),onMoveDown:()=>(e=>{if(e===p.length-1)return;let t=[...p];[t[e],t[e+1]]=[t[e+1],t[e]],h(t)})(a),onRemove:()=>{h(p.filter((e,t)=>t!==a))}},e))})})}),(0,l.jsxs)("button",{onClick:()=>g(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,l.jsx)(d.$n,{onClick:a,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(d.$n,{onClick:F,fullWidth:!0,size:"sm",disabled:!x.trim()||!!N||f,children:f?"Saving...":T?"Save":"Create"})]})]})}),(0,l.jsx)(d.rq,{isOpen:b,onClose:()=>g(!1),onSelect:e=>{h(t=>t.includes(e.value)?t:[...t,e.value])},onDeselect:e=>{h(t=>t.filter(t=>t!==e.value))},onSelectBatch:e=>{h(t=>{let a=[...t];for(let t of e)t?.value&&!a.includes(t.value)&&a.push(t.value);return a})},onDeselectBatch:e=>{let t=new Set(e.map(e=>e.value));h(e=>e.filter(e=>!t.has(e)))},activeProviders:c,modelAliases:C,title:"Add Model to Combo",kindFilter:m,addedModelValues:p,closeOnSelect:!1})]})}},80667:(e,t,a)=>{Promise.resolve().then(a.bind(a,62311))}},e=>{e.O(0,[2574,3862,3745,3416,7055,9501,620,5497,8441,3794,7358],()=>e(e.s=80667)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{15296:(e,t,l)=>{Promise.resolve().then(l.bind(l,44493))},44493:(e,t,l)=>{"use strict";l.d(t,{default:()=>o});var n=l(95155),s=l(12115),r=l(35497),a=l(90620);let c={LOG:"text-green-700 dark:text-green-400",INFO:"text-blue-700 dark:text-blue-400",WARN:"text-amber-700 dark:text-yellow-400",ERROR:"text-red-700 dark:text-red-400",DEBUG:"text-purple-700 dark:text-purple-400"};function o(){let[e,t]=(0,s.useState)([]),[l,o]=(0,s.useState)("connecting"),[i,d]=(0,s.useState)(0),[u,x]=(0,s.useState)(!1),[g,p]=(0,s.useState)(null),m=(0,s.useRef)(null),h=async()=>{if(!u){x(!0),p(null),t([]);try{let e=await fetch("/api/translator/console-logs",{method:"DELETE"});if(!e.ok)throw Error(`Failed to clear logs (${e.status})`)}catch(l){t(e),p(l.message||"Failed to clear console logs")}finally{x(!1)}}};return(0,s.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>o("connected"),e.onmessage=e=>{try{let l=JSON.parse(e.data);"init"===l.type&&Array.isArray(l.logs)?t(l.logs.slice(-a.UY.maxLines)):"line"===l.type&&null!=l.line?t(e=>[...e,String(l.line)].slice(-a.UY.maxLines)):"clear"===l.type&&t([])}catch{p("Received an invalid console log event")}},e.onerror=()=>o("disconnected"),()=>e.close()},[i]),(0,s.useEffect)(()=>{m.current&&(m.current.scrollTop=m.current.scrollHeight)},[e]),(0,n.jsxs)(r.Zp,{className:"p-0 overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border bg-surface-2 px-4 py-3",children:[(0,n.jsxs)("div",{role:"status","aria-live":"polite",className:"flex items-center gap-2",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:`size-2 rounded-full ${"connected"===l?"bg-green-500":"connecting"===l?"animate-pulse bg-yellow-500":"bg-red-500"}`}),(0,n.jsx)("span",{className:"text-sm capitalize text-text-muted",children:l})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:["disconnected"===l?(0,n.jsx)(r.$n,{size:"sm",variant:"outline",onClick:()=>{o("connecting"),p(null),d(e=>e+1)},children:"Reconnect"}):null,(0,n.jsx)(r.$n,{size:"sm",variant:"outline",icon:"delete",onClick:h,loading:u,disabled:0===e.length,children:"Clear"})]})]}),g?(0,n.jsx)("div",{role:"alert",className:"border-b border-border px-4 py-2 text-sm text-danger",children:g}):null,(0,n.jsx)("div",{ref:m,role:"log","aria-live":"polite","aria-relevant":"additions text",className:"h-[calc(100vh-220px)] overflow-y-auto bg-bg-alt p-4 font-mono text-xs text-text-main dark:bg-black",children:0===e.length?(0,n.jsx)("span",{className:"text-text-muted",children:"connecting"===l?"Connecting to console logs…":"disconnected"===l?"Console log stream disconnected.":"No console logs yet. Logs appear after routed requests."}):(0,n.jsx)("div",{className:"space-y-0.5",children:e.map((e,t)=>{let l,s,r;return(0,n.jsx)("div",{children:(r=c[(s=(l="string"==typeof e?e:String(e)).match(/\[(\w+)\]/g))?s[1]?.replace(/\[|\]/g,""):null]||"text-green-700 dark:text-green-400",(0,n.jsx)("span",{className:r,children:l}))},`${t}-${e}`)})})})]})}}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=15296)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9933],{4402:(e,t,s)=>{Promise.resolve().then(s.bind(s,33711))},33711:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});var l=s(95155),a=s(12115),n=s(35497);function i(e){let t=new TextEncoder().encode(e||"").length;return t<1024?`${t} B`:`${(t/1024).toFixed(1)} KB`}function r(){let[e,t]=(0,a.useState)(!1),[s,r]=(0,a.useState)([]),[d,o]=(0,a.useState)(!0),[c,m]=(0,a.useState)(!1),[x,p]=(0,a.useState)(null),[h,u]=(0,a.useState)(null),[f,y]=(0,a.useState)({type:"",message:""}),[b,j]=(0,a.useState)(!1),[g,v]=(0,a.useState)(""),[N,w]=(0,a.useState)(!1),[k,C]=(0,a.useState)(null),S=(0,a.useRef)(null),T=(0,a.useCallback)(async()=>{o(!0);try{let[e,s]=await Promise.all([fetch("/api/settings",{cache:"no-store"}),fetch("/api/context",{cache:"no-store"})]),l=await e.json(),a=await s.json();t(!!l.contextInjectionEnabled),r(Array.isArray(a.files)?a.files:[])}catch(e){y({type:"error",message:"Failed to load context files."})}finally{o(!1)}},[]);(0,a.useEffect)(()=>{T()},[T]);let E=async e=>{t(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({contextInjectionEnabled:e})})}catch{t(!e),y({type:"error",message:"Failed to update global toggle."})}},$=async()=>{if(!x?.name?.trim())return void y({type:"error",message:"Name is required."});m(!0);try{let e={name:x.name,content:x.content||"",prefillContent:x.prefillContent||"",models:x.modelsText,mode:(x.content||"").trim()?"system":"prefill"};x.id?await fetch(`/api/context/${x.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}):await fetch("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,priority:s.length})}),p(null),await T(),y({type:"success",message:"Saved."})}catch{y({type:"error",message:"Failed to save."})}finally{m(!1)}},F=async(e,t)=>{r(s=>s.map(s=>s.id===e.id?{...s,enabled:t}:s));try{await fetch(`/api/context/${e.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t})})}catch{await T()}},O=(e,t="system")=>{let s=e?.mode==="prefill"&&!e?.prefillContent;p({...e,content:s?"":e?.content||"",prefillContent:e?.prefillContent||s&&e?.content||"",modelsText:(e?.models||[]).join(", "),slot:t})},P=x?.slot==="prefill"?x.prefillContent||"":x?.content||"",z=async()=>{if(h)try{await fetch(`/api/context/${h.id}`,{method:"DELETE"}),u(null),await T()}catch{y({type:"error",message:"Failed to delete."})}},A=async e=>{let t=Array.from(e.target.files||[]);if(0!==t.length){j(!0),y({type:"",message:""});try{let e=await Promise.all(t.map(async e=>({name:e.name,content:await e.text()}))),s=await fetch("/api/context/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e})}),l=await s.json();if(!s.ok)throw Error(l?.error||"Upload failed");await T(),y({type:"success",message:`Uploaded ${l.created} file(s) — all disabled by default. Enable the ones you want below.`})}catch(e){y({type:"error",message:e.message||"Upload failed."})}finally{j(!1),S.current&&(S.current.value="")}}},_=async()=>{let e=g.trim();if(e){w(!0),C(null);try{let t=await fetch("/api/context/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e})}),s=await t.json();C(s)}catch(e){C({ok:!1,reason:e.message||"Test request failed."})}finally{w(!1)}}},J=s.filter(e=>e.enabled).length,M=s.filter(e=>e.enabled).reduce((e,t)=>e+new TextEncoder().encode(t.content||"").length,0);return(0,l.jsxs)("div",{className:"max-w-4xl mx-auto space-y-6",children:[(0,l.jsxs)(n.Zp,{padding:"md",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h1",{className:"text-lg font-semibold text-text-main",children:"Context Injection"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1 max-w-xl",children:"Inject your own context into chat requests routed through ZevaiRouter. System mode prepends the file to the system prompt. Prefill mode inserts a user/assistant turn pair before the real conversation. Each file can be limited to specific models and toggled off without deleting it."})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,l.jsx)("span",{className:"text-sm text-text-muted",children:e?"On":"Off"}),(0,l.jsx)(n.lM,{checked:e,onChange:E})]})]}),e&&(0,l.jsxs)("p",{className:"text-[11px] text-text-muted mt-3",children:[J," file(s) active \xb7 up to ~",(M/1024).toFixed(1)," KB added per request (files limited to specific models are added only for those models)"]})]}),(0,l.jsxs)(n.Zp,{padding:"md",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Test injection"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Sends one real request to the model with a one-time check code added to the injected context. Passes only if the model replies with that code."}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-3",children:[(0,l.jsx)(n.pd,{placeholder:"provider/model or combo name, e.g. kiro/claude-sonnet-4.5",value:g,onChange:e=>v(e.target.value),onKeyDown:e=>{"Enter"===e.key&&_()}}),(0,l.jsx)(n.$n,{size:"sm",onClick:_,disabled:N||!g.trim(),children:N?"Testing…":"Test"})]}),k&&(0,l.jsxs)("div",{className:`mt-3 text-xs px-3 py-2 rounded space-y-1 ${k.ok?"text-green-600 bg-green-500/10":"text-red-500 bg-red-500/10"}`,children:[(0,l.jsx)("p",{className:"font-medium",children:k.ok?"Injected: the model saw the context.":`Not injected: ${k.reason||"unknown error"}`}),Array.isArray(k.matchedFiles)&&(0,l.jsxs)("p",{className:"text-text-muted",children:["Files for this model: ",k.matchedFiles.length?k.matchedFiles.join(", "):"none"]}),void 0!==k.reply&&(0,l.jsxs)("p",{className:"text-text-muted whitespace-pre-wrap break-words",children:["Reply: ",k.reply||"(empty)",k.latencyMs?` \xb7 ${k.latencyMs} ms`:""]})]})]}),f.message&&(0,l.jsx)("div",{className:`text-xs px-3 py-2 rounded ${"error"===f.type?"text-red-500 bg-red-500/10":"text-green-600 bg-green-500/10"}`,children:f.message}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Files"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("input",{ref:S,type:"file",multiple:!0,className:"hidden",onChange:A}),(0,l.jsxs)(n.$n,{variant:"ghost",size:"sm",onClick:()=>S.current?.click(),disabled:b,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1",children:"upload_file"}),b?"Uploading…":"Upload .md"]}),(0,l.jsxs)(n.$n,{size:"sm",onClick:()=>O({name:"",content:"",prefillContent:"",enabled:!0,models:[]},"system"),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1",children:"add"}),"Add File"]})]})]}),d?(0,l.jsx)("div",{className:"text-sm text-text-muted",children:"Loading…"}):0===s.length?(0,l.jsx)(n.Zp,{padding:"md",children:(0,l.jsxs)("p",{className:"text-sm text-text-muted",children:["No context files yet. Click ",(0,l.jsx)("b",{children:"Add File"})," to create one (e.g. ",(0,l.jsx)("code",{children:"soul.md"}),")."]})}):(0,l.jsx)("div",{className:"space-y-2",children:s.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-3 p-4 rounded-[14px] border border-border-subtle bg-surface",children:[(0,l.jsx)("div",{className:"size-9 rounded-lg flex items-center justify-center shrink-0 bg-primary/10 text-primary",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"description"})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,l.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),(0,l.jsx)(n.Ex,{variant:"default",size:"sm",children:i((e.content||"")+(e.prefillContent||""))}),e.models?.length?(0,l.jsx)(n.Ex,{variant:"default",size:"sm",title:e.models.join(", "),children:1===e.models.length?e.models[0]:`${e.models.length} models`}):(0,l.jsx)(n.Ex,{variant:"default",size:"sm",children:"all models"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5 line-clamp-2 whitespace-pre-wrap",children:("prefill"===e.mode&&!e.prefillContent,e.content)?.slice(0,160)||e.prefillContent?.slice(0,160)||"(empty)"}),(0,l.jsxs)("div",{className:"flex items-center gap-1 mt-2",children:[e.content&&!("prefill"===e.mode&&!e.prefillContent)?(0,l.jsx)("button",{type:"button",onClick:()=>O(e,"system"),className:"px-2 py-0.5 rounded-md text-[11px] font-medium border border-primary bg-primary text-white",children:"System"}):(0,l.jsx)("button",{type:"button",onClick:()=>O(e,"system"),title:"Add system prompt",className:"px-1.5 py-0.5 rounded-md text-[11px] border border-border text-text-muted hover:bg-black/5 dark:hover:bg-white/5",children:"+"}),e.prefillContent||"prefill"===e.mode?(0,l.jsx)("button",{type:"button",onClick:()=>O(e,"prefill"),className:"px-2 py-0.5 rounded-md text-[11px] font-medium border border-primary bg-primary text-white",children:"Prefill"}):(0,l.jsx)("button",{type:"button",onClick:()=>O(e,"prefill"),title:"Add prefill",className:"px-1.5 py-0.5 rounded-md text-[11px] border border-border text-text-muted hover:bg-black/5 dark:hover:bg-white/5",children:"+"})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,l.jsx)("span",{className:"text-[11px] text-text-muted",children:e.enabled?"On":"Off"}),(0,l.jsx)(n.lM,{checked:e.enabled,onChange:t=>F(e,t),size:"sm"}),(0,l.jsx)("button",{onClick:()=>O(e,"system"),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5",title:"Edit",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,l.jsx)("button",{onClick:()=>u(e),className:"p-1.5 rounded-lg text-text-muted hover:bg-red-500/10 hover:text-red-500",title:"Delete",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id))}),x&&(0,l.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,l.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>p(null)}),(0,l.jsxs)("div",{className:"relative w-full max-w-2xl bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl flex flex-col max-h-[85vh]",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,l.jsx)("h2",{className:"text-base font-semibold text-text-main",children:x.id?"Edit File":"New Context File"}),(0,l.jsx)("button",{onClick:()=>p(null),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,l.jsxs)("div",{className:"p-4 space-y-3 overflow-y-auto flex-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium",children:"Name"}),(0,l.jsx)(n.pd,{placeholder:"soul.md",value:x.name,onChange:e=>p(t=>({...t,name:e.target.value}))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium",children:"Models"}),(0,l.jsx)(n.pd,{placeholder:"Empty = all models. e.g. kiro/*, cc/claude-opus-4*, my-combo",value:x.modelsText||"",onChange:e=>p(t=>({...t,modelsText:e.target.value}))}),(0,l.jsx)("p",{className:"text-[11px] text-text-muted mt-1",children:"Comma-separated. Matches provider/model, provider alias/model, bare model, or the model/combo name the client sent. Use * as a wildcard."})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium",children:"Slot"}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,l.jsx)(n.$n,{type:"button",size:"sm",variant:"system"===(x.slot||"system")?"primary":(x.content||"").trim()?"secondary":"ghost",onClick:()=>p(e=>({...e,slot:"system"})),children:"System prompt"}),(0,l.jsx)(n.$n,{type:"button",size:"sm",variant:"prefill"===x.slot?"primary":(x.prefillContent||"").trim()?"secondary":"ghost",onClick:()=>p(e=>({...e,slot:"prefill"})),children:"Prefill"})]}),(0,l.jsx)("p",{className:"text-[11px] text-text-muted mt-1",children:"Same file. System is prepended to the prompt. Prefill is inserted as prior turns. Fill either, or both. Empty slot is skipped."})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium",children:"prefill"===x.slot?"Prefill turns":"System prompt"}),(0,l.jsx)("textarea",{className:"w-full mt-1 rounded-lg border border-border bg-surface-2 p-3 font-mono text-xs text-text-main min-h-[280px] resize-y focus:outline-none focus:ring-2 focus:ring-primary/40",placeholder:"prefill"===x.slot?'[{"role":"user","content":"..."},{"role":"assistant","content":"..."}]':"You are a helpful assistant with the following persona…",value:P,onChange:e=>{var t;return t=e.target.value,void p(e=>e?.slot==="prefill"?{...e,prefillContent:t}:{...e,content:t})}}),(0,l.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:[i(P)," \xb7 switching slots does not erase the other one"]})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-2 p-3 border-t border-black/5 dark:border-white/5",children:[(0,l.jsx)(n.$n,{variant:"ghost",size:"sm",onClick:()=>p(null),children:"Cancel"}),(0,l.jsx)(n.$n,{size:"sm",onClick:$,disabled:c,children:c?"Saving…":"Save"})]})]})]}),(0,l.jsx)(n.uo,{isOpen:!!h,title:"Delete context file?",message:`"${h?.name}" will be permanently removed.`,confirmText:"Delete",variant:"danger",onConfirm:z,onClose:()=>u(null)})]})}}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=4402)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9933],{7159:(e,t,s)=>{Promise.resolve().then(s.bind(s,33711))},33711:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});var l=s(95155),a=s(12115),n=s(35497);function i(e){let t=new TextEncoder().encode(e||"").length;return t<1024?`${t} B`:`${(t/1024).toFixed(1)} KB`}function r(){let[e,t]=(0,a.useState)(!1),[s,r]=(0,a.useState)([]),[d,o]=(0,a.useState)(!0),[c,m]=(0,a.useState)(!1),[x,p]=(0,a.useState)(null),[h,u]=(0,a.useState)(null),[f,y]=(0,a.useState)({type:"",message:""}),[b,j]=(0,a.useState)(!1),[g,v]=(0,a.useState)(""),[N,w]=(0,a.useState)(!1),[k,C]=(0,a.useState)(null),S=(0,a.useRef)(null),T=(0,a.useCallback)(async()=>{o(!0);try{let[e,s]=await Promise.all([fetch("/api/settings",{cache:"no-store"}),fetch("/api/context",{cache:"no-store"})]),l=await e.json(),a=await s.json();t(!!l.contextInjectionEnabled),r(Array.isArray(a.files)?a.files:[])}catch(e){y({type:"error",message:"Failed to load context files."})}finally{o(!1)}},[]);(0,a.useEffect)(()=>{T()},[T]);let E=async e=>{t(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({contextInjectionEnabled:e})})}catch{t(!e),y({type:"error",message:"Failed to update global toggle."})}},$=async()=>{if(!x?.name?.trim())return void y({type:"error",message:"Name is required."});m(!0);try{let e={name:x.name,content:x.content||"",prefillContent:x.prefillContent||"",models:x.modelsText,mode:(x.content||"").trim()?"system":"prefill"};x.id?await fetch(`/api/context/${x.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}):await fetch("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,priority:s.length})}),p(null),await T(),y({type:"success",message:"Saved."})}catch{y({type:"error",message:"Failed to save."})}finally{m(!1)}},F=async(e,t)=>{r(s=>s.map(s=>s.id===e.id?{...s,enabled:t}:s));try{await fetch(`/api/context/${e.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t})})}catch{await T()}},O=(e,t="system")=>{let s=e?.mode==="prefill"&&!e?.prefillContent;p({...e,content:s?"":e?.content||"",prefillContent:e?.prefillContent||s&&e?.content||"",modelsText:(e?.models||[]).join(", "),slot:t})},P=x?.slot==="prefill"?x.prefillContent||"":x?.content||"",z=async()=>{if(h)try{await fetch(`/api/context/${h.id}`,{method:"DELETE"}),u(null),await T()}catch{y({type:"error",message:"Failed to delete."})}},A=async e=>{let t=Array.from(e.target.files||[]);if(0!==t.length){j(!0),y({type:"",message:""});try{let e=await Promise.all(t.map(async e=>({name:e.name,content:await e.text()}))),s=await fetch("/api/context/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e})}),l=await s.json();if(!s.ok)throw Error(l?.error||"Upload failed");await T(),y({type:"success",message:`Uploaded ${l.created} file(s) — all disabled by default. Enable the ones you want below.`})}catch(e){y({type:"error",message:e.message||"Upload failed."})}finally{j(!1),S.current&&(S.current.value="")}}},_=async()=>{let e=g.trim();if(e){w(!0),C(null);try{let t=await fetch("/api/context/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e})}),s=await t.json();C(s)}catch(e){C({ok:!1,reason:e.message||"Test request failed."})}finally{w(!1)}}},J=s.filter(e=>e.enabled).length,M=s.filter(e=>e.enabled).reduce((e,t)=>e+new TextEncoder().encode(t.content||"").length,0);return(0,l.jsxs)("div",{className:"max-w-4xl mx-auto space-y-6",children:[(0,l.jsxs)(n.Zp,{padding:"md",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h1",{className:"text-lg font-semibold text-text-main",children:"Context Injection"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1 max-w-xl",children:"Inject your own context into chat requests routed through ZevaiRouter. System mode prepends the file to the system prompt. Prefill mode inserts a user/assistant turn pair before the real conversation. Each file can be limited to specific models and toggled off without deleting it."})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,l.jsx)("span",{className:"text-sm text-text-muted",children:e?"On":"Off"}),(0,l.jsx)(n.lM,{checked:e,onChange:E})]})]}),e&&(0,l.jsxs)("p",{className:"text-[11px] text-text-muted mt-3",children:[J," file(s) active \xb7 up to ~",(M/1024).toFixed(1)," KB added per request (files limited to specific models are added only for those models)"]})]}),(0,l.jsxs)(n.Zp,{padding:"md",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Test injection"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Sends one real request to the model with a one-time check code added to the injected context. Passes only if the model replies with that code."}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-3",children:[(0,l.jsx)(n.pd,{placeholder:"provider/model or combo name, e.g. kiro/claude-sonnet-4.5",value:g,onChange:e=>v(e.target.value),onKeyDown:e=>{"Enter"===e.key&&_()}}),(0,l.jsx)(n.$n,{size:"sm",onClick:_,disabled:N||!g.trim(),children:N?"Testing…":"Test"})]}),k&&(0,l.jsxs)("div",{className:`mt-3 text-xs px-3 py-2 rounded space-y-1 ${k.ok?"text-green-600 bg-green-500/10":"text-red-500 bg-red-500/10"}`,children:[(0,l.jsx)("p",{className:"font-medium",children:k.ok?"Injected: the model saw the context.":`Not injected: ${k.reason||"unknown error"}`}),Array.isArray(k.matchedFiles)&&(0,l.jsxs)("p",{className:"text-text-muted",children:["Files for this model: ",k.matchedFiles.length?k.matchedFiles.join(", "):"none"]}),void 0!==k.reply&&(0,l.jsxs)("p",{className:"text-text-muted whitespace-pre-wrap break-words",children:["Reply: ",k.reply||"(empty)",k.latencyMs?` \xb7 ${k.latencyMs} ms`:""]})]})]}),f.message&&(0,l.jsx)("div",{className:`text-xs px-3 py-2 rounded ${"error"===f.type?"text-red-500 bg-red-500/10":"text-green-600 bg-green-500/10"}`,children:f.message}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Files"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("input",{ref:S,type:"file",multiple:!0,className:"hidden",onChange:A}),(0,l.jsxs)(n.$n,{variant:"ghost",size:"sm",onClick:()=>S.current?.click(),disabled:b,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1",children:"upload_file"}),b?"Uploading…":"Upload .md"]}),(0,l.jsxs)(n.$n,{size:"sm",onClick:()=>O({name:"",content:"",prefillContent:"",enabled:!0,models:[]},"system"),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1",children:"add"}),"Add File"]})]})]}),d?(0,l.jsx)("div",{className:"text-sm text-text-muted",children:"Loading…"}):0===s.length?(0,l.jsx)(n.Zp,{padding:"md",children:(0,l.jsxs)("p",{className:"text-sm text-text-muted",children:["No context files yet. Click ",(0,l.jsx)("b",{children:"Add File"})," to create one (e.g. ",(0,l.jsx)("code",{children:"soul.md"}),")."]})}):(0,l.jsx)("div",{className:"space-y-2",children:s.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-3 p-4 rounded-[14px] border border-border-subtle bg-surface",children:[(0,l.jsx)("div",{className:"size-9 rounded-lg flex items-center justify-center shrink-0 bg-primary/10 text-primary",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"description"})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,l.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),(0,l.jsx)(n.Ex,{variant:"default",size:"sm",children:i((e.content||"")+(e.prefillContent||""))}),e.models?.length?(0,l.jsx)(n.Ex,{variant:"default",size:"sm",title:e.models.join(", "),children:1===e.models.length?e.models[0]:`${e.models.length} models`}):(0,l.jsx)(n.Ex,{variant:"default",size:"sm",children:"all models"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5 line-clamp-2 whitespace-pre-wrap",children:("prefill"===e.mode&&!e.prefillContent,e.content)?.slice(0,160)||e.prefillContent?.slice(0,160)||"(empty)"}),(0,l.jsxs)("div",{className:"flex items-center gap-1 mt-2",children:[e.content&&!("prefill"===e.mode&&!e.prefillContent)?(0,l.jsx)("button",{type:"button",onClick:()=>O(e,"system"),className:"px-2 py-0.5 rounded-md text-[11px] font-medium border border-primary bg-primary text-white",children:"System"}):(0,l.jsx)("button",{type:"button",onClick:()=>O(e,"system"),title:"Add system prompt",className:"px-1.5 py-0.5 rounded-md text-[11px] border border-border text-text-muted hover:bg-black/5 dark:hover:bg-white/5",children:"+"}),e.prefillContent||"prefill"===e.mode?(0,l.jsx)("button",{type:"button",onClick:()=>O(e,"prefill"),className:"px-2 py-0.5 rounded-md text-[11px] font-medium border border-primary bg-primary text-white",children:"Prefill"}):(0,l.jsx)("button",{type:"button",onClick:()=>O(e,"prefill"),title:"Add prefill",className:"px-1.5 py-0.5 rounded-md text-[11px] border border-border text-text-muted hover:bg-black/5 dark:hover:bg-white/5",children:"+"})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,l.jsx)("span",{className:"text-[11px] text-text-muted",children:e.enabled?"On":"Off"}),(0,l.jsx)(n.lM,{checked:e.enabled,onChange:t=>F(e,t),size:"sm"}),(0,l.jsx)("button",{onClick:()=>O(e,"system"),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5",title:"Edit",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,l.jsx)("button",{onClick:()=>u(e),className:"p-1.5 rounded-lg text-text-muted hover:bg-red-500/10 hover:text-red-500",title:"Delete",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id))}),x&&(0,l.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,l.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>p(null)}),(0,l.jsxs)("div",{className:"relative w-full max-w-2xl bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl flex flex-col max-h-[85vh]",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,l.jsx)("h2",{className:"text-base font-semibold text-text-main",children:x.id?"Edit File":"New Context File"}),(0,l.jsx)("button",{onClick:()=>p(null),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,l.jsxs)("div",{className:"p-4 space-y-3 overflow-y-auto flex-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium",children:"Name"}),(0,l.jsx)(n.pd,{placeholder:"soul.md",value:x.name,onChange:e=>p(t=>({...t,name:e.target.value}))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium",children:"Models"}),(0,l.jsx)(n.pd,{placeholder:"Empty = all models. e.g. kiro/*, cc/claude-opus-4*, my-combo",value:x.modelsText||"",onChange:e=>p(t=>({...t,modelsText:e.target.value}))}),(0,l.jsx)("p",{className:"text-[11px] text-text-muted mt-1",children:"Comma-separated. Matches provider/model, provider alias/model, bare model, or the model/combo name the client sent. Use * as a wildcard."})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium",children:"Slot"}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,l.jsx)(n.$n,{type:"button",size:"sm",variant:"system"===(x.slot||"system")?"primary":(x.content||"").trim()?"secondary":"ghost",onClick:()=>p(e=>({...e,slot:"system"})),children:"System prompt"}),(0,l.jsx)(n.$n,{type:"button",size:"sm",variant:"prefill"===x.slot?"primary":(x.prefillContent||"").trim()?"secondary":"ghost",onClick:()=>p(e=>({...e,slot:"prefill"})),children:"Prefill"})]}),(0,l.jsx)("p",{className:"text-[11px] text-text-muted mt-1",children:"Same file. System is prepended to the prompt. Prefill is inserted as prior turns. Fill either, or both. Empty slot is skipped."})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium",children:"prefill"===x.slot?"Prefill turns":"System prompt"}),(0,l.jsx)("textarea",{className:"w-full mt-1 rounded-lg border border-border bg-surface-2 p-3 font-mono text-xs text-text-main min-h-[280px] resize-y focus:outline-none focus:ring-2 focus:ring-primary/40",placeholder:"prefill"===x.slot?'[{"role":"user","content":"..."},{"role":"assistant","content":"..."}]':"You are a helpful assistant with the following persona…",value:P,onChange:e=>{var t;return t=e.target.value,void p(e=>e?.slot==="prefill"?{...e,prefillContent:t}:{...e,content:t})}}),(0,l.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:[i(P)," \xb7 switching slots does not erase the other one"]})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-2 p-3 border-t border-black/5 dark:border-white/5",children:[(0,l.jsx)(n.$n,{variant:"ghost",size:"sm",onClick:()=>p(null),children:"Cancel"}),(0,l.jsx)(n.$n,{size:"sm",onClick:$,disabled:c,children:c?"Saving…":"Save"})]})]})]}),(0,l.jsx)(n.uo,{isOpen:!!h,title:"Delete context file?",message:`"${h?.name}" will be permanently removed.`,confirmText:"Delete",variant:"danger",onConfirm:z,onClose:()=>u(null)})]})}}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=7159)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{},_=>{_.O(0,[2574,3862,3745,3416,9501,620,5497,6202,8441,3794,7358],()=>_(_.s=6202)),_N_E=_.O()}]);
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{39365:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>ee});var a=s(95155),r=s(73321),o=s(98500),n=s.n(o),l=s(12115),i=s(35497),d=s(57250),c=s(1791),u=s(14051),p=s.n(u),m=s(81277),x=s(66430),h=s(40728),b=s(11059);let g=()=>()=>{},f=()=>window.location.hostname;function y({value:e,copied:t,onCopy:s,id:r}){return(0,a.jsxs)("div",{className:"flex items-start gap-2 rounded-lg bg-sidebar px-3 py-2",children:[(0,a.jsx)("code",{className:"min-w-0 flex-1 whitespace-pre-wrap break-all text-xs font-mono text-text-main",children:e}),(0,a.jsxs)("button",{type:"button",onClick:()=>s(e,r),className:"inline-flex shrink-0 items-center gap-1 rounded-md bg-primary px-2 py-1 text-[11px] font-medium text-white hover:bg-primary/90","aria-label":`Copy: ${e}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:t===r?"check":"content_copy"}),t===r?"Copied":"Copy"]})]})}function v({n:e,title:t,children:s}){return(0,a.jsxs)("li",{className:"flex gap-3",children:[(0,a.jsx)("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-full bg-primary/10 text-xs font-semibold text-primary",children:e}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:t}),s]})]})}function j({n:e,onImport:t}){return(0,a.jsxs)(v,{n:e,title:"Import the account here",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Click ",(0,a.jsx)("strong",{children:"Import local profiles"}),", keep Daemon URL ",(0,a.jsx)("code",{children:"http://127.0.0.1:8077/mcp"}),", paste the daemon token, then Import. Every logged-in profile becomes one connection; importing again only updates them."]}),(0,a.jsxs)("button",{type:"button",onClick:t,className:"inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1 text-xs font-medium text-text-main hover:border-primary hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Import local profiles"]})]})}function w({hasConnections:e,onImport:t}){let s=(0,l.useSyncExternalStore)(g,f,()=>""),r=!(!s||"localhost"===s||"127.0.0.1"===s||"::1"===s),[o,n]=(0,l.useState)(null),[d,c]=(0,l.useState)(!e),{copied:u,copy:p}=(0,b.C)(2e3),m=o||(r?"vps":"local"),x=r?s:"YOUR-VPS-IP",h="akun1";return(0,a.jsxs)(i.Zp,{padding:"md",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"flex w-full items-center justify-between gap-3 text-left","aria-expanded":d,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"person_add"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"How to add a Google account"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["The quickest way is the ",(0,a.jsx)("strong",{children:"Add"})," button in the Connections card below. The steps here are a one-time setup you only do once per machine."]})]})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted",children:d?"expand_less":"expand_more"})]}),d&&(0,a.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,a.jsxs)("div",{className:"rounded-lg border border-primary/30 bg-primary/5 px-3 py-2.5 text-xs",children:[(0,a.jsx)("p",{className:"font-semibold text-text-main",children:"Already set this up once?"}),(0,a.jsxs)("p",{className:"mt-0.5 text-text-muted",children:["Just click the ",(0,a.jsx)("strong",{children:"Add"})," button in the Connections card below. A sign-in window opens, you log in to Google, and the account appears here on its own — nothing to copy or paste."]}),(0,a.jsx)("p",{className:"mt-1.5 text-text-muted",children:"First time on this machine? Do the one-time setup below once, then use the button for every account after."})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",role:"tablist",children:[["local","Router on this computer (Windows / macOS)"],["vps","Router on a VPS (Linux, no screen)"]].map(([e,t])=>(0,a.jsx)("button",{type:"button",role:"tab","aria-selected":m===e,onClick:()=>n(e),className:`rounded-md px-3 py-1.5 text-xs font-medium ${m===e?"bg-primary text-white":"border border-border text-text-muted hover:text-text-main"}`,children:t},e))}),"local"===m?(0,a.jsxs)("ol",{className:"space-y-4",children:[(0,a.jsxs)(v,{n:1,title:"Install gflow and Google Chrome (once)",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Install Google Chrome, then install uv and gflow-cli. Windows: run in PowerShell, then reopen PowerShell."}),(0,a.jsx)(y,{id:"l-uv-win",copied:u,onCopy:p,value:'powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"'}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"macOS / Linux:"}),(0,a.jsx)(y,{id:"l-uv-unix",copied:u,onCopy:p,value:"curl -LsSf https://astral.sh/uv/install.sh | sh"}),(0,a.jsx)(y,{id:"l-gflow",copied:u,onCopy:p,value:'uv tool install "gflow-cli>=0.88,<0.90"'})]}),(0,a.jsxs)(v,{n:2,title:"Sign in a Google account (repeat per account)",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Prefer the ",(0,a.jsx)("strong",{children:"Add"})," button in the Connections card — it runs this for you. To do it by hand: run the command, sign in until the Flow editor appears, and Chrome closes by itself. Use a different profile name for every account."]}),(0,a.jsx)(y,{id:"l-login",copied:u,onCopy:p,value:`gflow auth login --profile ${h} --browser chrome`})]}),(0,a.jsxs)(v,{n:3,title:"Start the gflow daemon (keep this window open)",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Pick any secret token; you paste the same token into Import below. Windows PowerShell:"}),(0,a.jsx)(y,{id:"l-serve-win",copied:u,onCopy:p,value:'& "$(uv tool dir)\\gflow-cli\\Scripts\\python.exe" "$(npm root -g)\\zevairouter\\scripts\\gflow-reply-capture.py"; $env:GFLOW_DAEMON_TOKEN = "choose-a-secret-token"; gflow serve --port 8077'}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"macOS / Linux:"}),(0,a.jsx)(y,{id:"l-serve-unix",copied:u,onCopy:p,value:'"$(uv tool dir)/gflow-cli/bin/python" "$(npm root -g)/zevairouter/scripts/gflow-reply-capture.py" && GFLOW_DAEMON_TOKEN=choose-a-secret-token gflow serve --port 8077'})]}),(0,a.jsx)(j,{n:4,onImport:t})]}):(0,a.jsxs)("ol",{className:"space-y-4",children:[(0,a.jsxs)(v,{n:1,title:"Prepare the VPS for Flow (once, as root)",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Installs Chrome, Xvfb, gflow and its services, and prints the daemon token. Safe to run again; it keeps the token and accounts."}),(0,a.jsx)(y,{id:"v-setup",copied:u,onCopy:p,value:'sudo bash "$(npm root -g)/zevairouter/scripts/flow-vps-setup.sh"'})]}),(0,a.jsxs)(v,{n:2,title:"Sign in a Google account (repeat per account)",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Easiest: click ",(0,a.jsx)("strong",{children:"Add"})," in the Connections card. On a VPS it starts the sign-in on the server and shows you the VNC password and the exact tunnel command right in that window — just follow them. To do it by hand instead, run (it prints a VNC password and the next two steps):"]}),(0,a.jsx)(y,{id:"v-login",copied:u,onCopy:p,value:`ssh root@${x} flow-login ${h}`}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"In a second terminal, open the tunnel and leave it open:"}),(0,a.jsx)(y,{id:"v-tunnel",copied:u,onCopy:p,value:`ssh -L 5998:127.0.0.1:5998 root@${x}`}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Open a VNC viewer at ",(0,a.jsx)("code",{children:"127.0.0.1:5998"})," with that password: on macOS, Finder → Go → Connect to Server → ",(0,a.jsx)("code",{children:"vnc://127.0.0.1:5998"}),"; on Windows, TigerVNC or RealVNC Viewer. Sign in until the Flow editor appears; Chrome closes by itself and VNC shuts down."]})]}),(0,a.jsx)(v,{n:3,title:"Get the daemon token",children:(0,a.jsx)(y,{id:"v-token",copied:u,onCopy:p,value:`ssh root@${x} cat /home/flow/.gflow-agent/token`})}),(0,a.jsx)(j,{n:4,onImport:t})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface px-3 py-2 text-xs text-text-muted space-y-1",children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Several accounts:"})," the account with the highest priority is used first; when its credits run out the next one takes over automatically."]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Videos of 20–60 s:"})," on flow.google.com, upload one image you own with that account and accept Google's image-rights dialog, then edit the connection and enable ",(0,a.jsx)("em",{children:"I2V upload consent confirmed"}),"."]})]})]})]})}y.propTypes={value:p().string.isRequired,copied:p().string,onCopy:p().func.isRequired,id:p().string.isRequired},v.propTypes={n:p().number.isRequired,title:p().string.isRequired,children:p().node},j.propTypes={n:p().number.isRequired,onImport:p().func.isRequired},w.propTypes={hasConnections:p().bool.isRequired,onImport:p().func.isRequired};let N=new Set(["running","importing"]);function k({onDone:e}){var t;let[s,r]=(0,l.useState)(null),[o,n]=(0,l.useState)(!1),[d,c]=(0,l.useState)(""),u=(0,l.useRef)(null),p=(0,l.useRef)(!1),m=(0,l.useCallback)(()=>{u.current&&(clearInterval(u.current),u.current=null)},[]),x=(0,l.useCallback)(async t=>{try{let s=await fetch(`/api/providers/flow/login/${t}`),a=await s.json();if(!a?.job)return;r(a.job),!N.has(a.job.status)&&(m(),"done"!==a.job.status||p.current||(p.current=!0,e?.()))}catch{}},[e,m]),h=(0,l.useCallback)(async()=>{n(!0),c(""),p.current=!1;try{let e=await fetch("/api/providers/flow/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),t=await e.json();if(!e.ok)throw Error(t?.error||"Could not start sign-in");r(t.job),m(),u.current=setInterval(()=>x(t.job.id),2e3)}catch(e){c(e?.message||"Could not start sign-in")}finally{n(!1)}},[x,m]),b=(0,l.useCallback)(async()=>{if(m(),s?.id&&N.has(s.status)){try{await fetch(`/api/providers/flow/login/${s.id}`,{method:"DELETE"})}catch{}r(e=>e?{...e,status:"cancelled",step:"Cancelled.",active:!1}:e)}},[s,m]);(0,l.useEffect)(()=>m,[m]);let g=s&&N.has(s.status);return(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[!s&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Opens Google sign-in on the machine running this router and imports the account automatically — no profile name or token to type."}),s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"vps"===s.mode?(0,a.jsx)(a.Fragment,{children:"This router is headless. A sign-in window runs on the server over VNC — follow the steps below, sign in until the Flow editor appears, and the account imports automatically."}):(0,a.jsx)(a.Fragment,{children:"A Chrome window opens on the computer running this router. Sign in until the Flow editor appears — Chrome then closes by itself and the account is imported automatically."})}),s.vnc&&s.active&&(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-sidebar p-3 text-xs text-text-muted space-y-2",children:[(0,a.jsx)("p",{className:"font-medium text-text-main",children:"Reach the sign-in window"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:"1. On your computer, open an SSH tunnel:"}),(0,a.jsx)("code",{className:"mt-1 block break-all rounded bg-background px-2 py-1 text-text-main",children:s.vnc.tunnel})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{children:["2. Open a VNC viewer at ",(0,a.jsx)("code",{className:"text-text-main",children:s.vnc.viewer||"127.0.0.1:5998"})," with password:"]}),(0,a.jsx)("code",{className:"mt-1 block rounded bg-background px-2 py-1 text-text-main",children:s.vnc.password})]}),(0,a.jsx)("p",{children:"3. Sign in until the Flow editor appears; the window closes by itself."})]}),(0,a.jsxs)("div",{className:`rounded-lg border p-3 text-sm ${"done"===(t=s.status)?"border-green-500/30 bg-green-500/10":"failed"===t||"needs_token"===t?"border-red-500/30 bg-red-500/10":"border-border bg-surface"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[g&&(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px] text-primary",children:"progress_activity"}),(0,a.jsx)("span",{className:"font-medium text-text-main",children:s.step})]}),(0,a.jsxs)("div",{className:"mt-1 text-xs text-text-muted",children:["Profile ",(0,a.jsx)("code",{children:s.profile}),s.email?(0,a.jsxs)(a.Fragment,{children:[" \xb7 ",s.email]}):null]}),s.error&&(0,a.jsx)("div",{className:"mt-2 text-xs text-red-500 break-words",children:s.error})]})]}),d&&(0,a.jsx)("p",{className:"text-sm text-red-500 break-words",children:d}),g?(0,a.jsx)(i.$n,{onClick:b,variant:"ghost",fullWidth:!0,children:"Cancel sign-in"}):(0,a.jsx)(i.$n,{onClick:h,icon:"person_add",fullWidth:!0,disabled:o,children:o?"Starting…":s?.status==="done"?"Add another":"Sign in with Google"})]})}k.propTypes={onDone:p().func};var C=s(5539);function S({until:e}){let[t,s]=(0,l.useState)("");return((0,l.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);a<60?s(`${a}s`):a<3600?s(`${Math.floor(a/60)}m ${a%60}s`):s(`${Math.floor(a/3600)}h ${Math.floor(a%3600/60)}m`)};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function $({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:o,onMoveUp:n,onMoveDown:d,onToggleActive:c,onUpdateProxy:u,onEdit:p,onDelete:x}){let[h,b]=(0,l.useState)(!1),[g,f]=(0,l.useState)(!1),y=(0,l.useRef)(null),v=new Map((t||[]).map(e=>[e.id,e])),j=e.providerSpecificData?.proxyPoolId||null,w=j?v.get(j):null,N=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,k=!!j||N,C=w?`Pool: ${w.name}`:j?`Pool: ${j} (inactive/missing)`:N?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",_="",R=w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(R)try{let e=new URL(R);_=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{_=R}let P=w?.noProxy||e.providerSpecificData?.connectionNoProxy||"",E=w?.isActive===!0?"success":j||N?"error":"default",I=(0,m.c)(e),O=null!==I;(0,l.useEffect)(()=>{if(!h)return;let e=e=>{y.current&&!y.current.contains(e.target)&&b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h]);let T="unavailable"!==e.testStatus||O?e.testStatus:"active",A=s?e.name||e.email||e.displayName||"OAuth Account":e.name,L=async e=>{f(!0);try{await u("__none__"===e?null:e)}finally{f(!1),b(!1)}};return(0,a.jsxs)("div",{className:`group flex flex-col gap-3 p-2 rounded-lg sm:flex-row sm:items-center sm:justify-between hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:d,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:A}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:!1===e.isActive?"default":"active"===T||"success"===T?"success":"error"===T||"expired"===T||"unavailable"===T?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":T||"Unknown"}),k&&(0,a.jsx)(i.Ex,{variant:E,size:"sm",children:"Proxy"}),O&&!1!==e.isActive&&(0,a.jsx)(S,{until:I}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),k&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:C,children:C}),_&&(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:_}),P&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:P,children:["no_proxy: ",P]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:y,children:[(0,a.jsxs)("button",{onClick:()=>b(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${k?"text-primary":"text-text-muted hover:text-primary"}`,disabled:g,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:g?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),h&&(0,a.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,a.jsx)("button",{onClick:()=>L("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!j?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>L(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${j===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function _({isOpen:e,provider:t,providerName:s,proxyPools:r,onSave:o,onClose:n,onFlowDone:d,saveError:c}){let u="__none__",p="flow"===t,[m,x]=(0,l.useState)({name:"",apiKey:"",priority:1,proxyPoolId:u,flowProfile:"",flowBaseUrl:"http://127.0.0.1:8077/mcp",flowI2vReady:!1}),[h,b]=(0,l.useState)(!1),[g,f]=(0,l.useState)(null),[y,v]=(0,l.useState)(!1),[j,w]=(0,l.useState)(!1),N=p?{profile:m.flowProfile.trim(),baseUrl:m.flowBaseUrl.trim(),i2vReady:m.flowI2vReady}:void 0,C=async()=>{b(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:m.apiKey,providerSpecificData:N})}),s=await e.json();f(s.valid?"success":"failed")}catch{f("failed")}finally{b(!1)}},S=async()=>{if(t&&m.apiKey&&(!p||m.flowProfile.trim())){v(!0);try{let e=!1;try{b(!0),f(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:m.apiKey,providerSpecificData:N})});e=!!(await s.json()).valid,f(e?"success":"failed")}catch{f("failed")}finally{b(!1)}await o({name:m.name,apiKey:m.apiKey,priority:m.priority,proxyPoolId:p||m.proxyPoolId===u?null:m.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:N})}finally{v(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:p?"Add Google Flow Account":`Add ${s||t} API Key`,onClose:n,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[p&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k,{onDone:d}),(0,a.jsx)("button",{type:"button",onClick:()=>w(e=>!e),className:"self-start text-xs text-text-muted underline hover:text-text-main",children:j?"Hide manual setup":"Add an already-signed-in profile by hand"})]}),(!p||j)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:p?"Account name":"Name"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:m.name,onChange:e=>x({...m,name:e.target.value}),placeholder:p?"Google account email":"Production Key"})]}),p&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"gflow profile"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",value:m.flowProfile,onChange:e=>x({...m,flowProfile:e.target.value}),placeholder:"from: gflow auth list"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Daemon URL"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",value:m.flowBaseUrl,onChange:e=>x({...m,flowBaseUrl:e.target.value})})]}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm text-text-main",children:[(0,a.jsx)("input",{type:"checkbox",checked:m.flowI2vReady,onChange:e=>x({...m,flowI2vReady:e.target.checked}),className:"mt-1"}),(0,a.jsxs)("span",{children:["I2V upload consent confirmed ",(0,a.jsx)("span",{className:"block text-xs text-text-muted",children:"Required for 20–60s videos. Enable after accepting Google's image-rights dialog once for this profile."})]})]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:p?"Daemon token":"API Key"}),(0,a.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:m.apiKey,onChange:e=>x({...m,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:C,disabled:!m.apiKey||p&&!m.flowProfile.trim()||h||y,variant:"secondary",children:h?"Checking...":"Check"})})]}),g&&(0,a.jsx)(i.Ex,{variant:"success"===g?"success":"error",children:"success"===g?"Valid":"Invalid"}),c&&(0,a.jsx)("p",{className:"text-sm text-red-500 break-words",children:c}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,a.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:m.priority,onChange:e=>x({...m,priority:Number.parseInt(e.target.value)||1})})]}),!p&&(0,a.jsx)(i.l6,{label:"Proxy Pool",value:m.proxyPoolId,onChange:e=>x({...m,proxyPoolId:e.target.value}),options:[{value:u,label:"None"},...(r||[]).map(e=>({value:e.id,label:e.name}))]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:S,fullWidth:!0,disabled:!m.name||!m.apiKey||p&&!m.flowProfile.trim()||y,children:y?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:n,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),p&&!j&&(0,a.jsx)(i.$n,{onClick:n,variant:"ghost",fullWidth:!0,children:"Close"})]})}):null}function R({isOpen:e,onImported:t,onClose:s}){let[r,o]=(0,l.useState)(""),[n,d]=(0,l.useState)("http://127.0.0.1:8077/mcp"),[c,u]=(0,l.useState)(!1),[p,m]=(0,l.useState)(!1),[x,h]=(0,l.useState)(null),[b,g]=(0,l.useState)(""),f=async()=>{if(r.trim()){m(!0),g(""),h(null);try{let e=await fetch("/api/providers/flow/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({daemonToken:r,baseUrl:n,i2vReady:c})}),s=await e.json();if(!e.ok)throw Error(s.error||"Flow profile import failed");h(s),o(""),await t()}catch(e){g(e?.message||"Flow profile import failed")}finally{m(!1)}}};return e?(0,a.jsx)(i.aF,{isOpen:!0,title:"Import local gflow profiles",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Imports every account signed in with ",(0,a.jsx)("code",{children:"gflow auth login"})," (or ",(0,a.jsx)("code",{children:"flow-login"})," on a VPS). Google cookies stay inside gflow and are never copied into zevairouter. The daemon token is the one you started ",(0,a.jsx)("code",{children:"gflow serve"})," with; on a VPS set up with ",(0,a.jsx)("code",{children:"flow-vps-setup.sh"})," it is in ",(0,a.jsx)("code",{children:"/home/flow/.gflow-agent/token"}),"."]}),(0,a.jsx)(i.pd,{label:"Daemon URL",value:n,onChange:e=>d(e.target.value),placeholder:"http://127.0.0.1:8077/mcp"}),(0,a.jsx)(i.pd,{label:"Daemon token",type:"password",value:r,onChange:e=>o(e.target.value),placeholder:"GFLOW_DAEMON_TOKEN",required:!0}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm text-text-main",children:[(0,a.jsx)("input",{type:"checkbox",checked:c,onChange:e=>u(e.target.checked),className:"mt-1"}),(0,a.jsxs)("span",{children:["I2V upload consent confirmed for every imported profile ",(0,a.jsx)("span",{className:"block text-xs text-text-muted",children:"Enable only after each account accepted Google's image-rights dialog. Required for 20–60s videos."})]})]}),x&&(0,a.jsxs)("div",{className:"rounded-lg border border-green-500/30 bg-green-500/10 p-3 text-sm",children:["Imported ",x.imported?.length||0," profile(s); validated ",(0,a.jsx)("code",{children:x.validatedProfile}),".",(x.skipped?.length||0)>0&&(0,a.jsxs)("div",{className:"mt-1 text-text-muted",children:["Skipped ",x.skipped.length," profile(s) without saved cookies."]})]}),b&&(0,a.jsx)("p",{className:"text-sm text-red-500 break-words",children:b}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:f,fullWidth:!0,disabled:!r.trim()||p,children:p?"Importing...":"Import profiles"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:x?"Done":"Cancel"})]})]})}):null}function P({providerId:e,isOAuth:t,loginProviderId:s=null}){let[r,o]=(0,l.useState)([]),[n,d]=(0,l.useState)([]),[c,u]=(0,l.useState)(!0),[p,m]=(0,l.useState)(""),[b,g]=(0,l.useState)(!1),[f,y]=(0,l.useState)(""),[v,j]=(0,l.useState)(!1),[N,k]=(0,l.useState)(!1),[S,E]=(0,l.useState)(null),[I,O]=(0,l.useState)(null),[T,A]=(0,l.useState)("1"),L=(0,l.useRef)(null),D=(0,l.useRef)("1"),[F,M]=(0,l.useState)(null),U=async e=>{if(!e.ok)return null;try{return await e.json()}catch{return null}},K=(0,l.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([(0,x.b7)("providers:list",h.t7),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),r=await U(s),n=await U(a)||{},l=null===t,i=null===r;l||o((t.connections||[]).filter(t=>t.provider===e)),i||d(r.proxyPools||[]),l||i?m("Connection data could not be loaded. Check that the server is running, then retry."):m("");let c=(n.providerStrategies||{})[e]||{};O(c.fallbackStrategy||null),A(null!=c.stickyRoundRobinLimit?String(c.stickyRoundRobinLimit):"1"),D.current=null!=c.stickyRoundRobinLimit?String(c.stickyRoundRobinLimit):"1"}catch(e){console.log("ConnectionsCard fetch error:",e),m("Connection data could not be loaded. Check that the server is running, then retry.")}finally{u(!1)}},[e]);(0,l.useEffect)(()=>{K()},[K]);let B=async(t,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),r=(a.ok?await a.json():{}).providerStrategies||{},o={};t&&(o.fallbackStrategy=t),"round-robin"===t&&""!==s&&(o.stickyRoundRobinLimit=Number(s)||3);let n={...r};0===Object.keys(o).length?delete n[e]:n[e]=o,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("saveStrategy error:",e)}},q=async(e,t)=>{let s=[...r];[s[e],s[t]]=[s[t],s[e]],o(s);try{let[a,r]=await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e+1})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t+1})})]);a.ok&&r.ok?(0,x.au)("providers:list"):await K()}catch{await K()}},V=async e=>{M({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{M(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&(o(t=>t.filter(t=>t.id!==e)),(0,x.au)("providers:list"))}catch(e){console.log("delete error:",e)}}})},z=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(o(s=>s.map(s=>s.id===e?{...s,isActive:t}:s)),(0,x.au)("providers:list"))}catch(e){console.log("toggle error:",e)}},J=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&(o(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s)),(0,x.au)("providers:list"))}catch(e){console.log("proxy error:",e)}},G=async t=>{y("");try{let s=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})}),a=await s.json().catch(()=>null);if(s.ok){(0,x.au)("providers:list"),await K(),g(!1);return}y(a?.error||"Could not save connection")}catch(e){console.log("save apikey error:",e),y("Could not save connection")}},H=async e=>{try{(await fetch(`/api/providers/${S.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&((0,x.au)("providers:list"),await K(),j(!1))}catch(e){console.log("update connection error:",e)}};return c?(0,a.jsx)(i.Zp,{children:(0,a.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,a.jsxs)(a.Fragment,{children:["flow"===e&&(0,a.jsx)(w,{hasConnections:r.length>0,onImport:()=>k(!0)}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:["flow"===e&&(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"download",onClick:()=>k(!0),children:"Import local profiles"}),(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(i.lM,{checked:"round-robin"===I,onChange:e=>{let t=e?"round-robin":null;O(t),e&&!T&&A("1");let s=e?T||"1":T;D.current=s,L.current&&(clearTimeout(L.current),L.current=null),B(t,s)}}),"round-robin"===I&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:T,onChange:e=>{A(e.target.value),D.current=e.target.value,L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{B("round-robin",D.current)},500)},className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),p&&(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-600 dark:border-red-800 dark:bg-red-900/20 dark:text-red-400 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("span",{children:p}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:()=>{u(!0),K()},children:"Retry"})]}),0!==r.length||p?r.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:r.map((e,s)=>(0,a.jsx)($,{connection:e,proxyPools:n,isOAuth:t,isFirst:0===s,isLast:s===r.length-1,onMoveUp:()=>q(s,s-1),onMoveDown:()=>q(s,s+1),onToggleActive:t=>z(e.id,t),onUpdateProxy:t=>J(e.id,t),onEdit:()=>{E(e),j(!0)},onDelete:()=>V(e.id)},e.id))}),(0,a.jsxs)("div",{className:"mt-4 flex justify-stretch gap-2 sm:justify-start",children:[(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>g(!0),children:"Add"}),s&&(0,a.jsx)(C.A,{providerId:s,onConnected:K})]})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[s&&(0,a.jsx)(C.A,{providerId:s,onConnected:K}),"flow"===e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>g(!0),children:"Add"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"download",onClick:()=>k(!0),children:"Import local profiles"})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>g(!0),children:"Add manually"})]})]})]}),b&&(0,a.jsx)(_,{isOpen:!0,provider:e,proxyPools:n,onSave:G,saveError:f,onClose:()=>{y(""),g(!1)},onFlowDone:async()=>{(0,x.au)("providers:list"),await K()}}),"flow"===e&&N&&(0,a.jsx)(R,{isOpen:!0,onImported:async()=>{(0,x.au)("providers:list"),await K()},onClose:()=>k(!1)}),v&&S&&(0,a.jsx)(i.wI,{isOpen:!0,connection:S,proxyPools:n,onSave:H,onClose:()=>j(!1)}),F&&(0,a.jsx)(i.uo,{isOpen:!0,onClose:()=>M(null),onConfirm:F.onConfirm,title:F.title||"Confirm",message:F.message,variant:"danger"})]})}S.propTypes={until:p().string.isRequired},$.propTypes={connection:p().shape({id:p().string,name:p().string,email:p().string,displayName:p().string,testStatus:p().string,isActive:p().bool,lastError:p().string,priority:p().number}).isRequired,proxyPools:p().array,isOAuth:p().bool.isRequired,isFirst:p().bool.isRequired,isLast:p().bool.isRequired,onMoveUp:p().func.isRequired,onMoveDown:p().func.isRequired,onToggleActive:p().func.isRequired,onUpdateProxy:p().func,onEdit:p().func.isRequired,onDelete:p().func.isRequired},_.propTypes={isOpen:p().bool.isRequired,provider:p().string,providerName:p().string,proxyPools:p().array,onSave:p().func.isRequired,onClose:p().func.isRequired,onFlowDone:p().func,saveError:p().string},R.propTypes={isOpen:p().bool.isRequired,onImported:p().func.isRequired,onClose:p().func.isRequired},P.propTypes={providerId:p().string.isRequired,isOAuth:p().bool,loginProviderId:p().string};var E=s(28777);function I({model:e,fullModel:t,copied:s,onCopy:r,testStatus:o,isCustom:n,isFree:l,onDeleteAlias:i,onTest:d,isTesting:c}){let u="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:u?{color:u}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e.id}`?"Copied!":"Copy"})]}),l&&(0,a.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),n&&(0,a.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function O({isOpen:e,onSave:t,onClose:s}){let[r,o]=(0,l.useState)(""),n=()=>{r.trim()&&(t(r.trim()),o(""))};return(0,a.jsx)(i.aF,{isOpen:e,title:"Add Custom Model",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:r,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&n(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:n,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function T({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,b.C)(),[n,d]=(0,l.useState)({}),[u,p]=(0,l.useState)([]),[m,g]=(0,l.useState)({}),[f,y]=(0,l.useState)(()=>new Set),[v,j]=(0,l.useState)({}),[w,N]=(0,l.useState)(!1),[k,C]=(0,l.useState)([]),S=s||(0,c.wG)(e),$=t||"llm",_=(0,l.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([(0,x.b7)("models:aliases",h.QF),(0,x.b7)("providers:list",h.t7),(0,x.b7)("models:custom",h.Mi)]);d(t.aliases||{}),C((s.connections||[]).filter(t=>t.provider===e)),p(a.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[e]);(0,l.useEffect)(()=>{_()},[_]),(0,l.useEffect)(()=>{let e=()=>{(0,x.au)("models:custom"),(0,x.au)("models:aliases"),_()};return window.addEventListener("customModelChanged",e),()=>window.removeEventListener("customModelChanged",e)},[_]);let R=async(e,t)=>{let s=`${S}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&((0,x.au)("models:aliases"),await _())}catch(e){console.log("set alias error:",e)}},P=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&((0,x.au)("models:aliases"),await _())}catch(e){console.log("delete alias error:",e)}},A=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:S,id:e,type:$})})).ok&&((0,x.au)("models:custom"),await _(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},L=async e=>{try{let t=new URLSearchParams({providerAlias:S,id:e,type:$});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&((0,x.au)("models:custom"),await _(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},D=async e=>{y(t=>new Set(t).add(e));try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${S}/${e}`,kind:t})}),a=await s.json();g(t=>({...t,[e]:a.ok?"ok":"error"})),j(t=>({...t,[e]:a.ok?"":a.error||"Model not reachable"}))}catch{g(t=>({...t,[e]:"error"})),j(t=>({...t,[e]:"Network error"}))}finally{y(t=>{let s=new Set(t);return s.delete(e),s})}},F=(0,E.KC)(e),M=t?F.filter(e=>Array.isArray(e.kinds)?e.kinds.includes(t):(e.kind||e.type||"llm")===t):F,U=u.filter(e=>e.providerAlias===S&&(e.kind||e.type||"llm")===$&&!M.some(t=>t.id===e.id)),K=(0,l.useMemo)(()=>{let e={};for(let[t,s]of Object.entries(n))s in e||(e[s]=t);return e},[n]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),Object.values(v).some(Boolean)&&(0,a.jsx)("div",{className:"mb-3 space-y-1",children:Object.entries(v).filter(([,e])=>!!e).map(([e,t])=>(0,a.jsxs)("p",{className:"break-words text-xs text-red-500",children:[e,": ",t]},e))}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[M.map(e=>{let t=K[`${S}/${e.id}`];return(0,a.jsx)(I,{model:e,fullModel:`${S}/${e.id}`,alias:t,copied:r,onCopy:o,onSetAlias:t=>R(e.id,t),onDeleteAlias:()=>P(t),testStatus:m[e.id],onTest:()=>D(e.id),isTesting:f.has(e.id),isFree:e.isFree},e.id)}),U.map(e=>(0,a.jsx)(I,{model:{id:e.id,name:e.name},fullModel:`${S}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>L(e.id),testStatus:m[e.id],onTest:()=>D(e.id),isTesting:f.has(e.id),isCustom:!0},`${e.id}-${e.type}`)),(0,a.jsxs)("button",{onClick:()=>N(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(O,{isOpen:w,onSave:async e=>{await A(e),N(!1)},onClose:()=>N(!1)})]})}I.propTypes={model:p().shape({id:p().string.isRequired}).isRequired,fullModel:p().string.isRequired,copied:p().string,onCopy:p().func.isRequired,testStatus:p().oneOf(["ok","error"]),isCustom:p().bool,isFree:p().bool,onDeleteAlias:p().func,onTest:p().func,isTesting:p().bool},O.propTypes={isOpen:p().bool.isRequired,onSave:p().func.isRequired,onClose:p().func.isRequired},T.propTypes={providerId:p().string.isRequired,kindFilter:p().string,providerAliasOverride:p().string};var A=s(62199);function L({label:e,children:t}){return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,a.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}let D=`// Audio will appear here after running.
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{32376:(e,t,s)=>{Promise.resolve().then(s.bind(s,39365))},39365:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>ee});var a=s(95155),r=s(73321),o=s(98500),n=s.n(o),l=s(12115),i=s(35497),d=s(57250),c=s(1791),u=s(14051),p=s.n(u),m=s(81277),x=s(66430),h=s(40728),b=s(11059);let g=()=>()=>{},f=()=>window.location.hostname;function y({value:e,copied:t,onCopy:s,id:r}){return(0,a.jsxs)("div",{className:"flex items-start gap-2 rounded-lg bg-sidebar px-3 py-2",children:[(0,a.jsx)("code",{className:"min-w-0 flex-1 whitespace-pre-wrap break-all text-xs font-mono text-text-main",children:e}),(0,a.jsxs)("button",{type:"button",onClick:()=>s(e,r),className:"inline-flex shrink-0 items-center gap-1 rounded-md bg-primary px-2 py-1 text-[11px] font-medium text-white hover:bg-primary/90","aria-label":`Copy: ${e}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:t===r?"check":"content_copy"}),t===r?"Copied":"Copy"]})]})}function v({n:e,title:t,children:s}){return(0,a.jsxs)("li",{className:"flex gap-3",children:[(0,a.jsx)("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-full bg-primary/10 text-xs font-semibold text-primary",children:e}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:t}),s]})]})}function j({n:e,onImport:t}){return(0,a.jsxs)(v,{n:e,title:"Import the account here",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Click ",(0,a.jsx)("strong",{children:"Import local profiles"}),", keep Daemon URL ",(0,a.jsx)("code",{children:"http://127.0.0.1:8077/mcp"}),", paste the daemon token, then Import. Every logged-in profile becomes one connection; importing again only updates them."]}),(0,a.jsxs)("button",{type:"button",onClick:t,className:"inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1 text-xs font-medium text-text-main hover:border-primary hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Import local profiles"]})]})}function w({hasConnections:e,onImport:t}){let s=(0,l.useSyncExternalStore)(g,f,()=>""),r=!(!s||"localhost"===s||"127.0.0.1"===s||"::1"===s),[o,n]=(0,l.useState)(null),[d,c]=(0,l.useState)(!e),{copied:u,copy:p}=(0,b.C)(2e3),m=o||(r?"vps":"local"),x=r?s:"YOUR-VPS-IP",h="akun1";return(0,a.jsxs)(i.Zp,{padding:"md",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"flex w-full items-center justify-between gap-3 text-left","aria-expanded":d,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"person_add"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"How to add a Google account"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["The quickest way is the ",(0,a.jsx)("strong",{children:"Add"})," button in the Connections card below. The steps here are a one-time setup you only do once per machine."]})]})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted",children:d?"expand_less":"expand_more"})]}),d&&(0,a.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,a.jsxs)("div",{className:"rounded-lg border border-primary/30 bg-primary/5 px-3 py-2.5 text-xs",children:[(0,a.jsx)("p",{className:"font-semibold text-text-main",children:"Already set this up once?"}),(0,a.jsxs)("p",{className:"mt-0.5 text-text-muted",children:["Just click the ",(0,a.jsx)("strong",{children:"Add"})," button in the Connections card below. A sign-in window opens, you log in to Google, and the account appears here on its own — nothing to copy or paste."]}),(0,a.jsx)("p",{className:"mt-1.5 text-text-muted",children:"First time on this machine? Do the one-time setup below once, then use the button for every account after."})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",role:"tablist",children:[["local","Router on this computer (Windows / macOS)"],["vps","Router on a VPS (Linux, no screen)"]].map(([e,t])=>(0,a.jsx)("button",{type:"button",role:"tab","aria-selected":m===e,onClick:()=>n(e),className:`rounded-md px-3 py-1.5 text-xs font-medium ${m===e?"bg-primary text-white":"border border-border text-text-muted hover:text-text-main"}`,children:t},e))}),"local"===m?(0,a.jsxs)("ol",{className:"space-y-4",children:[(0,a.jsxs)(v,{n:1,title:"Install gflow and Google Chrome (once)",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Install Google Chrome, then install uv and gflow-cli. Windows: run in PowerShell, then reopen PowerShell."}),(0,a.jsx)(y,{id:"l-uv-win",copied:u,onCopy:p,value:'powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"'}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"macOS / Linux:"}),(0,a.jsx)(y,{id:"l-uv-unix",copied:u,onCopy:p,value:"curl -LsSf https://astral.sh/uv/install.sh | sh"}),(0,a.jsx)(y,{id:"l-gflow",copied:u,onCopy:p,value:'uv tool install "gflow-cli>=0.88,<0.90"'})]}),(0,a.jsxs)(v,{n:2,title:"Sign in a Google account (repeat per account)",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Prefer the ",(0,a.jsx)("strong",{children:"Add"})," button in the Connections card — it runs this for you. To do it by hand: run the command, sign in until the Flow editor appears, and Chrome closes by itself. Use a different profile name for every account."]}),(0,a.jsx)(y,{id:"l-login",copied:u,onCopy:p,value:`gflow auth login --profile ${h} --browser chrome`})]}),(0,a.jsxs)(v,{n:3,title:"Start the gflow daemon (keep this window open)",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Pick any secret token; you paste the same token into Import below. Windows PowerShell:"}),(0,a.jsx)(y,{id:"l-serve-win",copied:u,onCopy:p,value:'& "$(uv tool dir)\\gflow-cli\\Scripts\\python.exe" "$(npm root -g)\\zevairouter\\scripts\\gflow-reply-capture.py"; $env:GFLOW_DAEMON_TOKEN = "choose-a-secret-token"; gflow serve --port 8077'}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"macOS / Linux:"}),(0,a.jsx)(y,{id:"l-serve-unix",copied:u,onCopy:p,value:'"$(uv tool dir)/gflow-cli/bin/python" "$(npm root -g)/zevairouter/scripts/gflow-reply-capture.py" && GFLOW_DAEMON_TOKEN=choose-a-secret-token gflow serve --port 8077'})]}),(0,a.jsx)(j,{n:4,onImport:t})]}):(0,a.jsxs)("ol",{className:"space-y-4",children:[(0,a.jsxs)(v,{n:1,title:"Prepare the VPS for Flow (once, as root)",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Installs Chrome, Xvfb, gflow and its services, and prints the daemon token. Safe to run again; it keeps the token and accounts."}),(0,a.jsx)(y,{id:"v-setup",copied:u,onCopy:p,value:'sudo bash "$(npm root -g)/zevairouter/scripts/flow-vps-setup.sh"'})]}),(0,a.jsxs)(v,{n:2,title:"Sign in a Google account (repeat per account)",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Easiest: click ",(0,a.jsx)("strong",{children:"Add"})," in the Connections card. On a VPS it starts the sign-in on the server and shows you the VNC password and the exact tunnel command right in that window — just follow them. To do it by hand instead, run (it prints a VNC password and the next two steps):"]}),(0,a.jsx)(y,{id:"v-login",copied:u,onCopy:p,value:`ssh root@${x} flow-login ${h}`}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"In a second terminal, open the tunnel and leave it open:"}),(0,a.jsx)(y,{id:"v-tunnel",copied:u,onCopy:p,value:`ssh -L 5998:127.0.0.1:5998 root@${x}`}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Open a VNC viewer at ",(0,a.jsx)("code",{children:"127.0.0.1:5998"})," with that password: on macOS, Finder → Go → Connect to Server → ",(0,a.jsx)("code",{children:"vnc://127.0.0.1:5998"}),"; on Windows, TigerVNC or RealVNC Viewer. Sign in until the Flow editor appears; Chrome closes by itself and VNC shuts down."]})]}),(0,a.jsx)(v,{n:3,title:"Get the daemon token",children:(0,a.jsx)(y,{id:"v-token",copied:u,onCopy:p,value:`ssh root@${x} cat /home/flow/.gflow-agent/token`})}),(0,a.jsx)(j,{n:4,onImport:t})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface px-3 py-2 text-xs text-text-muted space-y-1",children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Several accounts:"})," the account with the highest priority is used first; when its credits run out the next one takes over automatically."]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Videos of 20–60 s:"})," on flow.google.com, upload one image you own with that account and accept Google's image-rights dialog, then edit the connection and enable ",(0,a.jsx)("em",{children:"I2V upload consent confirmed"}),"."]})]})]})]})}y.propTypes={value:p().string.isRequired,copied:p().string,onCopy:p().func.isRequired,id:p().string.isRequired},v.propTypes={n:p().number.isRequired,title:p().string.isRequired,children:p().node},j.propTypes={n:p().number.isRequired,onImport:p().func.isRequired},w.propTypes={hasConnections:p().bool.isRequired,onImport:p().func.isRequired};let N=new Set(["running","importing"]);function k({onDone:e}){var t;let[s,r]=(0,l.useState)(null),[o,n]=(0,l.useState)(!1),[d,c]=(0,l.useState)(""),u=(0,l.useRef)(null),p=(0,l.useRef)(!1),m=(0,l.useCallback)(()=>{u.current&&(clearInterval(u.current),u.current=null)},[]),x=(0,l.useCallback)(async t=>{try{let s=await fetch(`/api/providers/flow/login/${t}`),a=await s.json();if(!a?.job)return;r(a.job),!N.has(a.job.status)&&(m(),"done"!==a.job.status||p.current||(p.current=!0,e?.()))}catch{}},[e,m]),h=(0,l.useCallback)(async()=>{n(!0),c(""),p.current=!1;try{let e=await fetch("/api/providers/flow/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),t=await e.json();if(!e.ok)throw Error(t?.error||"Could not start sign-in");r(t.job),m(),u.current=setInterval(()=>x(t.job.id),2e3)}catch(e){c(e?.message||"Could not start sign-in")}finally{n(!1)}},[x,m]),b=(0,l.useCallback)(async()=>{if(m(),s?.id&&N.has(s.status)){try{await fetch(`/api/providers/flow/login/${s.id}`,{method:"DELETE"})}catch{}r(e=>e?{...e,status:"cancelled",step:"Cancelled.",active:!1}:e)}},[s,m]);(0,l.useEffect)(()=>m,[m]);let g=s&&N.has(s.status);return(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[!s&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Opens Google sign-in on the machine running this router and imports the account automatically — no profile name or token to type."}),s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"vps"===s.mode?(0,a.jsx)(a.Fragment,{children:"This router is headless. A sign-in window runs on the server over VNC — follow the steps below, sign in until the Flow editor appears, and the account imports automatically."}):(0,a.jsx)(a.Fragment,{children:"A Chrome window opens on the computer running this router. Sign in until the Flow editor appears — Chrome then closes by itself and the account is imported automatically."})}),s.vnc&&s.active&&(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-sidebar p-3 text-xs text-text-muted space-y-2",children:[(0,a.jsx)("p",{className:"font-medium text-text-main",children:"Reach the sign-in window"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:"1. On your computer, open an SSH tunnel:"}),(0,a.jsx)("code",{className:"mt-1 block break-all rounded bg-background px-2 py-1 text-text-main",children:s.vnc.tunnel})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{children:["2. Open a VNC viewer at ",(0,a.jsx)("code",{className:"text-text-main",children:s.vnc.viewer||"127.0.0.1:5998"})," with password:"]}),(0,a.jsx)("code",{className:"mt-1 block rounded bg-background px-2 py-1 text-text-main",children:s.vnc.password})]}),(0,a.jsx)("p",{children:"3. Sign in until the Flow editor appears; the window closes by itself."})]}),(0,a.jsxs)("div",{className:`rounded-lg border p-3 text-sm ${"done"===(t=s.status)?"border-green-500/30 bg-green-500/10":"failed"===t||"needs_token"===t?"border-red-500/30 bg-red-500/10":"border-border bg-surface"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[g&&(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px] text-primary",children:"progress_activity"}),(0,a.jsx)("span",{className:"font-medium text-text-main",children:s.step})]}),(0,a.jsxs)("div",{className:"mt-1 text-xs text-text-muted",children:["Profile ",(0,a.jsx)("code",{children:s.profile}),s.email?(0,a.jsxs)(a.Fragment,{children:[" \xb7 ",s.email]}):null]}),s.error&&(0,a.jsx)("div",{className:"mt-2 text-xs text-red-500 break-words",children:s.error})]})]}),d&&(0,a.jsx)("p",{className:"text-sm text-red-500 break-words",children:d}),g?(0,a.jsx)(i.$n,{onClick:b,variant:"ghost",fullWidth:!0,children:"Cancel sign-in"}):(0,a.jsx)(i.$n,{onClick:h,icon:"person_add",fullWidth:!0,disabled:o,children:o?"Starting…":s?.status==="done"?"Add another":"Sign in with Google"})]})}k.propTypes={onDone:p().func};var C=s(5539);function S({until:e}){let[t,s]=(0,l.useState)("");return((0,l.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);a<60?s(`${a}s`):a<3600?s(`${Math.floor(a/60)}m ${a%60}s`):s(`${Math.floor(a/3600)}h ${Math.floor(a%3600/60)}m`)};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function $({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:o,onMoveUp:n,onMoveDown:d,onToggleActive:c,onUpdateProxy:u,onEdit:p,onDelete:x}){let[h,b]=(0,l.useState)(!1),[g,f]=(0,l.useState)(!1),y=(0,l.useRef)(null),v=new Map((t||[]).map(e=>[e.id,e])),j=e.providerSpecificData?.proxyPoolId||null,w=j?v.get(j):null,N=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,k=!!j||N,C=w?`Pool: ${w.name}`:j?`Pool: ${j} (inactive/missing)`:N?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",_="",R=w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(R)try{let e=new URL(R);_=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{_=R}let P=w?.noProxy||e.providerSpecificData?.connectionNoProxy||"",E=w?.isActive===!0?"success":j||N?"error":"default",I=(0,m.c)(e),O=null!==I;(0,l.useEffect)(()=>{if(!h)return;let e=e=>{y.current&&!y.current.contains(e.target)&&b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h]);let T="unavailable"!==e.testStatus||O?e.testStatus:"active",A=s?e.name||e.email||e.displayName||"OAuth Account":e.name,L=async e=>{f(!0);try{await u("__none__"===e?null:e)}finally{f(!1),b(!1)}};return(0,a.jsxs)("div",{className:`group flex flex-col gap-3 p-2 rounded-lg sm:flex-row sm:items-center sm:justify-between hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:d,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:A}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:!1===e.isActive?"default":"active"===T||"success"===T?"success":"error"===T||"expired"===T||"unavailable"===T?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":T||"Unknown"}),k&&(0,a.jsx)(i.Ex,{variant:E,size:"sm",children:"Proxy"}),O&&!1!==e.isActive&&(0,a.jsx)(S,{until:I}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),k&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:C,children:C}),_&&(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:_}),P&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:P,children:["no_proxy: ",P]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:y,children:[(0,a.jsxs)("button",{onClick:()=>b(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${k?"text-primary":"text-text-muted hover:text-primary"}`,disabled:g,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:g?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),h&&(0,a.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,a.jsx)("button",{onClick:()=>L("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!j?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>L(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${j===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function _({isOpen:e,provider:t,providerName:s,proxyPools:r,onSave:o,onClose:n,onFlowDone:d,saveError:c}){let u="__none__",p="flow"===t,[m,x]=(0,l.useState)({name:"",apiKey:"",priority:1,proxyPoolId:u,flowProfile:"",flowBaseUrl:"http://127.0.0.1:8077/mcp",flowI2vReady:!1}),[h,b]=(0,l.useState)(!1),[g,f]=(0,l.useState)(null),[y,v]=(0,l.useState)(!1),[j,w]=(0,l.useState)(!1),N=p?{profile:m.flowProfile.trim(),baseUrl:m.flowBaseUrl.trim(),i2vReady:m.flowI2vReady}:void 0,C=async()=>{b(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:m.apiKey,providerSpecificData:N})}),s=await e.json();f(s.valid?"success":"failed")}catch{f("failed")}finally{b(!1)}},S=async()=>{if(t&&m.apiKey&&(!p||m.flowProfile.trim())){v(!0);try{let e=!1;try{b(!0),f(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:m.apiKey,providerSpecificData:N})});e=!!(await s.json()).valid,f(e?"success":"failed")}catch{f("failed")}finally{b(!1)}await o({name:m.name,apiKey:m.apiKey,priority:m.priority,proxyPoolId:p||m.proxyPoolId===u?null:m.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:N})}finally{v(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:p?"Add Google Flow Account":`Add ${s||t} API Key`,onClose:n,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[p&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k,{onDone:d}),(0,a.jsx)("button",{type:"button",onClick:()=>w(e=>!e),className:"self-start text-xs text-text-muted underline hover:text-text-main",children:j?"Hide manual setup":"Add an already-signed-in profile by hand"})]}),(!p||j)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:p?"Account name":"Name"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:m.name,onChange:e=>x({...m,name:e.target.value}),placeholder:p?"Google account email":"Production Key"})]}),p&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"gflow profile"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",value:m.flowProfile,onChange:e=>x({...m,flowProfile:e.target.value}),placeholder:"from: gflow auth list"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Daemon URL"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",value:m.flowBaseUrl,onChange:e=>x({...m,flowBaseUrl:e.target.value})})]}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm text-text-main",children:[(0,a.jsx)("input",{type:"checkbox",checked:m.flowI2vReady,onChange:e=>x({...m,flowI2vReady:e.target.checked}),className:"mt-1"}),(0,a.jsxs)("span",{children:["I2V upload consent confirmed ",(0,a.jsx)("span",{className:"block text-xs text-text-muted",children:"Required for 20–60s videos. Enable after accepting Google's image-rights dialog once for this profile."})]})]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:p?"Daemon token":"API Key"}),(0,a.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:m.apiKey,onChange:e=>x({...m,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:C,disabled:!m.apiKey||p&&!m.flowProfile.trim()||h||y,variant:"secondary",children:h?"Checking...":"Check"})})]}),g&&(0,a.jsx)(i.Ex,{variant:"success"===g?"success":"error",children:"success"===g?"Valid":"Invalid"}),c&&(0,a.jsx)("p",{className:"text-sm text-red-500 break-words",children:c}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,a.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:m.priority,onChange:e=>x({...m,priority:Number.parseInt(e.target.value)||1})})]}),!p&&(0,a.jsx)(i.l6,{label:"Proxy Pool",value:m.proxyPoolId,onChange:e=>x({...m,proxyPoolId:e.target.value}),options:[{value:u,label:"None"},...(r||[]).map(e=>({value:e.id,label:e.name}))]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:S,fullWidth:!0,disabled:!m.name||!m.apiKey||p&&!m.flowProfile.trim()||y,children:y?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:n,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),p&&!j&&(0,a.jsx)(i.$n,{onClick:n,variant:"ghost",fullWidth:!0,children:"Close"})]})}):null}function R({isOpen:e,onImported:t,onClose:s}){let[r,o]=(0,l.useState)(""),[n,d]=(0,l.useState)("http://127.0.0.1:8077/mcp"),[c,u]=(0,l.useState)(!1),[p,m]=(0,l.useState)(!1),[x,h]=(0,l.useState)(null),[b,g]=(0,l.useState)(""),f=async()=>{if(r.trim()){m(!0),g(""),h(null);try{let e=await fetch("/api/providers/flow/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({daemonToken:r,baseUrl:n,i2vReady:c})}),s=await e.json();if(!e.ok)throw Error(s.error||"Flow profile import failed");h(s),o(""),await t()}catch(e){g(e?.message||"Flow profile import failed")}finally{m(!1)}}};return e?(0,a.jsx)(i.aF,{isOpen:!0,title:"Import local gflow profiles",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Imports every account signed in with ",(0,a.jsx)("code",{children:"gflow auth login"})," (or ",(0,a.jsx)("code",{children:"flow-login"})," on a VPS). Google cookies stay inside gflow and are never copied into zevairouter. The daemon token is the one you started ",(0,a.jsx)("code",{children:"gflow serve"})," with; on a VPS set up with ",(0,a.jsx)("code",{children:"flow-vps-setup.sh"})," it is in ",(0,a.jsx)("code",{children:"/home/flow/.gflow-agent/token"}),"."]}),(0,a.jsx)(i.pd,{label:"Daemon URL",value:n,onChange:e=>d(e.target.value),placeholder:"http://127.0.0.1:8077/mcp"}),(0,a.jsx)(i.pd,{label:"Daemon token",type:"password",value:r,onChange:e=>o(e.target.value),placeholder:"GFLOW_DAEMON_TOKEN",required:!0}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm text-text-main",children:[(0,a.jsx)("input",{type:"checkbox",checked:c,onChange:e=>u(e.target.checked),className:"mt-1"}),(0,a.jsxs)("span",{children:["I2V upload consent confirmed for every imported profile ",(0,a.jsx)("span",{className:"block text-xs text-text-muted",children:"Enable only after each account accepted Google's image-rights dialog. Required for 20–60s videos."})]})]}),x&&(0,a.jsxs)("div",{className:"rounded-lg border border-green-500/30 bg-green-500/10 p-3 text-sm",children:["Imported ",x.imported?.length||0," profile(s); validated ",(0,a.jsx)("code",{children:x.validatedProfile}),".",(x.skipped?.length||0)>0&&(0,a.jsxs)("div",{className:"mt-1 text-text-muted",children:["Skipped ",x.skipped.length," profile(s) without saved cookies."]})]}),b&&(0,a.jsx)("p",{className:"text-sm text-red-500 break-words",children:b}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:f,fullWidth:!0,disabled:!r.trim()||p,children:p?"Importing...":"Import profiles"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:x?"Done":"Cancel"})]})]})}):null}function P({providerId:e,isOAuth:t,loginProviderId:s=null}){let[r,o]=(0,l.useState)([]),[n,d]=(0,l.useState)([]),[c,u]=(0,l.useState)(!0),[p,m]=(0,l.useState)(""),[b,g]=(0,l.useState)(!1),[f,y]=(0,l.useState)(""),[v,j]=(0,l.useState)(!1),[N,k]=(0,l.useState)(!1),[S,E]=(0,l.useState)(null),[I,O]=(0,l.useState)(null),[T,A]=(0,l.useState)("1"),L=(0,l.useRef)(null),D=(0,l.useRef)("1"),[F,M]=(0,l.useState)(null),U=async e=>{if(!e.ok)return null;try{return await e.json()}catch{return null}},K=(0,l.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([(0,x.b7)("providers:list",h.t7),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),r=await U(s),n=await U(a)||{},l=null===t,i=null===r;l||o((t.connections||[]).filter(t=>t.provider===e)),i||d(r.proxyPools||[]),l||i?m("Connection data could not be loaded. Check that the server is running, then retry."):m("");let c=(n.providerStrategies||{})[e]||{};O(c.fallbackStrategy||null),A(null!=c.stickyRoundRobinLimit?String(c.stickyRoundRobinLimit):"1"),D.current=null!=c.stickyRoundRobinLimit?String(c.stickyRoundRobinLimit):"1"}catch(e){console.log("ConnectionsCard fetch error:",e),m("Connection data could not be loaded. Check that the server is running, then retry.")}finally{u(!1)}},[e]);(0,l.useEffect)(()=>{K()},[K]);let B=async(t,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),r=(a.ok?await a.json():{}).providerStrategies||{},o={};t&&(o.fallbackStrategy=t),"round-robin"===t&&""!==s&&(o.stickyRoundRobinLimit=Number(s)||3);let n={...r};0===Object.keys(o).length?delete n[e]:n[e]=o,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("saveStrategy error:",e)}},q=async(e,t)=>{let s=[...r];[s[e],s[t]]=[s[t],s[e]],o(s);try{let[a,r]=await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e+1})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t+1})})]);a.ok&&r.ok?(0,x.au)("providers:list"):await K()}catch{await K()}},V=async e=>{M({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{M(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&(o(t=>t.filter(t=>t.id!==e)),(0,x.au)("providers:list"))}catch(e){console.log("delete error:",e)}}})},z=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(o(s=>s.map(s=>s.id===e?{...s,isActive:t}:s)),(0,x.au)("providers:list"))}catch(e){console.log("toggle error:",e)}},J=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&(o(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s)),(0,x.au)("providers:list"))}catch(e){console.log("proxy error:",e)}},G=async t=>{y("");try{let s=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})}),a=await s.json().catch(()=>null);if(s.ok){(0,x.au)("providers:list"),await K(),g(!1);return}y(a?.error||"Could not save connection")}catch(e){console.log("save apikey error:",e),y("Could not save connection")}},H=async e=>{try{(await fetch(`/api/providers/${S.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&((0,x.au)("providers:list"),await K(),j(!1))}catch(e){console.log("update connection error:",e)}};return c?(0,a.jsx)(i.Zp,{children:(0,a.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,a.jsxs)(a.Fragment,{children:["flow"===e&&(0,a.jsx)(w,{hasConnections:r.length>0,onImport:()=>k(!0)}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:["flow"===e&&(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"download",onClick:()=>k(!0),children:"Import local profiles"}),(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(i.lM,{checked:"round-robin"===I,onChange:e=>{let t=e?"round-robin":null;O(t),e&&!T&&A("1");let s=e?T||"1":T;D.current=s,L.current&&(clearTimeout(L.current),L.current=null),B(t,s)}}),"round-robin"===I&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:T,onChange:e=>{A(e.target.value),D.current=e.target.value,L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{B("round-robin",D.current)},500)},className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),p&&(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-600 dark:border-red-800 dark:bg-red-900/20 dark:text-red-400 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("span",{children:p}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:()=>{u(!0),K()},children:"Retry"})]}),0!==r.length||p?r.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:r.map((e,s)=>(0,a.jsx)($,{connection:e,proxyPools:n,isOAuth:t,isFirst:0===s,isLast:s===r.length-1,onMoveUp:()=>q(s,s-1),onMoveDown:()=>q(s,s+1),onToggleActive:t=>z(e.id,t),onUpdateProxy:t=>J(e.id,t),onEdit:()=>{E(e),j(!0)},onDelete:()=>V(e.id)},e.id))}),(0,a.jsxs)("div",{className:"mt-4 flex justify-stretch gap-2 sm:justify-start",children:[(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>g(!0),children:"Add"}),s&&(0,a.jsx)(C.A,{providerId:s,onConnected:K})]})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[s&&(0,a.jsx)(C.A,{providerId:s,onConnected:K}),"flow"===e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>g(!0),children:"Add"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"download",onClick:()=>k(!0),children:"Import local profiles"})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>g(!0),children:"Add manually"})]})]})]}),b&&(0,a.jsx)(_,{isOpen:!0,provider:e,proxyPools:n,onSave:G,saveError:f,onClose:()=>{y(""),g(!1)},onFlowDone:async()=>{(0,x.au)("providers:list"),await K()}}),"flow"===e&&N&&(0,a.jsx)(R,{isOpen:!0,onImported:async()=>{(0,x.au)("providers:list"),await K()},onClose:()=>k(!1)}),v&&S&&(0,a.jsx)(i.wI,{isOpen:!0,connection:S,proxyPools:n,onSave:H,onClose:()=>j(!1)}),F&&(0,a.jsx)(i.uo,{isOpen:!0,onClose:()=>M(null),onConfirm:F.onConfirm,title:F.title||"Confirm",message:F.message,variant:"danger"})]})}S.propTypes={until:p().string.isRequired},$.propTypes={connection:p().shape({id:p().string,name:p().string,email:p().string,displayName:p().string,testStatus:p().string,isActive:p().bool,lastError:p().string,priority:p().number}).isRequired,proxyPools:p().array,isOAuth:p().bool.isRequired,isFirst:p().bool.isRequired,isLast:p().bool.isRequired,onMoveUp:p().func.isRequired,onMoveDown:p().func.isRequired,onToggleActive:p().func.isRequired,onUpdateProxy:p().func,onEdit:p().func.isRequired,onDelete:p().func.isRequired},_.propTypes={isOpen:p().bool.isRequired,provider:p().string,providerName:p().string,proxyPools:p().array,onSave:p().func.isRequired,onClose:p().func.isRequired,onFlowDone:p().func,saveError:p().string},R.propTypes={isOpen:p().bool.isRequired,onImported:p().func.isRequired,onClose:p().func.isRequired},P.propTypes={providerId:p().string.isRequired,isOAuth:p().bool,loginProviderId:p().string};var E=s(28777);function I({model:e,fullModel:t,copied:s,onCopy:r,testStatus:o,isCustom:n,isFree:l,onDeleteAlias:i,onTest:d,isTesting:c}){let u="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:u?{color:u}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e.id}`?"Copied!":"Copy"})]}),l&&(0,a.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),n&&(0,a.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function O({isOpen:e,onSave:t,onClose:s}){let[r,o]=(0,l.useState)(""),n=()=>{r.trim()&&(t(r.trim()),o(""))};return(0,a.jsx)(i.aF,{isOpen:e,title:"Add Custom Model",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:r,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&n(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:n,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function T({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,b.C)(),[n,d]=(0,l.useState)({}),[u,p]=(0,l.useState)([]),[m,g]=(0,l.useState)({}),[f,y]=(0,l.useState)(()=>new Set),[v,j]=(0,l.useState)({}),[w,N]=(0,l.useState)(!1),[k,C]=(0,l.useState)([]),S=s||(0,c.wG)(e),$=t||"llm",_=(0,l.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([(0,x.b7)("models:aliases",h.QF),(0,x.b7)("providers:list",h.t7),(0,x.b7)("models:custom",h.Mi)]);d(t.aliases||{}),C((s.connections||[]).filter(t=>t.provider===e)),p(a.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[e]);(0,l.useEffect)(()=>{_()},[_]),(0,l.useEffect)(()=>{let e=()=>{(0,x.au)("models:custom"),(0,x.au)("models:aliases"),_()};return window.addEventListener("customModelChanged",e),()=>window.removeEventListener("customModelChanged",e)},[_]);let R=async(e,t)=>{let s=`${S}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&((0,x.au)("models:aliases"),await _())}catch(e){console.log("set alias error:",e)}},P=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&((0,x.au)("models:aliases"),await _())}catch(e){console.log("delete alias error:",e)}},A=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:S,id:e,type:$})})).ok&&((0,x.au)("models:custom"),await _(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},L=async e=>{try{let t=new URLSearchParams({providerAlias:S,id:e,type:$});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&((0,x.au)("models:custom"),await _(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},D=async e=>{y(t=>new Set(t).add(e));try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${S}/${e}`,kind:t})}),a=await s.json();g(t=>({...t,[e]:a.ok?"ok":"error"})),j(t=>({...t,[e]:a.ok?"":a.error||"Model not reachable"}))}catch{g(t=>({...t,[e]:"error"})),j(t=>({...t,[e]:"Network error"}))}finally{y(t=>{let s=new Set(t);return s.delete(e),s})}},F=(0,E.KC)(e),M=t?F.filter(e=>Array.isArray(e.kinds)?e.kinds.includes(t):(e.kind||e.type||"llm")===t):F,U=u.filter(e=>e.providerAlias===S&&(e.kind||e.type||"llm")===$&&!M.some(t=>t.id===e.id)),K=(0,l.useMemo)(()=>{let e={};for(let[t,s]of Object.entries(n))s in e||(e[s]=t);return e},[n]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),Object.values(v).some(Boolean)&&(0,a.jsx)("div",{className:"mb-3 space-y-1",children:Object.entries(v).filter(([,e])=>!!e).map(([e,t])=>(0,a.jsxs)("p",{className:"break-words text-xs text-red-500",children:[e,": ",t]},e))}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[M.map(e=>{let t=K[`${S}/${e.id}`];return(0,a.jsx)(I,{model:e,fullModel:`${S}/${e.id}`,alias:t,copied:r,onCopy:o,onSetAlias:t=>R(e.id,t),onDeleteAlias:()=>P(t),testStatus:m[e.id],onTest:()=>D(e.id),isTesting:f.has(e.id),isFree:e.isFree},e.id)}),U.map(e=>(0,a.jsx)(I,{model:{id:e.id,name:e.name},fullModel:`${S}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>L(e.id),testStatus:m[e.id],onTest:()=>D(e.id),isTesting:f.has(e.id),isCustom:!0},`${e.id}-${e.type}`)),(0,a.jsxs)("button",{onClick:()=>N(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(O,{isOpen:w,onSave:async e=>{await A(e),N(!1)},onClose:()=>N(!1)})]})}I.propTypes={model:p().shape({id:p().string.isRequired}).isRequired,fullModel:p().string.isRequired,copied:p().string,onCopy:p().func.isRequired,testStatus:p().oneOf(["ok","error"]),isCustom:p().bool,isFree:p().bool,onDeleteAlias:p().func,onTest:p().func,isTesting:p().bool},O.propTypes={isOpen:p().bool.isRequired,onSave:p().func.isRequired,onClose:p().func.isRequired},T.propTypes={providerId:p().string.isRequired,kindFilter:p().string,providerAliasOverride:p().string};var A=s(62199);function L({label:e,children:t}){return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,a.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}let D=`// Audio will appear here after running.
2
2
  // Example JSON response (response_format=json):
3
3
  {
4
4
  "format": "mp3",
@@ -65,4 +65,4 @@
65
65
  -F "diarize=true"`:""}${m.includes("num_speakers")&&!I&&T?` \\
66
66
  -F "num_speakers=${T}"`:""}`,en=async()=>{if(!g||!er)return;W(!0),Q(""),z(null);let e=Date.now();try{let t=new FormData;t.append("file",g),t.append("model",er),m.includes("language")&&y&&t.append("language",y),m.includes("response_format")&&t.append("response_format",h),m.includes("temperature")&&C&&t.append("temperature",C),m.includes("prompt")&&j&&t.append("prompt",j),m.includes("timestamps_granularity")&&$&&t.append("timestamps_granularity",$),m.includes("tag_audio_events")&&R&&t.append("tag_audio_events","true"),m.includes("diarize")&&I?t.append("diarize","true"):m.includes("num_speakers")&&T&&t.append("num_speakers",T);let s=await fetch((0,A.O)("/v1/audio/transcriptions"),{method:"POST",body:t});G(Date.now()-e);let a=(s.headers.get("content-type")||"").includes("application/json")?await s.json():await s.text();if(!s.ok)return void Q(a?.error?.message||a?.error||a||`HTTP ${s.status}`);z(a)}catch(e){Q(e.message||"Network error")}finally{W(!1)}},el="string"==typeof V?V:V?JSON.stringify(V,null,2):`{
67
67
  "text": "Hello world..."
68
- }`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[n.length>0?(0,a.jsx)(L,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>u(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:n.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(L,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>u(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(L,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ea,"/v1/audio/transcriptions"]}),B&&(0,a.jsxs)("button",{onClick:()=>M(e=>!e),title:F?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${F?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(L,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:(0,a.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),(0,a.jsx)(L,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>f(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),g&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[g.name," \xb7 ",(g.size/1024).toFixed(1)," KB"]})]})}),m.includes("language")&&(0,a.jsx)(L,{label:"Language",children:(0,a.jsx)("input",{value:y,onChange:e=>v(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),m.includes("prompt")&&(0,a.jsx)(L,{label:"Prompt",children:(0,a.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),m.includes("temperature")&&(0,a.jsx)(L,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:C,onChange:e=>S(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),m.includes("response_format")&&(0,a.jsx)(L,{label:"Response Format",children:(0,a.jsx)("select",{value:h,onChange:e=>k(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:x.map(e=>(0,a.jsx)("option",{value:e,children:e},e))})}),m.includes("timestamps_granularity")&&(0,a.jsx)(L,{label:"Timestamps",children:(0,a.jsxs)("select",{value:$,onChange:e=>_(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"provider default"}),(0,a.jsx)("option",{value:"word",children:"word"}),(0,a.jsx)("option",{value:"character",children:"character"}),(0,a.jsx)("option",{value:"none",children:"none"})]})}),m.includes("tag_audio_events")&&(0,a.jsx)(L,{label:"Tag audio events",children:(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:R,onChange:e=>P(e.target.checked),className:"accent-primary"}),"Label non-speech sounds as [laughter], [applause], ..."]})}),m.includes("diarize")&&(0,a.jsx)(L,{label:"Speaker labels",children:(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:I,onChange:e=>O(e.target.checked),className:"accent-primary"}),"Detect speakers automatically (overrides speaker count)"]})}),m.includes("num_speakers")&&(0,a.jsx)(L,{label:"Speaker count",children:(0,a.jsx)("input",{type:"number",step:"1",min:"1",max:"32",value:T,onChange:e=>D(e.target.value),disabled:I,placeholder:"auto-detect",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary disabled:opacity-50"})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>ee(eo),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:X?"check":"content_copy"}),X?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:en,disabled:H||!g||!er,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:H?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),H?"Transcribing...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:eo})]}),Y&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:Y}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",V&&J&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",J,"ms"]})]}),V&&(0,a.jsxs)("button",{onClick:()=>es(el),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:et?"check":"content_copy"}),et?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:el})]})]})]})}var X=s(42835);function ee(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=c.rj.find(t=>t.id===e),u=(0,c.gC)(t)&&"embedding"===e,[p,m]=(0,l.useState)(null),[x,h]=(0,l.useState)(u),[b,g]=(0,l.useState)(!1),[f,y]=(0,l.useState)(!1),[v,j]=(0,l.useState)(!1),w=async()=>{if(confirm("Delete this Custom Embedding node?")){j(!0);try{let a=await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"});if(a.ok)return void s.push(`/dashboard/media-providers/${e}`);let r=await a.json().catch(()=>({}));alert(r.error||"Failed to delete custom embedding node")}catch{alert("Failed to delete custom embedding node")}j(!1)}};if((0,l.useEffect)(()=>{if(!u)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(s=>{e||(m((s.nodes||[]).find(e=>e.id===t)||null),h(!1))}).catch(()=>{e||h(!1)}),()=>{e=!0}},[t,u]),!o)return(0,r.notFound)();let N=c.Q2[t],k=u?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:N;if(!u&&!N||u&&!x&&!p)return(0,r.notFound)();if(u&&x)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let S=u?["embedding"]:k.serviceKinds??["llm"];return u||S.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(n(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),o.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${k.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${k.id}.png`,alt:k.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:k.textIcon||k.id.slice(0,2).toUpperCase(),fallbackColor:k.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:k.name}),!u&&k.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:k.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[u&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",p?.prefix]}),S.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),u&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>g(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:w,disabled:v,children:v?"Deleting...":"Delete"})]})]})]}),!u&&k.kindNotice?.[e]&&(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:k.kindNotice[e]})]}),!u&&k.notice?.text&&!k.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:k.notice.text}),k.notice.apiKeyUrl&&(0,a.jsx)("a",{href:k.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!u&&k.noAuth?(0,a.jsx)(i.gw,{providerId:t}):"stt"===e&&c.zN[t]?(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-3",children:"This service shares your existing OAuth connections."}),(0,a.jsx)(n(),{href:`/dashboard/providers/${t}`,className:"text-primary hover:underline",children:"Manage OAuth connections →"})]}):(0,a.jsx)(P,{providerId:t,isOAuth:!1,loginProviderId:!u&&C.w.has(t)?t:null}),"openrouter"===t&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>y(!0),className:"live-probe-button",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"radar"}),"Live Probe Models"]}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Probe free OpenRouter models for this media type."})]}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(T,{providerId:t,kindFilter:e,providerAliasOverride:u?p?.prefix:void 0}),!u&&(k.searchConfig||k.fetchConfig||k.ttsConfig||k.sttConfig||k.embeddingConfig||"systemone"===e&&k.systemoneConfig||k.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?k.fetchConfig:"tts"===e?k.ttsConfig:"stt"===e?k.sttConfig:"embedding"===e?k.embeddingConfig:"systemone"===e?k.systemoneConfig:k.searchConfig||{mode:"chat-completions",defaultModel:k.searchViaChat?.defaultModel,pricingUrl:k.searchViaChat?.pricingUrl,freeTier:k.searchViaChat?.freeTier},provider:k,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(q,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(G,{providerId:t}),"stt"===e&&!u&&(0,a.jsx)(Z,{providerId:t}),!u&&K[e]&&(0,a.jsx)(Q,{providerId:t,kind:e}),"openrouter"===t&&f&&(0,a.jsx)(X.A,{isOpen:!0,kind:e,onModelsAdded:async e=>{for(let t of e||[]){let e="string"==typeof t?.id?t.id.trim():"",s=e.split("/").pop();if(!e||!s)continue;let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`openrouter/${e}`,alias:s})});if(!a.ok){let t=await a.json().catch(()=>({}));throw Error(t?.error||`Could not save ${e}`)}}window.dispatchEvent(new Event("customModelChanged"))},onClose:()=>y(!1)}),u&&(0,a.jsx)(i.x0,{isOpen:b,node:p,onClose:()=>g(!1),onSaved:e=>{m(e),g(!1)}})]}):(0,r.notFound)()}},54909:(e,t,s)=>{Promise.resolve().then(s.bind(s,39365))},62199:(e,t,s)=>{"use strict";s.d(t,{O:()=>r,x:()=>o});let a=Object.freeze({"/v1/embeddings":"embeddings","/v1/images/generations":"images","/v1/audio/speech":"speech","/v1/audio/transcriptions":"transcriptions","/v1/search":"search","/v1/web/fetch":"fetch","/v1/videos/generations":"videos"});function r(e){if("string"!=typeof e)return null;let t=e.indexOf("?"),s=-1===t?e:e.slice(0,t),r=-1===t?"":e.slice(t),o=a[s];return o?`/api/dashboard/media/${o}${r}`:null}function o(e){return"string"==typeof e&&e.trim()?`/api/dashboard/media/videos/${encodeURIComponent(e.trim())}`:null}}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,5153,8441,3794,7358],()=>e(e.s=54909)),_N_E=e.O()}]);
68
+ }`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[n.length>0?(0,a.jsx)(L,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>u(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:n.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(L,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>u(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(L,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ea,"/v1/audio/transcriptions"]}),B&&(0,a.jsxs)("button",{onClick:()=>M(e=>!e),title:F?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${F?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(L,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:(0,a.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),(0,a.jsx)(L,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>f(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),g&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[g.name," \xb7 ",(g.size/1024).toFixed(1)," KB"]})]})}),m.includes("language")&&(0,a.jsx)(L,{label:"Language",children:(0,a.jsx)("input",{value:y,onChange:e=>v(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),m.includes("prompt")&&(0,a.jsx)(L,{label:"Prompt",children:(0,a.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),m.includes("temperature")&&(0,a.jsx)(L,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:C,onChange:e=>S(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),m.includes("response_format")&&(0,a.jsx)(L,{label:"Response Format",children:(0,a.jsx)("select",{value:h,onChange:e=>k(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:x.map(e=>(0,a.jsx)("option",{value:e,children:e},e))})}),m.includes("timestamps_granularity")&&(0,a.jsx)(L,{label:"Timestamps",children:(0,a.jsxs)("select",{value:$,onChange:e=>_(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"provider default"}),(0,a.jsx)("option",{value:"word",children:"word"}),(0,a.jsx)("option",{value:"character",children:"character"}),(0,a.jsx)("option",{value:"none",children:"none"})]})}),m.includes("tag_audio_events")&&(0,a.jsx)(L,{label:"Tag audio events",children:(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:R,onChange:e=>P(e.target.checked),className:"accent-primary"}),"Label non-speech sounds as [laughter], [applause], ..."]})}),m.includes("diarize")&&(0,a.jsx)(L,{label:"Speaker labels",children:(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:I,onChange:e=>O(e.target.checked),className:"accent-primary"}),"Detect speakers automatically (overrides speaker count)"]})}),m.includes("num_speakers")&&(0,a.jsx)(L,{label:"Speaker count",children:(0,a.jsx)("input",{type:"number",step:"1",min:"1",max:"32",value:T,onChange:e=>D(e.target.value),disabled:I,placeholder:"auto-detect",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary disabled:opacity-50"})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>ee(eo),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:X?"check":"content_copy"}),X?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:en,disabled:H||!g||!er,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:H?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),H?"Transcribing...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:eo})]}),Y&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:Y}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",V&&J&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",J,"ms"]})]}),V&&(0,a.jsxs)("button",{onClick:()=>es(el),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:et?"check":"content_copy"}),et?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:el})]})]})]})}var X=s(42835);function ee(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=c.rj.find(t=>t.id===e),u=(0,c.gC)(t)&&"embedding"===e,[p,m]=(0,l.useState)(null),[x,h]=(0,l.useState)(u),[b,g]=(0,l.useState)(!1),[f,y]=(0,l.useState)(!1),[v,j]=(0,l.useState)(!1),w=async()=>{if(confirm("Delete this Custom Embedding node?")){j(!0);try{let a=await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"});if(a.ok)return void s.push(`/dashboard/media-providers/${e}`);let r=await a.json().catch(()=>({}));alert(r.error||"Failed to delete custom embedding node")}catch{alert("Failed to delete custom embedding node")}j(!1)}};if((0,l.useEffect)(()=>{if(!u)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(s=>{e||(m((s.nodes||[]).find(e=>e.id===t)||null),h(!1))}).catch(()=>{e||h(!1)}),()=>{e=!0}},[t,u]),!o)return(0,r.notFound)();let N=c.Q2[t],k=u?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:N;if(!u&&!N||u&&!x&&!p)return(0,r.notFound)();if(u&&x)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let S=u?["embedding"]:k.serviceKinds??["llm"];return u||S.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(n(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),o.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${k.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${k.id}.png`,alt:k.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:k.textIcon||k.id.slice(0,2).toUpperCase(),fallbackColor:k.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:k.name}),!u&&k.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:k.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[u&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",p?.prefix]}),S.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),u&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>g(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:w,disabled:v,children:v?"Deleting...":"Delete"})]})]})]}),!u&&k.kindNotice?.[e]&&(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:k.kindNotice[e]})]}),!u&&k.notice?.text&&!k.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:k.notice.text}),k.notice.apiKeyUrl&&(0,a.jsx)("a",{href:k.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!u&&k.noAuth?(0,a.jsx)(i.gw,{providerId:t}):"stt"===e&&c.zN[t]?(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-3",children:"This service shares your existing OAuth connections."}),(0,a.jsx)(n(),{href:`/dashboard/providers/${t}`,className:"text-primary hover:underline",children:"Manage OAuth connections →"})]}):(0,a.jsx)(P,{providerId:t,isOAuth:!1,loginProviderId:!u&&C.w.has(t)?t:null}),"openrouter"===t&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>y(!0),className:"live-probe-button",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"radar"}),"Live Probe Models"]}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Probe free OpenRouter models for this media type."})]}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(T,{providerId:t,kindFilter:e,providerAliasOverride:u?p?.prefix:void 0}),!u&&(k.searchConfig||k.fetchConfig||k.ttsConfig||k.sttConfig||k.embeddingConfig||"systemone"===e&&k.systemoneConfig||k.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?k.fetchConfig:"tts"===e?k.ttsConfig:"stt"===e?k.sttConfig:"embedding"===e?k.embeddingConfig:"systemone"===e?k.systemoneConfig:k.searchConfig||{mode:"chat-completions",defaultModel:k.searchViaChat?.defaultModel,pricingUrl:k.searchViaChat?.pricingUrl,freeTier:k.searchViaChat?.freeTier},provider:k,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(q,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(G,{providerId:t}),"stt"===e&&!u&&(0,a.jsx)(Z,{providerId:t}),!u&&K[e]&&(0,a.jsx)(Q,{providerId:t,kind:e}),"openrouter"===t&&f&&(0,a.jsx)(X.A,{isOpen:!0,kind:e,onModelsAdded:async e=>{for(let t of e||[]){let e="string"==typeof t?.id?t.id.trim():"",s=e.split("/").pop();if(!e||!s)continue;let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`openrouter/${e}`,alias:s})});if(!a.ok){let t=await a.json().catch(()=>({}));throw Error(t?.error||`Could not save ${e}`)}}window.dispatchEvent(new Event("customModelChanged"))},onClose:()=>y(!1)}),u&&(0,a.jsx)(i.x0,{isOpen:b,node:p,onClose:()=>g(!1),onSaved:e=>{m(e),g(!1)}})]}):(0,r.notFound)()}},62199:(e,t,s)=>{"use strict";s.d(t,{O:()=>r,x:()=>o});let a=Object.freeze({"/v1/embeddings":"embeddings","/v1/images/generations":"images","/v1/audio/speech":"speech","/v1/audio/transcriptions":"transcriptions","/v1/search":"search","/v1/web/fetch":"fetch","/v1/videos/generations":"videos"});function r(e){if("string"!=typeof e)return null;let t=e.indexOf("?"),s=-1===t?e:e.slice(0,t),r=-1===t?"":e.slice(t),o=a[s];return o?`/api/dashboard/media/${o}${r}`:null}function o(e){return"string"==typeof e&&e.trim()?`/api/dashboard/media/videos/${encodeURIComponent(e.trim())}`:null}}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,5153,8441,3794,7358],()=>e(e.s=32376)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{16144:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>f});var i=t(95155),r=t(73321),a=t(98500),n=t.n(a),o=t(12115),l=t(35497),c=t(57250),d=t(1791);let m=new Set([]),h={image:"image-combo",tts:"tts-combo"};function x(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function p({provider:e,kind:s,connections:t,isCustom:r,onToggle:a}){let o=d.Q2[e.id],m=!!o?.noAuth,h=t.filter(s=>s.provider===e.id),u=h.filter(e=>{let s=x(e);return"active"===s||"success"===s}).length,f=h.filter(e=>{let s=x(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=h.length,g=b>0&&h.every(e=>!1===e.isActive);return(0,i.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,i.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${g?"opacity-50":""}`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,i.jsx)(c.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,i.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[r&&(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Custom"}),m?(0,i.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):g?(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,i.jsxs)(i.Fragment,{children:[u>0&&(0,i.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[u," Connected"]}),f>0&&(0,i.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[f," Error"]}),0===u&&0===f&&(0,i.jsxs)(l.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})]})]})]}),b>0&&(0,i.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),a&&a(e.id,g)},children:(0,i.jsx)(l.lM,{size:"sm",checked:!g,onChange:()=>{},title:g?"Enable provider":"Disable provider"})})]})})})}function u({combos:e}){return 0===e.length?null:(0,i.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,i.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,i.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,i.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",r=d.Q2[t];return(0,i.jsx)("div",{title:r?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${r?.color??"#888"}15`},children:(0,i.jsx)(c.A,{src:`/providers/${t}.png`,alt:r?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:r?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:r?.color})},`${e}-${s}`)}),e.models.length>6&&(0,i.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,i.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function f(){let{kind:e}=(0,r.useParams)(),s=(0,r.useRouter)(),[t,a]=(0,o.useState)([]),[n,c]=(0,o.useState)([]),[x,f]=(0,o.useState)([]),[b,g]=(0,o.useState)(!1),[j,v]=(0,o.useState)(!1);(0,o.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&s.replace("/dashboard/media-providers/web")},[e,s]);let N=d.rj.find(s=>s.id===e),y="embedding"===e,k=m.has(e);if((0,o.useEffect)(()=>{N&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>a(e.connections||[])).catch(()=>{}),y&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>c((e.nodes||[]).filter(e=>"custom-embedding"===e.type))).catch(()=>{}),k&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>f(e.combos||[])).catch(()=>{}))},[y,k,N]),!N)return(0,r.notFound)();let w=(0,d.o5)(e),C=x.filter(s=>s.kind===e),$=n.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),E=[...w,...$],S=async(e,s)=>{let i=t.filter(s=>s.provider===e);a(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),(await Promise.allSettled(i.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e})))).some(e=>"rejected"===e.status)&&a(t=>t.map(t=>t.provider===e?{...t,isActive:!s}:t))},z=async()=>{if(!j){v(!0);try{let t=h[e]||`${e}-combo`,i=t,r=1,a=new Set(x.map(e=>e.name));for(;a.has(i);)i=`${t}-${r++}`;let n=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,models:[],kind:e})});if(n.ok){let e=await n.json();s.push(`/dashboard/media-providers/combo/${e.id}`)}else{let e=await n.json().catch(()=>({}));alert(e.error||"Failed to create combo")}}catch{alert("Failed to create combo")}finally{v(!1)}}};return(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(y||k)&&(0,i.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[k&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:z,disabled:j,children:"Create Combo"}),y&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>g(!0),children:"Add Custom Embedding"})]}),k&&C.length>0&&(0,i.jsx)(u,{combos:C}),0===E.length?(0,i.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,i.jsx)("strong",{children:N.label})," yet."]}):(0,i.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[w.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,onToggle:S},s.id)),$.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,isCustom:!0,onToggle:S},s.id))]}),y&&(0,i.jsx)(l.x0,{isOpen:b,onClose:()=>g(!1),onCreated:e=>{c(s=>[...s,e]),g(!1)}})]})}},79069:(e,s,t)=>{Promise.resolve().then(t.bind(t,16144))}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=79069)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{16144:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>f});var i=t(95155),r=t(73321),a=t(98500),n=t.n(a),o=t(12115),l=t(35497),c=t(57250),d=t(1791);let m=new Set([]),h={image:"image-combo",tts:"tts-combo"};function x(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function p({provider:e,kind:s,connections:t,isCustom:r,onToggle:a}){let o=d.Q2[e.id],m=!!o?.noAuth,h=t.filter(s=>s.provider===e.id),u=h.filter(e=>{let s=x(e);return"active"===s||"success"===s}).length,f=h.filter(e=>{let s=x(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=h.length,g=b>0&&h.every(e=>!1===e.isActive);return(0,i.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,i.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${g?"opacity-50":""}`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,i.jsx)(c.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,i.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[r&&(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Custom"}),m?(0,i.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):g?(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,i.jsxs)(i.Fragment,{children:[u>0&&(0,i.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[u," Connected"]}),f>0&&(0,i.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[f," Error"]}),0===u&&0===f&&(0,i.jsxs)(l.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})]})]})]}),b>0&&(0,i.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),a&&a(e.id,g)},children:(0,i.jsx)(l.lM,{size:"sm",checked:!g,onChange:()=>{},title:g?"Enable provider":"Disable provider"})})]})})})}function u({combos:e}){return 0===e.length?null:(0,i.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,i.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,i.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,i.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",r=d.Q2[t];return(0,i.jsx)("div",{title:r?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${r?.color??"#888"}15`},children:(0,i.jsx)(c.A,{src:`/providers/${t}.png`,alt:r?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:r?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:r?.color})},`${e}-${s}`)}),e.models.length>6&&(0,i.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,i.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function f(){let{kind:e}=(0,r.useParams)(),s=(0,r.useRouter)(),[t,a]=(0,o.useState)([]),[n,c]=(0,o.useState)([]),[x,f]=(0,o.useState)([]),[b,g]=(0,o.useState)(!1),[j,v]=(0,o.useState)(!1);(0,o.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&s.replace("/dashboard/media-providers/web")},[e,s]);let N=d.rj.find(s=>s.id===e),y="embedding"===e,k=m.has(e);if((0,o.useEffect)(()=>{N&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>a(e.connections||[])).catch(()=>{}),y&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>c((e.nodes||[]).filter(e=>"custom-embedding"===e.type))).catch(()=>{}),k&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>f(e.combos||[])).catch(()=>{}))},[y,k,N]),!N)return(0,r.notFound)();let w=(0,d.o5)(e),C=x.filter(s=>s.kind===e),$=n.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),E=[...w,...$],S=async(e,s)=>{let i=t.filter(s=>s.provider===e);a(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),(await Promise.allSettled(i.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e})))).some(e=>"rejected"===e.status)&&a(t=>t.map(t=>t.provider===e?{...t,isActive:!s}:t))},z=async()=>{if(!j){v(!0);try{let t=h[e]||`${e}-combo`,i=t,r=1,a=new Set(x.map(e=>e.name));for(;a.has(i);)i=`${t}-${r++}`;let n=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,models:[],kind:e})});if(n.ok){let e=await n.json();s.push(`/dashboard/media-providers/combo/${e.id}`)}else{let e=await n.json().catch(()=>({}));alert(e.error||"Failed to create combo")}}catch{alert("Failed to create combo")}finally{v(!1)}}};return(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(y||k)&&(0,i.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[k&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:z,disabled:j,children:"Create Combo"}),y&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>g(!0),children:"Add Custom Embedding"})]}),k&&C.length>0&&(0,i.jsx)(u,{combos:C}),0===E.length?(0,i.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,i.jsx)("strong",{children:N.label})," yet."]}):(0,i.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[w.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,onToggle:S},s.id)),$.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,isCustom:!0,onToggle:S},s.id))]}),y&&(0,i.jsx)(l.x0,{isOpen:b,onClose:()=>g(!1),onCreated:e=>{c(s=>[...s,e]),g(!1)}})]})}},35214:(e,s,t)=>{Promise.resolve().then(t.bind(t,16144))}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=35214)),_N_E=e.O()}]);