@sifxprime/krouter 0.5.6 → 0.5.8

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 (911) hide show
  1. package/README.md +9 -9
  2. package/app/.next-cli-build/BUILD_ID +1 -1
  3. package/app/.next-cli-build/app-path-routes-manifest.json +5 -3
  4. package/app/.next-cli-build/build-manifest.json +2 -2
  5. package/app/.next-cli-build/prerender-manifest.json +24 -0
  6. package/app/.next-cli-build/routes-manifest.json +12 -0
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/environment/page.js +2 -0
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/environment/page.js.nft.json +1 -0
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/environment/page_client-reference-manifest.js +1 -0
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  74. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  85. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  88. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  89. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  90. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  92. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  94. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  95. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  110. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  112. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  122. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  124. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  130. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  134. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  138. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  142. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +2 -1
  144. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  160. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  190. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  238. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  240. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  244. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/settings/environment/route.js +1 -0
  248. package/app/.next-cli-build/server/app/api/settings/environment/route.js.nft.json +1 -0
  249. package/app/.next-cli-build/server/app/api/settings/environment/route_client-reference-manifest.js +1 -0
  250. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/settings/route.js +2 -1
  255. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  263. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  285. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  301. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +2 -1
  305. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +3 -2
  315. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/v1/search/route.js +2 -1
  333. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +2 -1
  335. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  347. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  349. package/app/.next-cli-build/server/app/callback.html +1 -1
  350. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  351. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  352. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  353. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  354. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  355. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  356. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  357. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  358. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  359. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  360. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  361. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  362. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  363. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  364. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  365. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  366. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  367. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  368. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  369. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  370. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  371. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  372. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  373. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  374. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  375. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  376. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  377. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  378. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  379. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  380. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  381. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  382. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  383. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  384. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  385. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  386. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  387. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  388. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  389. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  390. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  391. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  392. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  393. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  394. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  395. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  396. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  397. package/app/.next-cli-build/server/app/dashboard/environment.html +1 -0
  398. package/app/.next-cli-build/server/app/dashboard/environment.meta +17 -0
  399. package/app/.next-cli-build/server/app/dashboard/environment.rsc +27 -0
  400. package/app/.next-cli-build/server/app/dashboard/environment.segments/!KGRhc2hib2FyZCk/dashboard/environment/__PAGE__.segment.rsc +9 -0
  401. package/app/.next-cli-build/server/app/dashboard/environment.segments/!KGRhc2hib2FyZCk/dashboard/environment.segment.rsc +5 -0
  402. package/app/.next-cli-build/server/app/dashboard/environment.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
  403. package/app/.next-cli-build/server/app/dashboard/environment.segments/!KGRhc2hib2FyZCk.segment.rsc +6 -0
  404. package/app/.next-cli-build/server/app/dashboard/environment.segments/_full.segment.rsc +27 -0
  405. package/app/.next-cli-build/server/app/dashboard/environment.segments/_head.segment.rsc +6 -0
  406. package/app/.next-cli-build/server/app/dashboard/environment.segments/_index.segment.rsc +8 -0
  407. package/app/.next-cli-build/server/app/dashboard/environment.segments/_tree.segment.rsc +6 -0
  408. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  410. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  411. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  412. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  416. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  418. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  419. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  421. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  422. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  425. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  426. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  427. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  428. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  429. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  431. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  432. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  435. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  436. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  437. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  438. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  439. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  440. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  441. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  442. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  446. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  447. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  449. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  450. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  452. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  453. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  456. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  457. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  458. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  459. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  460. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  461. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  462. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  463. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  464. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  466. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  467. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  468. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  469. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  470. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  471. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  472. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  473. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  474. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  476. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  477. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  478. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  479. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  480. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  481. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  485. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  486. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  488. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  495. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  496. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  500. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  502. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  503. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  505. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  506. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  510. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  512. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  515. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  519. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  520. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  522. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  523. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  524. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  525. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  528. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  529. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  530. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  531. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  532. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  533. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  534. package/app/.next-cli-build/server/app/index.html +1 -1
  535. package/app/.next-cli-build/server/app/index.rsc +4 -4
  536. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  537. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  538. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  539. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  540. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  541. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  542. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  543. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  544. package/app/.next-cli-build/server/app/landing.html +1 -1
  545. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  546. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  547. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  549. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  550. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  551. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  552. package/app/.next-cli-build/server/app/login/page.js +2 -2
  553. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  554. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  555. package/app/.next-cli-build/server/app/login.html +1 -1
  556. package/app/.next-cli-build/server/app/login.rsc +5 -5
  557. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  558. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  559. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  560. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  561. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  562. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  563. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  564. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  565. package/app/.next-cli-build/server/app/page.js +2 -2
  566. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  567. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  568. package/app/.next-cli-build/server/app-paths-manifest.json +5 -3
  569. package/app/.next-cli-build/server/chunks/2722.js +11 -11
  570. package/app/.next-cli-build/server/chunks/2966.js +1 -1
  571. package/app/.next-cli-build/server/chunks/3104.js +1 -1
  572. package/app/.next-cli-build/server/chunks/318.js +1 -1
  573. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  574. package/app/.next-cli-build/server/chunks/412.js +1 -1
  575. package/app/.next-cli-build/server/chunks/4161.js +1 -0
  576. package/app/.next-cli-build/server/chunks/4177.js +1 -1
  577. package/app/.next-cli-build/server/chunks/4380.js +1 -0
  578. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  579. package/app/.next-cli-build/server/chunks/4884.js +1 -1
  580. package/app/.next-cli-build/server/chunks/5024.js +1 -1
  581. package/app/.next-cli-build/server/chunks/6182.js +63 -0
  582. package/app/.next-cli-build/server/chunks/6298.js +1 -1
  583. package/app/.next-cli-build/server/chunks/706.js +1 -0
  584. package/app/.next-cli-build/server/chunks/7153.js +1 -0
  585. package/app/.next-cli-build/server/chunks/7501.js +1 -0
  586. package/app/.next-cli-build/server/chunks/7540.js +7 -7
  587. package/app/.next-cli-build/server/chunks/7774.js +15 -15
  588. package/app/.next-cli-build/server/chunks/7879.js +2 -2
  589. package/app/.next-cli-build/server/chunks/8271.js +1 -0
  590. package/app/.next-cli-build/server/chunks/8895.js +1 -1
  591. package/app/.next-cli-build/server/chunks/9489.js +2 -1
  592. package/app/.next-cli-build/server/chunks/9754.js +1 -0
  593. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  594. package/app/.next-cli-build/server/middleware.js +1 -1
  595. package/app/.next-cli-build/server/pages/404.html +1 -1
  596. package/app/.next-cli-build/server/pages/500.html +1 -1
  597. package/app/.next-cli-build/static/chunks/{1321-af234bd85e3c185f.js → 1321-54b4a8da412f1ce5.js} +1 -1
  598. package/app/.next-cli-build/static/chunks/{5497-203788669b701ef3.js → 5497-5e835b2348fa3ba4.js} +2 -2
  599. package/app/.next-cli-build/static/chunks/6069-16dfda64c3d754de.js +53 -0
  600. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-4c1e725bd992da4a.js +1 -0
  601. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/environment/page-c4bf05bcf846ba6d.js +1 -0
  602. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-442131997a40d2c6.js → page-e2ad254d0354082d.js} +1 -1
  603. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-1befb2cb37eac66d.js +10 -0
  604. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-29d3f0186b78fa76.js +1 -0
  605. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-62a53f4e6cbff359.js → page-bff87b71ed7474bb.js} +1 -1
  606. package/app/.next-cli-build/static/chunks/app/_global-error/page-478dd09cdaa20324.js +1 -0
  607. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-478dd09cdaa20324.js +1 -0
  608. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-478dd09cdaa20324.js +1 -0
  609. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-478dd09cdaa20324.js +1 -0
  610. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-478dd09cdaa20324.js +1 -0
  611. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-478dd09cdaa20324.js +1 -0
  612. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-478dd09cdaa20324.js +1 -0
  613. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-478dd09cdaa20324.js +1 -0
  614. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-478dd09cdaa20324.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-478dd09cdaa20324.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-478dd09cdaa20324.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-478dd09cdaa20324.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-478dd09cdaa20324.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-478dd09cdaa20324.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-478dd09cdaa20324.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-478dd09cdaa20324.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-478dd09cdaa20324.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-478dd09cdaa20324.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-478dd09cdaa20324.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-478dd09cdaa20324.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-478dd09cdaa20324.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-478dd09cdaa20324.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-478dd09cdaa20324.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-478dd09cdaa20324.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-478dd09cdaa20324.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-478dd09cdaa20324.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/combos/route-478dd09cdaa20324.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/health/route-478dd09cdaa20324.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/init/route-478dd09cdaa20324.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-478dd09cdaa20324.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/keys/route-478dd09cdaa20324.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/locale/route-478dd09cdaa20324.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-478dd09cdaa20324.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-478dd09cdaa20324.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-478dd09cdaa20324.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-478dd09cdaa20324.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-478dd09cdaa20324.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-478dd09cdaa20324.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-478dd09cdaa20324.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-478dd09cdaa20324.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-478dd09cdaa20324.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-478dd09cdaa20324.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-478dd09cdaa20324.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/models/route-478dd09cdaa20324.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/models/test/route-478dd09cdaa20324.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-478dd09cdaa20324.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-478dd09cdaa20324.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-478dd09cdaa20324.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-478dd09cdaa20324.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-478dd09cdaa20324.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-478dd09cdaa20324.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-478dd09cdaa20324.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-478dd09cdaa20324.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-478dd09cdaa20324.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-478dd09cdaa20324.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-478dd09cdaa20324.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/pricing/route-478dd09cdaa20324.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-478dd09cdaa20324.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-478dd09cdaa20324.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-478dd09cdaa20324.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-478dd09cdaa20324.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-478dd09cdaa20324.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-478dd09cdaa20324.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-478dd09cdaa20324.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-478dd09cdaa20324.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-478dd09cdaa20324.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/providers/route-478dd09cdaa20324.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-478dd09cdaa20324.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-478dd09cdaa20324.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-478dd09cdaa20324.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-478dd09cdaa20324.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-478dd09cdaa20324.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-478dd09cdaa20324.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-478dd09cdaa20324.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-478dd09cdaa20324.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-478dd09cdaa20324.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-478dd09cdaa20324.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/settings/environment/route-478dd09cdaa20324.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-478dd09cdaa20324.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-478dd09cdaa20324.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/settings/route-478dd09cdaa20324.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-478dd09cdaa20324.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/tags/route-478dd09cdaa20324.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-478dd09cdaa20324.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-478dd09cdaa20324.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-478dd09cdaa20324.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-478dd09cdaa20324.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-478dd09cdaa20324.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-478dd09cdaa20324.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-478dd09cdaa20324.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-478dd09cdaa20324.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-478dd09cdaa20324.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-478dd09cdaa20324.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-478dd09cdaa20324.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-478dd09cdaa20324.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-478dd09cdaa20324.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-478dd09cdaa20324.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-478dd09cdaa20324.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-478dd09cdaa20324.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-478dd09cdaa20324.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-478dd09cdaa20324.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-478dd09cdaa20324.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-478dd09cdaa20324.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-478dd09cdaa20324.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-478dd09cdaa20324.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-478dd09cdaa20324.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-478dd09cdaa20324.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-478dd09cdaa20324.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-478dd09cdaa20324.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-478dd09cdaa20324.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-478dd09cdaa20324.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-478dd09cdaa20324.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-478dd09cdaa20324.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-478dd09cdaa20324.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-478dd09cdaa20324.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-478dd09cdaa20324.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-478dd09cdaa20324.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-478dd09cdaa20324.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/v1/route-478dd09cdaa20324.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-478dd09cdaa20324.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-478dd09cdaa20324.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-478dd09cdaa20324.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-478dd09cdaa20324.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/version/route-478dd09cdaa20324.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-478dd09cdaa20324.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/version/update/route-478dd09cdaa20324.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/landing/page-6ea4d0e0696afdaf.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-478dd09cdaa20324.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/page-478dd09cdaa20324.js +1 -0
  735. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-478dd09cdaa20324.js +1 -0
  736. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-478dd09cdaa20324.js +1 -0
  737. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-478dd09cdaa20324.js +1 -0
  738. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-478dd09cdaa20324.js +1 -0
  739. package/app/.next-cli-build/static/cs-JIRZTHi1El1lFpGPT-/_buildManifest.js +1 -0
  740. package/app/.next-cli-build/static/css/d850c5a6fb4ab3c5.css +1 -0
  741. package/app/cli/.build-home/{.9router/db/backups/upgrade-0.5.1-to-0.5.2-0.5.2-20260617-190156 → .krouter/db}/data.sqlite +0 -0
  742. package/app/package.json +3 -2
  743. package/app/public/favicon.svg +5 -19
  744. package/app/src/lib/updater/updater.js +16 -6
  745. package/app/src/mitm/server.js +32 -32
  746. package/cli.js +76 -17
  747. package/hooks/postinstall.js +5 -5
  748. package/hooks/sqliteRuntime.js +17 -5
  749. package/hooks/trayRuntime.js +6 -6
  750. package/package.json +3 -3
  751. package/src/cli/api/client.js +19 -5
  752. package/src/cli/menus/cliTools.js +10 -6
  753. package/src/cli/terminalUI.js +2 -2
  754. package/src/cli/tray/autostart.js +158 -30
  755. package/src/cli/tray/icon.ico +0 -0
  756. package/src/cli/tray/icon.png +0 -0
  757. package/src/cli/tray/tray.js +5 -5
  758. package/src/cli/tray/tray.ps1 +1 -1
  759. package/app/.next-cli-build/server/chunks/1051.js +0 -1
  760. package/app/.next-cli-build/server/chunks/1260.js +0 -1
  761. package/app/.next-cli-build/server/chunks/3529.js +0 -1
  762. package/app/.next-cli-build/server/chunks/6811.js +0 -1
  763. package/app/.next-cli-build/server/chunks/71.js +0 -1
  764. package/app/.next-cli-build/server/chunks/8255.js +0 -1
  765. package/app/.next-cli-build/server/chunks/915.js +0 -63
  766. package/app/.next-cli-build/static/GetUlhAf36B8GeUeChMFM/_buildManifest.js +0 -1
  767. package/app/.next-cli-build/static/chunks/6069-6837f0e0d8eeeb28.js +0 -53
  768. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-f756ee83816a63f2.js +0 -1
  769. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-71a6700f4f0a01dc.js +0 -10
  770. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-04d3612075e922f8.js +0 -1
  771. package/app/.next-cli-build/static/chunks/app/_global-error/page-45e7abb74f49cc88.js +0 -1
  772. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-45e7abb74f49cc88.js +0 -1
  773. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-45e7abb74f49cc88.js +0 -1
  774. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-45e7abb74f49cc88.js +0 -1
  775. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-45e7abb74f49cc88.js +0 -1
  776. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-45e7abb74f49cc88.js +0 -1
  777. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-45e7abb74f49cc88.js +0 -1
  778. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-45e7abb74f49cc88.js +0 -1
  779. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-45e7abb74f49cc88.js +0 -1
  780. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-45e7abb74f49cc88.js +0 -1
  781. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-45e7abb74f49cc88.js +0 -1
  782. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-45e7abb74f49cc88.js +0 -1
  783. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-45e7abb74f49cc88.js +0 -1
  784. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-45e7abb74f49cc88.js +0 -1
  785. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-45e7abb74f49cc88.js +0 -1
  786. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-45e7abb74f49cc88.js +0 -1
  787. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-45e7abb74f49cc88.js +0 -1
  788. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-45e7abb74f49cc88.js +0 -1
  789. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-45e7abb74f49cc88.js +0 -1
  790. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-45e7abb74f49cc88.js +0 -1
  791. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-45e7abb74f49cc88.js +0 -1
  792. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-45e7abb74f49cc88.js +0 -1
  793. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-45e7abb74f49cc88.js +0 -1
  794. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-45e7abb74f49cc88.js +0 -1
  795. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-45e7abb74f49cc88.js +0 -1
  796. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-45e7abb74f49cc88.js +0 -1
  797. package/app/.next-cli-build/static/chunks/app/api/combos/route-45e7abb74f49cc88.js +0 -1
  798. package/app/.next-cli-build/static/chunks/app/api/health/route-45e7abb74f49cc88.js +0 -1
  799. package/app/.next-cli-build/static/chunks/app/api/init/route-45e7abb74f49cc88.js +0 -1
  800. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-45e7abb74f49cc88.js +0 -1
  801. package/app/.next-cli-build/static/chunks/app/api/keys/route-45e7abb74f49cc88.js +0 -1
  802. package/app/.next-cli-build/static/chunks/app/api/locale/route-45e7abb74f49cc88.js +0 -1
  803. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-45e7abb74f49cc88.js +0 -1
  804. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-45e7abb74f49cc88.js +0 -1
  805. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-45e7abb74f49cc88.js +0 -1
  806. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-45e7abb74f49cc88.js +0 -1
  807. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-45e7abb74f49cc88.js +0 -1
  808. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-45e7abb74f49cc88.js +0 -1
  809. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-45e7abb74f49cc88.js +0 -1
  810. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-45e7abb74f49cc88.js +0 -1
  811. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-45e7abb74f49cc88.js +0 -1
  812. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-45e7abb74f49cc88.js +0 -1
  813. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-45e7abb74f49cc88.js +0 -1
  814. package/app/.next-cli-build/static/chunks/app/api/models/route-45e7abb74f49cc88.js +0 -1
  815. package/app/.next-cli-build/static/chunks/app/api/models/test/route-45e7abb74f49cc88.js +0 -1
  816. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-45e7abb74f49cc88.js +0 -1
  817. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-45e7abb74f49cc88.js +0 -1
  818. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-45e7abb74f49cc88.js +0 -1
  819. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-45e7abb74f49cc88.js +0 -1
  820. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-45e7abb74f49cc88.js +0 -1
  821. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-45e7abb74f49cc88.js +0 -1
  822. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-45e7abb74f49cc88.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-45e7abb74f49cc88.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-45e7abb74f49cc88.js +0 -1
  825. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-45e7abb74f49cc88.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-45e7abb74f49cc88.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/api/pricing/route-45e7abb74f49cc88.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-45e7abb74f49cc88.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-45e7abb74f49cc88.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-45e7abb74f49cc88.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-45e7abb74f49cc88.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-45e7abb74f49cc88.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-45e7abb74f49cc88.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-45e7abb74f49cc88.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-45e7abb74f49cc88.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-45e7abb74f49cc88.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/api/providers/route-45e7abb74f49cc88.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-45e7abb74f49cc88.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-45e7abb74f49cc88.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-45e7abb74f49cc88.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-45e7abb74f49cc88.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-45e7abb74f49cc88.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-45e7abb74f49cc88.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-45e7abb74f49cc88.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-45e7abb74f49cc88.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-45e7abb74f49cc88.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-45e7abb74f49cc88.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-45e7abb74f49cc88.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-45e7abb74f49cc88.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/settings/route-45e7abb74f49cc88.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-45e7abb74f49cc88.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/tags/route-45e7abb74f49cc88.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-45e7abb74f49cc88.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-45e7abb74f49cc88.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-45e7abb74f49cc88.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-45e7abb74f49cc88.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-45e7abb74f49cc88.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-45e7abb74f49cc88.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-45e7abb74f49cc88.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-45e7abb74f49cc88.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-45e7abb74f49cc88.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-45e7abb74f49cc88.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-45e7abb74f49cc88.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-45e7abb74f49cc88.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-45e7abb74f49cc88.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-45e7abb74f49cc88.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-45e7abb74f49cc88.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-45e7abb74f49cc88.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-45e7abb74f49cc88.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-45e7abb74f49cc88.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-45e7abb74f49cc88.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-45e7abb74f49cc88.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-45e7abb74f49cc88.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-45e7abb74f49cc88.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-45e7abb74f49cc88.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-45e7abb74f49cc88.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-45e7abb74f49cc88.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-45e7abb74f49cc88.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-45e7abb74f49cc88.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-45e7abb74f49cc88.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-45e7abb74f49cc88.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-45e7abb74f49cc88.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-45e7abb74f49cc88.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-45e7abb74f49cc88.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-45e7abb74f49cc88.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-45e7abb74f49cc88.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-45e7abb74f49cc88.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/v1/route-45e7abb74f49cc88.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-45e7abb74f49cc88.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-45e7abb74f49cc88.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-45e7abb74f49cc88.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-45e7abb74f49cc88.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/version/route-45e7abb74f49cc88.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-45e7abb74f49cc88.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/version/update/route-45e7abb74f49cc88.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/landing/page-fcd19da612ef903f.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-45e7abb74f49cc88.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/page-45e7abb74f49cc88.js +0 -1
  899. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-45e7abb74f49cc88.js +0 -1
  900. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-45e7abb74f49cc88.js +0 -1
  901. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-45e7abb74f49cc88.js +0 -1
  902. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-45e7abb74f49cc88.js +0 -1
  903. package/app/.next-cli-build/static/css/9116556a04eab3b0.css +0 -1
  904. package/app/cli/.build-home/.9router/db/backups/upgrade-0.5.2-to-0.5.3-0.5.3-20260617-190532/data.sqlite +0 -0
  905. /package/app/.next-cli-build/static/{GetUlhAf36B8GeUeChMFM → cs-JIRZTHi1El1lFpGPT-}/_ssgManifest.js +0 -0
  906. /package/app/cli/.build-home/{.9router → .krouter}/db/backups/upgrade-0.5.3-to-0.5.4-0.5.4-20260618-020746/data.sqlite +0 -0
  907. /package/app/cli/.build-home/{.9router → .krouter}/db/backups/upgrade-0.5.4-to-0.5.5-0.5.5-20260618-022155/data.sqlite +0 -0
  908. /package/app/cli/.build-home/{.9router → .krouter}/db/backups/upgrade-0.5.5-to-0.5.6-0.5.6-20260618-023500/data.sqlite +0 -0
  909. /package/app/cli/.build-home/{.9router/db → .krouter/db/backups/upgrade-0.5.6-to-0.5.7-0.5.7-20260618-205427}/data.sqlite +0 -0
  910. /package/app/cli/.build-home/{.9router → .krouter}/jwt-secret +0 -0
  911. /package/app/cli/.build-home/{.9router → .krouter}/machine-id +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{47295:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var l=s(95155),a=s(12115),r=s(44923),o=s(87256),i=s(39768),n=s(5020),c=s(35497),d=s(11059);s(52679);let m=/^[a-zA-Z0-9_.\-]+$/;function x(){let[e,t]=(0,a.useState)([]),[s,r]=(0,a.useState)(!0),[o,i]=(0,a.useState)(!1),[n,m]=(0,a.useState)(null),[x,u]=(0,a.useState)([]),[p,f]=(0,a.useState)({}),[g,j]=(0,a.useState)(null),{copied:y,copy:v}=(0,d.C)();(0,a.useEffect)(()=>{w()},[]);let w=async()=>{try{let[e,s,l]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings")]),a=await e.json(),r=await s.json(),o=l.ok?await l.json():{};e.ok&&t((a.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),s.ok&&u(r.connections||[]),f(o.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{r(!1)}},N=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await w(),i(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},k=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await w(),m(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},C=async s=>{j({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{j(null);try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&t(e.filter(e=>e.id!==s))}catch(e){console.log("Error deleting combo:",e)}}})},S=async(e,t)=>{try{let s={...p},l={...s[e]||{},...t};l.fallbackStrategy&&"fallback"!==l.fallbackStrategy?s[e]=l:delete s[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})}),f(s)}catch(e){console.log("Error updating combo strategy:",e)}};return s?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(c.Qv,{}),(0,l.jsx)(c.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:"Create model combos with fallback support"})]}),(0,l.jsx)(c.$n,{icon:"add",onClick:()=>i(!0),className:"w-full sm:w-auto",children:"Create Combo"})]}),0===e.length?(0,l.jsx)(c.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)(c.$n,{icon:"add",onClick:()=>i(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,l.jsx)("div",{className:"flex flex-col gap-4",children:e.map(e=>(0,l.jsx)(h,{combo:e,activeProviders:x,copied:y,onCopy:v,onEdit:()=>m(e),onDelete:()=>C(e.id),strategy:p[e.name]||{},onSetStrategy:t=>S(e.name,t)},e.id))}),(0,l.jsx)(b,{isOpen:o,onClose:()=>i(!1),onSave:N,activeProviders:x},"create"),(0,l.jsx)(b,{isOpen:!!n,combo:n,onClose:()=>m(null),onSave:e=>k(n.id,e),activeProviders:x},n?.id||"new"),(0,l.jsx)(c.uo,{isOpen:!!g,onClose:()=>j(null),onConfirm:g?.onConfirm,title:g?.title||"Confirm",message:g?.message,variant:"danger"})]})}let u=[{value:"fallback",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate"},{value:"fusion",label:"Fusion — panel + judge"}];function h({combo:e,activeProviders:t=[],copied:s,onCopy:r,onEdit:o,onDelete:i,strategy:n={},onSetStrategy:d}){let[m,x]=(0,a.useState)(!1),p=n.fallbackStrategy||"fallback",b=n.judgeModel||"";return(0,l.jsxs)(c.Zp,{padding:"sm",className:"group",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)("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"===p&&(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",{onClick:()=>x(!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 hover:border-primary hover:bg-primary/5 transition-colors",title:"Pick the model that fuses 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",{onClick:()=>d({judgeModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:"Reset judge to Auto",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)(c.l6,{options:u,value:p,onChange:e=>d({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:s===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:o,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:i,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"})]})]})]})]}),(0,l.jsx)(c.rq,{isOpen:m,onClose:()=>x(!1),onSelect:e=>{d({judgeModel:e?.value||""}),x(!1)},activeProviders:t,title:"Select Judge Model",addedModelValues:b?[b]:[],closeOnSelect:!0})]})}function p({id:e,index:t,model:s,isFirst:r,isLast:n,onEdit:c,onMoveUp:d,onMoveDown:m,onRemove:x}){let{attributes:u,listeners:h,setNodeRef:b,transform:f,isDragging:g}=(0,o.gl)({id:e}),j={transform:i.Ks.Transform.toString(f),opacity:g?.4:1,zIndex:g?999:void 0},[y,v]=(0,a.useState)(!1),[w,N]=(0,a.useState)(s),k=()=>{let e=w.trim();e&&e!==s?c(e):N(s),v(!1)};return(0,l.jsxs)("div",{ref:b,style:j,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,...h,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:w,onChange:e=>N(e.target.value),onBlur:k,onKeyDown:e=>{"Enter"===e.key&&k(),"Escape"===e.key&&(N(s),v(!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:()=>v(!0),title:"Click to edit",children:s}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,l.jsx)("button",{onClick:d,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:n,className:`p-0.5 rounded ${n?"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 b({isOpen:e,combo:t,onClose:s,onSave:i,activeProviders:d,kindFilter:x=null}){let[u,h]=(0,a.useState)(t?.name||""),[f,g]=(0,a.useState)(t?.models||[]),[j,y]=(0,a.useState)(!1),[v,w]=(0,a.useState)(!1),[N,k]=(0,a.useState)(""),[C,S]=(0,a.useState)({}),E=(0,r.FR)((0,r.MS)(r.AN,{activationConstraint:{distance:5}}),(0,r.MS)(r.uN,{coordinateGetter:o.JR})),M=f.map((e,t)=>({uid:`item-${t}`,model:e})),O=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();S(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,a.useEffect)(()=>{e&&O()},[e]);let $=e=>e.trim()?m.test(e)?(k(""),!0):(k("Only letters, numbers, -, _ and . allowed"),!1):(k("Name is required"),!1),_=async()=>{$(u)&&(w(!0),await i({name:u.trim(),models:f}),w(!1))},D=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.aF,{isOpen:e,onClose:s,title:D?"Edit Combo":"Create Combo",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.pd,{label:"Combo Name",value:u,onChange:e=>{let t=e.target.value;h(t),t?$(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===f.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:E,collisionDetection:r.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=M.findIndex(e=>e.uid===t.id),l=M.findIndex(e=>e.uid===s.id);-1!==e&&-1!==l&&g(t=>(0,o.be)(t,e,l))}},modifiers:[n.FN,n.gj],children:(0,l.jsx)(o.gB,{items:M.map(e=>e.uid),strategy:o._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:M.map(({uid:e,model:t},s)=>(0,l.jsx)(p,{id:e,index:s,model:t,isFirst:0===s,isLast:s===M.length-1,onEdit:e=>{let t=[...f];t[s]=e,g(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...f];[t[e-1],t[e]]=[t[e],t[e-1]],g(t)})(s),onMoveDown:()=>(e=>{if(e===f.length-1)return;let t=[...f];[t[e],t[e+1]]=[t[e+1],t[e]],g(t)})(s),onRemove:()=>{g(f.filter((e,t)=>t!==s))}},e))})})}),(0,l.jsxs)("button",{onClick:()=>y(!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)(c.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(c.$n,{onClick:_,fullWidth:!0,size:"sm",disabled:!u.trim()||!!N||v,children:v?"Saving...":D?"Save":"Create"})]})]})}),(0,l.jsx)(c.rq,{isOpen:j,onClose:()=>y(!1),onSelect:e=>{f.includes(e.value)||g([...f,e.value])},onDeselect:e=>{g(f.filter(t=>t!==e.value))},activeProviders:d,modelAliases:C,title:"Add Model to Combo",kindFilter:x,addedModelValues:f,closeOnSelect:!1})]})}},67172:(e,t,s)=>{Promise.resolve().then(s.bind(s,47295))}},e=>{e.O(0,[2574,3862,2649,7055,1321,5497,8441,3794,7358],()=>e(e.s=67172)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3811],{14976:(e,t,s)=>{Promise.resolve().then(s.bind(s,61521))},61521:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var a=s(95155),r=s(12115),n=s(35497);function l(){let[e,t]=(0,r.useState)(!0),[s,l]=(0,r.useState)({categories:[],vars:[]}),[i,d]=(0,r.useState)(""),[x,o]=(0,r.useState)(()=>new Set),[m,p]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch("/api/settings/environment",{cache:"no-store"}).then(e=>e.ok?e.json():Promise.reject()).then(e=>l(e)).catch(()=>{}).finally(()=>t(!1))},[]);let h=(0,r.useMemo)(()=>{let e=i.trim().toLowerCase(),t=new Map;for(let a of s.vars){if(m&&!a.isSet||e&&!`${a.name} ${a.desc}`.toLowerCase().includes(e))continue;let s=t.get(a.category)||[];s.push(a),t.set(a.category,s)}return t},[s.vars,i,m]),u=s.vars.filter(e=>e.isSet).length;return e?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(n.Qv,{}),(0,a.jsx)(n.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold",children:"Environment"}),(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Every environment variable kRouter recognizes, what it does, and whether it's currently set on this process. Secrets are masked — click the eye icon to reveal."," ",(0,a.jsxs)("span",{className:"text-text-main font-medium",children:[u,"/",s.vars.length," set."]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 sm:items-center",children:[(0,a.jsx)("input",{type:"text",value:i,onChange:e=>d(e.target.value),placeholder:"Search by name or description…",className:"flex-1 px-3 py-2 rounded-lg bg-surface-2 border border-border text-sm focus:outline-none focus:ring-2 focus:ring-primary/30"}),(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-muted whitespace-nowrap cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",checked:m,onChange:e=>p(e.target.checked),className:"size-4 accent-primary"}),"Only show set"]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[s.categories.map(e=>{let t=h.get(e.key)||[];return 0===t.length?null:(0,a.jsxs)(n.Zp,{padding:"sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:e.icon}),(0,a.jsx)("h2",{className:"text-base font-semibold",children:e.label}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["(",t.length,")"]})]}),(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:t.map(e=>(0,a.jsx)(c,{v:e,revealed:x.has(e.name),onToggleReveal:()=>{let t=new Set(x);t.has(e.name)?t.delete(e.name):t.add(e.name),o(t)}},e.name))})]},e.key)}),0===h.size&&(0,a.jsx)(n.Zp,{padding:"sm",children:(0,a.jsx)("p",{className:"text-sm text-text-muted text-center py-4",children:"No env vars match the current filter."})})]})]})}function c({v:e,revealed:t,onToggleReveal:s}){return e.isSet&&e.secret,(0,a.jsxs)("div",{className:`flex flex-col sm:flex-row sm:items-start gap-2 sm:gap-3 rounded-md px-2 py-2 ${e.deprecated?"bg-amber-500/[0.04] border border-amber-500/20":e.isSet?"bg-green-500/[0.03] border border-transparent":"border border-transparent"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0 sm:w-[280px] shrink-0",children:[(0,a.jsx)("code",{className:"text-xs font-mono font-medium truncate",children:e.name}),e.deprecated&&(0,a.jsx)("span",{className:"text-[10px] uppercase tracking-wide font-bold px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600 dark:text-amber-400 shrink-0",children:"deprecated"}),e.isSet&&(0,a.jsx)("span",{className:"text-[10px] uppercase tracking-wide font-bold px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 dark:text-green-400 shrink-0",children:"set"})]}),(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc}),(0,a.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:e.isSet?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("code",{className:"text-xs font-mono truncate bg-black/5 dark:bg-white/5 px-1.5 py-0.5 rounded",children:e.value}),e.secret&&(0,a.jsx)("button",{onClick:s,className:"shrink-0 text-text-muted hover:text-primary transition-colors",title:t?"Hide value":"Reveal (still masked)",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:t?"visibility_off":"visibility"})})]}):(0,a.jsxs)("span",{className:"text-xs text-text-muted italic",children:["default: ",(0,a.jsx)("code",{className:"font-mono",children:e.default})]})})]})]})}}},e=>{e.O(0,[2574,3862,2649,1321,5497,8441,3794,7358],()=>e(e.s=14976)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{38048:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var a=s(95155),r=s(12115),o=s(73321),i=s(35497),l=s(81127),n=s(21931),d=s(1620),c=s(31474),m=s(90620),x=s(93308),p=s(38202);function u(){let e=(0,o.useRouter)(),{theme:t,setTheme:s,isDark:u}=(0,d.D)(),[h,b]=(0,r.useState)("en"),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)(!1),[v,C]=(0,r.useState)({fallbackStrategy:"fill-first"}),[k,S]=(0,r.useState)(!0),[P,O]=(0,r.useState)({current:"",new:"",confirm:""}),[I,L]=(0,r.useState)({type:"",message:""}),[R,D]=(0,r.useState)(!1),[U,T]=(0,r.useState)(!1),[A,M]=(0,r.useState)({type:"",message:""}),[$,E]=(0,r.useState)({open:!1,mode:"",password:""}),F=(0,r.useRef)(null),[q,J]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[_,H]=(0,r.useState)(""),[K,Z]=(0,r.useState)({type:"",message:""}),[z,B]=(0,r.useState)(!1),[W,Q]=(0,r.useState)(!1),[G,V]=(0,r.useState)({type:"",message:""}),[Y,X]=(0,r.useState)("/api/auth/oidc/callback"),[ee,et]=(0,r.useState)(!1),es=(0,r.useRef)(null),[ea,er]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[eo,ei]=(0,r.useState)({type:"",message:""}),[el,en]=(0,r.useState)(!1),[ed,ec]=(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=>{C(e),J({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),H(""),(e?.authMode==="oidc"||e?.authMode==="both")&&et(!0),er({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),S(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),S(!1)})},[]),(0,r.useEffect)(()=>{X(`${window.location.origin}/api/auth/oidc/callback`)},[]);let em=async e=>{if(e.preventDefault(),!0===v.outboundProxyEnabled){en(!0),ei({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:ea.outboundProxyUrl,outboundNoProxy:ea.outboundNoProxy})}),t=await e.json();e.ok?(C(e=>({...e,...t})),ei({type:"success",message:"Proxy settings applied"})):ei({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){ei({type:"error",message:"An error occurred"})}finally{en(!1)}}},ex=async()=>{if(!0!==v.outboundProxyEnabled)return;let e=(ea.outboundProxyUrl||"").trim();if(!e)return void ei({type:"error",message:"Please enter a Proxy URL to test"});ec(!0),ei({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?ei({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):ei({type:"error",message:s?.error||"Proxy test failed"})}catch(e){ei({type:"error",message:"An error occurred"})}finally{ec(!1)}},ep=async e=>{en(!0),ei({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?(C(e=>({...e,...s})),er(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),ei({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):ei({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){ei({type:"error",message:"An error occurred"})}finally{en(!1)}},eu=async e=>{if(e.preventDefault(),P.new!==P.confirm)return void L({type:"error",message:"Passwords do not match"});D(!0),L({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:P.current,newPassword:P.new})}),t=await e.json();e.ok?(L({type:"success",message:"Password updated successfully"}),O({current:"",new:"",confirm:""})):L({type:"error",message:t.error||"Failed to update password"})}catch(e){L({type:"error",message:"An error occurred"})}finally{D(!1)}},eh=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&C(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eb=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&C(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eg=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&&C(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},ey=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&&C(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},ef=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&C(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ej=(e,t)=>{J(s=>({...s,[e]:t}))},ew=async(e=q.authMode||"password")=>{let t=q.oidcIssuerUrl.trim(),s=q.oidcClientId.trim(),a=q.oidcScopes.trim(),r=q.oidcLoginLabel.trim(),o=_.trim();if("password"!==e&&(!t||!s||!o)&&!v.oidcConfigured)return void Z({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});B(!0),Z({type:"",message:""}),V({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(C(e=>({...e,...n})),J({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"}),H(""),Z({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):Z({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){Z({type:"error",message:"An error occurred"})}finally{B(!1)}},eN=async()=>{let e=q.oidcIssuerUrl.trim(),t=q.oidcClientId.trim(),s=q.oidcScopes.trim(),a=_.trim();if(!e||!t)return void V({type:"error",message:"Issuer URL and client ID are required to test the connection."});Q(!0),Z({type:"",message:""}),V({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:q.authMode||v.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:q.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void V({type:"error",message:o.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:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;V({type:"success",message:e})}else V({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){V({type:"error",message:"An error occurred"})}finally{Q(!1)}},ev=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&C(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eC=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();C(t)}catch(e){console.error("Failed to reload settings:",e)}},ek=async e=>{T(!0),M({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");i.href=o,i.download=`9router-backup-${l}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),M({type:"success",message:"Database backup downloaded"})}catch(e){M({type:"error",message:e.message||"Failed to export database"})}finally{T(!1)}},eS=async e=>{let t=F.current;if(t){T(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eC(),M({type:"success",message:"Database imported successfully"})}catch(e){M({type:"error",message:e.message||"Invalid backup file"})}finally{F.current=null,T(!1)}}},eP=async()=>{let{mode:e,password:t}=$;E({open:!1,mode:"",password:""}),"export"===e?await ek(t):"import"===e&&await eS(t)},eO=!0===v.enableObservability,eI=async()=>{N(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}N(!1),j(!1)},eL=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:"~/.9router/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:()=>E({open:!0,mode:"export",password:""}),loading:U,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(i.$n,{variant:"outline",icon:"upload",onClick:()=>es.current?.click(),disabled:U,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:es,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];es.current&&(es.current.value=""),t&&(F.current=t,M({type:"",message:""}),E({open:!0,mode:"import",password:""}))}})]}),A.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===A.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:A.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:p.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===v.requireLogin,onChange:()=>ef(!v.requireLogin),disabled:k})]}),!0===v.requireLogin&&(0,a.jsxs)("form",{onSubmit:eu,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[v.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:P.current,onChange:e=>O({...P,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:P.new,onChange:e=>O({...P,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:P.confirm,onChange:e=>O({...P,confirm:e.target.value}),required:!0})]})]}),I.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===I.type?"text-red-500":"text-green-500"}`,children:I.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:R,className:"w-full sm:w-auto",children:v.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>et(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"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"===v.authMode?"OIDC active":"both"===v.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:ee?"expand_less":"expand_more"})]}),ee&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"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=q.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ej("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:k||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/9router/",value:q.oidcIssuerUrl,onChange:e=>ej("oidcIssuerUrl",e.target.value),disabled:k||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:"9router-dashboard",value:q.oidcClientId,onChange:e=>ej("oidcClientId",e.target.value),disabled:k||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:_,onChange:e=>H(e.target.value),disabled:k||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:q.oidcScopes,onChange:e=>ej("oidcScopes",e.target.value),disabled:k||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:q.oidcLoginLabel,onChange:e=>ej("oidcLoginLabel",e.target.value),disabled:k||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:Y})]}),(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:()=>ew(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(i.$n,{type:"button",variant:"outline",loading:W,onClick:eN,className:"w-full sm:w-auto",children:"Test connection"})]}),G.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===G.type?"text-red-500":"text-green-500"}`,children:G.message}),K.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===K.type?"text-red-500":"text-green-500"}`,children:K.message}),"oidc"===v.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"===v.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)("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"===v.fallbackStrategy,onChange:()=>eh("round-robin"===v.fallbackStrategy?"fill-first":"round-robin"),disabled:k})]}),"round-robin"===v.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:v.stickyRoundRobinLimit||3,onChange:e=>eg(e.target.value),disabled:k,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"===v.comboStrategy,onChange:()=>eb("round-robin"===v.comboStrategy?"fallback":"round-robin"),disabled:k})]}),"round-robin"===v.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:v.comboStickyRoundRobinLimit||1,onChange:e=>ey(e.target.value),disabled:k,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"===v.fallbackStrategy?`Currently distributing requests across all available accounts with ${v.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===v.comboStrategy?` Combos rotate after ${v.comboStickyRoundRobinLimit||1} call${1===(v.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===v.outboundProxyEnabled,onChange:()=>ep(!0!==v.outboundProxyEnabled),disabled:k||el})]}),!0===v.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:em,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:ea.outboundProxyUrl,onChange:e=>er(t=>({...t,outboundProxyUrl:e.target.value})),disabled:k||el}),(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:ea.outboundNoProxy,onChange:e=>er(t=>({...t,outboundNoProxy:e.target.value})),disabled:k||el}),(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:ed,disabled:k||el,onClick:ex,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:el,className:"w-full sm:w-auto",children:"Apply"})]})]}),eo.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===eo.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:eo.message})]})]}),(0,a.jsxs)(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:eO,onChange:ev,disabled:k})]})]}),(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:eL,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)(l.ConfirmModal,{isOpen:f,onClose:()=>j(!1),onConfirm:eI,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:w}),(0,a.jsxs)(l.default,{isOpen:$.open,onClose:()=>E({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.$n,{variant:"ghost",onClick:()=>E({open:!1,mode:"",password:""}),disabled:U,children:"Cancel"}),(0,a.jsx)(i.$n,{variant:"primary",onClick:eP,loading:U,disabled:!$.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===$.mode?"export":"import"," the database."]}),(0,a.jsx)(i.pd,{type:"password",value:$.password,onChange:e=>E(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&$.password&&eP()},placeholder:"Current password",autoFocus:!0})]})]})}}},e=>{e.O(0,[2574,3862,2649,1321,5497,8441,3794,7358],()=>e(e.s=38048)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{38048:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var a=s(95155),r=s(12115),o=s(73321),i=s(35497),l=s(81127),n=s(21931),d=s(1620),c=s(31474),m=s(90620),x=s(93308),p=s(38202);function u(){let e=(0,o.useRouter)(),{theme:t,setTheme:s,isDark:u}=(0,d.D)(),[h,b]=(0,r.useState)("en"),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)(!1),[v,C]=(0,r.useState)({fallbackStrategy:"fill-first"}),[k,S]=(0,r.useState)(!0),[P,O]=(0,r.useState)({current:"",new:"",confirm:""}),[I,L]=(0,r.useState)({type:"",message:""}),[R,D]=(0,r.useState)(!1),[U,T]=(0,r.useState)(!1),[A,M]=(0,r.useState)({type:"",message:""}),[$,E]=(0,r.useState)({open:!1,mode:"",password:""}),F=(0,r.useRef)(null),[q,J]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[_,H]=(0,r.useState)(""),[K,Z]=(0,r.useState)({type:"",message:""}),[z,B]=(0,r.useState)(!1),[W,Q]=(0,r.useState)(!1),[G,V]=(0,r.useState)({type:"",message:""}),[Y,X]=(0,r.useState)("/api/auth/oidc/callback"),[ee,et]=(0,r.useState)(!1),es=(0,r.useRef)(null),[ea,er]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[eo,ei]=(0,r.useState)({type:"",message:""}),[el,en]=(0,r.useState)(!1),[ed,ec]=(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=>{C(e),J({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),H(""),(e?.authMode==="oidc"||e?.authMode==="both")&&et(!0),er({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),S(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),S(!1)})},[]),(0,r.useEffect)(()=>{X(`${window.location.origin}/api/auth/oidc/callback`)},[]);let em=async e=>{if(e.preventDefault(),!0===v.outboundProxyEnabled){en(!0),ei({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:ea.outboundProxyUrl,outboundNoProxy:ea.outboundNoProxy})}),t=await e.json();e.ok?(C(e=>({...e,...t})),ei({type:"success",message:"Proxy settings applied"})):ei({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){ei({type:"error",message:"An error occurred"})}finally{en(!1)}}},ex=async()=>{if(!0!==v.outboundProxyEnabled)return;let e=(ea.outboundProxyUrl||"").trim();if(!e)return void ei({type:"error",message:"Please enter a Proxy URL to test"});ec(!0),ei({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?ei({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):ei({type:"error",message:s?.error||"Proxy test failed"})}catch(e){ei({type:"error",message:"An error occurred"})}finally{ec(!1)}},ep=async e=>{en(!0),ei({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?(C(e=>({...e,...s})),er(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),ei({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):ei({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){ei({type:"error",message:"An error occurred"})}finally{en(!1)}},eu=async e=>{if(e.preventDefault(),P.new!==P.confirm)return void L({type:"error",message:"Passwords do not match"});D(!0),L({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:P.current,newPassword:P.new})}),t=await e.json();e.ok?(L({type:"success",message:"Password updated successfully"}),O({current:"",new:"",confirm:""})):L({type:"error",message:t.error||"Failed to update password"})}catch(e){L({type:"error",message:"An error occurred"})}finally{D(!1)}},eh=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&C(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eb=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&C(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eg=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&&C(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},ey=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&&C(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},ef=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&C(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ej=(e,t)=>{J(s=>({...s,[e]:t}))},ew=async(e=q.authMode||"password")=>{let t=q.oidcIssuerUrl.trim(),s=q.oidcClientId.trim(),a=q.oidcScopes.trim(),r=q.oidcLoginLabel.trim(),o=_.trim();if("password"!==e&&(!t||!s||!o)&&!v.oidcConfigured)return void Z({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});B(!0),Z({type:"",message:""}),V({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(C(e=>({...e,...n})),J({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"}),H(""),Z({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):Z({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){Z({type:"error",message:"An error occurred"})}finally{B(!1)}},eN=async()=>{let e=q.oidcIssuerUrl.trim(),t=q.oidcClientId.trim(),s=q.oidcScopes.trim(),a=_.trim();if(!e||!t)return void V({type:"error",message:"Issuer URL and client ID are required to test the connection."});Q(!0),Z({type:"",message:""}),V({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:q.authMode||v.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:q.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void V({type:"error",message:o.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:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;V({type:"success",message:e})}else V({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){V({type:"error",message:"An error occurred"})}finally{Q(!1)}},ev=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&C(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eC=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();C(t)}catch(e){console.error("Failed to reload settings:",e)}},ek=async e=>{T(!0),M({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");i.href=o,i.download=`9router-backup-${l}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),M({type:"success",message:"Database backup downloaded"})}catch(e){M({type:"error",message:e.message||"Failed to export database"})}finally{T(!1)}},eS=async e=>{let t=F.current;if(t){T(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eC(),M({type:"success",message:"Database imported successfully"})}catch(e){M({type:"error",message:e.message||"Invalid backup file"})}finally{F.current=null,T(!1)}}},eP=async()=>{let{mode:e,password:t}=$;E({open:!1,mode:"",password:""}),"export"===e?await ek(t):"import"===e&&await eS(t)},eO=!0===v.enableObservability,eI=async()=>{N(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}N(!1),j(!1)},eL=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:"~/.krouter/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:()=>E({open:!0,mode:"export",password:""}),loading:U,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(i.$n,{variant:"outline",icon:"upload",onClick:()=>es.current?.click(),disabled:U,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:es,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];es.current&&(es.current.value=""),t&&(F.current=t,M({type:"",message:""}),E({open:!0,mode:"import",password:""}))}})]}),A.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===A.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:A.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:p.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===v.requireLogin,onChange:()=>ef(!v.requireLogin),disabled:k})]}),!0===v.requireLogin&&(0,a.jsxs)("form",{onSubmit:eu,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[v.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:P.current,onChange:e=>O({...P,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:P.new,onChange:e=>O({...P,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:P.confirm,onChange:e=>O({...P,confirm:e.target.value}),required:!0})]})]}),I.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===I.type?"text-red-500":"text-green-500"}`,children:I.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:R,className:"w-full sm:w-auto",children:v.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>et(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"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"===v.authMode?"OIDC active":"both"===v.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:ee?"expand_less":"expand_more"})]}),ee&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"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=q.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ej("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:k||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/krouter/",value:q.oidcIssuerUrl,onChange:e=>ej("oidcIssuerUrl",e.target.value),disabled:k||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:"9router-dashboard",value:q.oidcClientId,onChange:e=>ej("oidcClientId",e.target.value),disabled:k||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:_,onChange:e=>H(e.target.value),disabled:k||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:q.oidcScopes,onChange:e=>ej("oidcScopes",e.target.value),disabled:k||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:q.oidcLoginLabel,onChange:e=>ej("oidcLoginLabel",e.target.value),disabled:k||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:Y})]}),(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:()=>ew(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(i.$n,{type:"button",variant:"outline",loading:W,onClick:eN,className:"w-full sm:w-auto",children:"Test connection"})]}),G.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===G.type?"text-red-500":"text-green-500"}`,children:G.message}),K.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===K.type?"text-red-500":"text-green-500"}`,children:K.message}),"oidc"===v.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"===v.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)("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"===v.fallbackStrategy,onChange:()=>eh("round-robin"===v.fallbackStrategy?"fill-first":"round-robin"),disabled:k})]}),"round-robin"===v.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:v.stickyRoundRobinLimit||3,onChange:e=>eg(e.target.value),disabled:k,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"===v.comboStrategy,onChange:()=>eb("round-robin"===v.comboStrategy?"fallback":"round-robin"),disabled:k})]}),"round-robin"===v.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:v.comboStickyRoundRobinLimit||1,onChange:e=>ey(e.target.value),disabled:k,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"===v.fallbackStrategy?`Currently distributing requests across all available accounts with ${v.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===v.comboStrategy?` Combos rotate after ${v.comboStickyRoundRobinLimit||1} call${1===(v.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===v.outboundProxyEnabled,onChange:()=>ep(!0!==v.outboundProxyEnabled),disabled:k||el})]}),!0===v.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:em,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:ea.outboundProxyUrl,onChange:e=>er(t=>({...t,outboundProxyUrl:e.target.value})),disabled:k||el}),(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:ea.outboundNoProxy,onChange:e=>er(t=>({...t,outboundNoProxy:e.target.value})),disabled:k||el}),(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:ed,disabled:k||el,onClick:ex,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:el,className:"w-full sm:w-auto",children:"Apply"})]})]}),eo.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===eo.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:eo.message})]})]}),(0,a.jsxs)(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:eO,onChange:ev,disabled:k})]})]}),(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:eL,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)(l.ConfirmModal,{isOpen:f,onClose:()=>j(!1),onConfirm:eI,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:w}),(0,a.jsxs)(l.default,{isOpen:$.open,onClose:()=>E({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.$n,{variant:"ghost",onClick:()=>E({open:!1,mode:"",password:""}),disabled:U,children:"Cancel"}),(0,a.jsx)(i.$n,{variant:"primary",onClick:eP,loading:U,disabled:!$.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===$.mode?"export":"import"," the database."]}),(0,a.jsx)(i.pd,{type:"password",value:$.password,onChange:e=>E(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&$.password&&eP()},placeholder:"Current password",autoFocus:!0})]})]})}}},e=>{e.O(0,[2574,3862,2649,1321,5497,8441,3794,7358],()=>e(e.s=38048)),_N_E=e.O()}]);
