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
@@ -1 +0,0 @@
1
- exports.id=5469,exports.ids=[5469],exports.modules={73180:(a,b,c)=>{"use strict";c.d(b,{default:()=>o});var d=c(48249),e=c(67484),f=c(26921),g=c(11656),h=c(50412);c(91431),c(7585);let i=[],j=["Explain this project like I'm new","Write a concise PR description","Debug this error message","Summarize the key trade-offs"];function k(){if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID();let a="";for(let b=0;b<8;b+=1)a+=Math.floor(0xffffffff*Math.random()).toString(16).padStart(8,"0");return`chat_${Date.now()}_${a}`}function l(a){if("string"==typeof a)return a;if(null==a)return"";if(Array.isArray(a))return a.map(l).filter(Boolean).join(" ");if("object"==typeof a){if("string"==typeof a.message)return a.message;if("string"==typeof a.error)return a.error;try{return JSON.stringify(a)}catch{return String(a)}}return String(a)}function m(a=""){let b=l(a).replace(/\s+/g," ").trim();return b?b.length>52?`${b.slice(0,52).trimEnd()}…`:b:"New chat"}async function n(a){return await new Promise((b,c)=>{let d=new FileReader;d.onload=()=>b(String(d.result||"")),d.onerror=()=>c(d.error||Error("Failed to read file")),d.readAsDataURL(a)})}function o(){let[a,b]=(0,e.useState)([]),[c,o]=(0,e.useState)(!0),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)([]),[t,u]=(0,e.useState)(""),[v,w]=(0,e.useState)(""),[x,y]=(0,e.useState)(""),[z,A]=(0,e.useState)(""),[B,C]=(0,e.useState)([]),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(""),[H,I]=(0,e.useState)(""),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(""),[P,Q]=(0,e.useState)(!1),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(""),[V,W]=(0,e.useState)(.7),[X,Y]=(0,e.useState)(""),Z=(0,e.useRef)(null),$=(0,e.useRef)(null);(0,e.useRef)(!1);let _=(0,e.useRef)(null),aa=(0,e.useRef)(null),ab=(0,e.useRef)(null),ac=(0,e.useRef)(null),ad=(0,e.useRef)(null);(0,e.useRef)(null),(0,e.useRef)(!1),(0,e.useRef)({sessions:[],activeSessionId:"",activeProviderId:"",draft:""});let ae=(0,e.useMemo)(()=>{let b=new Map;for(let c of a)for(let a of c.models)b.set(a.id,{...a,providerId:c.providerId,providerName:c.providerName});return b},[a]),af=(0,e.useMemo)(()=>a.find(a=>a.providerId===v)||a[0]||null,[a,v]),ag=(0,e.useMemo)(()=>{if(x&&ae.has(x))return ae.get(x);if(t){let a=r.find(a=>a.id===t);if(a?.modelId&&ae.has(a.modelId))return ae.get(a.modelId)}return af?.models?.[0]||null},[x,ae,af,r,t]),ah=(0,e.useMemo)(()=>r.find(a=>a.id===t)||null,[r,t]),ai=ah?.messages||i,aj=(0,e.useMemo)(()=>[...r].sort((a,b)=>new Date(b.updatedAt).getTime()-new Date(a.updatedAt).getTime()),[r]),ak=!D&&!!ag&&(z.trim().length>0||B.length>0),al=(a,b)=>{s(c=>c.map(c=>c.id===a?b({...c,messages:Array.isArray(c.messages)?c.messages.map(a=>({...a})):[]}):c))},am=a=>a?{id:k(),title:"New chat",providerId:a.providerId,providerName:a.providerName,modelId:a.id,modelName:a.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,an=()=>{if(!ag)return;let a=am(ag);a&&(s(b=>[a,...b]),u(a.id),w(a.providerId),y(a.modelId),A(""),C([]),G(""),I(""))},ao=async a=>{let b=Array.from(a.target.files||[]);if(0===b.length)return;let c=b.filter(a=>a.type.startsWith("image/"));if(0===c.length){a.target.value="";return}let d=await Promise.allSettled(c.map(async a=>({id:k(),name:a.name,type:a.type,size:a.size,dataUrl:await n(a)}))),e=d.filter(a=>"fulfilled"===a.status).map(a=>a.value);if(e.length>0&&C(a=>[...a,...e]),e.length<c.length){let a=d.find(a=>"rejected"===a.status)?.reason;q(l(a?.message)?`Failed to read file: ${l(a.message)}`:"Failed to read one or more files.")}a.target.value=""},ap=(a,b)=>{let c=m(b);al(a,a=>({...a,title:"New chat"===a.title?c:a.title,updatedAt:new Date().toISOString()}))},aq=async(a,b)=>{try{await navigator.clipboard.writeText(l(b)),U(a),setTimeout(()=>U(b=>b===a?"":b),1500)}catch{}},ar=async(a={})=>{let b=ag||af?.models?.[0]||null;if(!b)return;let c=!0===a.regenerate;c&&D&&($.current?.abort(),$.current=null,E(!1),G(""),I(""));let d=t,e=r.find(a=>a.id===d),f="string"==typeof a.userText?a.userText:z.trim(),g=Array.isArray(a.attachments)?a.attachments:B;if(c){if(!e)return;let a=[...e.messages||[]];for(;a.length&&a[a.length-1]?.role==="assistant";)a.pop();let b=[...a].reverse().find(a=>"user"===a.role);if(!b)return;f=l(b.content).trim(),g=Array.isArray(b.attachments)?b.attachments:[],e={...e,messages:a},s(a=>a.map(a=>a.id===d?e:a))}if(!f&&(!g||0===g.length))return;if(!e){if(!(e=am(b)))return;d=e.id,s(a=>[e,...a]),u(d)}let h=c?null:{id:k(),role:"user",content:f,attachments:(g||[]).map(a=>({id:a.id,name:a.name,type:a.type,dataUrl:a.dataUrl})),createdAt:new Date().toISOString()},i=k(),j={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...c?[...e.messages||[]]:[...e.messages||[],h],j];s(a=>a.map(a=>a.id===d?{...a,providerId:b.providerId,providerName:b.providerName,modelId:b.id,modelName:b.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===a.title?m(f):a.title}:a)),!c&&(A(""),C([]),ac.current&&(ac.current.style.height="auto")),E(!0),G(i),I(""),$.current?.abort(),$.current=new AbortController;let o=n.filter(a=>"assistant"!==a.role||a.id!==i).map(a=>({role:a.role,content:"user"===a.role?function(a){let b=l(a.content).trim(),c=Array.isArray(a.attachments)?a.attachments:[];if(0===c.length)return b;let d=[];for(let a of(b&&d.push({type:"text",text:b}),c))a?.dataUrl&&d.push({type:"image_url",image_url:{url:a.dataUrl}});return d.length>0?d:b}(a):a.content})),p=X.trim(),q=p?[{role:"system",content:p},...o]:o;try{let a=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:b.requestModel||b.id,messages:q,stream:!0,temperature:V}),signal:$.current.signal});if(!a.ok){let b=await a.json().catch(()=>({}));throw Error(l(b.error||b.message||`Request failed (${a.status})`))}let c=a.body?.getReader();if(!c){let b=await a.json().catch(()=>({})),c=l(b?.choices?.[0]?.message?.content||b?.output_text||b?.error||b?.message||"");al(d,a=>({...a,messages:a.messages.map(a=>a.id===i?{...a,content:c,status:"done"}:a),updatedAt:new Date().toISOString()}));return}let e=new TextDecoder,g="",h="";for(;;){let{value:a,done:b}=await c.read();if(b)break;let f=(g+=e.decode(a,{stream:!0})).split(/\r?\n/);for(let a of(g=f.pop()||"",f)){let b=a.trim();if(!b.startsWith("data:"))continue;let c=b.slice(5).trim();if(c&&"[DONE]"!==c)try{let a=JSON.parse(c),b=function(a){if(!a||"object"!=typeof a)return"";let b=a.choices?.[0];return[(b?.delta||{}).content,b?.message?.content,a.output_text,a.text].map(l).filter(Boolean)[0]||""}(a);if(!b)continue;h+=b,I(h),al(d,a=>({...a,messages:a.messages.map(a=>a.id===i?{...a,content:h,status:"streaming"}:a),updatedAt:new Date().toISOString()}))}catch{}}}al(d,a=>({...a,messages:a.messages.map(a=>a.id===i?{...a,content:h||a.content,status:"done"}:a),updatedAt:new Date().toISOString()})),ap(d,f)}catch(a){if("AbortError"===a.name)al(d,a=>({...a,messages:a.messages.map(a=>a.id===i?{...a,content:a.content||"Stopped",status:"stopped"}:a),updatedAt:new Date().toISOString()})),ap(d,f);else{let b=l(a?.message||a);al(d,a=>({...a,messages:a.messages.map(a=>a.id===i?{...a,content:a.content||`Error: ${b}`,status:"error"}:a),updatedAt:new Date().toISOString()}))}}finally{E(!1),G(""),I(""),$.current=null}},as=ag?ag.name:"Select model",at=ag?`${ag.providerName||""} \xb7 ${ag.requestModel||ag.id}`.replace(/^ · /,""):"Connected providers only",au=(0,e.useMemo)(()=>{let b=N.trim().toLowerCase();return b?a.map(a=>{let c=(a.providerName||"").toLowerCase().includes(b)||(a.providerId||"").toLowerCase().includes(b)?a.models:a.models.filter(a=>`${a.name||""} ${a.requestModel||""} ${a.id||""}`.toLowerCase().includes(b));return{...a,models:c}}).filter(a=>a.models.length>0):a},[a,N]);return(0,d.jsxs)("div",{className:"relative flex h-full min-h-0 min-w-0 flex-1 overflow-hidden bg-bg text-text-main",children:[(0,d.jsxs)("aside",{id:"playground-history",className:`${P?"flex":"hidden"} fixed inset-y-0 left-0 z-30 w-[min(85vw,260px)] shrink-0 flex-col border-r border-border-subtle bg-surface/95 backdrop-blur-xl lg:static lg:z-auto lg:flex lg:w-[260px] lg:bg-surface/60`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle p-3",children:[(0,d.jsxs)("button",{type:"button",onClick:an,disabled:!ag,className:"flex h-9 flex-1 items-center justify-center gap-2 rounded-[10px] bg-primary text-sm font-semibold text-white transition hover:bg-primary-hover disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"add"}),"New chat"]}),(0,d.jsx)("button",{type:"button",className:"flex size-11 items-center justify-center rounded-[10px] border border-border text-text-muted lg:hidden hover:bg-surface-2",onClick:()=>Q(!1),"aria-label":"Close history",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,d.jsxs)("div",{ref:aa,className:"flex-1 overflow-y-auto p-2 custom-scrollbar",children:[(0,d.jsx)("p",{className:"px-2 py-2 text-[11px] font-semibold uppercase tracking-wider text-text-subtle",children:"Chats"}),0===aj.length?(0,d.jsx)("div",{className:"rounded-[10px] border border-dashed border-border px-3 py-6 text-center text-xs text-text-muted",children:"No conversations yet"}):(0,d.jsx)("div",{className:"space-y-0.5",children:aj.map(a=>{let b=a.id===t,c=[...a.messages||[]].reverse().find(a=>"user"===a.role)||a.messages?.[0];return(0,d.jsxs)("button",{type:"button",onClick:()=>{var b;let c;b=a.id,(c=r.find(a=>a.id===b))&&(u(b),w(c.providerId||v),y(c.modelId||x),Q(!1))},className:`group flex w-full items-start gap-2 rounded-[10px] px-2.5 py-2.5 text-left transition ${b?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined mt-0.5 text-[16px] opacity-70",children:"chat_bubble"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsx)("p",{className:"truncate text-[13px] font-medium leading-snug",children:a.title||"New chat"}),(0,d.jsxs)("p",{className:"mt-0.5 truncate text-[11px] opacity-60",children:[l(c?.content)||"Empty"," \xb7"," ",function(a){if(!a)return"Now";let b=new Date(a).getTime();if(Number.isNaN(b))return"Now";let c=Math.max(1,Math.round((Date.now()-b)/6e4));if(c<60)return`${c}m`;let d=Math.round(c/60);return d<24?`${d}h`:`${Math.round(d/24)}d`}(a.updatedAt)]})]})]},a.id)})})]}),(0,d.jsx)("div",{className:"border-t border-border-subtle p-3",children:(0,d.jsxs)("button",{type:"button",onClick:()=>{if(!t)return;let a=r.filter(a=>a.id!==t),b=a[0]||null;s(a),b?(u(b.id),w(b.providerId),y(b.modelId)):(u(""),w(""),y(""))},disabled:!t||0===r.length,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-[8px] text-xs font-medium text-text-muted transition hover:bg-surface-2 hover:text-danger disabled:opacity-40",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"delete"}),"Delete current chat"]})})]}),(0,d.jsxs)("div",{className:"relative flex min-w-0 flex-1 flex-col",children:[(0,d.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border-subtle px-3 py-2 lg:hidden",children:[(0,d.jsx)("button",{type:"button",onClick:()=>Q(!0),className:"flex size-11 items-center justify-center rounded-[10px] border border-border text-text-muted hover:bg-surface-2","aria-label":"Open chats","aria-expanded":P,"aria-controls":"playground-history",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"history"})}),(0,d.jsxs)("div",{className:"min-w-0 text-center",children:[(0,d.jsx)("p",{className:"truncate text-sm font-semibold",children:as}),(0,d.jsx)("p",{className:"truncate text-[11px] text-text-subtle",children:at})]}),(0,d.jsx)("button",{type:"button",onClick:an,disabled:!ag,className:"flex size-11 items-center justify-center rounded-[10px] border border-border text-text-muted hover:bg-surface-2 disabled:opacity-40","aria-label":"New chat",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"edit_square"})})]}),p?(0,d.jsx)("div",{role:"alert",className:"mx-4 mt-3 rounded-[10px] border border-danger/25 bg-danger/10 px-3 py-2.5 text-sm text-danger",children:(0,d.jsxs)("div",{className:"flex items-start gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"error"}),(0,d.jsx)("p",{children:p})]})}):null,(0,d.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:0===ai.length?(0,d.jsxs)("div",{className:"flex min-h-full flex-col items-center justify-center px-6 pb-36 pt-10 text-center",children:[(0,d.jsx)("div",{className:"mb-4 flex size-12 items-center justify-center rounded-2xl border border-border bg-surface text-primary shadow-soft",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[26px]",children:"forum"})}),(0,d.jsx)("h2",{className:"text-[22px] font-semibold tracking-tight text-text-main",children:"How can I help?"}),(0,d.jsx)("p",{className:"mt-1.5 max-w-md text-[13px] leading-relaxed text-text-muted",children:"Pick a model below, then ask anything through your connected providers."}),(0,d.jsx)("div",{className:"mt-6 flex max-w-xl flex-wrap items-center justify-center gap-2",children:j.map(a=>(0,d.jsx)("button",{type:"button",disabled:!ag||c,onClick:()=>{A(a),requestAnimationFrame(()=>ac.current?.focus())},className:"rounded-full border border-border bg-surface px-3.5 py-2 text-left text-[12.5px] text-text-muted transition hover:border-primary/35 hover:bg-primary/5 hover:text-text-main disabled:opacity-40",children:a},a))}),c?(0,d.jsx)("p",{className:"mt-4 text-xs text-text-subtle",children:"Loading models…"}):null]}):(0,d.jsxs)("div",{className:"mx-auto w-full max-w-3xl px-4 py-6 lg:px-8",children:[ai.map((a,b)=>{let c="user"===a.role,e="assistant"===a.role,h=e&&a.id===F&&"streaming"===a.status,i=l(a.content)||(e?H:""),j="error"===a.status,k="stopped"===a.status,m=e&&b===ai.length-1&&"streaming"!==a.status;return(0,d.jsx)("div",{className:"group relative mb-1 border-b border-border-subtle/50 py-5 last:border-0",children:(0,d.jsxs)("div",{className:"flex gap-3.5",children:[(0,d.jsx)("div",{className:`flex size-7 shrink-0 items-center justify-center rounded-full text-[11px] font-bold ${c?"bg-primary text-white":"border border-border bg-surface-2 text-text-muted"}`,children:c?"Y":"AI"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsx)("p",{className:"mb-1.5 text-[12px] font-semibold text-text-main",children:c?"You":ag?.name||"Assistant"}),a.attachments?.length?(0,d.jsx)("div",{className:"mb-3 grid max-w-md grid-cols-2 gap-2 sm:grid-cols-3",children:a.attachments.map(a=>(0,d.jsx)("a",{href:a.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-lg border border-border",children:(0,d.jsx)("img",{src:a.dataUrl,alt:a.name,className:"h-24 w-full object-cover"})},a.id))}):null,e&&!j?(0,d.jsx)("div",{className:"playground-md text-[14.5px] leading-[1.7] text-text-main",dangerouslySetInnerHTML:{__html:function(a){let b=l(a);if(!b)return"";try{return g.A.sanitize(f.xI.parse(b))}catch{return b.replace(/</g,"&lt;").replace(/>/g,"&gt;")}}(i)||""}}):(0,d.jsx)("div",{className:`whitespace-pre-wrap break-words text-[14.5px] leading-[1.7] ${j?"text-danger":"text-text-main"}`,children:i}),e&&h?(0,d.jsx)("span",{className:"ml-0.5 inline-block animate-pulse text-primary",children:"▋"}):null,k?(0,d.jsx)("p",{className:"mt-2 text-xs text-text-muted",children:"Generation stopped"}):null,e&&i&&!h?(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-1 opacity-100 transition sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>aq(a.id,i),className:"inline-flex h-7 items-center gap-1 rounded-md px-2 text-[11px] font-medium text-text-muted hover:bg-surface-2 hover:text-text-main",title:"Copy",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:T===a.id?"check":"content_copy"}),T===a.id?"Copied":"Copy"]}),m&&!D?(0,d.jsxs)("button",{type:"button",onClick:()=>ar({regenerate:!0}),disabled:D,className:"inline-flex h-7 items-center gap-1 rounded-md px-2 text-[11px] font-medium text-text-muted hover:bg-surface-2 hover:text-text-main disabled:cursor-not-allowed disabled:opacity-50",title:"Regenerate",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"}),"Retry"]}):null]}):null]})]})},a.id)}),(0,d.jsx)("div",{ref:ad})]})}),(0,d.jsx)("div",{className:"shrink-0 border-t border-border-subtle bg-bg/90 backdrop-blur-xl",children:(0,d.jsxs)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-4 pt-3 lg:px-6",children:[B.length>0?(0,d.jsx)("div",{className:"mb-2 flex flex-wrap gap-2",children:B.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-border bg-surface px-3 py-1.5",children:[(0,d.jsx)("span",{className:"max-w-[10rem] truncate text-xs text-text-muted",children:a.name}),(0,d.jsx)("button",{type:"button",onClick:()=>{var b;return b=a.id,void C(a=>a.filter(a=>a.id!==b))},className:"text-text-subtle hover:text-text-main","aria-label":"Remove attachment",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},a.id))}):null,(0,d.jsxs)("div",{className:"rounded-2xl border border-border-subtle bg-surface-2/80 shadow-soft ring-1 ring-border-subtle focus-within:border-primary/50 focus-within:ring-primary/20 transition",children:[(0,d.jsx)("textarea",{ref:ac,"aria-label":"Message",value:z,onChange:a=>A(a.target.value),onKeyDown:a=>{"Enter"===a.key&&!a.shiftKey&&(a.preventDefault(),ak&&ar())},placeholder:ag?`Message ${ag.name}…`:"Select a model below to start chatting",rows:1,disabled:!ag||c,className:"max-h-[28vh] min-h-[52px] w-full resize-none overflow-y-auto bg-transparent px-4 pt-3.5 text-[15px] leading-6 text-text-main outline-none placeholder:text-text-subtle custom-scrollbar disabled:opacity-50"}),(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 px-2.5 pb-2.5 pt-1",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>Z.current?.click(),disabled:!ag||c,className:"inline-flex h-11 items-center gap-1.5 rounded-full border border-border bg-surface px-3 text-[12px] font-medium text-text-main transition hover:border-primary/40 hover:bg-primary/10 hover:text-primary disabled:cursor-not-allowed disabled:opacity-40",title:"Upload image",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"add_photo_alternate"}),(0,d.jsx)("span",{className:"hidden sm:inline",children:"Image"})]}),(0,d.jsx)("input",{ref:Z,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ao}),(0,d.jsxs)("div",{ref:ab,className:"relative",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>S(a=>!a),className:`inline-flex h-11 items-center gap-1.5 rounded-full border px-3 text-[12px] font-medium transition ${R||X.trim()||.7!==V?"border-primary/40 bg-primary/10 text-primary":"border-border bg-surface text-text-main hover:border-primary/40 hover:bg-primary/10 hover:text-primary"}`,title:"Chat settings","aria-label":"Chat settings","aria-expanded":R,"aria-controls":"playground-chat-settings",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tune"}),(0,d.jsx)("span",{className:"hidden sm:inline tabular-nums",children:V.toFixed(1)})]}),R?(0,d.jsxs)("div",{id:"playground-chat-settings",className:"absolute bottom-[calc(100%+8px)] left-0 z-40 w-[min(320px,calc(100vw-2rem))] space-y-3 rounded-xl border border-border bg-surface p-3 shadow-elevated",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"mb-1.5 flex items-center justify-between gap-2",children:[(0,d.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-text-subtle",children:"Temperature"}),(0,d.jsx)("span",{className:"text-xs font-semibold tabular-nums text-text-main",children:V.toFixed(2)})]}),(0,d.jsx)("input",{type:"range",min:0,max:2,step:.05,value:V,onChange:a=>W(Number(a.target.value)),className:"w-full accent-[var(--color-primary)]"}),(0,d.jsxs)("div",{className:"mt-1 flex justify-between text-[10px] text-text-subtle",children:[(0,d.jsx)("span",{children:"Precise"}),(0,d.jsx)("span",{children:"Creative"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wider text-text-subtle",children:"System prompt"}),(0,d.jsx)("textarea",{value:X,onChange:a=>Y(a.target.value),rows:4,placeholder:"Optional instructions for the model…",className:"w-full resize-y rounded-lg border border-border bg-bg px-2.5 py-2 text-[12.5px] leading-5 text-text-main outline-none placeholder:text-text-subtle focus:border-primary/40 custom-scrollbar"})]}),(0,d.jsx)("button",{type:"button",onClick:()=>{W(.7),Y("")},className:"text-[11px] font-medium text-text-muted hover:text-text-main",children:"Reset defaults"})]}):null]}),(0,d.jsxs)("div",{ref:_,className:"relative min-w-0",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>{M(a=>{let b=!a;return b||O(""),b})},disabled:c||0===a.length,"aria-label":`Choose model, currently ${as}`,"aria-haspopup":"listbox","aria-expanded":L,"aria-controls":"playground-model-menu",className:"inline-flex h-11 max-w-[min(100vw-12rem,260px)] items-center gap-1.5 rounded-full border border-border bg-surface px-3 text-left transition hover:border-primary/40 hover:bg-surface-2 disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary shrink-0",children:"smart_toy"}),(0,d.jsx)("span",{className:"min-w-0 truncate text-[12.5px] font-semibold text-text-main",children:c?"Loading…":as}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[16px] text-text-muted",children:L?"expand_less":"expand_more"})]}),L?(0,d.jsxs)("div",{id:"playground-model-menu",role:"listbox","aria-label":"Models",className:"absolute bottom-[calc(100%+8px)] left-0 z-40 w-[min(420px,calc(100vw-2rem))] overflow-hidden rounded-xl border border-border bg-surface shadow-elevated",children:[(0,d.jsxs)("div",{className:"border-b border-border-subtle px-3 py-2.5 space-y-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-text-subtle",children:"Models"}),(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[a.length," providers \xb7 search by name"]})]}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("span",{className:"material-symbols-outlined pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-[16px] text-text-subtle",children:"search"}),(0,d.jsx)("input",{type:"search",value:N,onChange:a=>O(a.target.value),placeholder:"Search models…",autoFocus:!0,className:"w-full rounded-lg border border-border bg-bg py-1.5 pl-8 pr-3 text-[16px] text-text-main outline-none placeholder:text-text-subtle focus:border-primary/40"})]})]}),(0,d.jsx)("div",{className:"max-h-[min(50vh,360px)] overflow-y-auto p-1.5 custom-scrollbar",children:0===au.length?(0,d.jsxs)("p",{className:"px-3 py-6 text-center text-xs text-text-muted",children:["No models match “",N.trim(),"”"]}):au.map(a=>(0,d.jsxs)("div",{className:"mb-1",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between px-2 py-1.5",children:[(0,d.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-subtle",children:a.providerName}),(0,d.jsx)(h.Ex,{size:"sm",variant:"default",children:a.models.length})]}),(0,d.jsx)("div",{className:"space-y-0.5",children:a.models.map(a=>{let b=a.id===x;return(0,d.jsxs)("button",{type:"button",role:"option","aria-selected":b,onClick:()=>{(a=>{let b=ae.get(a);if(!b)return;let c=r.find(a=>a.id===t);if(c&&c.messages.length>0){let a=am(b);if(!a)return;s(b=>[a,...b]),u(a.id)}else if(c)s(a=>a.map(a=>a.id===c.id?{...a,providerId:b.providerId,providerName:b.providerName,modelId:b.id,modelName:b.name}:a)),u(c.id);else{let a=am(b);if(!a)return;s(b=>[a,...b]),u(a.id)}w(b.providerId),y(b.id),M(!1)})(a.id),O("")},className:`flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-left transition ${b?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"}`,children:[(0,d.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,d.jsx)("span",{className:"block truncate text-[13px] font-medium",children:a.name}),(0,d.jsx)("span",{className:"block truncate text-[11px] opacity-60",children:a.requestModel})]}),b?(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check"}):null]},a.id)})})]},a.providerId))})]}):null]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[D?(0,d.jsxs)("button",{type:"button",onClick:()=>{$.current?.abort()},className:"inline-flex h-11 items-center gap-1.5 rounded-full border border-border bg-surface px-3 text-[12px] font-semibold text-text-main transition hover:bg-surface-2",title:"Stop generating",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),(0,d.jsx)("span",{className:"hidden sm:inline",children:"Stop"})]}):null,(0,d.jsxs)("button",{type:"button",onClick:ar,disabled:!ak,className:`inline-flex h-11 min-w-9 items-center justify-center gap-1.5 rounded-full px-3.5 text-[13px] font-semibold transition ${ak?"bg-primary text-white shadow-[0_2px_12px_rgba(var(--brand-rgb),0.45)] hover:bg-primary-hover active:scale-[0.97]":"bg-surface-3 text-text-subtle cursor-not-allowed opacity-70"}`,title:"Send message",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] font-bold",children:"send"}),(0,d.jsx)("span",{className:"hidden sm:inline",children:"Send"})]})]})]})]}),(0,d.jsx)("p",{className:"mt-2 text-center text-[11px] text-text-subtle",children:"Routed through ZevaiRouter \xb7 Enter to send \xb7 Shift+Enter for new line"})]})})]}),P?(0,d.jsx)("button",{type:"button",className:"fixed inset-0 z-20 bg-black/40 lg:hidden","aria-label":"Close history",onClick:()=>Q(!1)}):null]})}f.xI.setOptions({gfm:!0,breaks:!0})},75746:(a,b,c)=>{Promise.resolve().then(c.bind(c,79286))},79286:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/zevairouter-build/src/app/(dashboard)/dashboard/basic-chat/BasicChatPageClient.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/zevairouter-build/src/app/(dashboard)/dashboard/basic-chat/BasicChatPageClient.js","default")},93898:(a,b,c)=>{Promise.resolve().then(c.bind(c,73180))}};
@@ -1,3 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[523],{17907:(e,t,s)=>{"use strict";s.d(t,{default:()=>p});var a=s(95155),l=s(12115),n=s(14051),r=s.n(n),i=s(35497),o=s(11059),c=s(66430),d=s(40728);let m=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}];async function u(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(5e3)})).ok}catch{return!1}}async function x(...e){let t=e.filter(Boolean).map(u);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}function p({machineId:e}){let[t,s]=(0,l.useState)([]),[n,r]=(0,l.useState)([]),[h,k]=(0,l.useState)(!0),[w,v]=(0,l.useState)(!1),[N,C]=(0,l.useState)(""),[S,$]=(0,l.useState)(null),[T,P]=(0,l.useState)(null),[I,_]=(0,l.useState)(null),[A,E]=(0,l.useState)(null),[O,R]=(0,l.useState)(null),[U,z]=(0,l.useState)(null),[D,F]=(0,l.useState)(null),[L,W]=(0,l.useState)(()=>new Set),[q,M]=(0,l.useState)(()=>({})),[K,B]=(0,l.useState)(!1),[J,H]=(0,l.useState)(!0),[V,Z]=(0,l.useState)(!0),[G,Q]=(0,l.useState)(!1),[Y,X]=(0,l.useState)(!0),[ee,et]=(0,l.useState)(!1),[es,ea]=(0,l.useState)(!1),[el,en]=(0,l.useState)(""),[er,ei]=(0,l.useState)(""),[eo,ec]=(0,l.useState)(!1),[ed,em]=(0,l.useState)(""),[eu,ex]=(0,l.useState)(null),[ep,eh]=(0,l.useState)(!1),[ey,eb]=(0,l.useState)(!1),[eg,ef]=(0,l.useState)(!1),[ej,ek]=(0,l.useState)(!1),[ew,ev]=(0,l.useState)(""),[eN,eC]=(0,l.useState)(!1),[eS,e$]=(0,l.useState)(""),[eT,eP]=(0,l.useState)(null),[eI,e_]=(0,l.useState)(""),[eA,eE]=(0,l.useState)(""),[eO,eR]=(0,l.useState)(null),[eU,ez]=(0,l.useState)(!1),[eD,eF]=(0,l.useState)([]),[eL,eW]=(0,l.useState)(""),[eq,eM]=(0,l.useState)(!1),[eK,eB]=(0,l.useState)(!1),[eJ,eH]=(0,l.useState)(!1),eV=(0,l.useRef)(null),eZ=(0,l.useRef)(0),eG=(0,l.useRef)(0),eQ=(0,l.useRef)(0),eY=(0,l.useRef)(0),eX=(0,l.useRef)(!1),e0=(0,l.useRef)(!1),e1=(0,l.useRef)(!1),e5=(0,l.useRef)(!1),[e2,e4]=(0,l.useState)(!1),[e3,e8]=(0,l.useState)(!1),[e6,e7]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e7(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]);let{copied:e9,copy:te}=(0,o.C)(),tt=!J||!V,ts=J?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,l.useEffect)(()=>{eV.current&&(eV.current.scrollTop=eV.current.scrollHeight)},[eD]),(0,l.useEffect)(()=>{to(),tn()},[]),(0,l.useEffect)(()=>{if(!(ee||eg))return;let e=!ee||es,t=!eg||ej,s=()=>{document.hidden||tl()};document.addEventListener("visibilitychange",s);let a=setInterval(()=>{document.hidden||tl()},e&&t?3e4:5e3);return()=>{clearInterval(a),document.removeEventListener("visibilitychange",s)}},[ee,eg,es,ej]),(0,l.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(ee&&(el||er)){let e=await x(er,el);eX.current=e,e?(eQ.current=0,ea(!0),e1.current||(e1.current=!0,e4(!0))):(eQ.current+=1,eQ.current>=5&&ea(!1))}else eX.current=!1;if(eg&&ew){let e=await u(ew);e0.current=e,e?(eY.current=0,ek(!0),e5.current||(e5.current=!0,e8(!0))):(eY.current+=1,eY.current>=5&&ek(!1))}else e0.current=!1}};if(!(ee&&(el||er)||eg&&ew))return;e();let t=!eg||ej,s=setInterval(e,(!ee||es)&&t?6e4:1e4);return()=>clearInterval(s)},[ee,el,er,eg,ew,es,ej]);let ta=(0,l.useCallback)((e,t,s,a,l,n)=>{t.current?(s.current=0,a(!0),l.current||(l.current=!0,n(!0))):(s.current+=1,s.current>=5&&a(!1))},[]),tl=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,a=t.tunnel?.tunnelUrl||"";en(a),ei(t.tunnel?.publicUrl||""),et(s),ta(null,eX,eQ,ea,e1,e4);let l=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,n=t.tailscale?.tunnelUrl||"";ev(n),ef(l),ta(null,e0,eY,ek,e5,e8)}catch{}},tn=async()=>{X(!0);try{let[e,t]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e.ok){let t=await e.json();B(t.requireApiKey||!1),H(!1!==t.requireLogin),Z(t.hasPassword||!1),Q(t.tunnelDashboardAccess||!1)}if(t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,a=e.tunnel?.tunnelUrl||"";en(a),ei(e.tunnel?.publicUrl||""),et(s),ta(null,eX,eQ,ea,e1,e4);let l=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,n=e.tailscale?.tunnelUrl||"";ev(n),ef(l),ta(null,e0,eY,ek,e5,e8)}}catch(e){console.log("Error loading settings:",e)}finally{X(!1)}},tr=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:e})})).ok&&Q(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},ti=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:e})})).ok&&B(e)}catch(e){console.log("Error updating requireApiKey:",e)}},to=async()=>{try{let[e,t]=await Promise.all([fetch("/api/keys"),(0,c.b7)("providers:list",d.t7)]),a=await e.json();e.ok&&s(a.keys||[]),r(t.connections||[])}catch(e){console.log("Error fetching data:",e)}finally{k(!1)}},tc=async(e,...t)=>{let s=()=>eZ.current===e;ec(!0),em("Waiting for tunnel ready...");let a=t.filter(Boolean).map(e=>`${e}/api/health`),l=Date.now();for(;Date.now()-l<3e5;){if(await new Promise(e=>setTimeout(e,2e3)),!s())return!1;let e=await Promise.any(a.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1);if(!s())return!1;if(e)return et(!0),ec(!1),em(""),!0;if((Date.now()-l)%1e4<2e3)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return ex({type:"error",message:"Tunnel process stopped unexpectedly."}),ec(!1),em(""),!1}}catch{}}return ex({type:"error",message:"Tunnel created but not reachable. Please try again."}),ec(!1),em(""),!1},td=async()=>{eh(!1);let e=eZ.current+1;eZ.current=e;let t=()=>eZ.current===e;ec(!0),ex(null),em("Creating tunnel...");let s=!0;(async()=>{for(;s&&t();){try{let e=await fetch("/api/tunnel/status");if(e.ok){let a=await e.json();a.download?.downloading?em(`Downloading cloudflared... ${a.download.progress}%`):s&&t()&&em("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let a=await fetch("/api/tunnel/enable",{method:"POST"});s=!1;let l=await a.json();if(!t())return;if(!a.ok)return void ex({type:"error",message:l.error||"Failed to enable tunnel"});let n=l.tunnelUrl;if(!n)return void ex({type:"error",message:"No tunnel URL returned"});en(n),ei(l.publicUrl||""),await tc(e,l.publicUrl,n)}catch(e){t()&&ex({type:"error",message:e.message})}finally{s=!1,t()&&(ec(!1),em(""))}},tm=async()=>{ec(!0),ex(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(et(!1),en(""),eb(!1),ex({type:"success",message:"Tunnel disabled"})):ex({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){ex({type:"error",message:e.message})}finally{ec(!1)}},tu=async()=>{eR(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return eR(t.installed),t}}catch{}return eR(!1),{installed:!1}},tx=async()=>{ez(!0),eP(null),eF([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eL})});if(eW(""),!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||`Install failed (${e.status})`)}let t=e.body.getReader(),s=new TextDecoder,a="";for(;;){let{done:e,value:l}=await t.read();if(e)break;let n=(a+=s.decode(l,{stream:!0})).split("\n\n");for(let e of(a=n.pop()||"",n)){let t=e.split("\n"),s="progress",a=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{a=JSON.parse(e.slice(6))}catch{}if(a)if("progress"===s)eF(e=>[...e.slice(-50),a.message]);else if("done"===s){eR(!0),ez(!1),eB(!1),tb();return}else"error"===s&&eP({type:"error",message:a.error||"Install failed"})}}}catch(e){eP({type:"error",message:e.message})}finally{ez(!1)}},tp=async(e,t)=>{let s=()=>eG.current===e;e$("Waiting for Tailscale ready...");let a=`${t}/api/health`,l=Date.now();for(;Date.now()-l<3e5&&(await new Promise(e=>setTimeout(e,2e3)),s());)try{let e=await fetch(a,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}return!1},th=(e,t)=>{e_(e),eE(t)},ty=()=>{e_(""),eE("")},tb=async()=>{eB(!1);let e=eG.current+1;eG.current=e;let t=()=>eG.current===e;eM(!0),eC(!0),eP(null),e$("Connecting..."),ty();try{let s=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),a=await s.json();if(!t())return;if(s.ok&&a.success){ev(a.tunnelUrl||"");let s=await tp(e,a.tunnelUrl);if(!t())return;ef(!0),eP(s?null:{type:"warning",message:"Connected but not reachable yet."});return}if(a.needsLogin&&a.authUrl){th(a.authUrl,"Open Login Page"),e$('Login required — click "Open Login Page" to continue');for(let s=0;s<40;s++){if(await new Promise(e=>setTimeout(e,3e3)),!t())return;try{let s=await fetch("/api/tunnel/tailscale-check");if(s.ok&&(await s.json()).loggedIn){ty(),e$("Starting funnel...");let s=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),a=await s.json();if(!t())return;if(s.ok&&a.success){ev(a.tunnelUrl||"");let s=await tp(e,a.tunnelUrl);if(!t())return;ef(!0),eP(s?null:{type:"warning",message:"Connected but not reachable yet."})}else a.funnelNotEnabled&&a.enableUrl?await tg(e,a.enableUrl):eP({type:"error",message:a.error||"Failed to start funnel"});return}}catch{}}ty(),eP({type:"error",message:"Login timed out. Please try again."});return}if(a.funnelNotEnabled&&a.enableUrl)return void await tg(e,a.enableUrl);eP({type:"error",message:a.error||"Failed to connect"})}catch(e){t()&&eP({type:"error",message:e.message})}finally{t()&&(eC(!1),eM(!1),e$(""),ty())}},tg=async(e,t)=>{let s=()=>eG.current===e;th(t,"Open Funnel Settings"),e$('Click "Open Funnel Settings" to enable Funnel...');for(let t=0;t<40;t++){if(await new Promise(e=>setTimeout(e,3e3)),!s())return;try{let t=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),a=await t.json();if(!s())return;if(t.ok&&a.success){ty(),ev(a.tunnelUrl||"");let t=await tp(e,a.tunnelUrl);if(!s())return;ef(!0),eP(t?null:{type:"warning",message:"Connected but not reachable yet."});return}if(a.funnelNotEnabled)continue;if(a.error){ty(),eP({type:"error",message:a.error});return}}catch{}}ty(),eP({type:"error",message:"Timed out waiting for Funnel to be enabled."})},tf=async()=>{eC(!0),eP(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(ef(!1),ev(""),eH(!1),eP({type:"success",message:"Tailscale disabled"})):eP({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){eP({type:"error",message:e.message})}finally{eC(!1)}},tj=async()=>{eP(null),eF([]);let e=await tu();e?.installed&&e?.hasCachedPassword?tb():eB(!0)},tk=async e=>{if(e.preventDefault(),N.trim()&&!I){_("create"),E(null);try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:N})}),t=await e.json();if(!e.ok)throw Error(t.error||`Failed to create key (${e.status})`);$(t.key),t.id&&t.key&&M(e=>({...e,[t.id]:t.key})),await to(),C(""),v(!1),E({type:"success",message:"API key created"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}}},tw=async(e,t)=>{if(!I){_(`toggle:${e}`),E(null);try{let a=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})});if(!a.ok)throw Error(`Failed to update key (${a.status})`);s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s)),E({type:"success",message:"API key updated"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}}},tv=async(e,t,a)=>{if(I)return;let l=""===a?0:Math.max(0,Number(a)||0),n="tokenLimit"===t||"usedTokens"===t?Math.floor(l):l;_(`budget:${e}`),E(null);try{let a=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:n})});if(!a.ok)throw Error(`Failed to update budget (${a.status})`);s(s=>s.map(s=>s.id===e?{...s,[t]:n}:s)),E({type:"success",message:"tokenLimit"===t?"Token limit updated":"usedTokens"===t?"Token usage reset":"Budget updated"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}},tN=async()=>{if(!O||I)return;let{keyId:e,selected:t}=O,a=[...t];_(`connections:${e}`),E(null);try{let t=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({allowedConnectionIds:a})}),l=await t.json().catch(()=>({}));if(!t.ok)throw Error(l.error||`Failed to update provider access (${t.status})`);s(t=>t.map(t=>t.id===e?{...t,allowedConnectionIds:a}:t)),R(null),E({type:"success",message:"Provider access updated"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}},tC=async e=>{z({keyId:e.id,keyName:e.name,selected:new Set(e.allowedCombos||[]),combos:[],loading:!0});try{let t=await fetch("/api/combos",{cache:"no-store"}),s=t.ok?await t.json():{};z(t=>t?.keyId===e.id?{...t,combos:s.combos||[],loading:!1}:t)}catch{z(t=>t?.keyId===e.id?{...t,loading:!1}:t)}},tS=async()=>{if(!U||I)return;let{keyId:e,selected:t}=U,a=[...t];_(`combos:${e}`),E(null);try{let t=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({allowedCombos:a})}),l=await t.json().catch(()=>({}));if(!t.ok)throw Error(l.error||`Failed to update combo access (${t.status})`);s(t=>t.map(t=>t.id===e?{...t,allowedCombos:a}:t)),z(null),E({type:"success",message:"Combo access updated"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}},t$=async e=>{F({keyId:e.id,keyName:e.name,selected:[...e.allowedModels||[]],aliases:{},pickerOpen:!1});try{let t=await fetch("/api/models/alias",{cache:"no-store"}),s=t.ok?await t.json():{};F(t=>t?.keyId===e.id?{...t,aliases:s.aliases||{}}:t)}catch{}},tT=e=>{let t=(Array.isArray(e)?e:[e]).map(e=>"string"==typeof e?e.trim():"").filter(Boolean);0!==t.length&&F(e=>{if(!e)return e;let s=[...e.selected];for(let e of t)s.some(t=>t.toLowerCase()===e.toLowerCase())||s.push(e);return{...e,selected:s}})},tP=e=>{let t="string"==typeof e?e.trim().toLowerCase():"";t&&F(e=>e?{...e,selected:e.selected.filter(e=>e.toLowerCase()!==t)}:e)},tI=async()=>{if(!D||I)return;let{keyId:e,selected:t}=D;_(`models:${e}`),E(null);try{let a=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({allowedModels:t})}),l=await a.json().catch(()=>({}));if(!a.ok)throw Error(l.error||`Failed to update model access (${a.status})`);s(s=>s.map(s=>s.id===e?{...s,allowedModels:t}:s)),F(null),E({type:"success",message:"Model access updated"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}},t_=async e=>{if(q[e])return q[e];let t=await fetch(`/api/keys/${e}?reveal=1`,{cache:"no-store"}),s=await t.json().catch(()=>({}));if(!t.ok)throw Error(s.error||`Failed to reveal key (${t.status})`);let a=s.key?.key||s.key;if("string"!=typeof a||!a)throw Error("Key secret is not available");return M(t=>({...t,[e]:a})),a},tA=async e=>{if(L.has(e))return void W(t=>{let s=new Set(t);return s.delete(e),s});try{await t_(e),W(t=>{let s=new Set(t);return s.add(e),s}),E(null)}catch(e){E({type:"error",message:e.message})}},tE=async e=>{try{let t=await t_(e);te(t,e),E(null)}catch(e){E({type:"error",message:e.message})}},[tO,tR]=(0,l.useState)("/v1");if((0,l.useEffect)(()=>{tR(`${window.location.origin}/v1`)},[]),h)return(0,a.jsxs)("div",{className:"flex flex-col gap-6 lg:gap-7",children:[(0,a.jsx)(i.Qv,{}),(0,a.jsx)(i.Qv,{})]});let tU={local_url:"Local endpoint",tunnel_url:"Cloudflare Tunnel endpoint",ts_url:"Tailscale endpoint"}[e9]||"",tz=n.reduce((e,t)=>{let s=t.provider||"other";return e[s]||(e[s]=[]),e[s].push(t),e},{});return(0,a.jsxs)("div",{className:"flex flex-col gap-6 lg:gap-7",children:[(0,a.jsxs)(i.Zp,{padding:"none",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-t-[13px] border-b border-border-subtle bg-linear-to-r from-primary/[0.07] via-primary/[0.025] to-transparent px-4 py-4 sm:px-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined flex size-11 shrink-0 items-center justify-center rounded-xl bg-primary/12 text-[22px] text-primary ring-1 ring-primary/15",children:"terminal"}),(0,a.jsx)(i.w,{title:"API Endpoint",description:"Choose how local and remote clients connect to Zevai Router.",className:"flex-1"})]}),(0,a.jsxs)("div",{className:"p-4 sm:p-5",children:[(0,a.jsx)("div",{"aria-live":"polite",className:"sr-only",children:tU?`${tU}: Copied to clipboard`:""}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(b,{label:"Local",url:tO,copyId:"local_url",copied:e9,onCopy:te}),(0,a.jsx)(y,{icon:"cloud",label:"Tunnel",hint:"Cloudflare",tone:eo||Y?"busy":ee?es?"online":"warn":eu?.type==="error"?"error":"off",status:eo?"Starting":ee?es?"Online":"Reconnecting":Y?"Checking":"Off",children:ee&&!eo&&es?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{"aria-label":"Cloudflare Tunnel endpoint URL",value:`${er||el}/v1`,readOnly:!0,className:"min-w-0 flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>te(`${er||el}/v1`,"tunnel_url"),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5 sm:size-9 sm:rounded-lg","aria-label":"Copy Cloudflare Tunnel endpoint URL",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===e9?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>eb(!0),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!ee||eo||es?eo?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),ed||"Creating tunnel..."]}),(0,a.jsx)("button",{onClick:()=>{eZ.current+=1,ec(!1),em("")},className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):eu?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),eu.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",className:"min-h-11 shrink-0 sm:min-h-8",onClick:()=>eh(!0),children:"Enable"})]}):Y?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,a.jsx)("button",{onClick:()=>X(!1),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"min-w-0 flex-1 text-sm text-text-muted",children:"Public HTTPS URL for remote clients."}),(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",className:"min-h-11 shrink-0 sm:min-h-8",onClick:()=>{tt?ex({type:"error",message:`Security required: ${ts}`}):K?eh(!0):ex({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),e2?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,a.jsx)("button",{onClick:()=>eb(!0),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})}),(0,a.jsx)(y,{icon:"vpn_lock",label:"Tailscale",hint:"Private tailnet",tone:eN||eq?"busy":eg?ej?"online":"warn":eT?.type==="error"?"error":"off",status:eN||eq?"Connecting":eg?ej?"Online":"Reconnecting":"Off",children:eg&&!eN&&ej?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{"aria-label":"Tailscale endpoint URL",value:`${ew}/v1`,readOnly:!0,className:"min-w-0 flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>te(`${ew}/v1`,"ts_url"),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5 sm:size-9 sm:rounded-lg","aria-label":"Copy Tailscale endpoint URL",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===e9?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>eH(!0),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!eg||eN||ej?eN||eq?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eS||"Connecting..."]}),eI&&(0,a.jsx)(i.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(eI,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:eA||"Open"}),(0,a.jsx)("button",{onClick:()=>{eG.current+=1,eC(!1),eM(!1),e$(""),ty()},className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):eT?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),eT.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",className:"min-h-11 shrink-0 sm:min-h-8",onClick:tj,children:"Enable"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"min-w-0 flex-1 text-sm text-text-muted",children:"Reach this router only from your tailnet devices."}),(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{tt?eP({type:"error",message:`Security required: ${ts}`}):tj()},className:"min-h-11 shrink-0 sm:min-h-8",children:"Enable"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),e3?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,a.jsx)("button",{onClick:()=>eH(!0),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})})]}),tt&&!ee&&!eg&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(j,{message:ts,action:{label:"Open settings",href:"/dashboard/profile"}})}),(ee||eg)&&(0,a.jsxs)("div",{className:"mt-4 overflow-hidden rounded-xl border border-border-subtle bg-surface-2/30",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle px-3.5 py-2.5 sm:px-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"shield"}),(0,a.jsx)("span",{className:"text-xs font-semibold uppercase tracking-[0.08em] text-text-muted",children:"Remote access"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 p-3 sm:p-4",children:[!K&&(0,a.jsx)(j,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!J||!V)&&(0,a.jsx)(j,{message:J?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:J?"Change password":"Enable",href:"/dashboard/profile"}}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-lg border border-border-subtle bg-bg/60 px-3 py-2.5",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)(i.lM,{touchTarget:!0,label:"Allow dashboard access via tunnel",checked:G,onChange:()=>tr(!G)}),(0,a.jsx)(f,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]}),(0,a.jsx)("span",{className:`shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${G?"bg-amber-500/10 text-amber-600 dark:text-amber-400":"bg-surface-2 text-text-muted"}`,children:G?"Exposed":"API only"})]})]})]})]})]}),(0,a.jsxs)(i.Zp,{id:"require-api-key",children:[(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined flex size-11 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-[21px] text-primary ring-1 ring-primary/15",children:"vpn_key"}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:"API Keys"}),(0,a.jsxs)("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-text-muted ring-1 ring-border-subtle",children:[t.length," ",1===t.length?"key":"keys"]})]}),(0,a.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:"Control authentication and spending per client."})]})]}),t.length>0&&(0,a.jsx)(i.$n,{icon:"add",onClick:()=>v(!0),className:"w-full sm:w-auto",children:"Create Key"})]}),A&&(0,a.jsx)(i.Gi,{tone:A.type,className:"mb-4",children:A.message}),(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 rounded-xl border border-primary/15 bg-primary/[0.045] p-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg bg-surface text-[17px] text-primary ring-1 ring-border-subtle",children:"shield_lock"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,a.jsx)("p",{className:"mt-0.5 text-sm text-text-muted",children:"Reject requests that do not include a valid client key."})]})]}),(0,a.jsx)("div",{className:"shrink-0 self-end sm:self-auto",children:(0,a.jsx)(i.lM,{touchTarget:!0,label:"Require API key",checked:K,onChange:()=>ti(!K)})})]}),e6&&!K&&(0,a.jsx)("div",{className:"mb-4 -mt-2",children:(0,a.jsx)(j,{message:"Endpoint is exposed without an API key."})}),0===t.length?(0,a.jsx)(i.pp,{icon:"vpn_key",title:"No API keys yet",description:"Create a key to authenticate clients and control their access.",action:(0,a.jsx)(i.$n,{icon:"add",onClick:()=>v(!0),children:"Create Key"})}):(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2",children:t.map(e=>{var t,l;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-wrap items-center justify-between gap-3 rounded-xl border border-border-subtle bg-surface-2/25 p-4 transition-[border-color,box-shadow,opacity] hover:border-primary/20 hover:shadow-[0_14px_28px_-26px_rgba(15,23,42,0.65)] ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1 min-w-0",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono truncate max-w-[min(100%,28rem)]",children:(t=e,L.has(t.id)&&q[t.id]?q[t.id]:t.maskedKey||((l=t.key)?l.length>8?l.slice(0,8)+"...":l:"")||"••••••••")}),(0,a.jsx)("button",{type:"button",onClick:()=>tA(e.id),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-text-muted opacity-100 transition-all hover:bg-black/5 hover:text-primary dark:hover:bg-white/5 sm:size-7 sm:rounded-lg sm:opacity-0 sm:group-hover:opacity-100",title:L.has(e.id)?"Hide key":"Show key","aria-label":L.has(e.id)?"Hide API key":"Show API key",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:L.has(e.id)?"visibility_off":"visibility"})}),(0,a.jsx)("button",{type:"button",onClick:()=>tE(e.id),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-text-muted opacity-100 transition-all hover:bg-black/5 hover:text-primary dark:hover:bg-white/5 sm:size-7 sm:rounded-lg sm:opacity-0 sm:group-hover:opacity-100",title:"Copy key","aria-label":"Copy API key",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:e9===e.id?"check":"content_copy"})})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,a.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"}),(0,a.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("label",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:["Daily $",(0,a.jsx)("input",{type:"number",min:"0",step:"0.01",disabled:I===`budget:${e.id}`,defaultValue:e.budgetDaily||0,onBlur:t=>tv(e.id,"budgetDaily",t.target.value),className:"w-16 rounded border border-border bg-surface px-1 py-0.5 text-[11px]",title:"Daily budget cap in USD (0 = unlimited)"},`daily-${e.budgetDaily||0}`)]}),(0,a.jsxs)("label",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:["Tokens",(0,a.jsx)("input",{type:"number",min:"0",step:"1",disabled:I===`budget:${e.id}`,defaultValue:e.tokenLimit||0,onBlur:t=>tv(e.id,"tokenLimit",t.target.value),className:"w-20 rounded border border-border bg-surface px-1 py-0.5 text-[11px]",title:"Lifetime token cap for this key (0 = unlimited)"},`tokens-${e.tokenLimit||0}`)]}),(Number(e.usedTokens)>0||Number(e.tokenLimit)>0)&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:[(Number(e.usedTokens)||0).toLocaleString()," used",Number(e.usedTokens)>0&&(0,a.jsx)("button",{type:"button",disabled:I===`budget:${e.id}`,onClick:()=>tv(e.id,"usedTokens",0),className:"ml-1 text-primary hover:underline disabled:opacity-50",children:"Reset"})]}),(0,a.jsxs)("label",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:["Monthly $",(0,a.jsx)("input",{type:"number",min:"0",step:"0.01",disabled:I===`budget:${e.id}`,defaultValue:e.budgetMonthly||0,onBlur:t=>tv(e.id,"budgetMonthly",t.target.value),className:"w-16 rounded border border-border bg-surface px-1 py-0.5 text-[11px]",title:"Monthly budget cap in USD (0 = unlimited)"},`monthly-${e.budgetMonthly||0}`)]}),(0,a.jsxs)("button",{type:"button",disabled:I===`connections:${e.id}`,onClick:()=>{R({keyId:e.id,keyName:e.name,selected:new Set(e.allowedConnectionIds||[])})},className:"inline-flex min-h-8 items-center gap-1.5 rounded-lg border border-border bg-surface px-2.5 py-1 text-[11px] font-medium text-text-muted transition-colors hover:border-primary/40 hover:text-primary disabled:opacity-50",title:"Restrict this API key to selected provider connections",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"account_tree"}),(e.allowedConnectionIds||[]).length>0?`${e.allowedConnectionIds.length} connection${1===e.allowedConnectionIds.length?"":"s"}`:"All connections"]}),(0,a.jsxs)("button",{type:"button",disabled:I===`combos:${e.id}`,onClick:()=>tC(e),className:"inline-flex min-h-8 items-center gap-1.5 rounded-lg border border-border bg-surface px-2.5 py-1 text-[11px] font-medium text-text-muted transition-colors hover:border-primary/40 hover:text-primary disabled:opacity-50",title:"Restrict this API key to selected combos",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"layers"}),(e.allowedCombos||[]).length>0?`${e.allowedCombos.length} combo${1===e.allowedCombos.length?"":"s"}`:"All combos"]}),(0,a.jsxs)("button",{type:"button",disabled:I===`models:${e.id}`,onClick:()=>t$(e),className:"inline-flex min-h-8 items-center gap-1.5 rounded-lg border border-border bg-surface px-2.5 py-1 text-[11px] font-medium text-text-muted transition-colors hover:border-primary/40 hover:text-primary disabled:opacity-50",title:"Restrict this API key to selected models",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"model_training"}),(e.allowedModels||[]).length>0?`${e.allowedModels.length} model${1===e.allowedModels.length?"":"s"}`:"All models"]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"flex size-11 items-center justify-center sm:size-auto",children:(0,a.jsx)(i.lM,{size:"sm",touchTarget:!0,disabled:I===`toggle:${e.id}`,checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?P({title:"Pause API Key",message:`Pause API key "${e.name}"?
2
-
3
- This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{P(null),tw(e.id,t)}}):tw(e.id,t)},title:e.isActive?"Pause key":"Resume key"})}),(0,a.jsx)("button",{disabled:I===`delete:${e.id}`,onClick:()=>{var t;return t=e.id,void(!I&&P({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{P(null),_(`delete:${t}`),E(null);try{let e=await fetch(`/api/keys/${t}`,{method:"DELETE"});if(!e.ok)throw Error(`Failed to delete key (${e.status})`);s(e=>e.filter(e=>e.id!==t)),W(e=>{let s=new Set(e);return s.delete(t),s}),M(e=>{if(!(t in e))return e;let s={...e};return delete s[t],s}),E({type:"success",message:"API key deleted"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}}}))},className:"flex size-11 items-center justify-center rounded-xl text-red-500 opacity-100 transition-all hover:bg-red-500/10 sm:size-9 sm:rounded-lg sm:opacity-0 sm:group-hover:opacity-100","aria-label":`Delete ${e.name}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsx)(i.aF,{isOpen:!!O,title:"Provider Access",onClose:()=>{I?.startsWith("connections:")||R(null)},children:O&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-primary/15 bg-primary/[0.045] p-3",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:O.keyName}),(0,a.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Empty selection keeps the current unrestricted behavior. Once selected, routing, fallback, and combos can only use these connections."})]}),0===n.length?(0,a.jsx)("p",{className:"rounded-xl border border-dashed border-border p-5 text-center text-sm text-text-muted",children:"No provider connections are configured yet."}):(0,a.jsx)("div",{className:"max-h-[min(28rem,60vh)] space-y-3 overflow-y-auto pr-1",children:Object.entries(tz).map(([e,t])=>(0,a.jsxs)("div",{className:"rounded-xl border border-border-subtle bg-surface-2/25 p-3",children:[(0,a.jsx)("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,a.jsx)("div",{className:"space-y-1.5",children:t.map(e=>{let t=O.selected.has(e.id),s=e.displayName||e.name||e.email||e.id;return(0,a.jsxs)("label",{className:"flex min-h-11 cursor-pointer items-center gap-3 rounded-lg px-2 py-1.5 transition-colors hover:bg-surface",children:[(0,a.jsx)("input",{type:"checkbox",checked:t,onChange:()=>{var t;return t=e.id,void R(e=>{if(!e)return e;let s=new Set(e.selected);return s.has(t)?s.delete(t):s.add(t),{...e,selected:s}})},className:"size-4 accent-primary"}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block truncate text-sm text-text-main",children:s}),(0,a.jsx)("span",{className:"block truncate font-mono text-[10px] text-text-muted",children:e.id})]}),!1===e.isActive&&(0,a.jsx)("span",{className:"rounded-full bg-orange-500/10 px-2 py-0.5 text-[10px] text-orange-500",children:"Paused"})]},e.id)})})]},e))}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{fullWidth:!0,onClick:tN,disabled:I===`connections:${O.keyId}`,children:I===`connections:${O.keyId}`?"Saving...":"Save access"}),(0,a.jsx)(i.$n,{fullWidth:!0,variant:"ghost",disabled:I===`connections:${O.keyId}`,onClick:()=>R(null),children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!U,title:"Combo Access",onClose:()=>{I?.startsWith("combos:")||z(null)},children:U&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[U.keyName,": an empty selection keeps every combo available."]}),U.loading?(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Loading combos..."}):0===U.combos.length?(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No combos are configured yet."}):(0,a.jsx)("div",{className:"max-h-80 space-y-1.5 overflow-y-auto",children:U.combos.map(e=>(0,a.jsxs)("label",{className:"flex min-h-11 cursor-pointer items-center gap-3 rounded-lg px-2 py-1.5 hover:bg-surface",children:[(0,a.jsx)("input",{type:"checkbox",checked:U.selected.has(e.name),onChange:()=>{var t;return t=e.name,void z(e=>{if(!e)return e;let s=new Set(e.selected);return s.has(t)?s.delete(t):s.add(t),{...e,selected:s}})},className:"size-4 accent-primary"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name})]},e.id||e.name))}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{fullWidth:!0,onClick:tS,disabled:I===`combos:${U.keyId}`,children:I===`combos:${U.keyId}`?"Saving...":"Save access"}),(0,a.jsx)(i.$n,{fullWidth:!0,variant:"ghost",onClick:()=>z(null),disabled:I===`combos:${U.keyId}`,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!D,title:"Model Access",onClose:()=>{I?.startsWith("models:")||F(null)},children:D&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[D.keyName,": an empty selection keeps every model available. A combo can run only when each of its models is allowed. Patterns such as ",(0,a.jsx)("span",{className:"font-mono",children:"oc/*"})," or ",(0,a.jsx)("span",{className:"font-mono",children:"!opus"})," are allowed. A deny-only list stays open except for those names."]}),0===D.selected.length?(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No model restriction yet."}):(0,a.jsx)("div",{className:"flex max-h-48 flex-wrap gap-1.5 overflow-y-auto",children:D.selected.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>tP(e),className:"inline-flex items-center gap-1 rounded-lg border border-border bg-surface px-2 py-1 font-mono text-[11px] text-text-main",title:`Remove ${e}`,children:[(0,a.jsx)("span",{className:"max-w-52 truncate",children:e}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] text-text-muted",children:"close"})]},e))}),(0,a.jsxs)("form",{className:"flex gap-2",onSubmit:e=>{e.preventDefault();let t=e.currentTarget.elements.namedItem("modelPattern");tT(t&&"value"in t?String(t.value):""),t&&"value"in t&&(t.value="")},children:[(0,a.jsx)("input",{name:"modelPattern",placeholder:"oc/* or !opus",className:"min-w-0 flex-1 rounded border border-border bg-surface px-2 py-1.5 font-mono text-xs"}),(0,a.jsx)(i.$n,{type:"submit",variant:"secondary",children:"Add pattern"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{fullWidth:!0,variant:"secondary",onClick:()=>F(e=>e?{...e,pickerOpen:!0}:e),children:"Add model"}),(0,a.jsx)(i.$n,{fullWidth:!0,onClick:tI,disabled:I===`models:${D.keyId}`,children:I===`models:${D.keyId}`?"Saving...":"Save access"})]})]})}),D?.pickerOpen&&(0,a.jsx)(i.rq,{isOpen:!0,onClose:()=>F(e=>e?{...e,pickerOpen:!1}:e),onSelect:e=>tT(e?.value),onDeselect:e=>tP(e?.value),onSelectBatch:e=>tT(e.map(e=>e?.value)),onDeselectBatch:e=>e.forEach(e=>tP(e?.value)),activeProviders:n,modelAliases:D.aliases,title:`Models for ${D.keyName}`,addedModelValues:D.selected,includeCombos:!1,closeOnSelect:!1}),(0,a.jsx)(i.aF,{isOpen:w,title:"Create API Key",onClose:()=>{v(!1),C("")},children:(0,a.jsxs)("form",{className:"flex flex-col gap-4",onSubmit:tk,children:[(0,a.jsx)(i.pd,{label:"Key Name",value:N,onChange:e=>C(e.target.value),placeholder:"Production Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{type:"submit",fullWidth:!0,disabled:!N.trim()||"create"===I,children:"create"===I?"Creating...":"Create"}),(0,a.jsx)(i.$n,{type:"button",onClick:()=>{v(!1),C("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!S,title:"API Key Created",onClose:()=>$(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"Store this key securely. You can view or copy it later from the API Keys list."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.pd,{value:S||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(i.$n,{variant:"secondary",icon:"created_key"===e9?"check":"content_copy",onClick:()=>te(S,"created_key"),children:"created_key"===e9?"Copied!":"Copy"})]}),(0,a.jsx)(i.$n,{onClick:()=>$(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(i.aF,{isOpen:ep,title:"Enable Tunnel",onClose:()=>eh(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local ZevaiRouter to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:m.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:td,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(i.$n,{onClick:()=>eh(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:ey,title:"Disable Tunnel",onClose:()=>!eo&&eb(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tm,fullWidth:!0,disabled:eo,variant:"danger",children:eo?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>eb(!1),variant:"ghost",fullWidth:!0,disabled:eo,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:eK,title:"Tailscale Funnel",onClose:()=>{eU||(eB(!1),eW(""),eP(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===eO&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===eO&&!eU&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tx,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(i.$n,{onClick:()=>eB(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eU&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),eD.length>0&&(0,a.jsx)("div",{ref:eV,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:eD.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===eO&&!eU&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:()=>tb(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(i.$n,{onClick:()=>eB(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eT&&(0,a.jsx)(g,{status:eT})]})}),(0,a.jsx)(i.aF,{isOpen:eJ,title:"Disable Tailscale",onClose:()=>!eN&&eH(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tf,fullWidth:!0,disabled:eN,variant:"danger",children:eN?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>eH(!1),variant:"ghost",fullWidth:!0,disabled:eN,children:"Cancel"})]})]})}),(0,a.jsx)(i.uo,{isOpen:!!T,onClose:()=>P(null),onConfirm:T?.onConfirm,title:T?.title||"Confirm",message:T?.message,variant:"danger"})]})}let h={online:{dot:"bg-emerald-500",text:"text-emerald-600 dark:text-emerald-400",icon:"bg-primary/10 text-primary ring-primary/20"},busy:{dot:"bg-sky-500 animate-pulse",text:"text-sky-600 dark:text-sky-400",icon:"bg-sky-500/10 text-sky-600 ring-sky-500/20 dark:text-sky-400"},warn:{dot:"bg-amber-500 animate-pulse",text:"text-amber-600 dark:text-amber-400",icon:"bg-amber-500/10 text-amber-600 ring-amber-500/20 dark:text-amber-400"},error:{dot:"bg-red-500",text:"text-red-600 dark:text-red-400",icon:"bg-red-500/10 text-red-500 ring-red-500/20"},off:{dot:"bg-text-muted/40",text:"text-text-muted",icon:"bg-surface-2 text-text-muted ring-border-subtle"}};function y({icon:e,label:t,hint:s,status:l,tone:n="off",children:r}){let i=h[n]||h.off;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 rounded-xl border border-border-subtle bg-bg/55 p-3 transition-colors hover:border-primary/25 sm:flex-row sm:items-center sm:gap-4 sm:p-3.5",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:w-[184px] sm:shrink-0",children:[(0,a.jsx)("span",{className:`material-symbols-outlined flex size-10 shrink-0 items-center justify-center rounded-lg text-[20px] ring-1 ${i.icon}`,children:e}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)("span",{className:"text-sm font-semibold leading-tight text-text-main",children:t})}),(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5 text-[11px] leading-tight",children:[(0,a.jsx)("span",{className:`size-1.5 shrink-0 rounded-full ${i.dot}`,"aria-hidden":"true"}),(0,a.jsx)("span",{className:`font-medium ${i.text}`,children:l}),s&&(0,a.jsxs)("span",{className:"truncate text-text-muted",children:["\xb7 ",s]})]})]})]}),(0,a.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:r})]})}function b({label:e,url:t,copyId:s,copied:l,onCopy:n,actions:r,icon:o="computer",hint:c="This machine",status:d="Online",tone:m="online"}){return(0,a.jsxs)(y,{icon:o,label:e,hint:c,status:d,tone:m,children:[(0,a.jsx)(i.pd,{"aria-label":`${e} endpoint URL`,value:t,readOnly:!0,className:"min-w-0 flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>n(t,s),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5 sm:size-9 sm:rounded-lg","aria-label":`Copy ${e} endpoint URL`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l===s?"check":"content_copy"})}),r]})}function g({status:e,className:t=""}){return(0,a.jsx)(i.Gi,{tone:e.type,className:t,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function f({text:e}){return(0,a.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,a.jsx)("span",{className:"pointer-events-none absolute right-0 top-full z-50 mt-2 w-[min(16rem,calc(100vw-2rem))] rounded bg-gray-900 px-2.5 py-1.5 text-xs text-white opacity-0 shadow-lg transition-opacity group-hover:opacity-100 dark:bg-gray-800",children:e})]})}function j({message:e,action:t}){return(0,a.jsx)(i.Gi,{tone:"warning",action:t&&(0,a.jsx)("a",{href:t.href,className:"inline-flex min-h-11 shrink-0 items-center text-xs font-medium underline hover:opacity-80 sm:min-h-0",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label}),children:e})}p.propTypes={machineId:r().string.isRequired}},80523:(e,t,s)=>{Promise.resolve().then(s.bind(s,17907))}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{},_=>{_.O(0,[2574,3862,3745,3416,9501,620,5497,9126,8441,3794,7358],()=>_(_.s=19126)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{7905:(e,t,s)=>{Promise.resolve().then(s.bind(s,85309))},85309:(e,t,s)=>{"use strict";s.d(t,{default:()=>h});var a=s(95155),l=s(12115),r=s(98500),i=s.n(r),o=s(35497),d=s(3534),n=s(28777),c=s(66430),u=s(40728),x=s(12252),v=s(40866);let m=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function h({toolId:e,machineId:t}){let s=d.dM[e],[r,p]=(0,l.useState)([]),[b,f]=(0,l.useState)(!0),[j,g]=(0,l.useState)({}),[E,P]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[N,y]=(0,l.useState)(""),[_,A]=(0,l.useState)(!1),[S,C]=(0,l.useState)(""),[U,L]=(0,l.useState)([]),[I,T]=(0,l.useState)(!1),M=(0,x.F)(r.some(e=>"kiro"===e.provider&&!1!==e.isActive));(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,s,a,l]=await Promise.all([(0,c.b7)("providers:list",u.t7),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/dashboard/cli-tools/keys",{cache:"no-store"})]);if(!e)return;if(401===s.status||401===a.status||401===l.status)return void T(!0);if(p(t.connections||[]),s.ok){let e=await s.json();P(e.cloudEnabled||!1)}if(a.ok){let e=await a.json();w(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),y(e.tunnel?.publicUrl||""),A(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),C(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();L(e.keys||[])}}catch(t){e&&t?.status===401&&T(!0),console.log("Error loading tool data:",t)}finally{e&&f(!1)}})(),()=>{e=!1}},[]);let O=()=>r.filter(e=>!1!==e.isActive),$=(0,l.useCallback)((e,t,s)=>{g(a=>a[e]?.[t]===s?a:{...a,[e]:{...a[e],[t]:s}})},[]);return s?(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,a.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:s.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s.description})]}),b?(0,a.jsx)(o.Qv,{}):I?(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-red-500/10 border border-red-500/30 rounded-lg",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-500",children:"lock"}),(0,a.jsx)("p",{className:"flex-1 text-sm text-red-600",children:"Your session has expired — tool data, tunnel status, and API keys could not be loaded. Log in again before applying settings, otherwise the tool may be written with a fallback key."})]}),(0,a.jsx)("div",{className:"pl-9",children:(0,a.jsxs)("a",{href:"/login",className:"inline-flex items-center px-3 py-1.5 rounded-md border border-red-500/40 bg-red-500/20 text-red-700 dark:text-red-300 text-xs font-medium hover:bg-red-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1",children:"login"}),"Log in again"]})})]}):(()=>{let t,l,r,i=(t=O(),l=[],r=new Set,t.forEach(e=>{let t=n.Xg[e.provider]||e.provider;("kiro"===e.provider?M:(0,n.KC)(e.provider)).forEach(s=>{let a=`${t}/${s.id}`;r.has(a)||(r.add(a),l.push({value:a,label:`${t}/${s.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:s.id}))})}),l).length>0,o={tool:s,isExpanded:!0,onToggle:()=>{},baseUrl:k&&N?N:E&&m?m:window.location.origin,apiKeys:U,tunnelEnabled:k,tunnelPublicUrl:N,tailscaleEnabled:_,tailscaleUrl:S};switch(e){case"claude":return(0,a.jsx)(v.Tk,{...o,activeProviders:O(),modelMappings:j[e]||{},onModelMappingChange:(t,s)=>$(e,t,s),hasActiveProviders:i,cloudEnabled:E});case"codex":return(0,a.jsx)(v.Ah,{...o,activeProviders:O(),cloudEnabled:E});case"grok-build":return(0,a.jsx)(v.E_,{...o,activeProviders:O(),cloudEnabled:E});case"opencode":return(0,a.jsx)(v.qO,{...o,activeProviders:O(),cloudEnabled:E});case"cowork":return(0,a.jsx)(v.Q6,{...o,activeProviders:O(),hasActiveProviders:i,cloudEnabled:E,cloudUrl:m,tunnelEnabled:k,tunnelPublicUrl:N,tailscaleEnabled:_,tailscaleUrl:S});case"droid":return(0,a.jsx)(v.ZM,{...o,activeProviders:O(),hasActiveProviders:i,cloudEnabled:E});case"openclaw":return(0,a.jsx)(v.yZ,{...o,activeProviders:O(),hasActiveProviders:i,cloudEnabled:E});case"hermes":return(0,a.jsx)(v.RF,{...o,activeProviders:O(),hasActiveProviders:i,cloudEnabled:E});case"copilot":return(0,a.jsx)(v.h1,{...o,activeProviders:O(),cloudEnabled:E});case"cline":return(0,a.jsx)(v.aG,{...o,activeProviders:O(),cloudEnabled:E});case"kilo":return(0,a.jsx)(v.c9,{...o,activeProviders:O(),cloudEnabled:E});case"deepseek-tui":return(0,a.jsx)(v.lF,{...o,activeProviders:O(),hasActiveProviders:i,cloudEnabled:E});case"jcode":return(0,a.jsx)(v.mW,{...o,activeProviders:O(),hasActiveProviders:i,cloudEnabled:E});case"omp":return(0,a.jsx)(v.v0,{...o,cloudEnabled:E});case"openbot":return(0,a.jsx)(v.aD,{...o});case"pi":case"crush":case"forge":case"smelt":case"codewhale":return(0,a.jsx)(v.WE,{...o,activeProviders:O(),cloudEnabled:E});default:return(0,a.jsx)(v.a7,{toolId:e,...o,activeProviders:O(),cloudEnabled:E,tunnelEnabled:k})}})()]}):(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,a.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,866,8441,3794,7358],()=>e(e.s=7905)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var t=l(95155),r=l(12115),a=l(35497),n=l(3534),i=l(40866),o=l(98500),d=l.n(o),c=l(5772);function x({toolId:e,tool:s,status:l}){let r=l?.error?{label:"Unavailable",cls:"bg-red-500/10 text-red-600 dark:text-red-400"}:l||s?.configType!=="guide"?l?l.installed?l.hasZevai?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"}:{label:"Guide",cls:"bg-blue-500/10 text-blue-600 dark:text-blue-400"};return(0,t.jsx)(d(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(a.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(c.A,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${r.cls}`,children:r.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,r.useState)(!0),[o,d]=(0,r.useState)({}),[c,u]=(0,r.useState)(null),g=(0,r.useRef)(null),b=(0,r.useCallback)(async e=>{try{let s=await fetch("/api/cli-tools/all-statuses",{signal:e});!e.aborted&&s.ok?(d(await s.json()),u(null)):e.aborted||u(`Failed to load tool statuses (HTTP ${s.status})`)}catch(s){"AbortError"!==s.name&&(console.log("Error fetching tool statuses:",s),e.aborted||u("Failed to load tool statuses. Check your connection and try again."))}finally{e.aborted||l(!1)}},[]),p=(0,r.useCallback)(()=>{g.current?.abort();let e=new AbortController;g.current=e,b(e.signal)},[b]);if((0,r.useEffect)(()=>{let e=window.setTimeout(p,0),s=()=>p();return window.addEventListener("focus",s),()=>{window.clearTimeout(e),g.current?.abort(),window.removeEventListener("focus",s)}},[p]),s)return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,t.jsx)(a.Qv,{}),(0,t.jsx)(a.Qv,{}),(0,t.jsx)(a.Qv,{}),(0,t.jsx)(a.Qv,{}),(0,t.jsx)(a.Qv,{}),(0,t.jsx)(a.Qv,{})]});let h=Object.entries(n.dM),f=Object.entries(n.wn);return(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[c&&(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-600",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"error"}),(0,t.jsx)("span",{className:"flex-1",children:c}),(0,t.jsxs)("button",{type:"button",onClick:p,className:"inline-flex items-center gap-1 rounded-md border border-red-500/40 bg-red-500/20 px-2 py-1 font-medium text-red-700 hover:bg-red-500/30 dark:text-red-300",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"}),"Retry"]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:h.map(([e,s])=>(0,t.jsx)(x,{toolId:e,tool:s,status:o[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:f.map(([e,s])=>(0,t.jsx)(i.gY,{tool:s},e))})]})]})}},89734:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501))}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,866,8441,3794,7358],()=>e(e.s=89734)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{24636:(e,t,a)=>{Promise.resolve().then(a.bind(a,62311))},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})]})}}},e=>{e.O(0,[2574,3862,3745,3416,7055,9501,620,5497,8441,3794,7358],()=>e(e.s=24636)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{7827:(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=7827)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{},_=>{_.O(0,[2574,3862,3745,3416,9501,620,5497,523,8441,3794,7358],()=>_(_.s=80523)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{30837:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),o=t(73321),c=t(35497),n=t(57250),d=t(1791);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 m({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),h=o.filter(e=>{let s=x(e);return"active"===s||"success"===s}).length,p=o.filter(e=>{let s=x(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=o.length,u=b>0&&o.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(c.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.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,r.jsx)(n.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,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(c.Ex,{variant:"success",size:"sm",children:"Ready"}):u?(0,r.jsx)(c.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(c.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(c.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(c.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})})]})]})})})}function h({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(c.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.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]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:o}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(c.$n,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(h,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(m,{provider:e,kind:t,connections:i},e.id))})]})}function b(){let e=(0,o.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),[n,x]=(0,l.useState)(!0),[m,h]=(0,l.useState)(""),b=async()=>{h("");try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);if(!e.ok&&!s.ok)throw Error("load failed");e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{h("Failed to load providers. Check your connection and try again.")}finally{x(!1)}};(0,l.useEffect)(()=>{b()},[]);let u=(0,d.o5)("webSearch"),f=(0,d.o5)("webFetch"),j=a.filter(e=>"webSearch"===e.kind),v=a.filter(e=>"webFetch"===e.kind),g=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(o.ok){let s=await o.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await o.json()).error||"Failed to create combo")};return n?(0,r.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."}):m?(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3 py-12 text-center",children:[(0,r.jsx)("p",{className:"text-sm text-red-500",children:m}),(0,r.jsx)(c.$n,{size:"sm",variant:"outline",icon:"refresh",onClick:()=>{x(!0),b()},children:"Retry"})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:u,connections:s,combos:j,onCreateCombo:()=>g("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:f,connections:s,combos:v,onCreateCombo:()=>g("webFetch")})]})}}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=30837)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[2574,3862,3745,3416,9501,620,5497,523,8441,3794,7358],()=>_(_.s=80523)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1287],{},_=>{_.O(0,[2574,3862,3745,3416,9501,620,5497,9126,8441,3794,7358],()=>_(_.s=19126)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{52424:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),l=s(73321),i=s(35497),o=s(81127),n=s(21931),d=s(1620),c=s(31474),m=s(90620),x=s(93308),u=s(38202);function p(){let e=(0,l.useRouter)(),{theme:t,setTheme:s,isDark:p}=(0,d.D)(),[h,b]=(0,r.useState)("en"),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[N,v]=(0,r.useState)(!1),[w,S]=(0,r.useState)({fallbackStrategy:"fill-first"}),[C,k]=(0,r.useState)(!0),[L,P]=(0,r.useState)({current:"",new:"",confirm:""}),[O,I]=(0,r.useState)({type:"",message:""}),[A,M]=(0,r.useState)(!1),[R,T]=(0,r.useState)(!1),[U,E]=(0,r.useState)({type:"",message:""}),[D,$]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[F,q]=(0,r.useState)(""),[J,_]=(0,r.useState)({type:"",message:""}),[z,H]=(0,r.useState)(!1),[B,Z]=(0,r.useState)(!1),[K,W]=(0,r.useState)({type:"",message:""}),[X,Q]=(0,r.useState)("/api/auth/oidc/callback"),[G,V]=(0,r.useState)(!1),[Y,ee]=(0,r.useState)({samlEntryPoint:"",samlIssuer:"urn:zevairouter:sp",samlLoginLabel:"Sign in with SAML SSO",samlAttributeEmail:"email",samlAttributeName:"name"}),[et,es]=(0,r.useState)(""),[ea,er]=(0,r.useState)({type:"",message:""}),[el,ei]=(0,r.useState)(!1),[eo,en]=(0,r.useState)(!1),[ed,ec]=(0,r.useState)({type:"",message:""}),[em,ex]=(0,r.useState)("/api/auth/saml/acs"),[eu,ep]=(0,r.useState)("/api/auth/saml/metadata"),[eh,eb]=(0,r.useState)(!1),[eg,ey]=(0,r.useState)("oidc"),ef=(0,r.useRef)(null),[ej,eN]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[ev,ew]=(0,r.useState)({type:"",message:""}),[eS,eC]=(0,r.useState)(!1),[ek,eL]=(0,r.useState)(!1);(0,r.useEffect)(()=>{b(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${x.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,x.QC)(t)}())},[g]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{S(e),$({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),q(""),ee({samlEntryPoint:e?.samlEntryPoint||"",samlIssuer:e?.samlIssuer||"urn:zevairouter:sp",samlLoginLabel:e?.samlLoginLabel||"Sign in with SAML SSO",samlAttributeEmail:e?.samlAttributeEmail||"email",samlAttributeName:e?.samlAttributeName||"name"}),es(e?.samlCert||""),ey(e?.ssoType||(e?.authMode==="saml"?"saml":"oidc")),(e?.authMode==="oidc"||e?.authMode==="both")&&V(!0),(e?.authMode==="saml"||e?.ssoType==="saml")&&eb(!0),eN({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),k(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),k(!1)})},[]),(0,r.useEffect)(()=>{Q(`${window.location.origin}/api/auth/oidc/callback`),ex(`${window.location.origin}/api/auth/saml/acs`),ep(`${window.location.origin}/api/auth/saml/metadata`)},[]);let eP=async e=>{if(e.preventDefault(),!0===w.outboundProxyEnabled){eC(!0),ew({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:ej.outboundProxyUrl,outboundNoProxy:ej.outboundNoProxy})}),t=await e.json();e.ok?(S(e=>({...e,...t})),ew({type:"success",message:"Proxy settings applied"})):ew({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){ew({type:"error",message:"An error occurred"})}finally{eC(!1)}}},eO=async()=>{if(!0!==w.outboundProxyEnabled)return;let e=(ej.outboundProxyUrl||"").trim();if(!e)return void ew({type:"error",message:"Please enter a Proxy URL to test"});eL(!0),ew({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?ew({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):ew({type:"error",message:s?.error||"Proxy test failed"})}catch(e){ew({type:"error",message:"An error occurred"})}finally{eL(!1)}},eI=async e=>{eC(!0),ew({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(S(e=>({...e,...s})),eN(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),ew({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):ew({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){ew({type:"error",message:"An error occurred"})}finally{eC(!1)}},eA=async e=>{if(e.preventDefault(),L.new!==L.confirm)return void I({type:"error",message:"Passwords do not match"});M(!0),I({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:L.current,newPassword:L.new})}),t=await e.json();e.ok?(I({type:"success",message:"Password updated successfully"}),P({current:"",new:"",confirm:""})):I({type:"error",message:t.error||"Failed to update password"})}catch(e){I({type:"error",message:"An error occurred"})}finally{M(!1)}},eM=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&S(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eR=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&S(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eT=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&S(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eU=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&S(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eE=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&S(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},eD=(e,t)=>{$(s=>({...s,[e]:t}))},e$=async(e=D.authMode||"password")=>{let t=D.oidcIssuerUrl.trim(),s=D.oidcClientId.trim(),a=D.oidcScopes.trim(),r=D.oidcLoginLabel.trim(),l=F.trim();if("password"!==e&&(!t||!s||!l)&&!w.oidcConfigured)return void _({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});H(!0),_({type:"",message:""}),W({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};l&&(i.oidcClientSecret=l);let o=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await o.json();o.ok?(S(e=>({...e,...n})),$({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),q(""),_({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):_({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){_({type:"error",message:"An error occurred"})}finally{H(!1)}},eF=async()=>{let e=D.oidcIssuerUrl.trim(),t=D.oidcClientId.trim(),s=D.oidcScopes.trim(),a=F.trim();if(!e||!t)return void W({type:"error",message:"Issuer URL and client ID are required to test the connection."});Z(!0),_({type:"",message:""}),W({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:D.authMode||w.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:D.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),l=await r.json().catch(()=>({}));if(!r.ok)return void W({type:"error",message:l.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:l.oidcIssuerUrl||e,clientId:l.oidcClientId||t,scopes:l.oidcScopes||s||"openid profile email"})}),o=await i.json().catch(()=>({}));if(i.ok&&o?.ok){let e=o.clientSecretTested?!0===o.clientSecretValid?`Connection OK. Discovery loaded from ${o.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${o.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${o.issuerUrl}.`;W({type:"success",message:e})}else W({type:"error",message:o.error||"OIDC connection test failed"})}catch(e){W({type:"error",message:"An error occurred"})}finally{Z(!1)}},eq=(e,t)=>{ee(s=>({...s,[e]:t}))},eJ=async e=>{if(e)try{let t=await e.text(),s=t.match(/<[^>]*SingleSignOnService[^>]*Binding="[^"]*HTTP-Redirect"[^>]*Location="([^"]+)"/i)||t.match(/<[^>]*SingleSignOnService[^>]*Location="([^"]+)"[^>]*Binding="[^"]*HTTP-Redirect"/i)||t.match(/<[^>]*SingleSignOnService[^>]*Location="([^"]+)"/i),a=t.match(/<[^>]*X509Certificate[^>]*>([\s\S]*?)<\/[^>]*X509Certificate>/i);s&&eq("samlEntryPoint",s[1].trim()),a&&es(a[1].replace(/\s+/g,"").trim()),er({type:s||a?"success":"error",message:s||a?"Metadata parsed. Review the entry point and certificate, then save.":"Could not find SSO URL or certificate in the uploaded metadata."})}catch{er({type:"error",message:"Failed to read the metadata file."})}},e_=async e=>{if(e)try{es((await e.text()).trim()),er({type:"success",message:"Certificate loaded. Save to apply."})}catch{er({type:"error",message:"Failed to read the certificate file."})}},ez=async e=>{let t=Y.samlEntryPoint.trim(),s=et.trim(),a=e||w.authMode||"password";if("password"!==a&&(!t||!s)&&!w.samlConfigured)return void er({type:"error",message:"IdP SSO URL and certificate are required to enable SAML."});ei(!0),er({type:"",message:""}),ec({type:"",message:""});try{let e={authMode:a,ssoType:"saml",samlEntryPoint:t,samlIssuer:Y.samlIssuer.trim()||"urn:zevairouter:sp",samlLoginLabel:Y.samlLoginLabel.trim()||"Sign in with SAML SSO",samlAttributeEmail:Y.samlAttributeEmail.trim()||"email",samlAttributeName:Y.samlAttributeName.trim()||"name",samlCert:s},r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),l=await r.json();r.ok?(S(e=>({...e,...l})),ey("saml"),er({type:"success",message:"saml"===a?"SAML login enabled":"both"===a?"Password and SAML login enabled":"SAML settings saved"})):er({type:"error",message:l.error||"Failed to save SAML settings"})}catch{er({type:"error",message:"An error occurred"})}finally{ei(!1)}},eH=async()=>{en(!0),er({type:"",message:""}),ec({type:"",message:""});try{let e=await fetch("/api/auth/saml/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({samlEntryPoint:Y.samlEntryPoint.trim(),samlIssuer:Y.samlIssuer.trim()||"urn:zevairouter:sp",samlCert:et.trim()})}),t=await e.json().catch(()=>({}));e.ok&&t?.ok?ec({type:"success",message:t.message||"SAML configuration looks valid."}):ec({type:"error",message:t.error||"SAML config test failed"})}catch{ec({type:"error",message:"An error occurred"})}finally{en(!1)}},eB=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&S(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eZ=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();S(t)}catch(e){console.error("Failed to reload settings:",e)}},eK=async()=>{T(!0),E({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),l=document.createElement("a"),i=new Date().toISOString().replace(/[.:]/g,"-");l.href=r,l.download=`zevairouter-backup-${i}.json`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(r);let o=(a.size/1048576).toFixed(2),n=Array.isArray(t?.excludedTables)&&t.excludedTables.length?` (config only — skipped ${t.excludedTables.join(", ")})`:"";E({type:"success",message:`Database backup downloaded (${o} MB)${n}`})}catch(e){E({type:"error",message:e.message||"Failed to export database"})}finally{T(!1)}},eW=async e=>{let t=e.target.files?.[0];if(t){T(!0),E({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await eZ(),E({type:"success",message:"Database imported successfully"})}catch(e){E({type:"error",message:e.message||"Invalid backup file"})}finally{ef.current&&(ef.current.value=""),T(!1)}}},eX=!0===w.enableObservability,eQ=async()=>{v(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}v(!1),j(!1)},eG=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(e.push("/login"),e.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,c.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",t===e?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===e?"light_mode":"dark"===e?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:e})]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.zevai/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(i.$n,{variant:"secondary",icon:"download",onClick:eK,loading:R,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(i.$n,{variant:"outline",icon:"upload",onClick:()=>ef.current?.click(),disabled:R,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:ef,type:"file",accept:"application/json,.json",className:"hidden",onChange:eW})]}),U.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===U.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:U.message})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>y(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:u.h[h]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(i.lM,{checked:!0===w.requireLogin,onChange:()=>eE(!w.requireLogin),disabled:C})]}),!0===w.requireLogin&&(0,a.jsxs)("form",{onSubmit:eA,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[w.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter current password",value:L.current,onChange:e=>P({...L,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter new password",value:L.new,onChange:e=>P({...L,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Confirm new password",value:L.confirm,onChange:e=>P({...L,confirm:e.target.value}),required:!0})]})]}),O.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===O.type?"text-red-500":"text-green-500"}`,children:O.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:A,className:"w-full sm:w-auto",children:w.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>V(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===w.authMode?"OIDC active":"both"===w.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:G?"expand_less":"expand_more"})]}),G&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=D.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>eD("authMode",e.value),className:(0,c.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:C||z,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(i.pd,{placeholder:"https://auth.example.com/application/o/zevairouter/",value:D.oidcIssuerUrl,onChange:e=>eD("oidcIssuerUrl",e.target.value),disabled:C||z})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(i.pd,{placeholder:"zevairouter-dashboard",value:D.oidcClientId,onChange:e=>eD("oidcClientId",e.target.value),disabled:C||z})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:F,onChange:e=>q(e.target.value),disabled:C||z}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(i.pd,{placeholder:"openid profile email",value:D.oidcScopes,onChange:e=>eD("oidcScopes",e.target.value),disabled:C||z})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(i.pd,{placeholder:"Sign in with OIDC",value:D.oidcLoginLabel,onChange:e=>eD("oidcLoginLabel",e.target.value),disabled:C||z})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:X})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(i.$n,{type:"button",variant:"primary",loading:z,onClick:()=>e$(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(i.$n,{type:"button",variant:"outline",loading:B,onClick:eF,className:"w-full sm:w-auto",children:"Test connection"})]}),K.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===K.type?"text-red-500":"text-green-500"}`,children:K.message}),J.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===J.type?"text-red-500":"text-green-500"}`,children:J.message}),"oidc"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eb(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-emerald-500/10 text-emerald-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"badge"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"SAML 2.0 SSO"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"saml"===eg&&w.samlConfigured?"saml"===w.authMode?"SAML active":"both"===w.authMode?"Password + SAML active":"SAML configured":"Optional SSO via Okta / Entra ID / OneLogin / ADFS"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:eh?"expand_less":"expand_more"})]}),eh&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use any SAML 2.0 identity provider to sign in to the dashboard. OIDC and SAML are mutually exclusive SSO types; saving here sets the SSO type to SAML. Model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"saml",title:"SAML only",desc:"Require SAML for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or SAML."}].map(e=>{let t=(w.authMode||"password")===e.value&&("password"===e.value||"saml"===eg);return(0,a.jsxs)("button",{type:"button",onClick:()=>ez(e.value),className:(0,c.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:C||el,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"IdP SSO URL (Entry Point)"}),(0,a.jsx)(i.pd,{placeholder:"https://idp.example.com/app/xxxx/sso/saml",value:Y.samlEntryPoint,onChange:e=>eq("samlEntryPoint",e.target.value),disabled:C||el})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"IdP X.509 Certificate"}),(0,a.jsx)("textarea",{className:"w-full rounded-lg border border-border bg-bg p-2 font-mono text-xs min-h-[96px]",placeholder:"Paste the IdP signing certificate (PEM or base64), or upload below",value:et,onChange:e=>es(e.target.value),disabled:C||el}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsxs)("label",{className:"text-xs sm:text-sm text-primary cursor-pointer",children:["Upload IdP metadata XML",(0,a.jsx)("input",{type:"file",accept:".xml,text/xml,application/xml",className:"hidden",onChange:e=>eJ(e.target.files?.[0])})]}),(0,a.jsxs)("label",{className:"text-xs sm:text-sm text-primary cursor-pointer",children:["Upload certificate (.pem/.crt)",(0,a.jsx)("input",{type:"file",accept:".pem,.crt,.cer,.txt",className:"hidden",onChange:e=>e_(e.target.files?.[0])})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"SP Entity ID (Issuer)"}),(0,a.jsx)(i.pd,{placeholder:"urn:zevairouter:sp",value:Y.samlIssuer,onChange:e=>eq("samlIssuer",e.target.value),disabled:C||el})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Email Attribute"}),(0,a.jsx)(i.pd,{placeholder:"email",value:Y.samlAttributeEmail,onChange:e=>eq("samlAttributeEmail",e.target.value),disabled:C||el})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Name Attribute"}),(0,a.jsx)(i.pd,{placeholder:"name",value:Y.samlAttributeName,onChange:e=>eq("samlAttributeName",e.target.value),disabled:C||el})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(i.pd,{placeholder:"Sign in with SAML SSO",value:Y.samlLoginLabel,onChange:e=>eq("samlLoginLabel",e.target.value),disabled:C||el})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Register these with your IdP"}),(0,a.jsx)("p",{className:"mt-1",children:"ACS (Reply) URL"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:em}),(0,a.jsx)("p",{className:"mt-2",children:"SP Metadata URL"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:eu})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(i.$n,{type:"button",variant:"primary",loading:el,onClick:()=>ez("password"!==w.authMode&&w.authMode?w.authMode:"saml"),className:"w-full sm:w-auto",children:"Save SAML settings"}),(0,a.jsx)(i.$n,{type:"button",variant:"outline",loading:eo,onClick:eH,className:"w-full sm:w-auto",children:"Test configuration"})]}),ed.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ed.type?"text-red-500":"text-green-500"}`,children:ed.message}),ea.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ea.type?"text-red-500":"text-green-500"}`,children:ea.message}),"saml"===w.authMode&&"saml"===eg&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"SAML login is currently active. Password login is disabled until you switch back."})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===w.fallbackStrategy,onChange:()=>eM("round-robin"===w.fallbackStrategy?"fill-first":"round-robin"),disabled:C})]}),"round-robin"===w.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"10",value:w.stickyRoundRobinLimit||3,onChange:e=>eT(e.target.value),disabled:C,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===w.comboStrategy,onChange:()=>eR("round-robin"===w.comboStrategy?"fallback":"round-robin"),disabled:C})]}),"round-robin"===w.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"100",value:w.comboStickyRoundRobinLimit||1,onChange:e=>eU(e.target.value),disabled:C,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===w.fallbackStrategy?`Currently distributing requests across all available accounts with ${w.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===w.comboStrategy?` Combos rotate after ${w.comboStickyRoundRobinLimit||1} call${1===(w.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(i.lM,{checked:!0===w.outboundProxyEnabled,onChange:()=>eI(!0!==w.outboundProxyEnabled),disabled:C||eS})]}),!0===w.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:eP,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(i.pd,{placeholder:"http://127.0.0.1:7897",value:ej.outboundProxyUrl,onChange:e=>eN(t=>({...t,outboundProxyUrl:e.target.value})),disabled:C||eS}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(i.pd,{placeholder:"localhost,127.0.0.1",value:ej.outboundNoProxy,onChange:e=>eN(t=>({...t,outboundNoProxy:e.target.value})),disabled:C||eS}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(i.$n,{type:"button",variant:"secondary",loading:ek,disabled:C||eS,onClick:eO,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:eS,className:"w-full sm:w-auto",children:"Apply"})]})]}),ev.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ev.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:ev.message})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(i.lM,{checked:eX,onChange:eB,disabled:C})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(i.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>j(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(i.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eG,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[m.vQ.name," v",m.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(n.default,{hideTrigger:!0,isOpen:g,onClose:e=>{y(!1),b(e)}}),(0,a.jsx)(o.ConfirmModal,{isOpen:f,onClose:()=>j(!1),onConfirm:eQ,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:N})]})}}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=52424)),_N_E=e.O()}]);