@@ -0,0 +1,10 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{76487:(e,t,s)=>{Promise.resolve().then(s.bind(s,77957))},77957:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>T});var a=s(95155),i=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(35497),c=s(52679),p=s(28777),m=s(11059),x=s(73006);let u=new Map;async function h(e){if(!e?.url||!e?.type)return[];let t=u.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return u.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}var f=s(14051),g=s.n(f);function y({model:e,fullModel:t,alias:s,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:c,isTesting:p,onDisable:m}){let x="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:x?{color:x}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:t}),e.name&&(0,a.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),c&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:c,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:p?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):m?(0,a.jsx)("button",{onClick:m,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function b({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function v({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:l,onCopy:r,onSetAlias:n,onDeleteAlias:o,connections:c,isAnthropic:p}){let[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[y,j]=(0,i.useState)(null),[N,w]=(0,i.useState)({}),k=async t=>{if(!y){j(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();w(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{w(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),S=a=>{let i,l=`${e}/${a}`;if(Object.values(s).includes(l))return null;let r=(i=a.split("/"))[i.length-1];if(!s[r])return r;let n=`${t}-${r}`;return s[n]?null:n},A=async()=>{if(!m.trim()||u)return;let t=m.trim(),s=S(t);if(!s)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await n(t,s,e),x("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},$=async()=>{if(f)return;let t=c.find(e=>!1!==e.isActive);if(t){g(!0);try{let s=await fetch(`/api/providers/${t.id}/models`),a=await s.json();if(!s.ok)return void alert(a.error||"Failed to import models");let i=a.models||[];if(0===i.length)return void alert("No models returned from /models.");let l=0;for(let t of i){let s=t.id||t.name||t.model;if(!s)continue;let a=S(s);a&&(await n(s,a,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{g(!1)}}},T=c.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",p?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:m,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&A(),placeholder:p?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:A,disabled:!m.trim()||u,children:u?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:$,disabled:!T||f,children:f?"Importing...":"Import from /models"})]}),!T&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({modelId:e,fullModel:s,alias:i})=>(0,a.jsx)(b,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>o(i),onTest:c.length>0?()=>k(e):void 0,testStatus:N[e],isTesting:y===e},s))})]})}function j({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function N({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:p,onEdit:m,onDelete:x,oneByOneStatus:u=null,autoPing:h=null}){let[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(!1),v=(0,i.useRef)(null),w=new Map((t||[]).map(e=>[e.id,e])),k=e.providerSpecificData?.proxyPoolId||null,C=k?w.get(k):null,S=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,A=!!k||S,$=C?`Pool: ${C.name}`:k?`Pool: ${k} (inactive/missing)`:S?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",T="";if(C?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=C?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);T=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{T=t}}let O=C?.noProxy||e.providerSpecificData?.connectionNoProxy||"",P="default";C?.isActive===!0?P="success":(k||S)&&(P="error"),(0,i.useEffect)(()=>{if(!f)return;let e=e=>{v.current&&!v.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let I=async e=>{b(!0);try{await p("__none__"===e?null:e)}finally{b(!1),g(!1)}},E=e.authType||(s?"oauth":"apikey"),R="oauth"===E,D="cookie"===E,_=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),U=R?_(e.email)?e.email:_(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",[z,q]=(0,i.useState)(!1),M=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{q(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=M?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[M]);let F="unavailable"!==e.testStatus||z?e.testStatus:"active",K=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:D?"cookie":R?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:U}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:!1===e.isActive?"default":"active"===F||"success"===F?"success":"error"===F||"expired"===F||"unavailable"===F?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":F||"Unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:R?"OAuth":D?"Cookie":"API Key"}),A&&(0,a.jsx)(d.Ex,{variant:P,size:"sm",children:"Proxy"}),z&&!1!==e.isActive&&(0,a.jsx)(j,{until:M}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),K()&&(0,a.jsx)(d.Ex,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:K()})]}),A&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:$,children:$}),T&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:T}),O&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:O,children:["no_proxy: ",O]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:v,children:[(0,a.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${A?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>I("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!k?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>I(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${k===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,a.jsx)(d.m_,{text:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",children:(0,a.jsxs)("button",{onClick:()=>h.onToggle(!h.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${h.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,a.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}y.propTypes={model:g().shape({id:g().string.isRequired}).isRequired,fullModel:g().string.isRequired,alias:g().string,copied:g().string,onCopy:g().func.isRequired,testStatus:g().oneOf(["ok","error"]),isCustom:g().bool,isFree:g().bool,onDeleteAlias:g().func,onTest:g().func,isTesting:g().bool,onDisable:g().func},g().string.isRequired,g().string.isRequired,g().string,g().func.isRequired,g().func.isRequired,g().func,g().oneOf(["ok","error"]),g().bool,g().string.isRequired,g().object.isRequired,g().string,g().func.isRequired,g().func.isRequired,g().func.isRequired,v.propTypes={providerStorageAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,modelAliases:g().object.isRequired,copied:g().string,onCopy:g().func.isRequired,onSetAlias:g().func.isRequired,onDeleteAlias:g().func.isRequired,connections:g().arrayOf(g().shape({id:g().string,isActive:g().bool})).isRequired,isAnthropic:g().bool},j.propTypes={until:g().string.isRequired},N.propTypes={connection:g().shape({id:g().string,name:g().string,email:g().string,displayName:g().string,modelLockUntil:g().string,testStatus:g().string,isActive:g().bool,lastError:g().string,priority:g().number,globalPriority:g().number}).isRequired,proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string,proxyUrl:g().string,noProxy:g().string,isActive:g().bool})),isOAuth:g().bool.isRequired,isFirst:g().bool.isRequired,isLast:g().bool.isRequired,onMoveUp:g().func.isRequired,onMoveDown:g().func.isRequired,onToggleActive:g().func.isRequired,onUpdateProxy:g().func,onEdit:g().func.isRequired,onDelete:g().func.isRequired,oneByOneStatus:g().shape({state:g().string,error:g().string}),autoPing:g().shape({on:g().bool,onToggle:g().func})};let w=`name1|sk-key1
2
+ name2|sk-key2
3
+ sk-key-only-auto-named`;function k({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:p,proxyPools:m,error:x,onSave:u,onBulkDone:h,onClose:f}){let g="__none__",y="ollama-local"===t,b="cookie"===n,v="xai"===t&&!b,j=b?"Cookie Value":"API Key",N="azure"===t,C="cloudflare-ai"===t,S=c.Q2?.[t]?.regions||null,A=c.Q2?.[t]?.defaultRegion||S?.[0]?.id||"",[$,T]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[O,P]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,E]=(0,i.useState)({accountId:""}),[R,D]=(0,i.useState)(A),[_,U]=(0,i.useState)(!1),[z,q]=(0,i.useState)(null),[M,F]=(0,i.useState)(!1),[K,L]=(0,i.useState)("single"),[J,B]=(0,i.useState)(""),[W,V]=(0,i.useState)(null),H=()=>y&&$.ollamaHostUrl.trim()?{baseUrl:$.ollamaHostUrl.trim()}:N?{azureEndpoint:O.azureEndpoint,apiVersion:O.apiVersion,deployment:O.deployment,organization:O.organization}:C?{accountId:I.accountId}:S&&R?{region:R}:void 0,G=async()=>{U(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:H()})}),s=await e.json();q(s.valid?"success":"failed")}catch{q("failed")}finally{U(!1)}},Q=async()=>{if(t&&(y||$.apiKey)&&(y||$.name)&&(!l||$.defaultModel.trim())){F(!0);try{let e=!1;try{U(!0),q(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:H()})});e=!!(await s.json()).valid,q(e?"success":"failed")}catch{q("failed")}finally{U(!1)}await u({name:$.name||(y?"Ollama Local":""),apiKey:$.apiKey,defaultModel:l?$.defaultModel.trim():void 0,priority:$.priority,proxyPoolId:$.proxyPoolId===g?null:$.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:H()})}finally{F(!1)}}},Z=async()=>{let e=J.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;F(!0),V(null);let s=0,a=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}F(!1),V({success:s,failed:a}),s>0&&h&&h()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===K?"primary":"ghost",onClick:()=>{L("single"),V(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===K?"primary":"ghost",onClick:()=>{L("bulk"),V(null)},children:"Bulk Add"})]}),"bulk"===K&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:w,value:J,onChange:e=>B(e.target.value)}),W&&(0,a.jsxs)("div",{className:`text-sm font-medium ${W.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",W.success," added",W.failed>0?`, ✗ ${W.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:M||!J.trim(),children:M?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===K&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:$.name,onChange:e=>T({...$,name:e.target.value}),placeholder:y?"Ollama Local":"Production Key"}),y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:$.ollamaHostUrl,onChange:e=>T({...$,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:G,disabled:_||M,variant:"secondary",children:_?"Checking...":"Check"})})]}),!y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:j,type:b?"text":"password",value:$.apiKey,onChange:e=>T({...$,apiKey:e.target.value}),placeholder:b?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:G,disabled:!$.apiKey||_||M,variant:"secondary",children:_?"Checking...":"Check"})})]}),v&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),b&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,p&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",p.replace(/^https?:\/\//,"")]})]})]}),S&&(0,a.jsx)(d.l6,{label:"Region",value:R,onChange:e=>D(e.target.value),options:S.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(d.pd,{label:"Default Model",value:$.defaultModel,onChange:e=>T({...$,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),y&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),z&&(0,a.jsx)(d.Ex,{variant:"success"===z?"success":"error",children:"success"===z?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),C&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:I.accountId,onChange:e=>E({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),N&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:O.azureEndpoint,onChange:e=>P({...O,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:O.deployment,onChange:e=>P({...O,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:O.apiVersion,onChange:e=>P({...O,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:O.organization,onChange:e=>P({...O,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:$.priority,onChange:e=>T({...$,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:$.proxyPoolId,onChange:e=>T({...$,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(m||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(m||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Q,fullWidth:!0,disabled:M||!y&&(!$.name||!$.apiKey)||l&&!$.defaultModel.trim()||N&&(!O.azureEndpoint||!O.deployment||!O.organization)||C&&!I.accountId,children:M?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function C({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,p]=(0,i.useState)(!1),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{p(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:m,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>x(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!m||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function S({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,p]=(0,i.useState)(null),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),p(null),x(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(n.trim());if(e){p("testing"),x("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();p(a.ok?"ok":"error"),x(a.error||"")}catch(e){p("error"),x(e.message)}}},y=async()=>{let e=f(n.trim());if(e&&!u){h(!0);try{await l(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),p(null),x("")},onKeyDown:e=>{"Enter"===e.key&&g()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(n.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:m||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!n.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}k.propTypes={isOpen:g().bool.isRequired,provider:g().string,providerName:g().string,isCompatible:g().bool,isAnthropic:g().bool,authType:g().string,authHint:g().string,website:g().string,proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string})),error:g().string,onSave:g().func.isRequired,onBulkDone:g().func,onClose:g().func.isRequired},C.propTypes={isOpen:g().bool.isRequired,node:g().shape({id:g().string,name:g().string,prefix:g().string,apiType:g().string,baseUrl:g().string}),onSave:g().func.isRequired,onClose:g().func.isRequired,isAnthropic:g().bool},S.propTypes={isOpen:g().bool.isRequired,providerAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,onSave:g().func.isRequired,onClose:g().func.isRequired};let A=`[
4
+ {
5
+ "accessToken": "eyJhbGc...",
6
+ "refreshToken": "rt_...",
7
+ "idToken": "eyJhbGc...",
8
+ "email": "user@example.com"
9
+ }
10
+ ]`;function $({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,i.useState)(""),[n,o]=(0,i.useState)(!1),[c,p]=(0,i.useState)(""),[m,u]=(0,i.useState)(null),h=()=>{n||(r(""),p(""),u(null),t())},f=async()=>{var e;let t;p(""),u(null);let a=l.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){p(`${(0,x.Tl)("Invalid JSON")}: ${e.message}`);return}let i=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!i||0===i.length)return void p((0,x.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:i})}),t=await e.json();if(!e.ok)return void p(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof s&&s()}catch(e){p(e.message||(0,x.Tl)("Request failed"))}finally{o(!1)}},g=m?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(d.aF,{isOpen:e,title:(0,x.Tl)("Bulk Add Codex Accounts"),onClose:h,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,x.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:A,value:l,onChange:e=>r(e.target.value),disabled:n}),c&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),m&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,x.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,x.Tl)("failed")}`:""]}),g.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:g.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:f,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,x.Tl)("Importing..."):(0,x.Tl)("Import All")}),(0,a.jsx)(d.$n,{onClick:h,variant:"ghost",fullWidth:!0,disabled:n,children:(0,x.Tl)("Close")})]})]})})}function T(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[u,f]=(0,i.useState)([]),[g,b]=(0,i.useState)(!0),[j,w]=(0,i.useState)(null),[A,T]=(0,i.useState)([]),[O,P]=(0,i.useState)(!1),[I,E]=(0,i.useState)(!1),[R,D]=(0,i.useState)(!1),[_,U]=(0,i.useState)(""),[z,q]=(0,i.useState)(!1),[M,F]=(0,i.useState)(!1),[K,L]=(0,i.useState)(!1),[J,B]=(0,i.useState)(!1),[W,V]=(0,i.useState)(null),[H,G]=(0,i.useState)({}),[Q,Z]=(0,i.useState)(!1),[X,Y]=(0,i.useState)({}),[ee,et]=(0,i.useState)(""),[es,ea]=(0,i.useState)(new Set),[ei,el]=(0,i.useState)(!1),[er,en]=(0,i.useState)(!1),[eo,ed]=(0,i.useState)([]),[ec,ep]=(0,i.useState)("__none__"),[em,ex]=(0,i.useState)(!1),[eu,eh]=(0,i.useState)(null),[ef,eg]=(0,i.useState)(""),[ey,eb]=(0,i.useState)("auto"),[ev,ej]=(0,i.useState)({enabled:!1,connections:{}}),[eN,ew]=(0,i.useState)([]),[ek,eC]=(0,i.useState)([]),[eS,eA]=(0,i.useState)(!1),[e$,eT]=(0,i.useState)(""),[eO,eP]=(0,i.useState)(new Set),[eI,eE]=(0,i.useState)([]),[eR,eD]=(0,i.useState)([]),[e_,eU]=(0,i.useState)(null),[ez,eq]=(0,i.useState)(!1),[eM,eF]=(0,i.useState)(!1),[eK,eL]=(0,i.useState)(!1),[eJ,eB]=(0,i.useState)(null),[eW,eV]=(0,i.useState)({}),[eH,eG]=(0,i.useState)(null),eQ=(0,i.useRef)(!1),[eZ,eX]=(0,i.useState)(!1),{copied:eY,copy:e0}=(0,m.C)(),e1="ag_risk_confirmed",e5=()=>{P(!0)},e2=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(e1)?eq(!0):e8?e5():(U(""),D(!0))},e4=()=>{U(""),D(!0)},e3=()=>{e8?e2():e4()},e6=j?{id:j.id,name:j.name||("anthropic-compatible"===j.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===j.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===j.type?"AC":"OC",apiType:j.apiType,baseUrl:j.baseUrl,type:j.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],e7=e6?.authModes||[],e8=!!c.zN[r]||!!c.IS[r]||e7.includes("oauth"),e9=!!c.fg[r]||e7.includes("apikey"),te=!!c.IS[r]?.noAuth,tt=(0,p.KC)(r),ts=(0,c.wG)(r),ta=(0,c.mq)(r),ti=(0,c.gb)(r),tl=ta||ti,tr=!tl&&e8&&e9,tn="xai"===r?"Grok Build OAuth":"OAuth",to="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let td=tl?r:ts,tc=tl?j?.prefix||r:ts,tp=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(td)}`,{cache:"no-store"}),t=await e.json();e.ok&&eD(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[td]),tm=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:td,ids:[e]})})).ok&&await tp()}catch(e){console.log("Error disabling model:",e)}},tx=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(td)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tp()}catch(e){console.log("Error enabling model:",e)}},tu=async e=>{e.length&&eU({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eU(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:td,ids:e})})).ok&&await tp()}catch(e){console.log("Error disabling all models:",e)}}})},th=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(td)}`,{method:"DELETE"})).ok&&await tp()}catch(e){console.log("Error enabling all models:",e)}},tf=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&G(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eE(e.models)}).catch(()=>{})},[r]);let tg=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),i=await e.json(),l=await t.json(),n=await s.json(),o=a.ok?await a.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===r);f(e)}s.ok&&T(n.proxyPools||[]);let d=(o.providerStrategies||{})[r]||{};eh(d.fallbackStrategy||null),eg(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1");let c=(o.providerThinking||{})[r]||{};eb(c.mode||"auto");let p=o.claudeAutoPing||{};if(ej({enabled:!0===p.enabled,connections:p.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&tl)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}w(e)}}catch(e){console.log("Error fetching connections:",e)}finally{b(!1)}},[r,tl]),ty=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(w(s.node),await tg(),L(!1))}catch(e){console.log("Error updating provider node:",e)}},tb=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[r]:l[r]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},tv=async(e,t)=>{ej({...ev,connections:{...ev.connections,[e]:t}});try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).claudeAutoPing||{},i={...a,connections:{...a.connections||{},[e]:t}};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({claudeAutoPing:i})}),ej({enabled:!0===i.enabled,connections:i.connections})}catch(e){console.log("Error saving auto-ping config:",e),ej(ev)}};(0,i.useEffect)(()=>{tg(),tf(),tp()},[tg,tf,tp]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&h(e).then(ew)},[r]);let tj=(0,i.useCallback)(async()=>{if(0===u.length)return;let e=u.find(e=>!1!==e.isActive)||u[0];if(e){eA(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=t.ok?await t.json():null;s?.models?.length&&(eC(s.models),eP(e=>{if(e.size>0)return e;let t=s.models[0]?.id||"",a=t.includes("/")?t.split("/")[0]:"other";return new Set([a])}))}catch{}finally{eA(!1)}}},[r,u]);(0,i.useEffect)(()=>{tj()},[tj]);let tN=async(e,t,s=ts)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await tf();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tw=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tf()}catch(e){console.log("Error deleting alias:",e)}},tk=async()=>{if(eZ)return;let e=u.find(e=>!1!==e.isActive);if(!e)return void alert((0,x.Tl)("Please add an active Qoder connection first"));eX(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,x.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,x.Tl)("No models returned"));let i=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,""),a=`${td}/${s}`;!Object.values(H).includes(a)&&(H[s]||(await tN(s,s,td),i+=1))}0===i?alert((0,x.Tl)("All models already exist, no new models added")):alert((0,x.Tl)("Successfully added")+` ${i} `+(0,x.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,x.Tl)("Error fetching models")+": "+e.message)}finally{eX(!1)}},tC=async()=>{if(eM||0===u.length)return;let e=Object.fromEntries(u.map(e=>[e.id,{state:"queued",error:null}]));eQ.current=!1,eF(!0),eL(!1),eB(null),eV(e),eG({total:u.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<u.length;e+=1){if(eQ.current){eG({total:u.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=u[e];eB(a.id),eV(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,eV(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eV(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eG({total:u.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<u.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eB(null),eF(!1),eL(!1),eQ.current=!1}},tS=async e=>{eU({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eU(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&f(u.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tA=()=>{tg(),P(!1)},t$=async e=>{U("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tg(),D(!1);return}U(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),U("Failed to save connection")}},tT=async e=>{try{(await fetch(`/api/providers/${W.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tg(),F(!1))}catch(e){console.log("Error updating connection:",e)}},tO=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&f(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tP=async(e,t)=>{let s=[...u];[s[e],s[t]]=[s[t],s[e]],f(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tg()}},tI=u.filter(e=>eo.includes(e.id));u.length>0&&(eo.length,u.length),(0,i.useEffect)(()=>{ed(e=>e.filter(e=>u.some(t=>t.id===e)))},[u]),(()=>{if(0===tI.length)return;let e=new Set(tI.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=A.find(e=>e.id===t);return s?.name}})();let tE=()=>{em||B(!1)},tR=async e=>{ex(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tg(),B(!1)}finally{ex(!1)}},tD=e=>tR(u.map(t=>({connectionId:t.id,proxyPoolId:e}))),t_=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:u.map((e,t)=>(0,a.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(N,{connection:e,proxyPools:A,isOAuth:e8,isFirst:0===t,isLast:t===u.length-1,onMoveUp:()=>tP(t,t-1),onMoveDown:()=>tP(t,t+1),onToggleActive:t=>tO(e.id,t),autoPing:"claude"===r&&"oauth"===e.authType?{on:!0===ev.connections[e.id],onToggle:t=>tv(e.id,t)}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&f(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{V(e),F(!0)},onDelete:()=>tS(e.id),oneByOneStatus:eW[e.id]||null})})},e.id))}),tU=A.filter(e=>!0===e.isActive),tz=(0,a.jsx)(d.aF,{isOpen:J,onClose:tE,title:`Apply Proxy (${u.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=A.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tR(u.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:em||0===tU.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tD(null),disabled:em,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),A.map(e=>(0,a.jsxs)("button",{onClick:()=>tD(e.id),disabled:em||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),em&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tE,variant:"ghost",fullWidth:!0,disabled:em,children:"Cancel"})]})}),tq=async e=>{if(!es.has(e)){ea(t=>new Set([...t,e]));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${td}/${e}`})}),s=await t.json();Y(t=>({...t,[e]:s.ok?"ok":"error"})),s.ok||et(s.error||"Model not reachable")}catch{Y(t=>({...t,[e]:"error"}))}finally{ea(t=>{let s=new Set(t);return s.delete(e),s})}}},tM=async e=>{if(ei)return;el(!0);let t=[];try{for(let s=0;s<e.length;s+=5){let a=e.slice(s,s+5);await Promise.all(a.map(async e=>{ea(t=>new Set([...t,e.id]));try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${td}/${e.id}`})}),a=await s.json(),i=a.ok?"ok":"error";Y(t=>({...t,[e.id]:i})),a.ok&&t.push(e)}catch{Y(t=>({...t,[e.id]:"error"}))}finally{ea(t=>{let s=new Set(t);return s.delete(e.id),s})}}))}for(let e of t)await tN(e.id,e.id,td);t.length>0&&document.getElementById("available-models-section")?.scrollIntoView({behavior:"smooth"})}finally{el(!1)}};return g?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):e6?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e6.color}15`},children:Q?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:e6.color},children:e6.textIcon||e6.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:ta&&e6.apiType?"responses"===e6.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ti?"/providers/anthropic-m.png":`/providers/${e6.id}.png`,alt:e6.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>Z(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e6.name}),(e6.notice?.apiKeyUrl||e6.notice?.signupUrl||e6.website)&&(0,a.jsxs)("a",{href:e6.notice?.apiKeyUrl||e6.notice?.signupUrl||e6.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e6.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[u.length," connection",1===u.length?"":"s"]})]})]})]}),e6.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e6.deprecationNotice})]}),e6.notice?.text&&!e6.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:e6.notice.text}),e6.notice.apiKeyUrl&&(0,a.jsx)("a",{href:e6.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),tl&&j&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:ti?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[ti?"Messages API":"responses"===j.apiType?"Responses API":"Chat Completions"," \xb7 ",(j.baseUrl||"").replace(/\/$/,""),"/",ti?"messages":"responses"===j.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{U(""),D(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>L(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eU({title:"Delete Compatible Node",message:`Delete this ${ti?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eU(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),te?(0,a.jsx)(d.gw,{providerId:r}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[u.length>0&&A.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>B(!0),children:"Apply Proxy"}),u.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tC,disabled:eM,children:eM?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eM&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eM&&(eQ.current=!0,eL(!0))},disabled:eK,children:eK?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===eu,onChange:e=>{let t=e?"round-robin":null,s=e?ef||"1":ef;e&&!ef&&eg("1"),eh(t),tb(t,s)}}),"round-robin"===eu&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:ef,onChange:e=>{var t;eg(t=e.target.value),tb("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===u.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e8?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tr&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tn," or ",to,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:tr?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e2,children:tn}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e4,children:to})]}):(0,a.jsxs)(a.Fragment,{children:[!tl&&"iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>E(!0),children:"Cookie"}),"codex"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>q(!0),children:(0,x.Tl)("Bulk Add")}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e3,children:tl?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[eH&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eH.total]}),(0,a.jsxs)("span",{children:["Completed: ",eH.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eH.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eH.failed]}),eH.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eM&&eJ&&(0,a.jsxs)("span",{children:["Running: ",u.find(e=>e.id===eJ)?.name||eJ]})]})}),t_,!tl&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>E(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>q(!0),title:(0,x.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,x.Tl)("Bulk Add")}),tr?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e2,className:"w-full sm:w-auto",children:tn}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e4,className:"w-full sm:w-auto",children:to})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e3,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{id:"available-models-section",children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!tl&&(e=[...tt,...eI.filter(e=>!tt.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eR.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eR.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:th,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tu(e),children:"Disable All"})]}))]}),!!ee&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:ee}),(()=>{if(tl)return(0,a.jsx)(v,{providerStorageAlias:td,providerDisplayAlias:tc,modelAliases:H,copied:eY,onCopy:e0,onSetAlias:tN,onDeleteAlias:tw,connections:u,isAnthropic:ti});let e=[...tt,...eI.filter(e=>!tt.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),t=new Set(eR),s=e.filter(e=>!t.has(e.id)),i=e.filter(e=>t.has(e.id)),l=Object.entries(H).filter(([e,t])=>{let s=`${td}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return e6.passthroughModels?!tt.some(e=>e.id===a):!tt.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${td}/`.length),alias:e,fullModel:t}));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[l.map(e=>(0,a.jsx)(y,{model:{id:e.id},fullModel:`${tc}/${e.id}`,alias:e.alias,copied:eY,onCopy:e0,onSetAlias:()=>{},onDeleteAlias:()=>tw(e.alias),testStatus:X[e.id],onTest:u.length>0||te?()=>tq(e.id):void 0,isTesting:es.has(e.id),isCustom:!0,isFree:!1},e.id)),s.map(e=>{let t=`${td}/${e.id}`,s=`${r}/${e.id}`,i=Object.entries(H).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(y,{model:e,fullModel:`${tc}/${e.id}`,alias:i,copied:eY,onCopy:e0,onSetAlias:t=>tN(e.id,t,td),onDeleteAlias:()=>tw(i),testStatus:X[e.id],onTest:u.length>0||te?()=>tq(e.id):void 0,isTesting:es.has(e.id),isFree:e.isFree,onDisable:()=>tm(e.id)},e.id)}),(0,a.jsxs)("button",{onClick:()=>en(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===r&&u.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:tk,disabled:eZ,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:eZ?{animation:"spin 1s linear infinite"}:void 0,children:eZ?"progress_activity":"download"}),eZ?(0,x.Tl)("Fetching..."):(0,x.Tl)("Fetch Qoder Models")]}),(()=>{let e=new Set([...s.map(e=>e.id),...l.map(e=>e.id)]),t=ek.length>0?ek:eN,r=ek.length>0,n=t.filter(t=>t.id&&!e.has(t.id)),o=new Set(ek.map(e=>e.id).filter(Boolean)),d=i.filter(e=>e.id&&!o.has(e.id)).map(e=>({...e,dropped:!0})),c=new Set(d.map(e=>e.id)),p=[...n.filter(e=>!c.has(e.id)),...d];if(!eS&&0===p.length&&0===t.length)return null;let m=e$.trim().toLowerCase(),x=m?p.filter(e=>e.id.toLowerCase().includes(m)||e.name&&e.name.toLowerCase().includes(m)):p,u={};x.forEach(e=>{if(!e.id)return;let t=e.id.includes("/")?e.id.split("/")[0]:"models";u[t]||(u[t]=[]),u[t].push(e)});let h=Object.entries(u).sort((e,t)=>t[1].length-e[1].length),f=x.filter(e=>!e.dropped).slice(0,50);return(0,a.jsxs)("div",{className:"w-full mt-4 space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted shrink-0",children:eS?"Loading...":`${r?"From API":"Suggested"} (${n.length})${d.length>0?` \xb7 ${d.length} dropped`:""}`}),(0,a.jsxs)("div",{className:"relative flex-1 min-w-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-[13px] text-text-muted/60 pointer-events-none select-none",children:"search"}),(0,a.jsx)("input",{type:"text",value:e$,onChange:e=>eT(e.target.value),placeholder:"Search models...",className:"w-full h-7 pl-7 pr-7 text-xs rounded-lg bg-bg border border-border-subtle text-text-main placeholder:text-text-muted/50 focus:outline-none focus:ring-1 focus:ring-primary/30 focus:border-primary/40 transition-colors"}),e$&&(0,a.jsx)("button",{onClick:()=>eT(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted/50 hover:text-text-muted transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]}),(0,a.jsx)("button",{onClick:tj,disabled:eS,title:"Refresh",className:"shrink-0 h-7 w-7 flex items-center justify-center rounded-lg border border-border-subtle text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors disabled:opacity-40",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${eS?"animate-spin":""}`,children:"refresh"})}),!eS&&f.length>0&&(0,a.jsxs)("button",{onClick:()=>tM(f),disabled:ei,title:`Test up to ${f.length} models and auto-add passing ones`,className:"shrink-0 h-7 flex items-center gap-1 px-2.5 rounded-lg border border-border-subtle text-xs text-text-muted hover:text-green-600 hover:border-green-500/40 hover:bg-green-500/5 transition-colors disabled:opacity-40",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[13px] ${ei?"animate-spin":""}`,children:ei?"progress_activity":"play_circle"}),ei?"Testing...":"Test All"]})]}),m&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[x.length," result",1!==x.length?"s":""]}),eS?(0,a.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px] animate-spin",children:"progress_activity"}),"Fetching models from provider API..."]}):0===h.length?m?(0,a.jsxs)("p",{className:"text-xs text-text-muted py-2",children:['No models match "',e$,'"']}):null:(0,a.jsx)("div",{className:"space-y-1",children:h.map(([e,t])=>{let s=eO.has(e),i=t.filter(e=>!e.dropped&&"ok"===X[e.id]).length,l=t.filter(e=>!e.dropped&&"error"===X[e.id]).length,r=t.filter(e=>e.dropped).length;return(0,a.jsxs)("div",{className:"rounded-xl border border-border-subtle overflow-hidden",children:[(0,a.jsxs)("button",{onClick:()=>eP(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s}),className:"w-full flex items-center gap-2 px-3 py-2 text-xs bg-bg hover:bg-surface-2/60 transition-colors text-left",children:[(0,a.jsx)("span",{className:"font-semibold text-text-main flex-1",children:e}),i>0&&(0,a.jsxs)("span",{className:"text-green-600 dark:text-green-400 font-medium",children:[i," ✓"]}),l>0&&(0,a.jsxs)("span",{className:"text-red-500 font-medium",children:[l," ✗"]}),r>0&&(0,a.jsxs)("span",{className:"px-1.5 py-0.5 rounded-md bg-amber-500/10 text-amber-600 dark:text-amber-400 text-[10px] font-medium",children:[r," dropped"]}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 rounded-md bg-black/[0.06] dark:bg-white/[0.06] text-text-muted tabular-nums font-medium",children:t.length}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px] text-text-muted/60",children:s?"expand_less":"expand_more"})]}),s&&(0,a.jsx)("div",{className:"px-3 pt-2 pb-3 flex flex-wrap gap-1.5 border-t border-border-subtle bg-surface/50",children:t.map(e=>{let t=e.id.includes("/")?e.id.split("/").slice(1).join("/"):e.id,s=X[e.id],i=es.has(e.id);return e.dropped?(0,a.jsxs)("button",{onClick:async()=>{await tx(e.id),document.getElementById("available-models-section")?.scrollIntoView({behavior:"smooth"})},title:`Recently Dropped — click to restore: ${e.id}`,className:"group flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-amber-400/40 bg-amber-500/5 text-amber-700 dark:text-amber-400 text-xs hover:bg-amber-500/10 hover:border-amber-400/60 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"history"}),(0,a.jsx)("span",{children:t}),e.contextLength>0&&(0,a.jsxs)("span",{className:"opacity-50 text-[10px] ml-0.5",children:[(e.contextLength/1e3).toFixed(0),"k"]})]},e.id):(0,a.jsxs)("button",{onClick:async()=>{await tN(e.id,e.id,td),document.getElementById("available-models-section")?.scrollIntoView({behavior:"smooth"})},title:`Add: ${e.name||e.id}`,className:["group flex items-center gap-1 px-2.5 py-1.5 rounded-lg border text-xs transition-colors","ok"===s?"border-green-500/30 bg-green-500/5 text-green-700 dark:text-green-400 hover:bg-green-500/10":"error"===s?"border-red-400/30 bg-red-500/5 text-red-600 dark:text-red-400 hover:bg-red-500/10":"border-border-subtle text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5"].join(" "),children:[i?(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] animate-spin",children:"progress_activity"}):"ok"===s?(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"check"}):"error"===s?(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"}):(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] opacity-50 group-hover:opacity-100",children:"add"}),(0,a.jsx)("span",{children:t}),e.contextLength>0&&(0,a.jsxs)("span",{className:"opacity-40 text-[10px] ml-0.5",children:[(e.contextLength/1e3).toFixed(0),"k"]})]},e.id)})})]},e)})})]})})()]})})()]}),tz,"kiro"===r?(0,a.jsx)(d.Mh,{isOpen:O,providerInfo:e6,onSuccess:tA,onClose:()=>P(!1)}):"cursor"===r?(0,a.jsx)(d.G9,{isOpen:O,onSuccess:tA,onClose:()=>P(!1)}):"gitlab"===r?(0,a.jsx)(d.vj,{isOpen:O,providerInfo:e6,onSuccess:tA,onClose:()=>P(!1)}):(0,a.jsx)(d.LF,{isOpen:O,provider:r,providerInfo:e6,onSuccess:tA,onClose:()=>P(!1)}),"iflow"===r&&(0,a.jsx)(d.vE,{isOpen:I,onSuccess:()=>{tg(),E(!1)},onClose:()=>E(!1)}),(0,a.jsx)(k,{isOpen:R,provider:r,providerName:e6.name,isCompatible:tl,isAnthropic:ti,authType:e6?.authType,authHint:e6?.authHint,website:e6?.website,proxyPools:A,error:_,onSave:t$,onBulkDone:tg,onClose:()=>{U(""),D(!1)}}),(0,a.jsx)(d.wI,{isOpen:M,connection:W,proxyPools:A,onSave:tT,onClose:()=>F(!1)}),tl&&(0,a.jsx)(C,{isOpen:K,node:j,onSave:ty,onClose:()=>L(!1),isAnthropic:ti}),!tl&&(0,a.jsx)(S,{isOpen:er,providerAlias:td,providerDisplayAlias:tc,onSave:async e=>{let t=e6?.passthroughModels?e.split("/").pop():e;await tN(e,t,td),en(!1)},onClose:()=>en(!1)}),"codex"===r&&(0,a.jsx)($,{isOpen:z,onClose:()=>q(!1),onSuccess:tg}),(0,a.jsx)(d.uo,{isOpen:ez,onClose:()=>eq(!1),onConfirm:()=>{(window.localStorage.setItem(e1,"true"),eq(!1),e8)?e5():e4()},title:"Risk Notice",message:e6?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!e_,onClose:()=>eU(null),onConfirm:e_?.onConfirm,title:e_?.title||"Confirm",message:e_?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}$.propTypes={isOpen:g().bool.isRequired,onClose:g().func.isRequired,onSuccess:g().func}}},e=>{e.O(0,[2574,3862,2649,5772,1321,5497,8441,3794,7358],()=>e(e.s=76487)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{50574:(e,t,r)=>{Promise.resolve().then(r.bind(r,75095)),Promise.resolve().then(r.bind(r,25086))},75095:(e,t,r)=>{"use strict";r.d(t,{default:()=>S});var a=r(95155),s=r(12115),n=r(57250),i=r(45564);function l(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function o({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:n=!1}){let[i,c]=(0,s.useState)(1),d=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):l(e?.used,e?.total)})),[e]),u=(0,s.useMemo)(()=>"remaining-asc"===r?[...d].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...d].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):d,[d,r]),m=Math.max(1,Math.ceil(u.length/10));if((0,s.useEffect)(()=>{c(1)},[r,e]),(0,s.useEffect)(()=>{c(e=>Math.min(e,m))},[m]),!e||0===e.length)return null;let x=u.slice((i-1)*10,10*i),h=0===u.length?0:(i-1)*10+1,b=Math.min(10*i,u.length),p=t?"py-1 px-1.5":"py-2 px-3",g=t?"text-[11px]":"text-sm",f=t?"text-[11px]":"text-sm",v=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[u.length," quota",u.length>1?"s":""]}),n&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:x.map(e=>{var r;let s=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},n=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0)return"-";let s=Math.ceil(a/6e4);if(s<60)return`${s}m`;let n=Math.floor(s/60),i=s%60;if(n<24)return`${n}h ${i}m`;let l=Math.floor(n/24);return`${l}d ${n%24}h ${i}m`}catch(e){return"-"}}(e.resetAt),i=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(s.getDate()+1);let n="";n=t>=a&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let i=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${n}, ${i}`}catch{return null}}(e.resetAt);return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${p} w-[30%]`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:s.emoji}),(0,a.jsx)("span",{className:`${g} font-medium text-text-primary truncate`,children:e.name})]})}),(0,a.jsx)("td",{className:`${p} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${s.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${s.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]}),(0,a.jsxs)("span",{className:`font-medium ${s.text}`,children:[e.remaining,"%"]})]})]})}),(0,a.jsx)("td",{className:`${p} w-[25%]`,children:"-"!==n||i?t?(0,a.jsx)("div",{className:`${f} text-text-primary font-medium truncate`,title:i||"",children:"-"!==n?`in ${n}`:i}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==n&&(0,a.jsxs)("div",{className:`${f} text-text-primary font-medium`,children:["in ",n]}),i&&(0,a.jsx)("div",{className:`${v} text-text-muted`,children:i})]}):(0,a.jsx)("div",{className:`${f} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),m>1&&(0,a.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Showing ",h,"-",b," of ",u.length]}),(0,a.jsxs)("span",{children:["Page ",i," / ",m]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>Math.max(1,e-1)),disabled:1===i,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>Math.min(m,e+1)),disabled:i===m,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var c=r(98542),d=r(84588),u=r(35497),m=r(52679);function x(e){let t=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return t(e.email)?e.email:(t(e.name),e.name)}function h(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function b(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function p(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function g(e,t){return await e(t)}let f="quotaCacheData";function v(){try{let e=window.localStorage.getItem(f);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function y(e,t){try{let r=v();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(f,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}let k="quotaAutoRefresh",w=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],j=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}],N=[10,20,50,100];function S(){let[e,t]=(0,s.useState)([]),[r,S]=(0,s.useState)({}),[C,$]=(0,s.useState)({}),[A,P]=(0,s.useState)({}),[E,q]=(0,s.useState)(!0),[M,T]=(0,s.useState)({}),[D,O]=(0,s.useState)(null),[I,_]=(0,s.useState)(!1),[L,z]=(0,s.useState)(!1),[F,U]=(0,s.useState)(60),[R,J]=(0,s.useState)(!0),[K,H]=(0,s.useState)(null),[B,G]=(0,s.useState)(null),[W,Y]=(0,s.useState)(!1),[Q,V]=(0,s.useState)(null),[X,Z]=(0,s.useState)([]),[ee,et]=(0,s.useState)("all"),[er,ea]=(0,s.useState)([]),[es,en]=(0,s.useState)("all"),[ei,el]=(0,s.useState)("default"),[eo,ec]=(0,s.useState)(!1),[ed,eu]=(0,s.useState)(!1),[em,ex]=(0,s.useState)(!1),[eh,eb]=(0,s.useState)(1),[ep,eg]=(0,s.useState)(20),[ef,ev]=(0,s.useState)(String(20)),[ey,ek]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[ew,ej]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),eN=(0,s.useRef)(null),eS=(0,s.useRef)(null),eC=(0,s.useCallback)(async(e=eh)=>{try{var r,a;let s=new URLSearchParams({page:String(e),pageSize:String(ep),accountStatus:es,sort:"priority"});"all"!==ee&&s.set("provider",ee);let n=await fetch(`/api/providers/client?${s.toString()}`);if(!n.ok)throw Error("Failed to fetch connections");let i=await n.json(),l=i.connections||[],o=(r=i.pagination,r||{page:1,pageSize:ep,total:0,totalPages:1}),c=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(i.totals,l.length);return t(l),ea(i.providerOptions||[]),ek(o),ej(c),eb((a=i.pagination,a?.page||e)),l}catch(e){return console.error("Error fetching connections:",e),t([]),ea([]),ek({page:1,pageSize:ep,total:0,totalPages:1}),ej({eligibleConnections:0,providerFilteredConnections:0}),[]}},[es,eo,eh,ep,ee]),e$=(0,s.useCallback)(async(e,t)=>{$(t=>({...t,[e]:!0})),P(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=await fetch(`/api/usage/${e}`);if(!r.ok){let a=(await r.json().catch(()=>({}))).error||r.statusText;if(404===r.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===r.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,a);let r={quotas:[],message:a};S(t=>({...t,[e]:r})),y(e,r);return}throw Error(`HTTP ${r.status}: ${a}`)}let a=await r.json();console.log(`[ProviderLimits] Got quota for ${t}:`,a);let s={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,i.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,s=r.modelKey||r.name;return(e.get(a)??999)-(e.get(s)??999)})}return r}(t,a),plan:a.plan||null,message:a.message||null,raw:a};S(t=>({...t,[e]:s})),y(e,s)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),P(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{$(t=>({...t,[e]:!1}))}},[]),eA=(0,s.useCallback)(async(e,t)=>{await e$(e,t),O(new Date)},[e$]),eP=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){H(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){S(t=>{let r={...t};return delete r[e],r}),$(t=>{let r={...t};return delete r[e],r}),P(t=>{let r={...t};return delete r[e],r});try{let t=v();t[e]&&(delete t[e],window.localStorage.setItem(f,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await g(eC,eh)}}catch(e){console.error("Error deleting connection:",e)}finally{H(null)}}},[eC,eh]),eE=(0,s.useCallback)(async(e,t)=>{G(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(S(e=>({...e})),await g(eC,eh))}catch(e){console.error("Error updating connection status:",e)}finally{G(null)}},[eC,eh]),eq=(0,s.useCallback)(async e=>{if(!Q?.id)return;let t=Q.id,r=Q.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eC(),Y(!1),V(null),m.wb.includes(r)&&await e$(t,r))}catch(e){console.error("Error saving connection:",e)}},[Q,eC,e$]);(0,s.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&Z(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eM=(0,s.useCallback)(async()=>{if(!L){z(!0),U(60);try{let e=await eC(eh);$(b(e)),P(t=>p(t,e)),S(t=>p(t,e)),await Promise.all(e.map(e=>e$(e.id,e.provider))),O(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{z(!1)}}},[L,eC,e$,eh]);(0,s.useEffect)(()=>{(async()=>{J(!0);let e=await eC(eh);J(!1),$(b(e)),P(t=>p(t,e)),S(t=>p(t,e)),await Promise.all(e.map(e=>e$(e.id,e.provider))),O(new Date)})()},[eC,e$,eh]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(k);q(null===e||"true"===e),_(!0)},[]),(0,s.useEffect)(()=>{I&&window.localStorage.setItem(k,String(E))},[E,I]),(0,s.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>T(e?.claudeAutoPing?.connections||{})).catch(()=>{})},[]);let eT=(0,s.useCallback)(async(e,t)=>{let r={...M,[e]:t};T(r);try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{}).claudeAutoPing||{},connections:r};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({claudeAutoPing:t})})}catch{T(M)}},[M]);(0,s.useEffect)(()=>{if(!I||!E){eN.current&&(clearInterval(eN.current),eN.current=null),eS.current&&(clearInterval(eS.current),eS.current=null);return}return eN.current=setInterval(()=>{eM()},6e4),eS.current=setInterval(()=>{U(e=>e<=1?60:e-1)},1e3),()=>{eN.current&&clearInterval(eN.current),eS.current&&clearInterval(eS.current)}},[E,eM,I]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(eN.current&&(clearInterval(eN.current),eN.current=null),eS.current&&(clearInterval(eS.current),eS.current=null)):E&&I&&(eN.current=setInterval(eM,6e4),eS.current=setInterval(()=>{U(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[E,eM,I]);let eD=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=h(e,t),n=h(r,t),i="remaining-asc"===s?a-n:n-a;return 0!==i?i:(x(e)||"").localeCompare(x(r)||"")});if(!r)return e;let n=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=n(e)-n(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(x(e)||"").localeCompare(x(t)||"")})})(e,r,eo,ee,ei),[e,r,eo,ee,ei]),eO=e=>{let t=r[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=l(e.used,e.total))},eI=(0,s.useCallback)(async(e,t)=>{if(e.length&&!em){ex(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await g(eC,eh)}catch(e){console.error("Error bulk toggling connections:",e)}finally{ex(!1)}}},[em,eC,eh]),e_="all"===ee?"All providers":ee,eL=ew.eligibleConnections>0,ez=eD.length>0,eF=ew.eligibleConnections?ew.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===ee?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===es?"turned off":"active"===es?"active":"matching"} accounts found for ${ee}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},eU=function(e){var t;let{start:r,end:a}=(t=e).total?{start:(t.page-1)*t.pageSize+1,end:Math.min(t.page*t.pageSize,t.total)}:{start:0,end:0};return`Showing ${r}-${a} of ${e.total}`}(ey),eR=!N.includes(ep);return R||eL?R||ez?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eu(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":ed,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===ee?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(n.A,{src:`/providers/${ee}.png`,alt:ee,size:18,className:"size-[18px] rounded object-contain",fallbackText:ee.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:e_})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),ed&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>eu(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-black/10 bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{"all"!==ee&&eb(1),et("all"),eu(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===ee?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===ee&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:er.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{ee!==e&&eb(1),et(e),eu(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${ee===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)(n.A,{src:`/providers/${e}.png`,alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e}),ee===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:es,onChange:e=>{let t=e.target.value;es!==t&&eb(1),en(t)},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:w.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===ee&&(0,a.jsx)("select",{value:ei,onChange:e=>el(e.target.value),className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:j.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>ec(e=>!e),"aria-pressed":eo,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${eo?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{eI(eD.filter(e=>(e.isActive??!0)&&eO(e)).map(e=>e.id),!1)},disabled:em,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{eI(eD.filter(e=>!(e.isActive??!0)&&!eO(e)).map(e=>e.id),!0)},disabled:em,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:()=>q(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:E?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${E?"text-primary":"text-text-muted"}`,children:E?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),E&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",F,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:eM,disabled:L,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${L?"animate-spin":""}`,children:"refresh"})})]})}),eo&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:eD.map(e=>{let t=r[e.id],s=C[e.id],i=A[e.id],l=!1===e.isActive,m=K===e.id||B===e.id;return(0,a.jsxs)(d.default,{padding:"none",className:`min-w-0 ${l?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(n.A,{src:`/providers/${e.provider}.png`,alt:e.provider,size:32,className:"object-contain",fallbackText:e.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:e.provider}),x(e)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:x(e)}):null]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:["claude"===e.provider&&"oauth"===e.authType&&(0,a.jsx)(u.m_,{text:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",children:(0,a.jsx)("button",{type:"button",onClick:()=>eT(e.id,!0!==M[e.id]),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${!0===M[e.id]?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)("button",{type:"button",onClick:()=>eA(e.id,e.provider),disabled:s||m,"aria-label":"Refresh quota",className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",title:"Refresh quota",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${s?"animate-spin":""}`,children:"refresh"})}),(0,a.jsx)("button",{type:"button",onClick:()=>{V(e),Y(!0)},disabled:m,"aria-label":"Edit connection",className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",title:"Edit connection",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eP(e.id),disabled:m,"aria-label":"Delete connection",className:"p-1.5 rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",title:"Delete connection",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${K===e.id?"animate-pulse":""}`,children:"delete"})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:e.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(c.default,{size:"sm",checked:e.isActive??!0,disabled:m,onChange:t=>eE(e.id,t)})})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:s?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):i?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:i})]}):t?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:t.message})}):(0,a.jsx)(o,{quotas:t?.quotas,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==ei})})]},e.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:eU}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:eR?"custom":String(ep),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(eb(1),eg(r),ev(String(r)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[N.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:ef,onChange:e=>ev(e.target.value),onBlur:()=>{let e=Number.parseInt(ef,10);if(!Number.isFinite(e))return void ev(String(ep));let t=Math.min(500,Math.max(1,e));eb(1),eg(t),ev(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(ef,10);if(!Number.isFinite(t))return void ev(String(ep));let r=Math.min(500,Math.max(1,t));eb(1),eg(r),ev(String(r))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",ey.page," / ",ey.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eb(1),disabled:ey.page<=1||R||L,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>eb(e=>Math.max(1,e-1)),disabled:ey.page<=1||R||L,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eb(e=>Math.min(ey.totalPages,e+1)),disabled:ey.page>=ey.totalPages||R||L,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eb(ey.totalPages),disabled:ey.page>=ey.totalPages||R||L,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,a.jsx)(u.wI,{isOpen:W,connection:Q,proxyPools:X,onSave:eq,onClose:()=>{Y(!1),V(null)}})]}):(0,a.jsx)(d.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:eF.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:eF.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:eF.description})]})}):(0,a.jsx)(d.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}}},e=>{e.O(0,[2574,3862,2649,1321,5497,8441,3794,7358],()=>e(e.s=50574)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i(95155),r=i(35497),n=i(11059);let a="sifxprime/krouter",o="main",c="skills",d=`https://github.com/${a}`,l=`https://raw.githubusercontent.com/${a}/refs/heads/${o}/${c}`,m=`https://github.com/${a}/blob/${o}/${c}`,x=[{id:"krouter",name:"kRouter (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"krouter-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"krouter-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"krouter-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"krouter-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"krouter-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"krouter-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"krouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function p(e){return`${l}/${e}/SKILL.md`}function h({value:e,label:t="Copy link"}){let{copied:i,copy:r}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>r(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?"Copied!":t]})}function u({skill:e}){var t;let i=p(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,s.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,s.jsx)(r.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,s.jsx)(r.Ex,{variant:"default",size:"sm",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,s.jsxs)("a",{href:(t=e.id,`${m}/${t}/SKILL.md`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[i,(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,s.jsx)(h,{value:i})]})}function b(){return(0,s.jsxs)("div",{className:"max-w-4xl mx-auto space-y-6",children:[(0,s.jsxs)(r.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted mb-2",children:"Paste this to your AI:"}),(0,s.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",p("9router")]})]}),(0,s.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,s.jsx)(u,{skill:e},e.id))}),(0,s.jsx)(r.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Browse source, README, and examples."})]}),(0,s.jsxs)("a",{href:`${d}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}},67313:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))}},e=>{e.O(0,[2574,3862,2649,1321,5497,8441,3794,7358],()=>e(e.s=67313)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i(95155),r=i(35497),n=i(11059);let a="sifxprime/krouter",o="main",c="skills",d=`https://github.com/${a}`,l=`https://raw.githubusercontent.com/${a}/refs/heads/${o}/${c}`,m=`https://github.com/${a}/blob/${o}/${c}`,x=[{id:"krouter",name:"kRouter (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"krouter-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"krouter-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"krouter-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"krouter-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"krouter-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"krouter-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"krouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function p(e){return`${l}/${e}/SKILL.md`}function h({value:e,label:t="Copy link"}){let{copied:i,copy:r}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>r(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?"Copied!":t]})}function u({skill:e}){var t;let i=p(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,s.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,s.jsx)(r.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,s.jsx)(r.Ex,{variant:"default",size:"sm",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,s.jsxs)("a",{href:(t=e.id,`${m}/${t}/SKILL.md`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[i,(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,s.jsx)(h,{value:i})]})}function b(){return(0,s.jsxs)("div",{className:"max-w-4xl mx-auto space-y-6",children:[(0,s.jsxs)(r.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted mb-2",children:"Paste this to your AI:"}),(0,s.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",p("krouter")]})]}),(0,s.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,s.jsx)(u,{skill:e},e.id))}),(0,s.jsx)(r.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Browse source, README, and examples."})]}),(0,s.jsxs)("a",{href:`${d}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}},67313:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))}},e=>{e.O(0,[2574,3862,2649,1321,5497,8441,3794,7358],()=>e(e.s=67313)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,487,501,516,543,552,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,487,501,516,543,552,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,487,501,516,543,552,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,487,501,516,543,552,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,487,501,516,543,552,675,747,748,907,931,948,992,997,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);