@techysy/10router 1.3.1 → 1.3.4

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 (1025) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +12 -11
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +1 -1
  5. package/app/.next-cli-build/routes-manifest.json +6 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +5 -5
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  79. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  87. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  89. package/app/.next-cli-build/server/app/_not-found.html +2 -2
  90. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  91. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  92. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -6
  93. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  94. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/status/route.js +2 -2
  115. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  119. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js +2 -2
  125. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  127. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  139. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/models/caps/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/network/egress-region/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/network/egress-region/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  263. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route.js +2 -2
  267. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  269. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  305. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  307. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  311. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  313. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  315. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  317. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  319. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  321. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  325. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  327. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/security/status/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/security/status/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/settings/route.js +2 -1
  339. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  347. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  369. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/quotas/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/usage/quotas/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/version/route.js +2 -1
  445. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/version/shell-update/route.js +2 -0
  447. package/app/.next-cli-build/server/app/api/version/shell-update/route.js.nft.json +1 -0
  448. package/app/.next-cli-build/server/app/api/version/shell-update/route_client-reference-manifest.js +1 -0
  449. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  450. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  454. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  455. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  456. package/app/.next-cli-build/server/app/callback.html +2 -2
  457. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  458. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  459. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  460. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +6 -6
  461. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +2 -2
  462. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -8
  463. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +8 -8
  464. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
  465. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  466. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +2 -2
  467. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +8 -8
  468. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +8 -8
  469. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
  470. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  471. package/app/.next-cli-build/server/app/dashboard/combos.html +2 -2
  472. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
  473. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +8 -8
  474. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
  475. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  476. package/app/.next-cli-build/server/app/dashboard/endpoint.html +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +8 -8
  478. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +8 -8
  479. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
  480. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/dashboard/experimental.html +2 -2
  482. package/app/.next-cli-build/server/app/dashboard/experimental.rsc +8 -8
  483. package/app/.next-cli-build/server/app/dashboard/experimental.segments/!KGRhc2hib2FyZCk/dashboard/experimental/__PAGE__.segment.rsc +8 -8
  484. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_full.segment.rsc +8 -8
  485. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_tree.segment.rsc +2 -2
  486. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +2 -2
  487. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -8
  488. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +8 -8
  489. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -8
  490. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  491. package/app/.next-cli-build/server/app/dashboard/mitm.html +2 -2
  492. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
  493. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +8 -8
  494. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
  495. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  496. package/app/.next-cli-build/server/app/dashboard/profile.html +2 -2
  497. package/app/.next-cli-build/server/app/dashboard/profile.rsc +8 -8
  498. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +8 -8
  499. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +8 -8
  500. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  501. package/app/.next-cli-build/server/app/dashboard/providers/new.html +2 -2
  502. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -8
  503. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +8 -8
  504. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
  505. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  506. package/app/.next-cli-build/server/app/dashboard/providers.html +2 -2
  507. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
  508. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +8 -8
  509. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
  510. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  511. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +2 -2
  512. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -8
  513. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +8 -8
  514. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
  515. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +2 -2
  517. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +8 -8
  518. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +8 -8
  519. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +8 -8
  520. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  521. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  522. package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
  523. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +9 -9
  524. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
  525. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  529. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +2 -2
  530. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  531. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  532. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
  534. package/app/.next-cli-build/server/app/dashboard/skills.html +2 -2
  535. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
  536. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +8 -8
  537. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
  538. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/dashboard/token-saver.html +2 -2
  540. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +8 -8
  541. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +8 -8
  542. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +8 -8
  543. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  544. package/app/.next-cli-build/server/app/dashboard/translator.html +2 -2
  545. package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -8
  546. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +8 -8
  547. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -8
  548. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  549. package/app/.next-cli-build/server/app/dashboard/usage.html +2 -2
  550. package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -8
  551. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +8 -8
  552. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
  553. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  554. package/app/.next-cli-build/server/app/dashboard.html +2 -2
  555. package/app/.next-cli-build/server/app/dashboard.rsc +8 -8
  556. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +8 -8
  557. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -8
  558. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  559. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  560. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  561. package/app/.next-cli-build/server/app/index.html +1 -1
  562. package/app/.next-cli-build/server/app/index.rsc +6 -6
  563. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +6 -6
  564. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  565. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  566. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  567. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  568. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  569. package/app/.next-cli-build/server/app/landing.html +2 -2
  570. package/app/.next-cli-build/server/app/landing.rsc +7 -7
  571. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +7 -7
  572. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  573. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +7 -7
  574. package/app/.next-cli-build/server/app/login/page.js +1 -1
  575. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  576. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  577. package/app/.next-cli-build/server/app/login.html +2 -2
  578. package/app/.next-cli-build/server/app/login.rsc +7 -7
  579. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  580. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  581. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +7 -7
  582. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  583. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  584. package/app/.next-cli-build/server/app/page.js +1 -1
  585. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  586. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  587. package/app/.next-cli-build/server/app-paths-manifest.json +12 -11
  588. package/app/.next-cli-build/server/chunks/1329.js +1 -1
  589. package/app/.next-cli-build/server/chunks/2112.js +1 -1
  590. package/app/.next-cli-build/server/chunks/2120.js +1 -1
  591. package/app/.next-cli-build/server/chunks/2132.js +1 -1
  592. package/app/.next-cli-build/server/chunks/3433.js +2 -2
  593. package/app/.next-cli-build/server/chunks/3500.js +1 -1
  594. package/app/.next-cli-build/server/chunks/4123.js +2 -1
  595. package/app/.next-cli-build/server/chunks/4282.js +1 -1
  596. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  597. package/app/.next-cli-build/server/chunks/4803.js +1 -1
  598. package/app/.next-cli-build/server/chunks/4927.js +3 -3
  599. package/app/.next-cli-build/server/chunks/5210.js +12 -12
  600. package/app/.next-cli-build/server/chunks/5330.js +2 -2
  601. package/app/.next-cli-build/server/chunks/5781.js +1 -1
  602. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  603. package/app/.next-cli-build/server/chunks/615.js +1 -1
  604. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  605. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  606. package/app/.next-cli-build/server/chunks/6756.js +1 -1
  607. package/app/.next-cli-build/server/chunks/682.js +1 -0
  608. package/app/.next-cli-build/server/chunks/6960.js +2 -2
  609. package/app/.next-cli-build/server/chunks/7122.js +1 -1
  610. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  611. package/app/.next-cli-build/server/chunks/7274.js +3 -3
  612. package/app/.next-cli-build/server/chunks/7322.js +1 -1
  613. package/app/.next-cli-build/server/chunks/7774.js +2 -2
  614. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  615. package/app/.next-cli-build/server/chunks/8172.js +2 -2
  616. package/app/.next-cli-build/server/chunks/8370.js +1 -1
  617. package/app/.next-cli-build/server/chunks/8410.js +1 -1
  618. package/app/.next-cli-build/server/chunks/8499.js +1 -1
  619. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  620. package/app/.next-cli-build/server/chunks/8595.js +1 -1
  621. package/app/.next-cli-build/server/chunks/8672.js +1 -1
  622. package/app/.next-cli-build/server/chunks/939.js +1 -1
  623. package/app/.next-cli-build/server/chunks/9489.js +2 -2
  624. package/app/.next-cli-build/server/chunks/9628.js +1 -1
  625. package/app/.next-cli-build/server/instrumentation.js +1 -1
  626. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  627. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  628. package/app/.next-cli-build/server/middleware.js +5 -5
  629. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  630. package/app/.next-cli-build/server/pages/404.html +2 -2
  631. package/app/.next-cli-build/server/pages/500.html +1 -1
  632. package/app/.next-cli-build/static/TWKzsrjlsswyo8nggSyiE/_buildManifest.js +1 -0
  633. package/app/.next-cli-build/static/chunks/1321-555b548232df2f80.js +1 -0
  634. package/app/.next-cli-build/static/chunks/5497-a498f93dd709dccb.js +7 -0
  635. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-7c9d46f8c09d480e.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-39a4fadcce4f3019.js → page-0ee5ba586a2d3dfa.js} +1 -1
  637. package/app/.next-cli-build/static/chunks/app/_global-error/{page-2b9ff155b9d0f304.js → page-1058a44b968ee535.js} +1 -1
  638. package/app/.next-cli-build/static/chunks/app/api/auth/login/{route-2b9ff155b9d0f304.js → route-1058a44b968ee535.js} +1 -1
  639. package/app/.next-cli-build/static/chunks/app/api/auth/logout/{route-2b9ff155b9d0f304.js → route-1058a44b968ee535.js} +1 -1
  640. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/{route-2b9ff155b9d0f304.js → route-1058a44b968ee535.js} +1 -1
  641. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-1058a44b968ee535.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-1058a44b968ee535.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-1058a44b968ee535.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-1058a44b968ee535.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-1058a44b968ee535.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-1058a44b968ee535.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-1058a44b968ee535.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-1058a44b968ee535.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-1058a44b968ee535.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-1058a44b968ee535.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1058a44b968ee535.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-1058a44b968ee535.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-profiles/route-1058a44b968ee535.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-1058a44b968ee535.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-1058a44b968ee535.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-1058a44b968ee535.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-1058a44b968ee535.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-1058a44b968ee535.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1058a44b968ee535.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1058a44b968ee535.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-1058a44b968ee535.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-1058a44b968ee535.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-1058a44b968ee535.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-1058a44b968ee535.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-1058a44b968ee535.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-1058a44b968ee535.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-1058a44b968ee535.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-1058a44b968ee535.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-1058a44b968ee535.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-1058a44b968ee535.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-1058a44b968ee535.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/combos/route-1058a44b968ee535.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-1058a44b968ee535.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-1058a44b968ee535.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-1058a44b968ee535.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-1058a44b968ee535.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-1058a44b968ee535.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-1058a44b968ee535.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/health/route-1058a44b968ee535.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/init/route-1058a44b968ee535.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-1058a44b968ee535.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-1058a44b968ee535.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/keys/route-1058a44b968ee535.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/locale/route-1058a44b968ee535.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-1058a44b968ee535.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-1058a44b968ee535.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1058a44b968ee535.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1058a44b968ee535.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-1058a44b968ee535.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-1058a44b968ee535.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-1058a44b968ee535.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-1058a44b968ee535.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-1058a44b968ee535.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/models/caps/route-1058a44b968ee535.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-1058a44b968ee535.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-1058a44b968ee535.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-1058a44b968ee535.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/models/route-1058a44b968ee535.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/models/test/route-1058a44b968ee535.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-1058a44b968ee535.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-1058a44b968ee535.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-1058a44b968ee535.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-1058a44b968ee535.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-1058a44b968ee535.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-1058a44b968ee535.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-1058a44b968ee535.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-1058a44b968ee535.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-1058a44b968ee535.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-1058a44b968ee535.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-1058a44b968ee535.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-1058a44b968ee535.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-1058a44b968ee535.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-1058a44b968ee535.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-1058a44b968ee535.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-1058a44b968ee535.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-1058a44b968ee535.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder/checkin/route-1058a44b968ee535.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder-cn/checkin/route-1058a44b968ee535.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-1058a44b968ee535.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-1058a44b968ee535.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-1058a44b968ee535.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-1058a44b968ee535.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-kill/route-1058a44b968ee535.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-status/route-1058a44b968ee535.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-1058a44b968ee535.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-1058a44b968ee535.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/pricing/route-1058a44b968ee535.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-1058a44b968ee535.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-1058a44b968ee535.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-1058a44b968ee535.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-1058a44b968ee535.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-1058a44b968ee535.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-1058a44b968ee535.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-1058a44b968ee535.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-1058a44b968ee535.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-1058a44b968ee535.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/providers/route-1058a44b968ee535.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-1058a44b968ee535.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-1058a44b968ee535.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-1058a44b968ee535.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-1058a44b968ee535.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-1058a44b968ee535.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-1058a44b968ee535.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-1058a44b968ee535.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-1058a44b968ee535.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-1058a44b968ee535.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-1058a44b968ee535.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-1058a44b968ee535.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-1058a44b968ee535.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-1058a44b968ee535.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-1058a44b968ee535.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-1058a44b968ee535.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-1058a44b968ee535.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-1058a44b968ee535.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/security/status/route-1058a44b968ee535.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-1058a44b968ee535.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-1058a44b968ee535.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-1058a44b968ee535.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-1058a44b968ee535.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/settings/route-1058a44b968ee535.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-1058a44b968ee535.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/tags/route-1058a44b968ee535.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-1058a44b968ee535.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-1058a44b968ee535.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-1058a44b968ee535.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-1058a44b968ee535.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-1058a44b968ee535.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-1058a44b968ee535.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-1058a44b968ee535.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-1058a44b968ee535.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-1058a44b968ee535.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-1058a44b968ee535.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-1058a44b968ee535.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-1058a44b968ee535.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-1058a44b968ee535.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-1058a44b968ee535.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-1058a44b968ee535.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-1058a44b968ee535.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-1058a44b968ee535.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-1058a44b968ee535.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-1058a44b968ee535.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-1058a44b968ee535.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-1058a44b968ee535.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/usage/quotas/route-1058a44b968ee535.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-1058a44b968ee535.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-1058a44b968ee535.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-1058a44b968ee535.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-1058a44b968ee535.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-1058a44b968ee535.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-1058a44b968ee535.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-1058a44b968ee535.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-1058a44b968ee535.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-1058a44b968ee535.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-1058a44b968ee535.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-1058a44b968ee535.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-1058a44b968ee535.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-1058a44b968ee535.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-1058a44b968ee535.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-1058a44b968ee535.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-1058a44b968ee535.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-1058a44b968ee535.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-1058a44b968ee535.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/v1/route-1058a44b968ee535.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-1058a44b968ee535.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-1058a44b968ee535.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-1058a44b968ee535.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-1058a44b968ee535.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-1058a44b968ee535.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-1058a44b968ee535.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-1058a44b968ee535.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-1058a44b968ee535.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-1058a44b968ee535.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/version/route-1058a44b968ee535.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/version/shell-update/route-1058a44b968ee535.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-1058a44b968ee535.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/version/update/route-1058a44b968ee535.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/landing/page-241f3474d89f3b8c.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-1058a44b968ee535.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/page-1058a44b968ee535.js +1 -0
  820. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-1058a44b968ee535.js +1 -0
  821. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-1058a44b968ee535.js +1 -0
  822. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-1058a44b968ee535.js +1 -0
  823. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-1058a44b968ee535.js +1 -0
  824. package/app/.next-cli-build/static/css/b28513ee0ebc26ad.css +1 -0
  825. package/app/package.json +71 -71
  826. package/app/public/i18n/changelog/en.md +394 -354
  827. package/app/public/i18n/changelog/zh-CN.md +392 -352
  828. package/app/public/i18n/changelog/zh-TW.md +394 -354
  829. package/app/public/i18n/literals/zh-CN.json +41 -6
  830. package/app/public/i18n/literals/zh-TW.json +42 -6
  831. package/app/public/providers/apinex.png +0 -0
  832. package/app/public/providers/atria.png +0 -0
  833. package/app/public/providers/minimax-free.png +0 -0
  834. package/app/public/providers/opencode-zen.png +0 -0
  835. package/app/public/providers/tokenharbor.png +0 -0
  836. package/package.json +61 -61
  837. package/app/.next-cli-build/server/chunks/890.js +0 -1
  838. package/app/.next-cli-build/static/chunks/1321-8478f2be717a38f6.js +0 -1
  839. package/app/.next-cli-build/static/chunks/5497-7d66b43a3bbcf07d.js +0 -7
  840. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-912bf60e8bad7f94.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-2b9ff155b9d0f304.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-2b9ff155b9d0f304.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-2b9ff155b9d0f304.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-2b9ff155b9d0f304.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-2b9ff155b9d0f304.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-2b9ff155b9d0f304.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-2b9ff155b9d0f304.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-2b9ff155b9d0f304.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-2b9ff155b9d0f304.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-2b9ff155b9d0f304.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-2b9ff155b9d0f304.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-2b9ff155b9d0f304.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-profiles/route-2b9ff155b9d0f304.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-2b9ff155b9d0f304.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-2b9ff155b9d0f304.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-2b9ff155b9d0f304.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-2b9ff155b9d0f304.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-2b9ff155b9d0f304.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-2b9ff155b9d0f304.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-2b9ff155b9d0f304.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-2b9ff155b9d0f304.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-2b9ff155b9d0f304.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-2b9ff155b9d0f304.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-2b9ff155b9d0f304.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-2b9ff155b9d0f304.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-2b9ff155b9d0f304.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-2b9ff155b9d0f304.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-2b9ff155b9d0f304.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-2b9ff155b9d0f304.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-2b9ff155b9d0f304.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-2b9ff155b9d0f304.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/combos/route-2b9ff155b9d0f304.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-2b9ff155b9d0f304.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-2b9ff155b9d0f304.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-2b9ff155b9d0f304.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-2b9ff155b9d0f304.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-2b9ff155b9d0f304.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-2b9ff155b9d0f304.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/health/route-2b9ff155b9d0f304.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/init/route-2b9ff155b9d0f304.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-2b9ff155b9d0f304.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-2b9ff155b9d0f304.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/keys/route-2b9ff155b9d0f304.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/locale/route-2b9ff155b9d0f304.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-2b9ff155b9d0f304.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-2b9ff155b9d0f304.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-2b9ff155b9d0f304.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-2b9ff155b9d0f304.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-2b9ff155b9d0f304.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-2b9ff155b9d0f304.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-2b9ff155b9d0f304.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-2b9ff155b9d0f304.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-2b9ff155b9d0f304.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/models/caps/route-2b9ff155b9d0f304.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-2b9ff155b9d0f304.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-2b9ff155b9d0f304.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-2b9ff155b9d0f304.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/models/route-2b9ff155b9d0f304.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/models/test/route-2b9ff155b9d0f304.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-2b9ff155b9d0f304.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-2b9ff155b9d0f304.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-2b9ff155b9d0f304.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-2b9ff155b9d0f304.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-2b9ff155b9d0f304.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-2b9ff155b9d0f304.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-2b9ff155b9d0f304.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-2b9ff155b9d0f304.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-2b9ff155b9d0f304.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-2b9ff155b9d0f304.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-2b9ff155b9d0f304.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-2b9ff155b9d0f304.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-2b9ff155b9d0f304.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-2b9ff155b9d0f304.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-2b9ff155b9d0f304.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-2b9ff155b9d0f304.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-2b9ff155b9d0f304.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder/checkin/route-2b9ff155b9d0f304.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder-cn/checkin/route-2b9ff155b9d0f304.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-2b9ff155b9d0f304.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-2b9ff155b9d0f304.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-2b9ff155b9d0f304.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-2b9ff155b9d0f304.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-kill/route-2b9ff155b9d0f304.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-status/route-2b9ff155b9d0f304.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-2b9ff155b9d0f304.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-2b9ff155b9d0f304.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/pricing/route-2b9ff155b9d0f304.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-2b9ff155b9d0f304.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-2b9ff155b9d0f304.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-2b9ff155b9d0f304.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-2b9ff155b9d0f304.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-2b9ff155b9d0f304.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-2b9ff155b9d0f304.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-2b9ff155b9d0f304.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-2b9ff155b9d0f304.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-2b9ff155b9d0f304.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/providers/route-2b9ff155b9d0f304.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-2b9ff155b9d0f304.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-2b9ff155b9d0f304.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-2b9ff155b9d0f304.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-2b9ff155b9d0f304.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-2b9ff155b9d0f304.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-2b9ff155b9d0f304.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-2b9ff155b9d0f304.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-2b9ff155b9d0f304.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-2b9ff155b9d0f304.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-2b9ff155b9d0f304.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-2b9ff155b9d0f304.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-2b9ff155b9d0f304.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-2b9ff155b9d0f304.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-2b9ff155b9d0f304.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-2b9ff155b9d0f304.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-2b9ff155b9d0f304.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-2b9ff155b9d0f304.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/security/status/route-2b9ff155b9d0f304.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-2b9ff155b9d0f304.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-2b9ff155b9d0f304.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-2b9ff155b9d0f304.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-2b9ff155b9d0f304.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/settings/route-2b9ff155b9d0f304.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-2b9ff155b9d0f304.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/tags/route-2b9ff155b9d0f304.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-2b9ff155b9d0f304.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-2b9ff155b9d0f304.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-2b9ff155b9d0f304.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-2b9ff155b9d0f304.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-2b9ff155b9d0f304.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-2b9ff155b9d0f304.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-2b9ff155b9d0f304.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-2b9ff155b9d0f304.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-2b9ff155b9d0f304.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-2b9ff155b9d0f304.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-2b9ff155b9d0f304.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-2b9ff155b9d0f304.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-2b9ff155b9d0f304.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-2b9ff155b9d0f304.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-2b9ff155b9d0f304.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-2b9ff155b9d0f304.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-2b9ff155b9d0f304.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-2b9ff155b9d0f304.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-2b9ff155b9d0f304.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-2b9ff155b9d0f304.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-2b9ff155b9d0f304.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/usage/quotas/route-2b9ff155b9d0f304.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-2b9ff155b9d0f304.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-2b9ff155b9d0f304.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-2b9ff155b9d0f304.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-2b9ff155b9d0f304.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-2b9ff155b9d0f304.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-2b9ff155b9d0f304.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-2b9ff155b9d0f304.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-2b9ff155b9d0f304.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-2b9ff155b9d0f304.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-2b9ff155b9d0f304.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-2b9ff155b9d0f304.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-2b9ff155b9d0f304.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-2b9ff155b9d0f304.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-2b9ff155b9d0f304.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-2b9ff155b9d0f304.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-2b9ff155b9d0f304.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-2b9ff155b9d0f304.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-2b9ff155b9d0f304.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/v1/route-2b9ff155b9d0f304.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-2b9ff155b9d0f304.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-2b9ff155b9d0f304.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-2b9ff155b9d0f304.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-2b9ff155b9d0f304.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-2b9ff155b9d0f304.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-2b9ff155b9d0f304.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-2b9ff155b9d0f304.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-2b9ff155b9d0f304.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-2b9ff155b9d0f304.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/version/route-2b9ff155b9d0f304.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-2b9ff155b9d0f304.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/version/update/route-2b9ff155b9d0f304.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/landing/page-38924391f8649361.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-2b9ff155b9d0f304.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/page-2b9ff155b9d0f304.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-2b9ff155b9d0f304.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-2b9ff155b9d0f304.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-2b9ff155b9d0f304.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-2b9ff155b9d0f304.js +0 -1
  1023. package/app/.next-cli-build/static/css/bdf1d87cd5f4db94.css +0 -1
  1024. package/app/.next-cli-build/static/hWZt96TEErc6dGwTZrX7O/_buildManifest.js +0 -1
  1025. /package/app/.next-cli-build/static/{hWZt96TEErc6dGwTZrX7O → TWKzsrjlsswyo8nggSyiE}/_ssgManifest.js +0 -0
@@ -1,7 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5497],{98:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(31474);function i({label:e,options:t=[],value:a,onChange:s,placeholder:l="Select an option",error:o,hint:d,disabled:c=!1,required:u=!1,className:m,selectClassName:x,...p}){return(0,n.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-1.5",m),children:[e&&(0,n.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,u&&(0,n.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)("select",{value:a,onChange:s,disabled:c,className:(0,r.cn)("w-full py-2.5 px-3 pr-10 text-sm text-text-main","bg-surface-2 border border-transparent rounded-[10px] appearance-none","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",o&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",x),...p,children:[(0,n.jsx)("option",{value:"",disabled:!0,children:l}),t.map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,n.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),o&&(0,n.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,n.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},929:(e,t,a)=>{a.d(t,{yU:()=>m});var n=a(12115),r=a(990);let i=null,s=null,l=null,o=null;function d(){return i?Promise.resolve(i):s||(s=fetch("/api/models").then(async e=>{if(!e.ok)throw Error(`models ${e.status}`);return i=function(e){let t={},a={};for(let n of e||[])n.caps&&(n.fullModel&&(t[n.fullModel]=n.caps),n.routedModel&&(t[n.routedModel]=n.caps),n.model&&(a[n.model]=n.caps));return{byFull:t,byId:a}}((await e.json()).models)}).catch(()=>({byFull:{},byId:{}})).finally(()=>{s=null}))}function c(){return l?Promise.resolve(l):o||(o=fetch("/api/models/caps").then(async e=>{if(!e.ok)throw Error(`caps ${e.status}`);let t=await e.json();return l=t.caps&&"object"==typeof t.caps?t.caps:{}}).catch(()=>({})).finally(()=>{o=null}))}function u(e,t,a,n){if(!n)return null;let i=n.includes("/")?n.slice(0,n.indexOf("/")):null,s=n.includes("/")?n.slice(n.indexOf("/")+1):n,l=e=>{let t=i?a[i]?.[s]:null;return t?{...e||{},...t.contextWindow?{contextWindow:t.contextWindow}:{},...t.maxOutput?{maxOutput:t.maxOutput}:{}}:e};if(e[n])return l(e[n]);if(t[s])return l(t[s]);let o=(0,r.nl)(i,s);return l({vision:o.vision,search:o.search,reasoning:o.reasoning,contextWindow:o.contextWindow,maxOutput:o.maxOutput})}function m(){let[e,t]=(0,n.useState)(()=>i?.byFull||{}),[a,r]=(0,n.useState)(()=>i?.byId||{}),[m,x]=(0,n.useState)(()=>l||{}),p=(0,n.useCallback)(()=>{i=null,s=null,l=null,o=null,Promise.all([d(),c()]).then(([e,a])=>{t(e.byFull),r(e.byId),x(a||{})})},[]);return(0,n.useEffect)(()=>{if(c().then(x),i){t(i.byFull),r(i.byId);return}let e=!0;return d().then(a=>{e&&(t(a.byFull),r(a.byId))}),()=>{e=!1}},[]),{getCaps:(0,n.useCallback)(t=>u(e,a,m,t),[e,a,m]),getBaseCaps:(0,n.useCallback)(t=>u(e,a,{},t),[e,a]),overrides:m,refresh:p}}},990:(e,t,a)=>{a.d(t,{Q5:()=>function e(t,a=null,n=null,r=0){if(!t?.length||r>6)return null;let i=t.map(t=>{if(!t.includes("/")&&a?.[t])return e(a[t],a,n,r+1)??n?.(t)??g(null,t);let i=t.indexOf("/"),s=g(-1===i?null:t.slice(0,i),-1===i?t:t.slice(i+1)),l=n?.(t);return l?{...s,...l}:s}),s=i[0];return{vision:i.some(e=>e.vision),pdf:i.some(e=>e.pdf),audioInput:i.some(e=>e.audioInput),videoInput:i.some(e=>e.videoInput),imageOutput:i.some(e=>e.imageOutput),audioOutput:i.some(e=>e.audioOutput),search:i.some(e=>e.search),tools:i.every(e=>e.tools),reasoning:s.reasoning,thinkingFormat:s.thinkingFormat,thinkingCanDisable:s.thinkingCanDisable,thinkingRange:s.thinkingRange,contextWindow:Math.min(...i.map(e=>e.contextWindow)),maxOutput:Math.max(...i.map(e=>e.maxOutput))}},nl:()=>g});var n=a(62630);let r={vision:!1,pdf:!1,audioInput:!1,videoInput:!1,imageOutput:!1,audioOutput:!1,search:!1,tools:!0,reasoning:!1,thinkingFormat:null,thinkingCanDisable:!0,thinkingRange:null,contextWindow:2e5,maxOutput:64e3},i={"claude-fable-5-1":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},"claude-opus-5":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-5-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-5-agentic":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-5-5":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-5.5":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-5.5-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-5.5-agentic":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-5.5-thinking-agentic":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"muse-spark-1.2-contributor-free":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:131072},"muse-spark-1.3-contributor-free":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:131072},"big-pickle":{reasoning:!0,thinkingFormat:"openai",contextWindow:262144,maxOutput:65536},"mimo-v2.5-free":{reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:65536},"ling-3.0-flash-fin-free":{reasoning:!0,thinkingFormat:"openai",contextWindow:131072,maxOutput:32768},"nemotron-3-ultra-free":{reasoning:!0,thinkingFormat:"openai",contextWindow:262144,maxOutput:65536},"nemotron-3.5-lightning-free":{reasoning:!0,thinkingFormat:"openai",contextWindow:262144,maxOutput:65536},"claude-opus-5-thinking-agentic":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.7":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-7":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.8":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-8":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.8-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-8-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.6-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-6-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-4.6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-4-6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5-5":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5-agentic":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5-thinking-agentic":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"gpt-image-1":{imageOutput:!0,tools:!1},"glm-4.6v":{vision:!0,reasoning:!0,thinkingFormat:"zai",contextWindow:128e3},"GLM-4.6V-Flash":{vision:!0,reasoning:!0,thinkingFormat:"zai",contextWindow:2e5},"glm-5.3-flash":{vision:!0,videoInput:!0,pdf:!0,reasoning:!0,thinkingFormat:"zai",contextWindow:1e6,maxOutput:131072},"vision-model":{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6},"coder-model":{reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6},"glm-5.3":{reasoning:!0,thinkingFormat:"zai",contextWindow:1e6,maxOutput:131072},"glm-5.2":{reasoning:!0,thinkingFormat:"zai",contextWindow:1e6,maxOutput:131072},"glm-5.1":{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5,maxOutput:131072},"glm-5":{reasoning:!0,thinkingFormat:"zai",contextWindow:204800,maxOutput:131072},"qwen3.8-max":{vision:!0,videoInput:!0,pdf:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:131072},"qwen3.8-flash":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:131072},"mimo-v2-pro":{contextWindow:1048576,maxOutput:131072},"mimo-v2.5-pro":{contextWindow:1048576,maxOutput:131072},"mimo-v2.6-pro":{vision:!0,audioInput:!0,videoInput:!0,contextWindow:1048576,maxOutput:131072},"mimo-v2.6-flash":{vision:!0,audioInput:!0,videoInput:!0,contextWindow:1048576,maxOutput:131072},"mimo-v2.6-flash-free":{vision:!0,audioInput:!0,videoInput:!0,contextWindow:1048576,maxOutput:131072},"mimo-v2.6-pro-ultraspeed":{vision:!0,audioInput:!0,videoInput:!0,contextWindow:1048576,maxOutput:131072},"mimo-v2.6-pro-claude":{vision:!0,audioInput:!0,videoInput:!0,contextWindow:1048576,maxOutput:131072},"mimo-v2-omni":{vision:!0,audioInput:!0,videoInput:!0,pdf:!0,contextWindow:262144,maxOutput:131072},hy3:{reasoning:!0,thinkingFormat:"hunyuan",contextWindow:256e3,maxOutput:128e3},"hy3-preview":{reasoning:!0,thinkingFormat:"hunyuan",contextWindow:256e3,maxOutput:64e3},"step-5-preview":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"step",contextWindow:1e6},"step-3.7-flash":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"step",contextWindow:256e3},"step-3.5-flash":{reasoning:!0,thinkingFormat:"step",contextWindow:256e3},"step-3.5-flash-2603":{reasoning:!0,thinkingFormat:"step",contextWindow:256e3},"step-1o-turbo-vision":{vision:!0,contextWindow:32e3},"step-router-v1":{reasoning:!0,thinkingFormat:"step",contextWindow:256e3},"grok-4.5":{vision:!0,pdf:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:5e5,maxOutput:5e5},"grok-4.6":{vision:!0,pdf:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:5e5,maxOutput:5e5},"grok-4.7":{vision:!0,pdf:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:5e5,maxOutput:5e5},"gpt-5.6-luna":{vision:!0,pdf:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:105e4,maxOutput:128e3},"gpt-6-luna":{vision:!0,pdf:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:105e4,maxOutput:128e3},"kimi-k2.6":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",contextWindow:262144,maxOutput:262144},"kimi-k3":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:131072},k3:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:131072},"kimi-for-coding":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:65536},"kimi-for-coding-highspeed":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:65536},"kimi-k2.7-code":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:65536},"kimi-k2.7-code-highspeed":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:65536},"agnes-2.5-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:512e3,maxOutput:65536},"agnes-2.5-pro":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},"deepseek-v4-flash-vision-exp":{vision:!0,reasoning:!0,thinkingFormat:"deepseek",contextWindow:1e6,maxOutput:384e3},"deepseek-flash":{vision:!0,reasoning:!0,thinkingFormat:"deepseek",contextWindow:1e6,maxOutput:384e3},"deepseek-v4.1-flash":{vision:!0,reasoning:!0,thinkingFormat:"deepseek",contextWindow:1e6,maxOutput:384e3},"deepseek-v4-1-flash":{vision:!0,reasoning:!0,thinkingFormat:"deepseek",contextWindow:1e6,maxOutput:384e3},"muse-spark-1.1":{vision:!0,videoInput:!0,pdf:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:131072},"muse-spark-1.2":{vision:!0,videoInput:!0,pdf:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:131072},"muse-spark-1.3":{vision:!0,videoInput:!0,pdf:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:131072},"muse-spark-1.2-contributor":{vision:!0,videoInput:!0,pdf:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:131072},"muse-spark-1.3-contributor":{vision:!0,videoInput:!0,pdf:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:131072},"fugu-ultra":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:131072},"hy4-preview":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:64e3},"gpt-audio":{audioInput:!0,audioOutput:!0,contextWindow:128e3,maxOutput:16384},"gpt-audio-mini":{audioInput:!0,audioOutput:!0,contextWindow:128e3,maxOutput:16384},"LongCat-2.0":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:131072},"LongCat-2.5-Preview":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:131072},"longcat-2.0":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:131072},"longcat-2.5-preview-free":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:131072},"space-bunny-free":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:524288},"sensenova-6.8-flash-lite":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:262144,maxOutput:65536},"venice-uncensored-1-2":{vision:!0,contextWindow:128e3,maxOutput:8192},"morph-v3-large":{tools:!1,contextWindow:32e3,maxOutput:32e3},"morph-v3-fast":{tools:!1,contextWindow:16e3,maxOutput:16e3}},s={vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3},l={vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:372e3,maxOutput:128e3},o={vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3},d={...o,contextWindow:872e3},c={vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:128e3};function u(e,t){let a={...e};for(let[n,r]of Object.entries(t))a[n]=e[r];return a}let m={"Qwen3.8-Max":"qmodel_38max","Qwen3.7-Max":"qmodel_latest","Qwen3.7-Plus":"qmodel","Qwen3.8-Flash":"qfmodel","Kimi-K3":"kmodel_latest","Kimi-K2.7-Code":"kmodel","GLM-5.3":"gmodel","GLM-5.3-Flash":"gfmodel","DeepSeek-V4-Pro":"dmodel","DeepSeek-V4-Flash":"dfmodel","MiniMax-M3":"mmodel"},x={...m,"Qwen3.7-Flash":"q37fmodel","GLM-5.2":"gm51model"},p={antigravity:{"gemini-pro-agent":{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65535}},nvidia:{"minimaxai/minimax-m2.7":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:131072},"minimaxai/minimax-m3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:512e3,maxOutput:131072},"z-ai/glm-5.2":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:128e3},"deepseek-ai/deepseek-v4-pro":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:65536},"deepseek-ai/deepseek-v4-flash":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:65536}},amd:{"DeepSeek-V4-Flash":{reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:65536},"DeepSeek-V4-Flash-Vision-Exp":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:65536},"Qwen3.8-Flash-Next":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!0,contextWindow:262144,maxOutput:32768},"MiniCPM5-2B":{reasoning:!1,contextWindow:131072,maxOutput:32768}},dahl:{"zai-org/GLM-5.3-Flash":{vision:!0,videoInput:!0,pdf:!0,reasoning:!0,thinkingFormat:"zai",contextWindow:1e6,maxOutput:131072},"deepseek-ai/DeepSeek-V4-Flash-0731":{reasoning:!0,thinkingFormat:"deepseek",contextWindow:1e6,maxOutput:384e3}},atria:{"Atria-Dawn-Preview":{vision:!1,reasoning:!1}},tokenharbor:{"deepseek-v4.1-flash:free":{vision:!0,reasoning:!0,thinkingFormat:"deepseek",contextWindow:1e6,maxOutput:384e3}},codex:{"gpt-6-astra":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3},"gpt-6-sol":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3},"gpt-6-luna":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3},"gpt-6-astra[1m]":d,"gpt-6-sol[1m]":d,"gpt-6-luna[1m]":d,"gpt-5.6-sol[1m]":d,"gpt-5.6-terra[1m]":d,"gpt-5.6-luna[1m]":d,"gpt-5.6-sol":l,"gpt-5.6-sol-review":l,"gpt-5.6-terra":o,"gpt-5.6-terra-review":o,"gpt-5.6-luna":o,"gpt-5.6-luna-review":o,"gpt-daybreak-blue-latest":o,"gpt-reserve":o},kiro:{"gpt-5.6-sol":s,"gpt-5.6-terra":s,"gpt-5.6-luna":s,"gpt-5.6-sol-thinking":s,"gpt-5.6-terra-thinking":s,"gpt-5.6-luna-thinking":s,"gpt-5.6-sol-agentic":s,"gpt-5.6-terra-agentic":s,"gpt-5.6-luna-agentic":s,"gpt-5.6-sol-thinking-agentic":s,"gpt-5.6-terra-thinking-agentic":s,"gpt-5.6-luna-thinking-agentic":s},"devin-cli":{"gpt-5.4-high":c,"gpt-5.4-medium":c,"gpt-5.4-low":c,"gpt-5.5-xhigh":c,"gpt-5.5-high":c,"gpt-5.5-medium":c,"gpt-5.5-low":c},"codebuddy-cn":{"glm-5.2":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!0,contextWindow:1e6,maxOutput:48e3},"glm-5.1":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"glm-5v-turbo":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:64e3},"minimax-m3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:512e3,maxOutput:128e3},"kimi-k2.7":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},"kimi-k2.6":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},hy3:{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:192e3,maxOutput:64e3},"hy4-preview":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:64e3},"glm-5.3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!0,contextWindow:1e6,maxOutput:48e3},"glm-5.3-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!0,contextWindow:1e6,maxOutput:32e3},"kimi-k3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:32e3},"deepseek-v4-pro":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!0,contextWindow:1e6,maxOutput:384e3},"deepseek-v4.1-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!0,contextWindow:1e6,maxOutput:128e3}},qoder:u({auto:{vision:!0,reasoning:!0,thinkingFormat:"claude-adaptive",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},ultimate:{vision:!0,reasoning:!0,thinkingFormat:"claude-adaptive",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},performance:{vision:!0,reasoning:!0,thinkingFormat:"claude-adaptive",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},efficient:{vision:!0,reasoning:!0,thinkingFormat:"claude-adaptive",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},dmodel:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},dfmodel:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},gmodel:{reasoning:!0,thinkingFormat:"zai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},gfmodel:{vision:!0,reasoning:!0,thinkingFormat:"zai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},kmodel_latest:{vision:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},kmodel:{vision:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:65536},mmodel:{reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:512e3},qmodel_latest:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},qmodel:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},qfmodel:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},qmodel_38max:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536}},{...m,Auto:"auto",Ultimate:"ultimate",Performance:"performance",Efficient:"efficient"}),"qoder-cn":u({auto:{vision:!0,reasoning:!0,thinkingFormat:"claude-adaptive",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},dmodel:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},dfmodel:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},gmodel:{reasoning:!0,thinkingFormat:"zai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},gfmodel:{vision:!0,reasoning:!0,thinkingFormat:"zai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},gm51model:{reasoning:!0,thinkingFormat:"zai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:48e3},kmodel_latest:{vision:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},kmodel:{vision:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:65536},mmodel:{reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:512e3},qmodel_latest:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},qmodel:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},q37fmodel:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},qfmodel:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},qmodel_38max:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536}},{...x,Auto:"auto"}),poolside:{"laguna-s-2.1":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:32e3},"laguna-xs-2.1":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:32e3}}};p.cx=p.codex,p.dv=p["devin-cli"],p.devin=p["devin-cli"];let h=[{pattern:"*claude*opus-5*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude*sonnet-5*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude*opus-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*opus-4.7*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*opus-4.8*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*sonnet-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*sonnet-4.7*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*haiku*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*opus*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*sonnet*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*fable*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude*mythos*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude-3*",caps:{vision:!0}},{pattern:"*claude*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*gemini*image*",caps:{vision:!0,imageOutput:!0,contextWindow:1048576}},{pattern:"*gemini-3.8*",caps:{vision:!0,audioInput:!0,videoInput:!0,pdf:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-3.7*",caps:{vision:!0,audioInput:!0,videoInput:!0,pdf:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-3*pro*",caps:{vision:!0,audioInput:!0,videoInput:!0,pdf:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65535}},{pattern:"*gemini-3*",caps:{vision:!0,audioInput:!0,videoInput:!0,pdf:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-2.5*",caps:{vision:!0,audioInput:!0,videoInput:!0,pdf:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-budget",thinkingRange:{min:0,max:24576},contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-2*",caps:{vision:!0,audioInput:!0,videoInput:!0,search:!0,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini*",caps:{vision:!0,search:!0,contextWindow:1048576}},{pattern:"*gemma*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*nanobanana*",caps:{vision:!0,imageOutput:!0}},{pattern:"*gpt-6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:105e4,maxOutput:128e3}},{pattern:"*gpt-5*image*",caps:{imageOutput:!0}},{pattern:"*gpt-5*codex*",caps:{reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3}},{pattern:"*gpt-5.4-mini*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3}},{pattern:"*gpt-5.4-nano*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3}},{pattern:"*gpt-5.4*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:105e4,maxOutput:128e3}},{pattern:"*gpt-5.5*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:105e4,maxOutput:128e3}},{pattern:"*gpt-5.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:105e4,maxOutput:128e3}},{pattern:"*gpt-5*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3}},{pattern:"*gpt-4o*",caps:{vision:!0,search:!0,contextWindow:128e3,maxOutput:16384}},{pattern:"*gpt-4.1*",caps:{vision:!0,contextWindow:1e6,maxOutput:32768}},{pattern:"*gpt-4-turbo*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*gpt-4*",caps:{contextWindow:128e3}},{pattern:"*gpt-3.5*",caps:{contextWindow:16385,maxOutput:4096}},{pattern:"*gpt-oss*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3}},{pattern:"*o1-mini*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3}},{pattern:"*o1*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o3*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o4*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*grok*image*",caps:{imageOutput:!0}},{pattern:"*grok-code*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*grok-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:5e5,maxOutput:5e5}},{pattern:"*grok-4.5*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:5e5,maxOutput:64e3}},{pattern:"*grok-4*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*grok-3*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:131072}},{pattern:"*grok*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*qwen*vl*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*qwen*omni*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:262144,maxOutput:65536}},{pattern:"*qwen*coder*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6}},{pattern:"*qwen*max*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen3.5*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen3.6*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen3.7*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen*plus*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen*235b*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*qwq*",caps:{reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:131072}},{pattern:"*qwen*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*kimi*k3*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:131072}},{pattern:"*kimi*for-coding*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:65536}},{pattern:"*kimi*k2.7*code*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:65536}},{pattern:"*kimi*k2*",caps:{vision:!0,reasoning:!0,thinkingFormat:"kimi",contextWindow:262144,maxOutput:262144}},{pattern:"*kimi*",caps:{reasoning:!0,thinkingFormat:"kimi",contextWindow:262144}},{pattern:"*glm-5*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5,maxOutput:128e3}},{pattern:"*glm-4.7*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5,maxOutput:128e3}},{pattern:"*glm-4*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5}},{pattern:"*glm*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5}},{pattern:"*deepseek-v4*",caps:{reasoning:!0,thinkingFormat:"deepseek",contextWindow:1e6,maxOutput:384e3}},{pattern:"*reasoner*",caps:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:128e3}},{pattern:"*deepseek-r*",caps:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:128e3}},{pattern:"*deepseek-chat*",caps:{contextWindow:128e3}},{pattern:"*deepseek*",caps:{reasoning:!0,thinkingFormat:"deepseek",contextWindow:128e3}},{pattern:"*minimax*image*",caps:{imageOutput:!0}},{pattern:"*minimax-m3*",caps:{vision:!0,reasoning:!0,thinkingFormat:"minimax",contextWindow:1e6,maxOutput:131072}},{pattern:"*minimax-m2.7*",caps:{vision:!0,reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:204800,maxOutput:131072}},{pattern:"*minimax-m2.5*",caps:{vision:!0,reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:204800,maxOutput:131072}},{pattern:"*minimax*",caps:{reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:131072}},{pattern:"*mimo*preview*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:131072}},{pattern:"*mimo*v2.5*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:131072}},{pattern:"*mimo*omni*",caps:{vision:!0,audioInput:!0,reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:262144,maxOutput:131072}},{pattern:"*mimo*",caps:{vision:!0,reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:262144,maxOutput:131072}},{pattern:"*llama-4*",caps:{vision:!0,contextWindow:1e6}},{pattern:"*llama*",caps:{contextWindow:128e3}},{pattern:"*codestral*",caps:{contextWindow:256e3}},{pattern:"*mistral-large*",caps:{vision:!0,contextWindow:256e3}},{pattern:"*mistral*",caps:{contextWindow:128e3}},{pattern:"*command-a-vision*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*command*",caps:{contextWindow:128e3}},{pattern:"*sonar*",caps:{search:!0,contextWindow:128e3}},{pattern:"*pplx*",caps:{search:!0,contextWindow:128e3}},{pattern:"*perplexity*",caps:{search:!0,contextWindow:128e3}},{pattern:"*laguna-s-2.1*free*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:32e3}},{pattern:"*laguna-s-2.1*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:32e3}},{pattern:"*laguna*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:32e3}},{pattern:"*seed-2-0-pro*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:256e3,maxOutput:128e3}},{pattern:"*seed-2.0-pro*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:256e3,maxOutput:128e3}},{pattern:"*seed-2-0-code*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:262144,maxOutput:131072}},{pattern:"*seed-2.0-code*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:262144,maxOutput:131072}},{pattern:"*seed-2-0-mini*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:256e3,maxOutput:131072}},{pattern:"*seed-2.0-mini*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:256e3,maxOutput:131072}},{pattern:"*seed-2-0-lite*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:256e3,maxOutput:131072}},{pattern:"*seed-2.0-lite*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:256e3,maxOutput:131072}},{pattern:"*seed-code*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:256e3,maxOutput:32768}},{pattern:"*hunyuan*",caps:{reasoning:!0,thinkingFormat:"hunyuan",contextWindow:262144,maxOutput:262144}},{pattern:"hy3*",caps:{reasoning:!0,thinkingFormat:"hunyuan",contextWindow:262144,maxOutput:262144}},{pattern:"*step-*",caps:{reasoning:!0,thinkingFormat:"step",contextWindow:128e3}},{pattern:"*nemotron*",caps:{reasoning:!0,contextWindow:128e3}},{pattern:"*ling-*",caps:{reasoning:!0,contextWindow:128e3}}];function g(e,t){if(!t)return{...r};let a=t.includes("/")?t.split("/").pop():t;if(e){let n=p[e];if(n?.[t])return{...r,...n[t]};if(n?.[a])return{...r,...n[a]}}if(i[a])return{...r,...i[a]};if(i[t])return{...r,...i[t]};for(let{pattern:e,caps:i}of h)if((0,n.gH)(e,a)||(0,n.gH)(e,t))return{...r,...i};return{...r}}},1620:(e,t,a)=>{a.d(t,{D:()=>o});var n=a(12115),r=a(90085);function i(e){let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function s(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function l(){return!1}function o(){let{theme:e,setTheme:t,toggleTheme:a,initTheme:o}=(0,r.A)(),d=(0,n.useSyncExternalStore)(i,s,l);(0,n.useEffect)(()=>{o()},[o]),(0,n.useEffect)(()=>{if("system"!==e)return;let t=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>o();return t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[e,o]);let c="dark"===e||"system"===e&&d;return{theme:e,setTheme:t,toggleTheme:a,isDark:c}}},4823:(e,t,a)=>{a.d(t,{default:()=>m});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(84588),o=a(98),d=a(56061);let c="__none__",u=[{value:"none",label:"None (single pool)"},{value:"round-robin",label:"Round-robin"},{value:"random",label:"Random"}];function m({providerId:e}){let[t,a]=(0,r.useState)([]),[i,s]=(0,r.useState)(c),[x,p]=(0,r.useState)("none"),[h,g]=(0,r.useState)(!1),[f,b]=(0,r.useState)(!1),[v,y]=(0,r.useState)(""),[k,j]=(0,r.useState)(""),[w,N]=(0,r.useState)("");(0,r.useEffect)(()=>{let t=!1;return Promise.all([fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.ok?e.json():{proxyPools:[]}),fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{})]).then(([n,r])=>{if(t)return;a(n.proxyPools||[]);let i=(r.providerStrategies||{})[e]||{};s(i.proxyPoolId||c),p(i.rotateStrategy||"none"),y("zcode-free"===e&&r.zcodeGatewayHost||""),j("zcode-free"===e&&r.zcodeGatewayPort||""),N("zcode-free"===e&&r.zcodeGatewayPath||"")}).catch(()=>{}),()=>{t=!0}},[e]);let C=(0,r.useCallback)(async(t,a)=>{g(!0);try{let n=await fetch("/api/settings",{cache:"no-store"}),r=(n.ok?await n.json():{}).providerStrategies||{},i={...r[e]||{}};t===c?delete i.proxyPoolId:i.proxyPoolId=t,"none"===a?delete i.rotateStrategy:i.rotateStrategy=a;let s={...r};0===Object.keys(i).length?delete s[e]:s[e]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:s})}),b(!0),setTimeout(()=>b(!1),1500)}catch(e){console.log("Save proxy config error:",e)}finally{g(!1)}},[e]),S=(0,r.useCallback)(async(e,t,a)=>{g(!0);try{let n=await fetch("/api/settings",{cache:"no-store"});n.ok&&await n.json();let r={zcodeGatewayHost:String(e||"").trim(),zcodeGatewayPort:String(t||"").trim(),zcodeGatewayPath:String(a||"").trim()};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),b(!0),setTimeout(()=>b(!1),1500)}catch(e){console.log("Save gateway host error:",e)}finally{g(!1)}},[]),O=t.length>=2,F="none"!==x;return(0,n.jsxs)(l.default,{children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,n.jsx)("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-full bg-green-500/10 text-green-500",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("p",{className:"text-sm font-medium",children:"No authentication required"}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:"This provider is ready to use. Optionally route requests through a proxy pool to bypass IP-based limits."})]}),f&&(0,n.jsx)(d.default,{variant:"success",size:"sm",children:"Saved"})]}),(0,n.jsx)(o.default,{label:"Proxy Pool",value:i,onChange:e=>{var t;s(t=e.target.value),C(t,x)},disabled:h||F,options:[{value:c,label:"None (direct)"},...t.map(e=>({value:e.id,label:e.name}))],hint:F?"Pool selector is ignored when rotation is active — all active pools are used.":void 0}),(0,n.jsxs)("div",{className:"flex flex-col gap-2 mt-4",children:[(0,n.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Rotation Strategy"}),(0,n.jsx)("select",{value:x,onChange:e=>{var t;p(t=e.target.value),C(i,t)},disabled:h,className:"py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all disabled:opacity-50",children:u.map(e=>(0,n.jsx)("option",{value:e.value,disabled:"none"!==e.value&&!O,children:e.label},e.value))}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:O?F?"round-robin"===x?`Rotating through all ${t.length} active pools in order. State is in-memory (resets on restart).`:`Picking a random pool from ${t.length} active pools each request.`:"Uses the selected pool above. Set to Round-robin or Random to rotate across all active pools.":"Need at least 2 active proxy pools for rotation."})]}),"zcode-free"===e&&(0,n.jsxs)("div",{className:"flex flex-col gap-2 mt-4 pt-4 border-t border-black/5 dark:border-white/5",children:[(0,n.jsx)("label",{className:"text-sm font-medium text-text-main",children:"CreditDaddy 网关主机"}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("input",{value:v,onChange:e=>y(e.target.value),placeholder:"留空 = 本机 127.0.0.1;局域网填 CreditDaddy 主机 IP",className:"flex-1 py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,n.jsx)("input",{value:k,onChange:e=>j(e.target.value),placeholder:"47860",className:"w-24 py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,n.jsx)("input",{value:w,onChange:e=>N(e.target.value),placeholder:"/gateway/v1/messages",className:"w-44 py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,n.jsx)("button",{onClick:()=>S(v,k,w),disabled:h,className:"px-3 py-2 text-sm rounded-md bg-primary text-white disabled:opacity-50",children:"保存"})]}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:"CreditDaddy 桌面版开启「体验包接口」后即为本机可用;局域网主机需在其面板开启「局域网」并重启。 远程主机需鉴权——建一个带 key 的连接(key = 其「10Router 连接设置」里的虚拟 key)。"})]})]})}m.propTypes={providerId:s().string.isRequired}},7648:(e,t,a)=>{a.d(t,{default:()=>c});var n=a(95155),r=a(12115),i=a(73321),s=a(65921),l=a(92622),o=a(24747),d=a(32486);function c({children:e}){let[t,u]=(0,r.useState)(!1),[m,x]=(0,r.useState)(!1);(0,r.useEffect)(()=>{x("1"===window.localStorage.getItem("sidebarCollapsed"))},[]);let p=(0,i.usePathname)(),h=(0,s.i)(e=>e.notifications),g=(0,s.i)(e=>e.removeNotification);return(0,r.useEffect)(()=>{let e=()=>{a.e(6808).then(a.bind(a,6808)).catch(()=>{}),Promise.all([a.e(3842),a.e(839),a.e(124)]).then(a.bind(a,10124)).catch(()=>{})};if("requestIdleCallback"in window){let t=window.requestIdleCallback(e,{timeout:4e3});return()=>window.cancelIdleCallback(t)}let t=setTimeout(e,2500);return()=>clearTimeout(t)},[]),(0,n.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg",children:[(0,n.jsx)("div",{className:"fixed top-[5%] left-1/2 z-[80] flex w-[min(92vw,380px)] -translate-x-1/2 flex-col gap-2",children:h.map(e=>{var t;let a="success"===(t=e.type)?{wrapper:"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",icon:"check_circle"}:"error"===t?{wrapper:"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",icon:"error"}:"warning"===t?{wrapper:"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",icon:"warning"}:{wrapper:"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",icon:"info"};return(0,n.jsx)("div",{className:`rounded-lg border px-3 py-2 shadow-lg backdrop-blur-sm ${a.wrapper}`,children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-5 flex-shrink-0",children:a.icon}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[e.title?(0,n.jsx)("p",{className:"text-xs font-semibold mb-0.5",children:e.title}):null,(0,n.jsx)("p",{className:"text-xs whitespace-pre-wrap break-words",children:e.message})]}),e.dismissible?(0,n.jsx)("button",{type:"button",onClick:()=>g(e.id),className:"text-current/70 hover:text-current","aria-label":"Dismiss notification",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})}):null]})},e.id)})}),t&&(0,n.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 lg:hidden",onClick:()=>u(!1)}),(0,n.jsx)("div",{className:`${m?"hidden":"hidden lg:flex"}`,children:(0,n.jsx)(l.default,{})}),(0,n.jsx)("div",{className:`fixed inset-y-0 left-0 z-50 transform lg:hidden transition-transform duration-300 ease-in-out ${t?"translate-x-0":"-translate-x-full"}`,children:(0,n.jsx)(l.default,{onClose:()=>u(!1)})}),(0,n.jsxs)("main",{className:"flex flex-col flex-1 h-full min-w-0 relative transition-colors duration-300 isolate",children:[(0,n.jsx)("div",{className:"landing-grid absolute inset-0 pointer-events-none -z-10","aria-hidden":"true"}),(0,n.jsx)(o.default,{onMenuClick:()=>u(!0),onDesktopMenuClick:()=>{let e=!m;window.localStorage.setItem("sidebarCollapsed",e?"1":"0"),x(e)},sidebarCollapsed:m},p),(0,n.jsx)(d.default,{}),(0,n.jsx)("div",{className:`flex-1 overflow-y-auto custom-scrollbar ${"/dashboard/basic-chat"===p?"":"p-6 lg:p-10"} ${"/dashboard/basic-chat"===p?"flex flex-col overflow-hidden":""}`,children:(0,n.jsx)("div",{className:`${"/dashboard/basic-chat"===p?"flex-1 w-full h-full flex flex-col":"max-w-7xl mx-auto"}`,children:e})})]})]})}},8247:(e,t,a)=>{a.d(t,{HY:()=>l,Kw:()=>o});let n={"perplexity-agent":"perplexity","gitlab-duo":"gitlab","vercel-ai-gateway":"vercel","b.ai":"bai","b-ai":"bai","siliconflow-cn":"siliconflow","longcat-intl":"longcat","stepfun-cn":"stepfun","stepfun-plan":"stepfun","stepfun-plan-cn":"stepfun","step-cn":"stepfun","stepp-cn":"stepfun",stepp:"stepfun",step:"stepfun","sfp-cn":"stepfun",sfp:"stepfun",sfpcn:"stepfun","sf-cn":"stepfun",sfcn:"stepfun",sf:"stepfun","step-plan-cn":"stepfun","step-plan":"stepfun"},r={bai:".svg"},i=new Set;function s(e){return e&&"string"==typeof e?e.trim().toLowerCase():""}function l(e){let t=function(e){let t=s(e);if(!t||i.has(t))return"";let a=n[t]||t;return i.has(a)?"":a}(e);return t?`/providers/${t}${r[t]||".png"}`:null}function o(e){let t=s(e);t&&i.add(t);let a=n[t];a&&i.add(a)}},11059:(e,t,a)=>{a.d(t,{C:()=>i});var n=a(12115),r=a(65635);function i(e=2e3){let[t,a]=(0,n.useState)(null),s=(0,n.useRef)(null);return{copied:t,copy:(0,n.useCallback)((t,n="default")=>{(0,r.e)(t),a(n),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{a(null)},e)},[e])}}},11910:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(12115),i=a(31474),s=a(73006);function l({label:e,type:t="text",placeholder:a,value:o,onChange:d,error:c,hint:u,icon:m,disabled:x=!1,required:p=!1,reveal:h=!1,className:g,inputClassName:f,...b}){let[v,y]=(0,r.useState)(!1),k=h&&"password"===t;return(0,n.jsxs)("div",{className:(0,i.cn)("flex flex-col gap-1.5",g),children:[e&&(0,n.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,p&&(0,n.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,n.jsxs)("div",{className:"relative",children:[m&&(0,n.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-text-muted",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:m})}),(0,n.jsx)("input",{type:k&&v?"text":t,placeholder:a,value:o,onChange:d,disabled:x,className:(0,i.cn)("w-full py-2.5 px-3 text-sm text-text-main bg-surface-2 rounded-[10px]","border border-transparent placeholder-text-muted/70","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 ease-out disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",m&&"pl-10",k&&"pr-11",c&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",f),...b}),k&&(0,n.jsx)("button",{type:"button",tabIndex:-1,"aria-label":v?(0,s.Tl)("Hide password"):(0,s.Tl)("Show password"),onClick:()=>y(e=>!e),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted hover:text-text-main transition-colors",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:v?"visibility_off":"visibility"})})]}),c&&(0,n.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),c]}),u&&!c&&(0,n.jsx)("p",{className:"text-xs text-text-muted",children:u})]})}},21931:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(12115),i=a(47650),s=a(93308),l=a(73006);let o=e=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},km:{name:"ខ្មែរ",flag:"\uD83C\uDDF0\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"},fa:{name:"فارسی",flag:"\uD83C\uDDEE\uD83C\uDDF7"}})[e]||{name:e,flag:"\uD83C\uDF10"};function d({className:e="",isOpen:t,onClose:a,hideTrigger:c=!1}){let[u,m]=(0,r.useState)("en"),[x,p]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),f=(0,r.useRef)(null),b="boolean"==typeof t,v=b?t:h,y=(e,t=u)=>{b?!e&&a&&a(t):g(e)};(0,r.useEffect)(()=>{m(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${s.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,s.QC)(t)}())},[]),(0,r.useEffect)(()=>{function e(e){f.current&&!f.current.contains(e.target)&&y(!1)}if(v)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[v]);let k=async e=>{if(e!==u&&!x){p(!0);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:e})}),await (0,l.wn)(),m(e),y(!1,e)}catch(e){console.error("Failed to set locale:",e)}finally{p(!1)}}};return(0,n.jsxs)("div",{className:e,children:[!c&&(0,n.jsxs)("button",{onClick:()=>y(!v),disabled:x,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"}),(0,n.jsx)("span",{className:"text-sm font-medium",children:o(u).name}),(0,n.jsx)("span",{className:"text-lg",children:o(u).flag})]}),v&&(0,i.createPortal)((0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>y(!1)}),(0,n.jsxs)("div",{ref:f,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,n.jsx)("button",{onClick:()=>y(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,n.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,n.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:s.YZ.map(e=>{let t=u===e,a=o(e);return(0,n.jsxs)("button",{onClick:()=>k(e),disabled:x,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${t?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${x?"opacity-70 cursor-wait":""}`,title:a.name,children:[(0,n.jsx)("span",{className:"text-2xl",children:a.flag}),(0,n.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:a.name}),t&&(0,n.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},e)})})})]})]}),document.body)]})}},23615:(e,t,a)=>{a.d(t,{default:()=>s});var n=a(95155),r=a(12115),i=a(84588);function s(){let[e,t]=(0,r.useState)([]),[a,s]=(0,r.useState)(!0),[l,o]=(0,r.useState)(!0);(0,r.useEffect)(()=>{d()},[]),(0,r.useEffect)(()=>{let e;return l&&(e=setInterval(()=>{d(!1)},500)),()=>clearInterval(e)},[l]);let d=async(e=!0)=>{e&&s(!0);try{let e=await fetch("/api/usage/logs");if(e.ok){let a=await e.json();t(a)}}catch(e){console.error("Failed to fetch logs:",e)}finally{e&&s(!1)}};return(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("h2",{className:"text-xl font-semibold",children:"Request Logs"}),(0,n.jsx)("div",{className:"flex items-center gap-2",children:(0,n.jsxs)("label",{className:"text-sm font-medium text-text-muted flex items-center gap-2 cursor-pointer",children:[(0,n.jsx)("span",{children:"Auto Refresh (500ms)"}),(0,n.jsx)("div",{onClick:()=>o(!l),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${l?"bg-primary":"bg-bg-alt border border-border"}`,children:(0,n.jsx)("span",{className:`inline-block h-3 w-3 transform rounded-full bg-white transition-transform ${l?"translate-x-5":"translate-x-1"}`})})]})})]}),(0,n.jsx)(i.default,{className:"overflow-hidden bg-black/5 dark:bg-black/20",children:(0,n.jsx)("div",{className:"p-0 overflow-x-auto max-h-[600px] overflow-y-auto font-mono text-xs",children:a&&0===e.length?(0,n.jsx)("div",{className:"p-8 text-center text-text-muted",children:"Loading logs..."}):0===e.length?(0,n.jsx)("div",{className:"p-8 text-center text-text-muted",children:"No logs recorded yet."}):(0,n.jsxs)("table",{className:"w-full text-left border-collapse whitespace-nowrap",children:[(0,n.jsx)("thead",{className:"sticky top-0 bg-bg-alt border-b border-border z-10",children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"DateTime"}),(0,n.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Model"}),(0,n.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Provider"}),(0,n.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Account"}),(0,n.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"In"}),(0,n.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Out"}),(0,n.jsx)("th",{className:"px-3 py-2",children:"Status"})]})}),(0,n.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let a=e.split(" | ");if(a.length<7)return null;let r=a[6],i=r.includes("PENDING"),s=r.includes("FAILED"),l=r.includes("OK");return(0,n.jsxs)("tr",{className:`hover:bg-primary/5 transition-colors ${i?"bg-primary/5":""}`,children:[(0,n.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-text-muted",children:a[0]}),(0,n.jsx)("td",{className:"px-3 py-1.5 border-r border-border font-medium",children:a[1]}),(0,n.jsx)("td",{className:"px-3 py-1.5 border-r border-border",children:(0,n.jsx)("span",{className:"px-1.5 py-0.5 rounded bg-bg-alt border border-border text-[10px] uppercase font-bold",children:a[2]})}),(0,n.jsx)("td",{className:"px-3 py-1.5 border-r border-border truncate max-w-[150px]",title:a[3],children:a[3]}),(0,n.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-primary",children:a[4]}),(0,n.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-success",children:a[5]}),(0,n.jsx)("td",{className:`px-3 py-1.5 font-bold ${l?"text-success":s?"text-danger":"text-primary animate-pulse"}`,children:r})]},t)})})]})})}),(0,n.jsx)("div",{className:"text-[10px] text-text-muted italic",children:"Logs are saved to log.txt in the application data directory."})]})}},23936:(e,t,a)=>{a.d(t,{default:()=>o});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(35497);function o({isOpen:e,onSuccess:t,onClose:a}){let[i,s]=(0,r.useState)(""),[d,c]=(0,r.useState)(!1),[u,m]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),h=async()=>{if(!i.trim())return void m("Please paste your cookie");c(!0),m(null);try{let e=await fetch("/api/oauth/iflow/cookie",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cookie:i.trim()})}),a=await e.json();if(!e.ok)throw Error(a.error||"Authentication failed");p(!0),setTimeout(()=>{t?.(),g()},1500)}catch(e){m(e.message)}finally{c(!1)}},g=()=>{s(""),m(null),p(!1),a?.()};return(0,n.jsx)(l.aF,{isOpen:e,onClose:g,title:"iFlow Cookie Authentication",children:(0,n.jsx)("div",{className:"space-y-4",children:x?(0,n.jsxs)("div",{className:"text-center py-8",children:[(0,n.jsx)("div",{className:"text-6xl mb-4",children:"✅"}),(0,n.jsx)("p",{className:"text-lg font-medium text-text",children:"Authentication Successful!"}),(0,n.jsx)("p",{className:"text-sm text-text-muted mt-2",children:"Fresh API key obtained"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("p",{className:"text-sm text-text-muted",children:["To get a fresh API key, paste your browser cookie from"," ",(0,n.jsx)("a",{href:"https://platform.iflow.cn",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"platform.iflow.cn"})]}),(0,n.jsxs)("div",{className:"bg-surface-2 p-3 rounded-lg text-xs space-y-2",children:[(0,n.jsx)("p",{className:"font-medium text-text",children:"How to get cookie:"}),(0,n.jsxs)("ol",{className:"list-decimal list-inside space-y-1 text-text-muted",children:[(0,n.jsx)("li",{children:"Open platform.iflow.cn in your browser"}),(0,n.jsx)("li",{children:"Login to your account"}),(0,n.jsx)("li",{children:"Open DevTools (F12) → Application/Storage → Cookies"}),(0,n.jsx)("li",{children:"Copy the entire cookie string (must include BXAuth)"}),(0,n.jsx)("li",{children:"Paste it below"})]})]})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-text",children:"Cookie String"}),(0,n.jsx)("textarea",{value:i,onChange:e=>s(e.target.value),placeholder:"BXAuth=xxx; ...",className:"w-full px-3 py-2 bg-surface-2 border border-border rounded-lg text-sm text-text placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-primary resize-none",rows:4,disabled:d})]}),u&&(0,n.jsx)("div",{className:"p-3 bg-danger/10 border border-danger/20 rounded-lg",children:(0,n.jsx)("p",{className:"text-sm text-danger",children:u})}),(0,n.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,n.jsx)(l.$n,{variant:"secondary",onClick:g,disabled:d,fullWidth:!0,children:"Cancel"}),(0,n.jsx)(l.$n,{onClick:h,loading:d,fullWidth:!0,children:"Authenticate"})]})]})})})}o.propTypes={isOpen:s().bool.isRequired,onSuccess:s().func,onClose:s().func}},24747:(e,t,a)=>{a.d(t,{default:()=>C});var n=a(95155),r=a(12115),i=a(73321),s=a(98500),l=a.n(s),o=a(14051),d=a.n(o),c=a(67852),u=a(80752),m=a(93308),x=a(38202),p=a(21931);function h(){let[e,t]=(0,r.useState)(!1),[a,i]=(0,r.useState)("en");return(0,r.useEffect)(()=>{i(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[e]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{onClick:()=>t(!0),className:"flex items-center justify-center p-2 rounded-lg text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5 transition-all",title:"Language","data-i18n-skip":"true",children:(0,n.jsx)("span",{className:"text-lg leading-none",children:x.h[a]||"\uD83C\uDF10"})}),(0,n.jsx)(p.default,{hideTrigger:!0,isOpen:e,onClose:e=>{t(!1),i(e)}})]})}var g=a(38587),f=a(47650),b=a(90620);function v({isOpen:e,onClose:t}){let[a,i]=(0,r.useState)(null),[s,l]=(0,r.useState)(!1),[o,d]=(0,r.useState)(""),c=(0,r.useRef)(null);return((0,r.useEffect)(()=>{e&&!a&&(l(!0),d(""),fetch(b.Nu.donateUrl,{cache:"no-store"}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>i(e)).catch(e=>d(e.message||"Failed to load")).finally(()=>l(!1)))},[e,a]),(0,r.useEffect)(()=>{let a=e=>{c.current&&!c.current.contains(e.target)&&t()};if(e)return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[e,t]),!e||"u"<typeof document)?null:(0,f.createPortal)((0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:t}),(0,n.jsxs)("div",{ref:c,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-3xl flex flex-col max-h-[85vh]",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,n.jsxs)("h2",{className:"text-lg font-semibold text-text-main flex items-center gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-pink-500",children:"volunteer_activism"}),a?.title||"Support 10Router"]}),(0,n.jsx)("button",{onClick:t,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,n.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[s&&(0,n.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,n.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),"Loading..."]}),o&&(0,n.jsxs)("div",{className:"text-red-500 py-4",children:["Failed to load donate info: ",o]}),!s&&!o&&a&&(0,n.jsxs)(n.Fragment,{children:[a.message&&(0,n.jsx)("p",{className:"text-text-muted text-sm mb-6 text-center",children:a.message}),(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:a.channels?.map(e=>(0,n.jsx)(y,{channel:e},e.id))})]})]})]})]}),document.body)}function y({channel:e}){let{label:t,description:a,icon:r,color:i,url:s,qr:l}=e,o=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"w-12 h-12 rounded-full flex items-center justify-center mb-3",style:{backgroundColor:`${i}20`,color:i},children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[26px]",children:r})}),(0,n.jsx)("div",{className:"font-semibold text-text-main mb-1",children:t}),a&&(0,n.jsx)("div",{className:"text-xs text-text-muted mb-3 text-center",children:a}),l&&(0,n.jsx)("img",{src:l,alt:`${t} QR`,className:"w-full max-w-[180px] aspect-square object-contain rounded-lg bg-white p-1",loading:"lazy",decoding:"async"})]});return(0,n.jsxs)("div",{className:"flex flex-col items-center p-4 rounded-xl border border-black/10 dark:border-white/10 bg-surface/50 hover:border-pink-500/40 transition-colors",children:[o,s&&(0,n.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-flex items-center gap-1 px-3 py-1.5 rounded-lg text-sm font-medium text-white hover:opacity-90 transition-opacity",style:{backgroundColor:i},children:["Open",(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"})]})]})}v.propTypes={isOpen:d().bool.isRequired,onClose:d().func.isRequired};var k=a(38003),j=a(88105),w=a(8247),N=a(73006);function C({onMenuClick:e,onDesktopMenuClick:t,showMenuButton:a=!0,sidebarCollapsed:s=!1}){let o=(0,i.usePathname)(),[d,m]=(0,r.useState)(""),[x,p]=(0,r.useState)(""),[f,y]=(0,r.useState)(!1),{title:k,description:O,icon:F,breadcrumbs:W}=(0,r.useMemo)(()=>(e=>{if(!e)return{title:"",description:"",breadcrumbs:[]};let t=e.match(/\/media-providers\/([^/]+)\/([^/]+)$/);if(t){let e=t[1],a=t[2],n=j.rj.find(t=>t.id===e),r=j.Q2[a];return{title:r?.name||a,description:"",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${e}`},{label:n?.label||e,href:`/dashboard/media-providers/${e}`},{label:r?.name||a,image:(0,w.HY)(a)}]}}let a=e.match(/\/media-providers\/([^/]+)$/);if(a){let e=a[1],t=j.rj.find(t=>t.id===e);return{title:t?.label||e,description:`Manage your ${t?.label||e} providers`,icon:t?.icon||"perm_media",breadcrumbs:[]}}let n=e.match(/\/providers\/([^/]+)$/);if(n){let e=n[1],t=b.zN[e]||b.fg[e];if(t)return{title:t.name,description:"",breadcrumbs:[{label:"Providers",href:"/dashboard/providers"},{label:t.name,image:(0,w.HY)(t.id)}]}}return e.includes("/providers")&&!e.includes("/media-providers")?{title:"Providers",description:"Manage your AI provider connections",icon:"dns",breadcrumbs:[]}:e.includes("/combos")?{title:"Combos",description:"Model combos with fallback",icon:"layers",breadcrumbs:[]}:e.includes("/usage")?{title:"Usage & Analytics",description:"Monitor your API usage, token consumption, and request logs",icon:"bar_chart",breadcrumbs:[]}:e.includes("/auth-files")?{title:"Auth Files",description:"Map provider credentials stored in the local database",icon:"vpn_key",breadcrumbs:[]}:e.includes("/quota")?{title:"Quota Tracker",description:"Track and manage your API quota limits",icon:"data_usage",breadcrumbs:[]}:e.includes("/mitm")?{title:"MITM Proxy",description:"Intercept CLI tool traffic and route through 10Router",icon:"security",breadcrumbs:[]}:e.includes("/token-saver")?{title:"Token Saver",description:"Compress prompts and outputs to save tokens",icon:"savings",breadcrumbs:[]}:e.includes("/cli-tools")?{title:"CLI Tools",description:"Configure CLI tools",icon:"terminal",breadcrumbs:[]}:e.includes("/proxy-pools")?{title:"Proxy Pools",description:"Manage your proxy pool configurations",icon:"lan",breadcrumbs:[]}:e.includes("/skills")?{title:"Agent Skills",description:"Copy a link and paste to your AI to use 10Router — no install needed",icon:"extension",breadcrumbs:[]}:e.includes("/endpoint")?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:e.includes("/profile")?{title:"Settings",description:"Manage your preferences",icon:"settings",breadcrumbs:[]}:e.includes("/translator")?{title:"Translator",description:"Debug translation flow between formats",icon:"translate",breadcrumbs:[]}:e.includes("/console-log")?{title:"Console Log",description:"Live server console output",icon:"monitor",breadcrumbs:[]}:e.includes("/experimental")?{title:"Experimental",description:"Beta toggles for provider tools, daily check-ins, and dashboard security",icon:"science",breadcrumbs:[]}:"/dashboard"===e?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:{title:"",description:"",breadcrumbs:[]}})(o),[o]);(0,r.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/auth/status",{cache:"no-store"});if(!t.ok)return;let a=await t.json();e||(m(a?.displayName||a?.samlName||a?.samlEmail||a?.oidcName||a?.oidcEmail||""),p(a?.loginMethod||""))}catch{e||(m(""),p(""))}}(),()=>{e=!0}},[]);let T=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,n.jsxs)("header",{className:"shrink-0 flex items-center justify-between gap-3 px-4 lg:px-8 pt-3 pb-2 border-b border-border-subtle bg-surface/60 backdrop-blur-xl lg:bg-transparent lg:backdrop-blur-none z-20",children:[(0,n.jsx)("div",{className:"flex items-center gap-3 lg:hidden shrink-0",children:a&&(0,n.jsx)("button",{onClick:e,className:"text-text-main hover:text-primary transition-colors",children:(0,n.jsx)("span",{className:"material-symbols-outlined",children:"menu"})})}),t&&(0,n.jsx)("button",{onClick:t,className:"hidden lg:flex items-center justify-center p-2 shrink-0 text-text-main hover:text-primary transition-colors rounded-lg",title:s?(0,N.Tl)("Expand sidebar"):(0,N.Tl)("Collapse sidebar"),"aria-label":s?(0,N.Tl)("Expand sidebar"):(0,N.Tl)("Collapse sidebar"),"aria-expanded":!s,children:(0,n.jsx)("span",{className:`material-symbols-outlined transition-transform duration-200 ${s?"-scale-x-100":""}`,children:"menu_open"})}),(0,n.jsx)("div",{className:"flex flex-col min-w-0 flex-1",children:W.length>0?(0,n.jsx)("div",{className:"flex items-center gap-2",children:W.map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[t>0&&(0,n.jsx)("span",{className:"material-symbols-outlined text-text-muted text-base",children:"chevron_right"}),e.href?(0,n.jsx)(l(),{href:e.href,className:"text-text-muted hover:text-primary transition-colors",children:e.label}):(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[e.image&&(0,n.jsx)(c.A,{src:e.image,alt:e.label,size:28,className:"object-contain rounded max-w-[28px] max-h-[28px]",fallbackText:e.label.slice(0,2).toUpperCase()}),(0,n.jsx)("h1",{className:"text-base lg:text-2xl font-semibold text-text-main tracking-tight truncate",children:(0,N.Tl)(e.label)})]})]},`${e.label}-${e.href||"current"}`))}):k?(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[F&&(0,n.jsx)("span",{className:"material-symbols-outlined text-primary text-xl lg:text-2xl",children:F}),(0,n.jsx)("h1",{className:"text-base lg:text-2xl font-semibold tracking-tight truncate",children:(0,N.Tl)(k)})]}),O&&(0,n.jsx)("p",{className:"hidden lg:block text-sm text-text-muted truncate",children:(0,N.Tl)(O)})]}):null}),(0,n.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[d&&("OIDC"===x||"SAML"===x)&&(0,n.jsxs)("div",{className:"hidden sm:flex items-center max-w-[220px] px-3 py-1.5 rounded-full border border-border bg-surface/70 text-xs text-text-muted truncate",title:d,children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1.5 text-primary",children:"person"}),(0,n.jsx)("span",{className:"truncate",children:d}),(0,n.jsx)("span",{className:"ml-2 shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-primary",children:x})]}),(0,n.jsx)(S,{}),(0,n.jsxs)("button",{onClick:()=>y(!0),className:"flex items-center gap-1.5 px-3 h-8 rounded-lg border border-pink-500/30 bg-pink-500/10 text-pink-600 dark:text-pink-400 hover:bg-pink-500/20 transition-colors text-sm font-medium","aria-label":"Donate",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"volunteer_activism"}),(0,n.jsx)("span",{className:"hidden sm:inline",children:"Donate"})]}),(0,n.jsx)(g.default,{}),(0,n.jsx)(h,{}),(0,n.jsx)(u.default,{onLogout:T})]}),(0,n.jsx)(v,{isOpen:f,onClose:()=>y(!1)})]})}function S(){let e=(0,k.C)(e=>e.visible),t=(0,k.C)(e=>e.query),a=(0,k.C)(e=>e.placeholder),r=(0,k.C)(e=>e.setQuery);return e?(0,n.jsxs)("div",{className:"relative w-[160px] sm:w-[220px]",children:[(0,n.jsx)("span",{className:"material-symbols-outlined absolute left-2 top-1/2 -translate-y-1/2 text-text-muted text-[16px] pointer-events-none",children:"search"}),(0,n.jsx)("input",{type:"text",value:t,onChange:e=>r(e.target.value),placeholder:a,className:"w-full h-8 pl-7 pr-7 rounded-lg border border-border bg-surface/60 text-sm focus:outline-none focus:border-primary/50 transition-colors"}),t&&(0,n.jsx)("button",{type:"button",onClick:()=>r(""),className:"absolute right-1 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-main p-0.5 rounded","aria-label":"Clear search",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}):null}C.propTypes={onMenuClick:d().func,onDesktopMenuClick:d().func,sidebarCollapsed:d().bool,showMenuButton:d().bool}},25086:(e,t,a)=>{a.d(t,{CardSkeleton:()=>o,PageLoading:()=>s,Skeleton:()=>l,Spinner:()=>i,default:()=>d});var n=a(95155),r=a(31474);function i({size:e="md",className:t}){return(0,n.jsx)("span",{className:(0,r.cn)("material-symbols-outlined animate-spin text-brand-500",{sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"}[e],t),children:"progress_activity"})}function s({message:e="Loading..."}){return(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg",children:[(0,n.jsx)(i,{size:"xl"}),(0,n.jsx)("p",{className:"mt-4 text-text-muted",children:e})]})}function l({className:e,...t}){return(0,n.jsx)("div",{className:(0,r.cn)("animate-pulse rounded-[10px] bg-surface-2",e),...t})}function o(){return(0,n.jsxs)("div",{className:"p-6 rounded-[14px] border border-border-subtle bg-surface shadow-[var(--shadow-soft)]",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsx)(l,{className:"h-4 w-24"}),(0,n.jsx)(l,{className:"size-10 rounded-[10px]"})]}),(0,n.jsx)(l,{className:"h-8 w-16 mb-2"}),(0,n.jsx)(l,{className:"h-3 w-20"})]})}function d({type:e="spinner",...t}){switch(e){case"page":return(0,n.jsx)(s,{...t});case"skeleton":return(0,n.jsx)(l,{...t});case"card":return(0,n.jsx)(o,{...t});default:return(0,n.jsx)(i,{...t})}}},28058:(e,t,a)=>{a.d(t,{default:()=>s});var n=a(95155),r=a(12115),i=a(81127);function s({isOpen:e,onClose:t,onAdd:a,addedNames:l=[]}){let[o,d]=(0,r.useState)([]),[c,u]=(0,r.useState)(!1),[m,x]=(0,r.useState)(""),[p,h]=(0,r.useState)("all"),[g,f]=(0,r.useState)(null),[b,v]=(0,r.useState)(null),[y,k]=(0,r.useState)({}),[j,w]=(0,r.useState)({}),[N,C]=(0,r.useState)({});(0,r.useEffect)(()=>{!e||o.length>0||(u(!0),fetch("/api/cli-tools/cowork-mcp-registry").then(e=>e.json()).then(e=>{e.error?f(e.error):d(e.servers||[])}).catch(e=>f(e.message)).finally(()=>u(!1)))},[e]);let S=(0,r.useMemo)(()=>new Set(l),[l]),O=(0,r.useMemo)(()=>{let e=m.trim().toLowerCase();return o.filter(t=>("authless"!==p||!t.oauth)&&("oauth"!==p||!!t.oauth)&&(!e||(t.title||"").toLowerCase().includes(e)||(t.description||"").toLowerCase().includes(e)||(t.name||"").toLowerCase().includes(e)))},[o,m,p]),F=async e=>{if(!y[e.url]){w(t=>({...t,[e.url]:!0}));try{let t=await fetch("/api/cli-tools/cowork-mcp-tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e.url})}),a=await t.json(),n=a.tools||[],r=Array.isArray(e.toolNames)?e.toolNames:[],i=n.length>0?n.map(e=>e.name):r;k(t=>({...t,[e.url]:{tools:n,requiresAuth:!!a.requiresAuth,error:a.error}})),C(t=>({...t,[e.url]:Object.fromEntries(i.map(e=>[e,!0]))}))}catch(t){k(a=>({...a,[e.url]:{tools:[],error:t.message}}))}finally{w(t=>({...t,[e.url]:!1}))}}},W=(e,t)=>{let a=N[e]||{};C(n=>({...n,[e]:Object.fromEntries(Object.keys(a).map(e=>[e,t]))}))};return(0,n.jsx)(i.default,{isOpen:e,onClose:t,title:"Browse MCP Marketplace",size:"lg",children:(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{type:"text",value:m,onChange:e=>x(e.target.value),placeholder:"Search by name or description...",className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,n.jsxs)("select",{value:p,onChange:e=>h(e.target.value),className:"px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:[(0,n.jsx)("option",{value:"all",children:"All"}),(0,n.jsx)("option",{value:"authless",children:"Authless"}),(0,n.jsx)("option",{value:"oauth",children:"OAuth"})]})]}),g&&(0,n.jsx)("div",{className:"px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:g}),c&&(0,n.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-xs py-4 justify-center",children:[(0,n.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),(0,n.jsx)("span",{children:"Loading registry..."})]}),!c&&(0,n.jsxs)("div",{className:"flex flex-col gap-1 max-h-[60vh] overflow-y-auto",children:[0===O.length&&(0,n.jsx)("div",{className:"text-center text-xs text-text-muted py-6",children:"No servers match filter"}),O.map(e=>{let t=S.has(e.slug||e.name),r=b===e.url,i=y[e.url],s=j[e.url],l=N[e.url]||{},o=Object.keys(l),d=Object.values(l).filter(Boolean).length;return(0,n.jsxs)("div",{className:"rounded border border-transparent hover:border-border",children:[(0,n.jsxs)("div",{className:"flex items-start gap-2 px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5",children:[e.iconUrl?(0,n.jsx)("img",{src:e.iconUrl,alt:"",className:"size-7 rounded shrink-0 object-contain",onError:e=>{e.target.style.display="none"},loading:"lazy",decoding:"async"}):(0,n.jsx)("div",{className:"size-7 rounded bg-surface shrink-0"}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,n.jsx)("span",{className:"font-medium text-xs",children:e.title}),e.oauth?(0,n.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-amber-500/10 text-amber-600",children:"OAuth"}):(0,n.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-green-500/10 text-green-600",children:"Authless"}),e.toolCount>0&&(0,n.jsxs)("span",{className:"text-[10px] text-text-muted",children:[e.toolCount," tools"]})]}),e.description&&(0,n.jsx)("p",{className:"text-[10px] text-text-muted line-clamp-2 mt-0.5",children:e.description})]}),(0,n.jsx)("button",{onClick:()=>t?null:void(b===e.url?v(null):(v(e.url),F(e))),disabled:t,className:`shrink-0 px-2 py-1 rounded text-[10px] font-medium transition-colors ${t?"bg-green-500/10 text-green-600 cursor-default":r?"bg-surface border border-border text-text-muted hover:bg-black/5":"bg-primary/10 border border-primary/40 text-primary hover:bg-primary/20"}`,children:t?"Added":r?"Cancel":"+ Add"})]}),r&&(0,n.jsxs)("div",{className:"px-3 py-2 bg-surface/40 border-t border-border flex flex-col gap-2",children:[s&&(0,n.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-[10px] py-1",children:[(0,n.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),(0,n.jsx)("span",{children:"Probing server for tools..."})]}),!s&&i?.requiresAuth&&(0,n.jsx)("p",{className:"text-[10px] text-amber-600 bg-amber-500/10 px-2 py-1 rounded",children:"\uD83D\uDD10 OAuth required. Add now and authenticate after Apply; tool list will be discovered after first connect."}),!s&&i?.error&&!i?.requiresAuth&&(0,n.jsxs)("p",{className:"text-[10px] text-red-600 bg-red-500/10 px-2 py-1 rounded",children:["Probe failed: ",i.error]}),!s&&0===o.length&&!i?.requiresAuth&&!i?.error&&(0,n.jsx)("p",{className:"text-[10px] text-text-muted",children:"No tools advertised by server."}),!s&&o.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("span",{className:"text-[10px] text-text-muted",children:[d,"/",o.length," tools enabled"]}),(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("button",{onClick:()=>W(e.url,!0),className:"text-[10px] text-primary hover:underline",children:"All"}),(0,n.jsx)("span",{className:"text-[10px] text-text-muted",children:"\xb7"}),(0,n.jsx)("button",{onClick:()=>W(e.url,!1),className:"text-[10px] text-primary hover:underline",children:"None"})]})]}),(0,n.jsx)("div",{className:"grid grid-cols-2 gap-1 max-h-40 overflow-y-auto",children:o.map(t=>(0,n.jsxs)("label",{className:"flex items-center gap-1.5 text-[10px] cursor-pointer hover:bg-black/5 dark:hover:bg-white/5 px-1 rounded",children:[(0,n.jsx)("input",{type:"checkbox",checked:!!l[t],onChange:()=>{var a;return a=e.url,void C(e=>({...e,[a]:{...e[a],[t]:!e[a]?.[t]}}))},className:"size-3"}),(0,n.jsx)("span",{className:"truncate",children:t})]},t))})]}),(0,n.jsx)("button",{onClick:()=>{let t,n;return n=Object.keys(t=N[e.url]||{}).filter(e=>t[e]),void(a?.({name:e.slug||e.name,title:e.title,description:e.description,url:e.url,transport:e.transport,oauth:e.oauth,toolNames:n}),v(null))},className:"self-end px-2 py-1 rounded text-[10px] font-medium bg-primary text-white hover:bg-primary/90",children:"✓ Confirm Add"})]})]},e.url)})]}),(0,n.jsxs)("div",{className:"text-[10px] text-text-muted text-right",children:[O.length," of ",o.length," servers"]})]})})}},28067:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(31474);function i({options:e=[],value:t,onChange:a,size:s="md",className:l}){let o={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,n.jsx)("div",{className:(0,r.cn)("inline-flex items-center p-1 rounded-[10px] overflow-x-auto","bg-surface-2",l),children:e.map(e=>(0,n.jsxs)("button",{onClick:()=>a(e.value),className:(0,r.cn)("shrink-0 px-4 rounded-[8px] font-medium transition-all",o[s],t===e.value?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},28815:(e,t,a)=>{a.d(t,{default:()=>o});var n=a(95155),r=a(12115),i=a(81127),s=a(92542),l=a(11059);function o({isOpen:e,onClose:t,title:a="Manual Configuration",configs:d=[]}){let{copy:c}=(0,l.C)(),[u,m]=(0,r.useState)(null);return(0,n.jsx)(i.default,{isOpen:e,onClose:t,title:a,size:"xl",children:(0,n.jsx)("div",{className:"flex flex-col gap-4",children:d.map((e,t)=>(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.filename}),(0,n.jsxs)(s.default,{variant:"ghost",size:"sm",onClick:()=>{var a;return a=e.content,void(c(a,`manualconfig-${t}`),m(t),setTimeout(()=>m(null),2e3))},children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:u===t?"check":"content_copy"}),u===t?"Copied!":"Copy"]})]}),(0,n.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:e.content})]},t))})})}},29366:(e,t,a)=>{a.d(t,{default:()=>s});var n=a(95155),r=a(28777),i=a(97677);function s({caps:e,className:t="",colorOverride:a,size:l=16}){if(!e)return null;let o=Object.keys(r.bs).filter(t=>e[t]);return 0===o.length?null:(0,n.jsx)("span",{className:`inline-flex items-center gap-0.5 ${t}`,children:o.map(e=>(0,n.jsx)(i.default,{text:`${r.bs[e].label} — ${r.bs[e].desc}`,children:(0,n.jsx)("span",{className:`material-symbols-outlined leading-none cursor-help ${a||r.bs[e].color}`,style:{fontSize:`${l}px`},children:r.bs[e].icon})},e))})}},30312:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(35497),o=a(11059);function d({isOpen:e,providerInfo:t,onSuccess:a,onClose:i}){let[s,c]=(0,r.useState)("booting"),[u,m]=(0,r.useState)(null),[x,p]=(0,r.useState)(null),[h,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(null),[v,y]=(0,r.useState)(!1),k=(0,r.useRef)(null),j=(0,r.useRef)({proxyStarted:!1,stopSent:!1}),w=(0,r.useRef)(!1),N=(0,r.useRef)(!1),C=(0,r.useRef)(e),S=(0,r.useRef)(a),O=(0,r.useRef)(i),{copied:F,copy:W}=(0,o.C)();(0,r.useEffect)(()=>{C.current=e,S.current=a,O.current=i});let T=(0,r.useCallback)(()=>{let e=j.current;e.proxyStarted&&!e.stopSent&&(e.stopSent=!0,fetch("/api/oauth/zed/stop-proxy").catch(()=>{}))},[]),I=(0,r.useCallback)(()=>{c("success"),S.current?.(),setTimeout(()=>O.current?.(),600)},[]),$=(0,r.useCallback)(async e=>{if(e?.accessToken&&e?.userId){y(!0),b(null),c("importing");try{let t=await fetch("/api/oauth/zed/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:e.accessToken,userId:e.userId,...e.systemId?{systemId:e.systemId}:{}})}),a=await t.json();if(!t.ok)throw Error(a.error||"Import failed");T(),I()}catch(e){b(e.message),c("ide-found")}finally{y(!1)}}},[I,T]),A=(0,r.useCallback)(async()=>{b(null),p(null),g(""),j.current={proxyStarted:!1,stopSent:!1},N.current=!1;try{let e=await fetch("/api/oauth/zed/start-proxy"),t=await e.json();if(!e.ok||!t.success||!t.callbackUrl)throw Error(t.reason||t.error||"Failed to start Zed callback server");if(j.current.proxyStarted=!0,j.current.stopSent=!1,!C.current)return void T();let a=new URL("/api/oauth/zed/authorize",window.location.origin);a.searchParams.set("redirect_uri",t.callbackUrl);let n=await fetch(a),r=await n.json();if(!n.ok)throw T(),Error(r.error||"Failed to start Zed authorization");if(!C.current)return void T();let i={state:r.state};r.codeVerifier&&(i.codeVerifier=r.codeVerifier),r.systemId&&(i.systemId=r.systemId);let s=await fetch("/api/oauth/zed/register-session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),l=null;try{l=await s.json()}catch{l=null}if(!s.ok||l?.success===!1)throw T(),Error(l?.error||"Failed to register Zed login session");if(!C.current)return;p(r),c(e=>"ide-found"===e||"importing"===e?e:"browser"),k.current=window.open(r.authUrl,"oauth_popup_zed","width=600,height=700")}catch(e){if(!C.current)return;b(e.message),c(e=>"ide-found"===e?e:"browser")}},[T]);(0,r.useEffect)(()=>{if(!e||w.current)return;w.current=!0,c("booting"),m(null),p(null),g(""),b(null),y(!1),N.current=!1,j.current={proxyStarted:!1,stopSent:!1};let t=!1;return(async()=>{let e=A();try{let e=await fetch("/api/oauth/zed/auto-import",{signal:AbortSignal.timeout(12e3)}),a=await e.json();if(t||!C.current)return;if(a.found&&a.accessToken&&a.userId){let e={accessToken:a.accessToken,userId:String(a.userId),systemId:a.systemId||""};m(e),await $(e);return}}catch{}!t&&C.current&&(await e,!t&&C.current&&c("browser"))})(),()=>{t=!0}},[e,A,$]),(0,r.useEffect)(()=>{if(!e&&(w.current=!1,N.current=!0,T(),j.current={proxyStarted:!1,stopSent:!1},k.current&&!k.current.closed))try{k.current.close()}catch{}},[e,T]),(0,r.useEffect)(()=>{if(!x?.state||"importing"===s||"success"===s)return;let e=!1,t=0,a=async()=>{if(!e&&!N.current&&C.current){t+=1;try{let t=await fetch(`/api/oauth/zed/poll-status?state=${encodeURIComponent(x.state)}`),a=await t.json();if(e||N.current)return;if("done"===a.status){N.current=!0,T(),I();return}if("error"===a.status){N.current=!0,b(a.error||"Authentication failed"),c("error");return}}catch{}if(t>=200){b("Authentication timeout"),c("error");return}setTimeout(a,1500)}};return setTimeout(a,1500),()=>{e=!0}},[x,s,I,T]);let P=async()=>{let e=h.trim();if(e){y(!0),b(null);try{let t=await fetch("/api/oauth/zed/exchange",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,state:x?.state,...x?.redirectUri?{redirectUri:x.redirectUri}:{},...x?.codeVerifier?{codeVerifier:x.codeVerifier}:{},...x?.systemId?{systemId:x.systemId}:{}})}),a=await t.json();if(!t.ok)throw Error(a.error||"Exchange failed");N.current=!0,T(),I()}catch(e){b(e.message),c("error")}finally{y(!1)}}},D=()=>{N.current=!0,T(),i()},z=`Connect ${t?.name||"Zed"}`;return(0,n.jsx)(l.aF,{isOpen:e,title:z,onClose:D,size:"lg",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[("booting"===s||"importing"===s)&&(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border border-border rounded-lg bg-sidebar/50",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-base text-primary animate-spin",children:"progress_activity"}),(0,n.jsx)("span",{className:"text-sm",children:"importing"===s?"Importing session from Zed IDE…":"Detecting Zed IDE session…"})]}),"ide-found"===s&&u&&(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,n.jsxs)("p",{className:"text-sm text-green-800 dark:text-green-200",children:["Zed IDE session detected (user ",u.userId,"). Import failed — retry or use browser sign-in below."]})]})}),(0,n.jsx)(l.$n,{onClick:()=>$(u),fullWidth:!0,disabled:v,children:v?"Importing…":"Import from Zed IDE"})]}),"success"===s&&(0,n.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800 text-sm text-green-800 dark:text-green-200",children:"Connected successfully."}),("browser"===s||"error"===s||"ide-found"===s)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border border-border rounded-lg bg-sidebar/50",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-base text-primary animate-spin",children:"progress_activity"}),(0,n.jsx)("span",{className:"text-sm",children:"Waiting for popup authorization…"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 my-1",children:[(0,n.jsx)("div",{className:"flex-1 h-px bg-border"}),(0,n.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wider",children:"Or paste callback URL manually"}),(0,n.jsx)("div",{className:"flex-1 h-px bg-border"})]}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.pd,{value:x?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,n.jsx)(l.$n,{variant:"secondary",icon:"auth_url"===F?"check":"content_copy",onClick:()=>W(x?.authUrl,"auth_url"),disabled:!x?.authUrl,children:"Copy"})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,n.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser (or the local callback page)."}),(0,n.jsx)(l.pd,{value:h,onChange:e=>g(e.target.value),placeholder:"http://127.0.0.1:.../?user_id=...&access_token=...",className:"font-mono text-xs"})]})]}),f&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:f})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:P,fullWidth:!0,disabled:v||!h.trim()||!x,children:v?"Connecting…":"Connect"}),(0,n.jsx)(l.$n,{onClick:D,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}d.propTypes={isOpen:s().bool.isRequired,providerInfo:s().object,onSuccess:s().func,onClose:s().func.isRequired}},30815:(e,t,a)=>{a.d(t,{default:()=>o});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(35497);function o({isOpen:e,onSuccess:t,onClose:a}){let[i,s]=(0,r.useState)(""),[d,c]=(0,r.useState)(""),[u,m]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),[f,b]=(0,r.useState)(!1),[v,y]=(0,r.useState)(!1),k=async()=>{g(!0),m(null),b(!1),y(!1);try{let e=await fetch("/api/oauth/cursor/auto-import"),t=await e.json();t.found?(s(t.accessToken),c(t.machineId),b(!0)):t.windowsManual?y(!0):m(t.error||"Could not auto-detect tokens")}catch(e){m("Failed to auto-detect tokens")}finally{g(!1)}};(0,r.useEffect)(()=>{e&&k()},[e]);let j=async()=>{if(!i.trim())return void m("Please enter an access token");if(!d.trim())return void m("Please enter a machine ID");p(!0),m(null);try{let e=await fetch("/api/oauth/cursor/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:i.trim(),machineId:d.trim()})}),n=await e.json();if(!e.ok)throw Error(n.error||"Import failed");t?.(),a()}catch(e){m(e.message)}finally{p(!1)}};return(0,n.jsx)(l.aF,{isOpen:e,title:"Connect Cursor IDE",onClose:a,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[h&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting tokens..."}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Cursor IDE database"})]}),!h&&(0,n.jsxs)(n.Fragment,{children:[f&&(0,n.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,n.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Tokens auto-detected from Cursor IDE successfully!"})]})}),v&&(0,n.jsxs)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800 flex flex-col gap-2",children:[(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:"Could not read Cursor database automatically."})]}),(0,n.jsxs)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:["Make sure Cursor IDE has been opened at least once, then click ",(0,n.jsx)("strong",{children:"Retry"}),". If the problem persists, paste your tokens manually below."]}),(0,n.jsx)(l.$n,{onClick:k,variant:"outline",fullWidth:!0,children:"Retry"})]}),!f&&!v&&!u&&(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Cursor IDE not detected. Please paste your tokens manually."})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Access Token ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)("textarea",{value:i,onChange:e=>s(e.target.value),placeholder:"Access token will be auto-filled...",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-surface focus:outline-none focus:border-primary resize-none"})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Machine ID ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)(l.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"Machine ID will be auto-filled...",className:"font-mono text-sm"})]}),u&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:u})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:j,fullWidth:!0,disabled:x||!i.trim()||!d.trim(),children:x?"Importing...":"Import Token"}),(0,n.jsx)(l.$n,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}o.propTypes={isOpen:s().bool.isRequired,onSuccess:s().func,onClose:s().func.isRequired}},31474:(e,t,a)=>{a.d(t,{cn:()=>n});function n(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},32486:(e,t,a)=>{a.d(t,{default:()=>d,f:()=>o});var n=a(95155),r=a(12115),i=a(98500),s=a.n(i),l=a(73006);let o="10r:security-status-changed";function d(){let[e,t]=(0,r.useState)(null);if((0,r.useEffect)(()=>{let e=!1,a=()=>{fetch("/api/security/status").then(e=>e.ok?e.json():null).then(a=>{e||t(a)}).catch(()=>{e||t(null)})};return a(),window.addEventListener(o,a),()=>{e=!0,window.removeEventListener(o,a)}},[]),!e)return null;let a=!e.hasPassword&&!e.bootstrapPassword&&!e.ssoConfigured,i=!1===e.requireLogin;if(!a&&!i||i&&e.hideLoginOffBanner)return null;let d=i?(0,l.Tl)("Log-in check is off — anyone who can reach this port can manage every provider, key and credential."):(0,l.Tl)("No dashboard password is set — the dashboard opens on this machine only. Set one on the Settings page.");return(0,n.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b bg-red-500/10 border-red-500/20 text-red-600 dark:text-red-400",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px] shrink-0",children:"warning"}),(0,n.jsx)("p",{className:"text-xs flex-1",children:d}),(0,n.jsx)(s(),{href:"/dashboard/profile",className:"text-xs font-medium underline shrink-0 hover:opacity-80",children:(0,l.Tl)("Open Settings")})]})}},35497:(e,t,a)=>{a.d(t,{x0:()=>N.default,Ex:()=>d.default,$n:()=>n.default,nh:()=>T.default,Zp:()=>s.default,Qv:()=>o.CardSkeleton,CK:()=>p.default,uo:()=>l.ConfirmModal,G9:()=>b.default,wI:()=>w.default,vj:()=>j.default,vE:()=>k.default,pd:()=>r.default,N5:()=>W.default,Mh:()=>f.default,uR:()=>x.default,Nf:()=>h.default,aF:()=>l.default,rq:()=>m.default,gw:()=>C.default,LF:()=>u.default,Wx:()=>F.default,gM:()=>g.default,Iz:()=>S.default,l6:()=>i.default,lM:()=>c.default,m_:()=>O.default,LH:()=>y.default,TE:()=>v.default});var n=a(92542),r=a(11910),i=a(98),s=a(84588),l=a(81127),o=a(25086);a(56319);var d=a(56061),c=a(98542);a(38587),a(21110),a(92622),a(24747),a(92173);var u=a(90882),m=a(72908),x=a(28815),p=a(45455),h=a(28058);a(21931),a(80752),a(80229);var g=a(23615);a(61500);var f=a(62899);a(94230);var b=a(30815),v=a(30312),y=a(49770),k=a(23936),j=a(95088),w=a(73579),N=a(96748),C=a(4823),S=a(28067),O=a(97677),F=a(51825),W=a(76432),T=a(29366);a(32486),a(66996),a(7648),a(91450)},35655:(e,t,a)=>{a.d(t,{$n:()=>p,Ay:()=>h,dI:()=>c,h7:()=>x,jE:()=>u,jH:()=>d,pM:()=>m});var n=a(95155),r=a(14051),i=a.n(r),s=a(31474),l=a(73006),o=a(67352);let d="rounded-[3px]";function c(e){return`hsl(${(0,o.d$)(e)} 68% 46%)`}function u(e){let t=(0,o.d$)(e);return{backgroundImage:`linear-gradient(90deg, hsl(${t} 72% 58%), hsl(${t} 70% 44%))`}}let m={reset:"text-text-muted",expire:"text-text-muted",critical:"text-red-600 dark:text-red-400"};function x(e,t,{expired:a=!1}={}){if(a)return(0,l.Tl)("expired {date}").replace("{date}",(0,o.XV)(t));let n=(0,o.TV)(t);return n?(0,l.Tl)(e?"resets in {duration}":"expires in {duration}").replace("{duration}",n):(0,l.Tl)(e?"resets {date}":"expires {date}").replace("{date}",(0,o.XV)(t))}function p({height:e=5,className:t,children:a,...r}){return(0,n.jsx)("div",{className:(0,s.cn)("relative w-full overflow-hidden",d,"bg-black/10 dark:bg-white/10",t),style:{height:`${e}px`},...r,children:a})}function h({pct:e=0,colorPct:t=null,title:a,...r}){let i=Math.min(100,Math.max(0,Number(e)||0));return(0,n.jsx)(p,{title:a,...r,children:(0,n.jsx)("div",{className:(0,s.cn)("h-full transition-[width] duration-300",d),style:{width:`${i}%`,...u(t??i)}})})}p.propTypes={height:i().number,className:i().string,children:i().node},h.propTypes={pct:i().number,colorPct:i().number,title:i().string}},38003:(e,t,a)=>{a.d(t,{C:()=>n});let n=(0,a(1934).v)(e=>({query:"",placeholder:"",visible:!1,setQuery:t=>e({query:t}),register:(t="Search...")=>e({visible:!0,placeholder:t,query:""}),unregister:()=>e({visible:!1,placeholder:"",query:""})}))},38202:(e,t,a)=>{a.d(t,{h:()=>n});let n={en:"\uD83C\uDDFA\uD83C\uDDF8",vi:"\uD83C\uDDFB\uD83C\uDDF3","zh-CN":"\uD83C\uDDE8\uD83C\uDDF3","zh-TW":"\uD83C\uDDF9\uD83C\uDDFC",ja:"\uD83C\uDDEF\uD83C\uDDF5","pt-BR":"\uD83C\uDDE7\uD83C\uDDF7","pt-PT":"\uD83C\uDDF5\uD83C\uDDF9",ko:"\uD83C\uDDF0\uD83C\uDDF7",es:"\uD83C\uDDEA\uD83C\uDDF8",de:"\uD83C\uDDE9\uD83C\uDDEA",fr:"\uD83C\uDDEB\uD83C\uDDF7",he:"\uD83C\uDDEE\uD83C\uDDF1",ar:"\uD83C\uDDF8\uD83C\uDDE6",ru:"\uD83C\uDDF7\uD83C\uDDFA",pl:"\uD83C\uDDF5\uD83C\uDDF1",cs:"\uD83C\uDDE8\uD83C\uDDFF",nl:"\uD83C\uDDF3\uD83C\uDDF1",tr:"\uD83C\uDDF9\uD83C\uDDF7",uk:"\uD83C\uDDFA\uD83C\uDDE6",tl:"\uD83C\uDDF5\uD83C\uDDED",id:"\uD83C\uDDEE\uD83C\uDDE9",th:"\uD83C\uDDF9\uD83C\uDDED",km:"\uD83C\uDDF0\uD83C\uDDED",hi:"\uD83C\uDDEE\uD83C\uDDF3",bn:"\uD83C\uDDE7\uD83C\uDDE9",ur:"\uD83C\uDDF5\uD83C\uDDF0",ro:"\uD83C\uDDF7\uD83C\uDDF4",sv:"\uD83C\uDDF8\uD83C\uDDEA",it:"\uD83C\uDDEE\uD83C\uDDF9",el:"\uD83C\uDDEC\uD83C\uDDF7",hu:"\uD83C\uDDED\uD83C\uDDFA",fi:"\uD83C\uDDEB\uD83C\uDDEE",da:"\uD83C\uDDE9\uD83C\uDDF0",no:"\uD83C\uDDF3\uD83C\uDDF4",fa:"\uD83C\uDDEE\uD83C\uDDF7"}},38587:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(1620),i=a(31474);let s={system:{icon:"routine",label:"Theme: system",next:"light"},light:{icon:"light_mode",label:"Theme: light",next:"dark"},dark:{icon:"dark_mode",label:"Theme: dark",next:"system"}};function l({className:e,variant:t="default"}){let{theme:a,toggleTheme:o}=(0,r.D)(),d=s[a]||s.system,c={default:(0,i.cn)("flex items-center justify-center size-10 rounded-full","text-text-muted hover:text-text-main","hover:bg-surface-2 transition-colors"),card:(0,i.cn)("flex items-center justify-center size-11 rounded-full","bg-surface/60 hover:bg-surface","border border-border","backdrop-blur-md shadow-sm hover:shadow-[var(--shadow-warm)]","text-text-muted hover:text-brand-500","transition-all group")};return(0,n.jsx)("button",{onClick:o,className:(0,i.cn)(c[t],e),"aria-label":d.label,title:d.label,"data-theme-mode":a,children:(0,n.jsx)("span",{className:(0,i.cn)("material-symbols-outlined text-[22px]","card"===t&&"transition-transform duration-300 group-hover:rotate-12"),children:d.icon})})}},45455:(e,t,a)=>{a.d(t,{default:()=>u});var n=a(95155),r=a(12115),i=a(81127),s=a(11910),l=a(92542),o=a(72908);let d=/^[a-zA-Z0-9_.\-]+$/;function c({index:e,model:t,isFirst:a,isLast:i,onEdit:s,onMoveUp:l,onMoveDown:o,onRemove:d}){let[u,m]=(0,r.useState)(!1),[x,p]=(0,r.useState)(t),h=()=>{let e=x.trim();e&&e!==t?s(e):p(t),m(!1)};return(0,n.jsxs)("div",{className:"group flex min-w-0 items-center gap-1.5 rounded-md bg-black/[0.02] px-2 py-1 transition-colors hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04]",children:[(0,n.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:e+1}),u?(0,n.jsx)("input",{autoFocus:!0,value:x,onChange:e=>p(e.target.value),onBlur:h,onKeyDown:e=>{"Enter"===e.key&&h(),"Escape"===e.key&&(p(t),m(!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,n.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:()=>m(!0),title:"Click to edit",children:t}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,n.jsx)("button",{onClick:l,disabled:a,className:`p-0.5 rounded ${a?"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,n.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,n.jsx)("button",{onClick:o,disabled:i,className:`p-0.5 rounded ${i?"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,n.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,n.jsx)("button",{onClick:d,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function u({isOpen:e,combo:t,onClose:a,onSave:m,activeProviders:x,kindFilter:p=null,forcePrefix:h="",title:g}){let f=t?.name?h&&t.name.startsWith(h)?t.name.slice(h.length):t.name:"",[b,v]=(0,r.useState)(f),[y,k]=(0,r.useState)(t?.models||[]),[j,w]=(0,r.useState)(!1),[N,C]=(0,r.useState)(!1),[S,O]=(0,r.useState)(""),[F,W]=(0,r.useState)({});(0,r.useEffect)(()=>{e&&fetch("/api/models/alias").then(e=>e.ok?e.json():null).then(e=>e&&W(e.aliases||{})).catch(()=>{})},[e]);let T=e=>{if(!e.trim())return O("Name is required"),!1;let t=h+e;return d.test(t)?(O(""),!0):(O("Only letters, numbers, -, _ and . allowed"),!1)},I=e=>{let t=e.target.value;h&&t.startsWith(h)&&(t=t.slice(h.length)),v(t),t?T(t):O("")},$=async()=>{T(b)&&(C(!0),await m({name:h+b.trim(),models:y}),C(!1))},A=!!t;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.default,{isOpen:e,onClose:a,title:g||(A?"Edit Combo":"Create Combo"),children:(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsxs)("div",{children:[h?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("label",{className:"text-sm font-medium mb-1 block",children:"Combo Name"}),(0,n.jsxs)("div",{className:"flex items-stretch",children:[(0,n.jsx)("span",{className:"inline-flex items-center px-2 rounded-l border border-r-0 border-black/10 dark:border-white/10 bg-black/[0.04] dark:bg-white/[0.04] text-text-muted font-mono text-sm",children:h}),(0,n.jsx)("input",{value:b,onChange:I,placeholder:"my-combo",className:"flex-1 min-w-0 rounded-r border border-black/10 dark:border-white/10 bg-white dark:bg-black/20 px-2 py-1.5 font-mono text-sm outline-none focus:border-primary"})]}),S&&(0,n.jsx)("p",{className:"text-[11px] text-red-500 mt-0.5",children:S})]}):(0,n.jsx)(s.default,{label:"Combo Name",value:b,onChange:I,placeholder:"my-combo",error:S}),(0,n.jsxs)("p",{className:"text-[10px] text-text-muted mt-0.5",children:[h?`Auto-prefixed with "${h}". `:"","Only letters, numbers, -, _ and . allowed"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===y.length?(0,n.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,n.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,n.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:y.map((e,t)=>(0,n.jsx)(c,{index:t,model:e,isFirst:0===t,isLast:t===y.length-1,onEdit:e=>{let a=[...y];a[t]=e,k(a)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...y];[t[e-1],t[e]]=[t[e],t[e-1]],k(t)})(t),onMoveDown:()=>(e=>{if(e===y.length-1)return;let t=[...y];[t[e],t[e+1]]=[t[e+1],t[e]],k(t)})(t),onRemove:()=>k(y.filter((e,a)=>a!==t))},t))}),(0,n.jsxs)("button",{onClick:()=>w(!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,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,n.jsx)(l.default,{onClick:a,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,n.jsx)(l.default,{onClick:$,fullWidth:!0,size:"sm",disabled:!b.trim()||!!S||N,children:N?"Saving...":A?"Save":"Create"})]})]})}),j&&(0,n.jsx)(o.default,{isOpen:j,onClose:()=>w(!1),onSelect:e=>{y.includes(e.value)||k([...y,e.value])},onDeselect:e=>{k(y.filter(t=>t!==e.value))},activeProviders:x,modelAliases:F,title:"Add Model to Combo",kindFilter:p,addedModelValues:y,closeOnSelect:!1})]})}},45496:(e,t,a)=>{a.d(t,{F:()=>s,i:()=>i});var n=a(93308);let r={en:{sym:"$",rate:1},"zh-CN":{sym:"¥",rate:7.2},"zh-TW":{sym:"NT$",rate:31.5},ja:{sym:"\xa5",rate:155},ko:{sym:"₩",rate:1350},vi:{sym:"₫",rate:25e3},"pt-BR":{sym:"R$",rate:5.5},"pt-PT":{sym:"€",rate:.92},es:{sym:"€",rate:.92},de:{sym:"€",rate:.92}};function i(){if("u"<typeof localStorage)return!0;let e=localStorage.getItem("useRegionalCurrency");return null===e||"0"!==e}function s(e,t=2){let a=e||0;if(!i())return`$${a.toFixed(t)}`;let l=r[(0,n.QC)(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${n.CL}=`));return e?decodeURIComponent(e.split("=")[1]):"en"}())];return l?`${l.sym}${(a*l.rate).toFixed(t)}`:`$${a.toFixed(t)}`}},49770:(e,t,a)=>{a.d(t,{default:()=>c});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(35497),o=a(73006);let d=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function c({provider:e,isOpen:t,onSuccess:a,onClose:i}){let s="mimo-desktop"===e?"mimo-desktop":"xiaomi-mimo",u="mimo-desktop"===s,[m,x]=(0,r.useState)("detecting"),p=u?m:"cloud",[h,g]=(0,r.useState)(null),[f,b]=(0,r.useState)(!1),[v,y]=(0,r.useState)(!1),[k,j]=(0,r.useState)(null),[w,N]=(0,r.useState)(null),[C,S]=(0,r.useState)(""),[O,F]=(0,r.useState)(null),[W,T]=(0,r.useState)(null),[I,$]=(0,r.useState)(null),[A,P]=(0,r.useState)(""),[D,z]=(0,r.useState)(!1),E=async()=>{x("detecting"),j(null),N(null),S(""),g(null),F(null),T(null),P(""),b(!1),y(!1);let e=await fetch("/api/oauth/xiaomi-mimo/auto-import"),t=await e.json();t.found?(g(t),x("found")):(x("not-found"),b(!!t.desktopLocked),N(t.code||null),S(t.details||""),j((0,o.Tl)(t.error||"Xiaomi MiMo Desktop credentials not found on this machine.")))};(0,r.useEffect)(()=>{if(!t||!u)return;let e=!1;return(async()=>{x("detecting"),j(null),N(null),S(""),g(null),F(null),T(null),P(""),b(!1);try{let t=await fetch("/api/oauth/xiaomi-mimo/auto-import"),a=await t.json();if(e)return;a.found?(g(a),x("found")):(x("not-found"),b(!!a.desktopLocked),N(a.code||null),S(a.details||""),j((0,o.Tl)(a.error||"Xiaomi MiMo Desktop credentials not found on this machine.")))}catch{e||(x("not-found"),j((0,o.Tl)("Failed to read local Xiaomi MiMo Desktop credentials.")))}})(),()=>{e=!0}},[t,u]),(0,r.useEffect)(()=>{if(!t||!u||"not-found"!==m)return;let e=setInterval(async()=>{try{let e=await fetch("/api/oauth/xiaomi-mimo/auto-import");(await e.json()).found&&E()}catch{}},4e3);return()=>clearInterval(e)},[t,m,u]);let _=async()=>{let e=!!h?.sessionOnly;if(h?.apiKey||e){x("importing"),j(null);try{let t=await fetch("/api/oauth/xiaomi-mimo/api-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:h.apiKey||void 0,uid:h.uid,baseUrl:h.baseUrl,sessionOnly:e,provider:s})}),n=await t.json();if(!t.ok||!n.success)throw Error((0,o.Tl)(n.error||"Import failed"));a?.(n.connection),i()}catch(e){x("found"),j(e.message)}}},M=async()=>{y(!0);try{await fetch("/api/oauth/xiaomi-mimo/desktop-kill",{method:"POST"})}catch{}setTimeout(()=>{y(!1),E().catch(()=>x("not-found"))},1500)},L=async()=>{j(null),P("");try{let e=function(e=""){let t=globalThis.crypto;if("function"==typeof t?.randomUUID)return e+t.randomUUID();if("function"==typeof t?.getRandomValues){let a=t.getRandomValues(new Uint8Array(16));return a[6]=15&a[6]|64,a[8]=63&a[8]|128,e+d[a[0]]+d[a[1]]+d[a[2]]+d[a[3]]+"-"+d[a[4]]+d[a[5]]+"-"+d[a[6]]+d[a[7]]+"-"+d[a[8]]+d[a[9]]+"-"+d[a[10]]+d[a[11]]+d[a[12]]+d[a[13]]+d[a[14]]+d[a[15]]}return e+Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,10)+"-"+Math.random().toString(36).slice(2,10)}(),t=await fetch(`/api/oauth/${s}/authorize?state=${e}`),a=await t.json();if(a.authorizeUrl)F(a.authorizeUrl),T(a.manualUrl||null),$(a.state),window.open(a.authorizeUrl,"_blank","width=600,height=700");else throw Error((0,o.Tl)(a.error||"Failed to start OAuth"))}catch(e){j(e.message)}},R=async e=>{let t=await fetch(`/api/oauth/${s}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:e})}),n=await t.json();if(!n.success)throw Error((0,o.Tl)(n.error||"Exchange failed"));a?.(n.connection),i()},U=async()=>{let e=A.trim();if(!e)return void j((0,o.Tl)("Paste the authorization code first."));z(!0),j(null);try{let t=await fetch(`/api/oauth/${s}/submit-code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e})}),a=await t.json();if(!t.ok||"done"!==a.status)throw Error((0,o.Tl)(a.error||"Could not read that code."));await R(a.state||I)}catch(e){j(e.message)}finally{z(!1)}},q=async()=>{if(I){j(null);try{let e=await fetch(`/api/oauth/${s}/poll-status?state=${I}`),t=await e.json();if("done"===t.status&&t.result)await R(I);else if("error"===t.status)throw Error((0,o.Tl)(t.error||"OAuth failed"));else j((0,o.Tl)("Authorization not completed yet. Finish in the browser, then click Check Again."))}catch(e){j(e.message)}}};return(0,n.jsx)(l.aF,{isOpen:t,title:(0,o.Tl)("Connect Xiaomi MiMo"),onClose:i,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:["cloud"===p&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2 items-start",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,n.jsxs)("div",{className:"text-sm text-blue-800 dark:text-blue-200",children:[(0,n.jsx)("p",{className:"font-medium",children:(0,o.Tl)("Cloud models — sign in with the browser")}),(0,n.jsx)("p",{className:"mt-1 opacity-80",children:(0,o.Tl)("This card bills the cloud API, so it uses the browser authorization or an sk- API key. Desktop credits belong to the MiMo Desktop card.")})]})]})}),k&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),O?(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:[(0,n.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:(0,o.Tl)("Browser opened. Complete the Xiaomi sign-in there.")}),(0,n.jsxs)("p",{className:"text-sm text-blue-800 dark:text-blue-200 mt-1 opacity-80",children:[(0,o.Tl)("The page may show an authorization code — paste it below. If it came back automatically instead, click")," ",(0,n.jsx)("strong",{children:(0,o.Tl)("Check Again")}),"."]})]}),k&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),k&&(0,n.jsx)(l.$n,{onClick:L,variant:"outline",fullWidth:!0,children:(0,o.Tl)("Sign in via Browser")}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium mb-2",children:(0,o.Tl)("Authorization Code")}),(0,n.jsx)("textarea",{value:A,onChange:e=>P(e.target.value),placeholder:(0,o.Tl)("Paste the authorization code shown in the browser"),rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-surface focus:outline-none focus:border-primary resize-none"}),(0,n.jsx)("p",{className:"text-xs text-text-muted mt-1",children:(0,o.Tl)("The code is a long string (100+ characters) — copy it whole, using the Copy button on the sign-in page.")}),W&&(0,n.jsx)("a",{href:W,target:"_blank",rel:"noreferrer",className:"inline-block text-xs text-primary hover:underline mt-2",children:(0,o.Tl)("Open the code page")})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:U,disabled:D||!A.trim(),fullWidth:!0,children:D?(0,o.Tl)("Checking..."):(0,o.Tl)("Submit Code")}),(0,n.jsx)(l.$n,{onClick:q,variant:"outline",fullWidth:!0,children:(0,o.Tl)("Check Again")})]})]}):(0,n.jsx)(l.$n,{onClick:L,fullWidth:!0,children:(0,o.Tl)("Sign in via Browser")})]}),"detecting"===p&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:(0,o.Tl)("Reading local credentials...")}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:(0,o.Tl)("Checking Xiaomi MiMo Desktop's local profile (auth.json + cookie store)")})]}),"found"===p&&h&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,n.jsxs)("div",{className:"text-sm text-green-800 dark:text-green-200",children:[(0,n.jsx)("p",{className:"font-medium",children:h.sessionOnly?(0,o.Tl)("Xiaomi MiMo Desktop session detected!"):(0,o.Tl)("Xiaomi MiMo Desktop credentials found!")}),(0,n.jsxs)("p",{className:"mt-1 opacity-80",children:[(0,o.Tl)("UID"),": ",h.uid||"—"," \xb7 ",(0,o.Tl)("Source"),":"," ",h.source?.split(/[\\/]/).pop()]}),(0,n.jsx)("p",{className:"mt-1 opacity-80",children:h.hasDesktopSession?(0,o.Tl)("Desktop account session detected — the Desktop models will be available."):h.desktopLocked?(0,o.Tl)("Desktop is running and is holding its credential store — quit it to unlock the Desktop models."):(0,o.Tl)("No desktop account session found — sign in to MiMo Desktop, then retry.")})]})]})}),k&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),h.sessionOnly&&(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2 items-start",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"lightbulb"}),(0,n.jsxs)("div",{className:"text-sm text-blue-800 dark:text-blue-200",children:[(0,n.jsx)("p",{className:"font-medium",children:(0,o.Tl)("Want the metered models too?")}),(0,n.jsx)("p",{className:"mt-1 opacity-80",children:(0,o.Tl)("This card covers the Desktop models. The metered and subscription-plan models are on the MiMo card — open that card there.")})]})]})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:_,fullWidth:!0,children:h.sessionOnly?(0,o.Tl)("Connect with Desktop Session"):(0,o.Tl)("Connect with Local Credentials")}),(0,n.jsx)(l.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:(0,o.Tl)("Cancel")})]})]}),"importing"===p&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:(0,o.Tl)("Connecting...")})]}),"not-found"===p&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,n.jsxs)("div",{className:"flex gap-2 items-start",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,n.jsxs)("div",{className:"text-sm text-amber-800 dark:text-amber-200",children:[(0,n.jsx)("p",{className:"font-medium",children:f?(0,o.Tl)("Quit Xiaomi MiMo Desktop and retry"):(0,o.Tl)("Local credentials not found")}),(0,n.jsx)("p",{className:"mt-1 opacity-80",children:"DESKTOP_LOCKED"===w?(0,o.Tl)("The desktop app keeps an exclusive lock on its credential store while it runs."):"AUTH_FILE_MISSING"===w?(0,o.Tl)("Make sure Xiaomi MiMo Desktop is installed and you are signed in, then retry."):k}),C&&(0,n.jsxs)("details",{className:"mt-1 opacity-70",children:[(0,n.jsx)("summary",{className:"cursor-pointer",children:(0,o.Tl)("Checked paths")}),(0,n.jsx)("pre",{className:"mt-1 whitespace-pre-wrap break-all text-[10px]",children:C})]}),(0,n.jsx)("p",{className:"mt-2 opacity-80",children:(0,o.Tl)("Make sure MiMo Desktop is signed in on this machine.")})]})]})}),(0,n.jsx)(l.$n,{onClick:()=>{E().catch(()=>x("not-found"))},variant:"outline",fullWidth:!0,disabled:v,children:(0,o.Tl)("Retry Local Detect")}),f&&(0,n.jsx)(l.$n,{onClick:M,variant:"outline",fullWidth:!0,disabled:v,className:"mt-2",children:v?(0,o.Tl)("Closing MiMo Desktop..."):(0,o.Tl)("Quit MiMo Desktop and re-detect")})]})]})})}c.propTypes={provider:s().string,isOpen:s().bool.isRequired,onSuccess:s().func,onClose:s().func.isRequired}},51825:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(84588),i=a(76432),s=a(45496),l=a(73006);let o={mode:{label:"Mode",format:e=>e},defaultModel:{label:"Model",format:e=>e,mono:!0},baseUrl:{label:"Endpoint",format:e=>e,isLink:!0,mono:!0},costPerQuery:{label:"Cost / call",format:e=>0===e?"Free":(0,s.F)(e,4)},pricingUrl:{label:"Pricing",format:()=>"View pricing",isLink:!0},freeTier:{label:"Free tier",format:e=>e},freeMonthlyQuota:{label:"Free quota",format:e=>0===e?"—":e>=999999?"Unlimited":`${e.toLocaleString()} / mo`},searchTypes:{label:"Types",format:e=>e.join(", ")},formats:{label:"Formats",format:e=>e.join(", ")},maxMaxResults:{label:"Max results",format:e=>e},maxCharacters:{label:"Max chars",format:e=>e.toLocaleString()}};function d({config:e,provider:t,title:a="Provider Info"}){if(!e)return null;let s=Object.entries(o).filter(([t])=>void 0!==e[t]&&null!==e[t]&&""!==e[t]).map(([t,a])=>({key:t,label:a.label,value:a.format(e[t]),isLink:a.isLink,mono:a.mono,raw:e[t]})),c=t?.notice?.apiKeyUrl||t?.website,u=t?.notice?.webUrl,m=t?.notice?.text;return(0,n.jsxs)(r.default,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold",children:a}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[u?(0,n.jsxs)("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Web console"]}):c&&(0,n.jsxs)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]}),(0,n.jsx)(i.default,{code:t?.notice?.inviteCode})]})]}),(0,n.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-2",children:[s.map(e=>(0,n.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,n.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0",children:e.label}),e.isLink?(0,n.jsx)("a",{href:e.raw,target:"_blank",rel:"noopener noreferrer",className:`text-sm text-primary hover:underline truncate ${e.mono?"font-mono":""}`,children:e.value}):(0,n.jsx)("span",{className:`text-sm text-text-main truncate ${e.mono?"font-mono":""}`,children:e.value})]},e.key)),m&&(0,n.jsxs)("div",{className:"flex items-start gap-3 min-w-0 sm:col-span-2",children:[(0,n.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0 mt-0.5",children:"Notice"}),(0,n.jsx)("span",{className:"text-sm text-text-main leading-relaxed",children:(0,l.Tl)(m)})]})]})]})}},56061:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(31474);let i={default:"bg-surface-2 text-text-muted",primary:"bg-brand-500/10 text-brand-600 dark:text-brand-300",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400"},s={sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function l({children:e,variant:t="default",size:a="md",dot:o=!1,icon:d,className:c}){return(0,n.jsxs)("span",{className:(0,r.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold",i[t],s[a],c),children:[o&&(0,n.jsx)("span",{className:(0,r.cn)("size-1.5 rounded-full","success"===t&&"bg-green-500","warning"===t&&"bg-yellow-500","error"===t&&"bg-red-500","info"===t&&"bg-blue-500","primary"===t&&"bg-brand-500","default"===t&&"bg-gray-500")}),d&&(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:d}),e]})}},56319:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(31474);function i({src:e,alt:t="Avatar",name:a,size:s="md",className:l}){let o={xs:"size-6 text-xs",sm:"size-8 text-sm",md:"size-10 text-base",lg:"size-12 text-lg",xl:"size-16 text-xl"};return e?(0,n.jsx)("div",{className:(0,r.cn)("rounded-full bg-cover bg-center bg-no-repeat","ring-2 ring-white dark:ring-surface-dark shadow-sm",o[s],l),style:{backgroundImage:`url(${e})`},role:"img","aria-label":t}):(0,n.jsx)("div",{className:(0,r.cn)("rounded-full flex items-center justify-center font-semibold text-white","ring-2 ring-white dark:ring-surface-dark shadow-sm",o[s],(e=>{if(!e)return"bg-primary";let t=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],a=e.charCodeAt(0)%t.length;return t[a]})(a),l),role:"img","aria-label":t,children:(e=>{if(!e)return"?";let t=e.split(" ");return t.length>=2?`${t[0][0]}${t[1][0]}`.toUpperCase():e.substring(0,2).toUpperCase()})(a)})}},61500:(e,t,a)=>{a.d(t,{default:()=>o});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(35497);function o({isOpen:e,onMethodSelect:t,onClose:a}){let[i,s]=(0,r.useState)(null),[d,c]=(0,r.useState)(""),[u,m]=(0,r.useState)("us-east-1"),[x,p]=(0,r.useState)(""),[h,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(""),[v,y]=(0,r.useState)("us-east-1"),[k,j]=(0,r.useState)(null),[w,N]=(0,r.useState)(!1),[C,S]=(0,r.useState)(!1),[O,F]=(0,r.useState)(!1),[W,T]=(0,r.useState)(null);(0,r.useEffect)(()=>{"import"===i&&e&&(async()=>{S(!0),j(null),F(!1),T(null);try{let e=await fetch("/api/oauth/kiro/auto-import"),t=await e.json();t.found?(p(t.refreshToken),F(!0),t.clientId&&t.clientSecret&&T({clientId:t.clientId,clientSecret:t.clientSecret,region:t.region,authMethod:t.authMethod,profileArn:t.profileArn})):j(t.error||"Could not auto-detect token")}catch(e){j("Failed to auto-detect token")}finally{S(!1)}})()},[i,e]);let I=e=>{s(e),j(null)},$=()=>{s(null),j(null)},A=async()=>{if(!x.trim())return void j("Please enter a refresh token");N(!0),j(null);try{let e=await fetch("/api/oauth/kiro/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:x.trim(),...W||{}})}),a=await e.json();if(!e.ok)throw Error(a.error||"Import failed");t("import")}catch(e){j(e.message)}finally{N(!1)}},P=async()=>{if(!h.trim())return void j("Please paste CLIProxyAPI auth JSON");N(!0),j(null);try{let e=await fetch("/api/oauth/kiro/import-cli-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({json:h.trim()})}),a=await e.json();if(!e.ok)throw Error(a.error||"CLIProxyAPI import failed");t("import-cli-proxy")}catch(e){j(e.message)}finally{N(!1)}},D=async()=>{if(!f.trim())return void j("Please enter an API key");N(!0),j(null);try{let e=await fetch("/api/oauth/kiro/api-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:f.trim(),region:v.trim()||"us-east-1"})}),a=await e.json();if(!e.ok)throw Error(a.error||"Import failed");t("api-key")}catch(e){j(e.message)}finally{N(!1)}},z=e=>{t("social",{provider:e})};return(0,n.jsx)(l.aF,{isOpen:e,title:"Connect Kiro",onClose:a,size:"lg",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[!i&&(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Choose your authentication method:"}),(0,n.jsx)("button",{onClick:()=>t("builder-id"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"shield"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"AWS Builder ID"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Recommended for most users. Free AWS account required."})]})]})}),(0,n.jsx)("button",{onClick:()=>I("idc"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"business"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"AWS IAM Identity Center"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"For enterprise users with custom AWS IAM Identity Center."})]})]})}),(0,n.jsx)("button",{onClick:()=>I("api-key"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"key"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"API Key"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Use a long-lived Kiro/CodeWhisperer API key (headless auth)."})]})]})}),(0,n.jsx)("button",{onClick:()=>I("social-google"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"account_circle"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"Google Account"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your Google account (manual callback)."})]})]})}),(0,n.jsx)("button",{onClick:()=>I("social-github"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"code"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"GitHub Account"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your GitHub account (manual callback)."})]})]})}),(0,n.jsx)("button",{onClick:()=>I("import"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"file_upload"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"Import Token"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Paste refresh token from Kiro IDE."})]})]})}),(0,n.jsx)("button",{onClick:()=>I("import-cli-proxy"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"data_object"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"Import CLIProxyAPI JSON"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Paste external_idp auth JSON from CLIProxyAPI/Kiro Microsoft login."})]})]})})]}),"idc"===i&&(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["IDC Start URL ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)(l.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"https://your-org.awsapps.com/start",className:"font-mono text-sm"}),(0,n.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Your organization's AWS IAM Identity Center URL"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,n.jsx)(l.pd,{value:u,onChange:e=>m(e.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,n.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for your Identity Center (default: us-east-1)"})]}),k&&(0,n.jsx)("p",{className:"text-sm text-red-600",children:k}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:()=>{d.trim()?t("idc",{startUrl:d.trim(),region:u}):j("Please enter your IDC start URL")},fullWidth:!0,children:"Continue"}),(0,n.jsx)(l.$n,{onClick:$,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"api-key"===i&&(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Paste a long-lived Kiro/CodeWhisperer API key. It is validated against AWS and stored directly as a bearer credential (no refresh)."})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["API Key ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)(l.pd,{value:f,onChange:e=>b(e.target.value),placeholder:"Paste your Kiro API key...",className:"font-mono text-sm"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,n.jsx)(l.pd,{value:v,onChange:e=>y(e.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,n.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for the key (default: us-east-1)"})]}),k&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:D,fullWidth:!0,disabled:w||!f.trim(),children:w?"Validating...":"Add API Key"}),(0,n.jsx)(l.$n,{onClick:$,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-google"===i&&(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,n.jsxs)("div",{className:"flex-1 text-sm",children:[(0,n.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,n.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:()=>z("google"),fullWidth:!0,children:"Continue with Google"}),(0,n.jsx)(l.$n,{onClick:$,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-github"===i&&(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,n.jsxs)("div",{className:"flex-1 text-sm",children:[(0,n.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,n.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:()=>z("github"),fullWidth:!0,children:"Continue with GitHub"}),(0,n.jsx)(l.$n,{onClick:$,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"import"===i&&(0,n.jsxs)("div",{className:"space-y-4",children:[C&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting token..."}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from AWS SSO cache"})]}),!C&&(0,n.jsxs)(n.Fragment,{children:[O&&(0,n.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,n.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Token auto-detected from Kiro IDE successfully!"})]})}),!O&&!k&&(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Kiro IDE not detected. Please paste your refresh token manually."})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Refresh Token ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)(l.pd,{value:x,onChange:e=>p(e.target.value),placeholder:"Token will be auto-filled...",className:"font-mono text-sm"})]}),k&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:A,fullWidth:!0,disabled:w||!x.trim(),children:w?"Importing...":"Import Token"}),(0,n.jsx)(l.$n,{onClick:$,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]}),"import-cli-proxy"===i&&(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Paste the Kiro CLIProxyAPI auth JSON containing auth_method=external_idp. Only Microsoft login token endpoints are accepted."})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["CLIProxyAPI Auth JSON ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)("textarea",{value:h,onChange:e=>g(e.target.value),placeholder:'{"auth_method":"external_idp","access_token":"...","refresh_token":"...","client_id":"...","token_endpoint":"https://login.microsoftonline.com/.../oauth2/v2.0/token","profile_arn":"...","scopes":"..."}',className:"min-h-40 w-full rounded-md border border-border bg-surface p-3 font-mono text-sm outline-none focus:border-primary"})]}),k&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:P,fullWidth:!0,disabled:w||!h.trim(),children:w?"Importing...":"Import CLIProxyAPI JSON"}),(0,n.jsx)(l.$n,{onClick:$,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})})}o.propTypes={isOpen:s().bool.isRequired,onMethodSelect:s().func.isRequired,onClose:s().func.isRequired}},62630:(e,t,a)=>{a.d(t,{gH:()=>n});function n(e,t){return RegExp("^"+e.split("*").map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(t)}},62899:(e,t,a)=>{a.d(t,{default:()=>c});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(90882),o=a(61500),d=a(94230);function c({isOpen:e,providerInfo:t,onSuccess:a,onClose:i}){let[s,u]=(0,r.useState)(null),[m,x]=(0,r.useState)(null),[p,h]=(0,r.useState)(null),g=(0,r.useCallback)((e,t)=>{"builder-id"===e?u("builder-id"):"idc"===e?(u("idc"),h(t)):"social"===e?(u("social"),x(t.provider)):("import"===e||"api-key"===e)&&a?.()},[a]),f=()=>{u(null),x(null),h(null)};return s?"builder-id"===s||"idc"===s?(0,n.jsx)(l.default,{isOpen:e,provider:"kiro",providerInfo:t,onSuccess:()=>{u(null),h(null),a?.(),i?.()},onClose:f,idcConfig:p}):"social"===s&&m?(0,n.jsx)(d.default,{isOpen:e,provider:m,onSuccess:()=>{u(null),x(null),a?.(),i?.()},onClose:f}):null:(0,n.jsx)(o.default,{isOpen:e,onMethodSelect:g,onClose:i})}c.propTypes={isOpen:s().bool.isRequired,providerInfo:s().shape({name:s().string}),onSuccess:s().func,onClose:s().func.isRequired}},65635:(e,t,a)=>{a.d(t,{e:()=>n});async function n(e){let t=String(e??"");try{if(navigator?.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}try{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();let a=document.execCommand("copy");return document.body.removeChild(e),a}catch{return!1}}},65921:(e,t,a)=>{a.d(t,{i:()=>i});var n=a(1934);let r=0,i=(0,n.v)((e,t)=>({notifications:[],addNotification:a=>{let n=++r,i={id:n,type:a.type||"info",message:a.message,title:a.title||null,duration:a.duration??5e3,dismissible:a.dismissible??!0,createdAt:Date.now()};return e(e=>({notifications:[...e.notifications,i]})),i.duration>0&&setTimeout(()=>t().removeNotification(n),i.duration),n},removeNotification:t=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==t)}))},clearAll:()=>e({notifications:[]}),success:(e,a)=>t().addNotification({type:"success",message:e,title:a}),error:(e,a)=>t().addNotification({type:"error",message:e,title:a,duration:8e3}),warning:(e,a)=>t().addNotification({type:"warning",message:e,title:a}),info:(e,a)=>t().addNotification({type:"info",message:e,title:a})}))},66996:(e,t,a)=>{a.d(t,{default:()=>b});var n=a(95155),r=a(14051),i=a.n(r),s=a(73006),l=a(75958),o=a(67352),d=a(31474),c=a(35655);function u({className:e}){return(0,n.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[(0,n.jsx)("path",{d:"M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z"}),(0,n.jsx)("path",{d:"M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z"})]})}function m(e){return Number(e||0).toLocaleString("en-US",{maximumFractionDigits:2})}function x(e,t){return(0,c.h7)(e,t)}function p(e){return void 0!==e.remaining&&null!==e.remaining?Math.max(0,Number(e.remaining)):Math.max(0,Number(e.total||0)-Number(e.used||0))}function h({row:e,label:t=null,inset:a=!1}){let r=Number((e.totalNum??e.total)||0),i=Number.isFinite(e.remainingNum)?Number(e.remainingNum):Number(e.remaining??p(e)),g=(0,o.Rs)(e),f=(0,o.OG)(e);if(g){let t=(0,o.UL)(e.name),a=i>0;return(0,n.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-2 tabular-nums",children:[(0,n.jsxs)("span",{className:"flex min-w-0 items-baseline gap-1",children:[(0,n.jsx)(u,{className:"size-[11px] shrink-0 self-center text-text-muted"}),(0,n.jsx)("b",{className:(0,d.cn)("text-[12px] font-bold",a?"text-text":c.pM.critical),children:m(i)}),t?(0,n.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",t,")"]}):null]}),(0,n.jsx)("span",{className:"shrink-0 text-[11px] text-text-muted",children:(0,l.M)((0,o._6)(e.name)||e.name)})]}),(0,n.jsx)(c.Ay,{pct:100*!!a})]})}let b=(0,o.pR)(e),v=(0,o.Cd)(e,b);return(0,n.jsxs)("div",{className:(0,d.cn)("min-w-0 space-y-1",a&&"pl-[17px]"),children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2 text-[11px] tabular-nums",children:[(0,n.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[a?null:(0,n.jsx)(u,{className:"size-[11px] shrink-0 text-text-muted"}),(0,n.jsx)("span",{className:"truncate text-text-muted",children:t??(0,l.M)(e.name)})]}),(0,n.jsxs)("span",{className:(0,d.cn)("shrink-0",c.pM[v]),children:[e.percentScale?`${Math.round(b)}%`:(0,s.Tl)("remaining {remaining} of {total}").replace("{remaining}",m(i)).replace("{total}",m(r)),e.resetAt?` ${x(f,e.resetAt)}`:""]})]}),(0,n.jsx)(c.Ay,{pct:b})]})}let g=[.35,.65,1];function f({ladder:e}){let t=e.length,a=2.5/Math.max(1,t-1),r=e=>2===t?g[2*e]:g[e],i=t=>c.pM[e[t].ownPct>0&&e[t].ownPct<o.MF?"critical":"reset"],p=e[0];return(0,n.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2 text-[11px] tabular-nums",children:[(0,n.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,n.jsx)(u,{className:"size-[11px] shrink-0 text-text-muted"}),(0,n.jsx)("span",{className:"truncate text-text-muted",children:(0,l.M)(p.row.name||"")})]}),(0,n.jsxs)("span",{className:(0,d.cn)("shrink-0",i(0)),children:[(0,s.Tl)("remaining {remaining} of {total}").replace("{remaining}",m(p.ownRemaining)).replace("{total}",m(p.ownTotal)),p.row.resetAt?` ${x(!0,p.row.resetAt)}`:""]})]}),(0,n.jsx)(c.$n,{height:8,role:"img","aria-label":e.map(({row:e,ownRemaining:t,ownTotal:a})=>`${(0,l.M)(e.name)} ${m(t)}/${m(a)}`).join(","),children:e.map(({row:t,widthPct:i,ownRemaining:s,ownTotal:o},u)=>(0,n.jsx)("span",{className:(0,d.cn)("absolute left-0",c.jH),style:{top:`${u*a}px`,bottom:`${u*a}px`,width:`${i}%`,opacity:r(u),...(0,c.jE)(e[u].ownPct)},title:`${(0,l.M)(t.name)} ${m(s)} / ${m(o)}`},`${t.name||"band"}-${u}`))}),e.slice(1).map(({row:t,ownRemaining:a,ownTotal:o},u)=>(0,n.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2 text-[11px] tabular-nums",style:{paddingLeft:`${(u+1)*10}px`},children:[(0,n.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,n.jsx)("span",{className:"size-[8px] shrink-0 rounded-[2px]",style:{opacity:r(u+1),background:(0,c.dI)(e[u+1].ownPct)},"aria-hidden":"true"}),(0,n.jsx)("span",{className:"truncate text-text-muted",children:(0,l.M)(t.name)})]}),(0,n.jsxs)("span",{className:(0,d.cn)("shrink-0",i(u+1)),children:[(0,s.Tl)("remaining {remaining} of {total}").replace("{remaining}",m(a)).replace("{total}",m(o)),t.resetAt?` ${x(!0,t.resetAt)}`:""]})]},`${t.name||"layer"}-${u}`))]})}function b({packs:e=[],className:t,nestedCycle:a=!1}){let r,i,g=(e||[]).filter(e=>e&&"object"==typeof e&&!0!==e.detailOnly&&!(0,o.eK)(e));if(0===g.length)return null;let v=(e||[]).filter(e=>e&&"object"==typeof e&&!0===e.detailOnly).map(e=>({...e,totalNum:Number(e.total||0),remainingNum:p(e)})),y=g.map(e=>{let t=Number(e.total||0);return{...e,totalNum:t,remainingNum:p(e)}}),k=(0,o.GT)(y),j=(0,o.Ug)(y,{force:!0===a}),w=new Set(j.map(e=>e.row)),N=(0,o.MK)(y).filter(e=>!w.has(e)),C=y.some(e=>"资源包"===String(e.name||"")),S=y.filter(e=>!(0,o.uC)(e)).filter(e=>!(C&&String(e.name||"").startsWith("赠送包"))),O=new Map;for(let e of S){let t=String(e.name||"").replace(/\s*\d+\s*$/,"").trim();t&&(O.has(t)||O.set(t,[]),O.get(t).push(e))}let F=[...O.entries()].map(([e,t])=>{let a=t.reduce((e,t)=>e+t.totalNum,0),n=t.reduce((e,t)=>e+Number(t.used||0),0),r=t.reduce((e,t)=>e+t.remainingNum,0);return{base:e,members:t,totalNum:a,usedNum:n,remainingNum:r,live:t.filter(e=>e.remainingNum>0&&e.totalNum>0)}}).filter(e=>e.members.length>=2&&e.totalNum>0),W=new Set(F.flatMap(e=>e.members)),T=F.length>0?k.monthly.filter(e=>!w.has(e)):[],I=new Set,$=S.filter(e=>{if(W.has(e))return!1;let t=`${Number(e.used||0)}|${Number(e.total||0)}|${e.resetAt||""}`;return!I.has(t)&&(I.add(t),!0)}),A=[...F.flatMap(e=>e.members),...T,...$],P=A.reduce((e,t)=>e+t.totalNum,0),D=A.reduce((e,t)=>e+t.remainingNum,0),z=F.length+$.length+T.length,E=z<=1,_=1===z&&A.length>0&&A.every(e=>(0,o.Rs)(e)),M=_?(0,o.UL)(A[0]?.name):"",L=e=>"资源包"===e?"资源包 Credits":e;F.length;let R=E&&v.length>0,U=R?v:A;return(0,n.jsxs)("div",{className:(0,d.cn)("min-w-0 space-y-2",t),children:[A.length>0&&(0,n.jsxs)("div",{className:"flex items-end justify-between gap-3",children:[(0,n.jsxs)("span",{className:"flex items-end gap-1.5 tabular-nums",children:[(0,n.jsx)(u,{className:"size-[12px] shrink-0 self-center text-primary"}),(0,n.jsx)("b",{className:"text-[14px] font-bold leading-none text-text",children:m(D)}),M?(0,n.jsxs)("span",{className:"text-[10px] leading-none text-text-muted",children:["(",M,")"]}):null]}),!_&&(0,n.jsxs)("span",{className:"inline-flex shrink-0 items-baseline text-xs leading-none tabular-nums text-text-muted",children:[m(D)," / ",m(P)]})]}),A.length>0&&((e,t)=>{let a=e.filter(e=>e.remainingNum>0&&e.totalNum>0).sort((e,t)=>String(e.resetAt||"").localeCompare(String(t.resetAt||""))),r=0,i=a.map(e=>({...e,alpha:(0,o.OG)(e)?1:Math.max(.45,.85-.05*r++)})),l=i;if(i.length>20){let e=i.slice(0,19),t=i.slice(19);l=[...e,{name:(0,s.Tl)("{count} more packs").replace("{count}",String(t.length)),remainingNum:t.reduce((e,t)=>e+t.remainingNum,0),totalNum:t.reduce((e,t)=>e+t.totalNum,0),resetAt:t[0]?.resetAt||null,recurring:!1,alpha:.6}]}let d=e.reduce((e,t)=>e+t.remainingNum,0),u=t>0?Math.max(0,1-d/t):0,p=t>0?d/t*100:0,h=p>0&&p<o.MF?(0,c.dI)(0):"hsl(142 60% 45%)";return(0,n.jsxs)(c.$n,{className:"flex gap-[2px]",role:"img","aria-label":(0,s.Tl)("{count} packs, remaining {remaining} of {total}").replace("{count}",String(a.length)).replace("{remaining}",m(d)).replace("{total}",m(t)),children:[l.map((e,a)=>{let r=t>0?e.remainingNum/t:0,i=(0,o.OG)(e);return(0,n.jsx)("span",{className:"block h-full min-w-[3px]",style:{flex:`${r.toFixed(4)} 1 0`,opacity:e.alpha,background:h},title:[e.name||(0,s.Tl)("Quota package"),`${(0,s.Tl)("Remaining")} ${m(e.remainingNum)} / ${m(e.totalNum)}`,e.resetAt?x(i,e.resetAt):null].filter(Boolean).join(",")},`${e.name||"pack"}-${a}`)}),u>0&&(0,n.jsx)("span",{"aria-hidden":"true",className:"block h-full",style:{flex:`${u.toFixed(4)} 1 0`}})]})})(U,P),C&&(0,n.jsx)("div",{className:"text-[11px] text-text-muted",children:(0,s.Tl)("includes {names}").replace("{names}",[...$.map(e=>(0,l.M)(L(e.name))),"资源包 Credits"].join("、"))}),A.length>0&&(i=(r=U.filter(e=>e.remainingNum>0)).filter(e=>e.resetAt).sort((e,t)=>String(e.resetAt).localeCompare(String(t.resetAt)))[0]||null,E&&!R?(0,n.jsx)("div",{className:"text-[11px] text-text-muted",children:(0,l.M)((0,o._6)(L(A[0].name))||A[0].name)}):0===r.length?null:(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 text-[11px] tabular-nums",children:[(0,n.jsx)("span",{className:"text-text-muted",children:(0,s.Tl)("{count} resource packs").replace("{count}",String(r.length))}),i?(0,n.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-3 truncate text-text-muted",children:[(0,n.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1",children:[(0,n.jsx)(u,{className:"size-[11px] shrink-0"}),m(i.remainingNum)]}),(0,n.jsx)("span",{className:"shrink-0",children:x((0,o.OG)(i),i.resetAt)})]}):null]})),$.length>0&&!E&&(0,n.jsx)(n.Fragment,{children:$.map((e,t)=>(0,n.jsx)(h,{row:e},`${e.name||"pool"}-${t}`))}),j.length>0&&(0,n.jsx)(f,{ladder:j}),(0,o.EJ)(N).map((e,t)=>e.family?(0,n.jsxs)("div",{className:"min-w-0 space-y-1.5",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5 text-[11px]",children:[(0,n.jsx)(u,{className:"size-[11px] shrink-0 text-text-muted"}),(0,n.jsx)("span",{className:"truncate text-text",children:(0,s.Tl)(e.family)})]}),e.rows.map((e,t)=>(0,n.jsx)(h,{row:e,inset:!0,label:(0,s.Tl)((0,o.TM)(e.name)?.window||e.name)},`${e.name||"win"}-${t}`))]},`${e.family}-${t}`):e.rows.map((e,a)=>(0,n.jsx)(h,{row:e},`${e.name||"win"}-${t}-${a}`)))]})}f.propTypes={ladder:i().arrayOf(i().object).isRequired},h.propTypes={row:i().shape({name:i().string,used:i().oneOfType([i().number,i().string]),total:i().oneOfType([i().number,i().string]),remaining:i().oneOfType([i().number,i().string]),remainingNum:i().number,totalNum:i().number,resetAt:i().oneOfType([i().string,i().instanceOf(Date)]),recurring:i().bool})},b.propTypes={nestedCycle:i().bool,packs:i().arrayOf(i().shape({name:i().string,used:i().oneOfType([i().number,i().string]),total:i().oneOfType([i().number,i().string]),remaining:i().oneOfType([i().number,i().string]),resetAt:i().oneOfType([i().string,i().instanceOf(Date)]),recurring:i().bool})),className:i().string}},67352:(e,t,a)=>{a.d(t,{Cd:()=>y,D2:()=>w,EJ:()=>W,GT:()=>g,MF:()=>v,MK:()=>f,OG:()=>b,PZ:()=>C,Rs:()=>d,TM:()=>F,TV:()=>j,UL:()=>c,UY:()=>N,Ug:()=>h,XV:()=>k,_6:()=>u,d$:()=>I,eK:()=>l,pR:()=>m,qz:()=>S,uC:()=>o});let n=/total|aggregate|summary|^总/i,r=/month|月/i,i=/month|月|week|周|滚动|rolling|5h|hourly|window/i,s=/balance|voucher|cash|余额|代金券|现金/i;function l(e){return n.test(String(e?.name||""))}function o(e){return e?.recurring===!0||i.test(String(e?.name||""))}function d(e){return s.test(String(e?.name||""))}function c(e){let t=/\(([^)]+)\)\s*$/.exec(String(e||""));return t?t[1].trim():""}function u(e){return String(e||"").replace(/\s*\([^)]*\)\s*$/,"").trim()}function m(e){let t=Number((e?.totalNum??e?.total)||0),a=Number.isFinite(e?.remainingNum)?Number(e.remainingNum):Math.max(0,t-Number(e?.used||0));return t<=0?0:Math.min(100,Math.max(0,a/t*100))}let x={monthly:/month|月/i,weekly:/week|周/i,rolling:/rolling|滚动|session|5h/i};function p(e){return Number((e?.totalNum??e?.total)||0)}function h(e=[],{force:t=!1}={}){let a={monthly:null,weekly:null,rolling:null};for(let t of e){if(t?.giftPack===!0||t?.detailOnly===!0||!o(t)||d(t))continue;let e=String(t?.name||"");for(let[n,r]of Object.entries(x))if(!a[n]&&r.test(e)){a[n]=t;break}}if(!a.monthly)return[];let n=[a.monthly,a.weekly,a.rolling].filter(Boolean);if(n.length<2)return[];if(!t)for(let e=1;e<n.length;e+=1){let t=p(n[e]);if(!(t>0&&t<p(n[e-1])))return[]}let r=p(n[0]);if(!(r>0))return[];let i=r;return n.map((e,t)=>{let a,n=p(e),s=(a=p(e),Number.isFinite(e?.remainingNum)?Number(e.remainingNum):Math.max(0,a-Number(e?.used||0))),l=Math.max(0,Math.min(s,i));return i=l,{row:e,depth:t,widthPct:Math.min(100,l/r*100),ownRemaining:s,ownTotal:n,ownPct:m(e)}})}function g(e=[]){let t=e.filter(e=>o(e)&&!d(e)),a=t.filter(e=>r.test(String(e.name||""))),n=t.filter(e=>!a.includes(e));return{hasAnyCycle:t.length>0,windows:[...n,...a],monthly:a}}function f(e=[]){let{monthly:t,windows:a}=g(e),n=t.filter(e=>e?.giftPack!==!0);return[...a.filter(e=>!t.includes(e)),...n]}function b(e){return e?.recurring!==!1&&o(e)}let v=10;function y(e,t=m(e)){return t>0&&t<v?"critical":b(e)?"reset":"expire"}function k(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":`${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`}function j(e,t=Date.now()){if(!e)return"";let a=new Date(e).getTime();if(Number.isNaN(a))return"";let n=Math.max(0,Math.round((a-t)/1e3));return n>=86400?`${Math.floor(n/86400)}d ${Math.floor(n%86400/3600)}h`:n>=3600?`${Math.floor(n/3600)}h ${Math.floor(n%3600/60)}m`:`${Math.floor(n/60)}m ${n%60}s`}function w(e,t=Date.now()){if(b(e)||!e?.resetAt)return!1;let a=new Date(e.resetAt).getTime();return Number.isFinite(a)&&a<=t}function N(e,t=Date.now()){return!(e?.unlimited===!0||b(e))&&(!!w(e,t)||Number(e?.total||0)>0&&0>=(Number.isFinite(e?.remainingNum)?Number(e.remainingNum):Math.max(0,Number(e?.total||0)-Number(e?.used||0))))}function C(e=[]){return(e||[]).filter(e=>e&&"object"==typeof e&&!(l(e)||e?.summarizesDetail===!0))}function S(e=[]){let t=C(e);return!!t.some(e=>!0===e.detailOnly||!0===e.giftPack)||t.filter(e=>!b(e)).length>=2}let O=/^(.+?)\s+·\s+(.+)$/;function F(e){let t=O.exec(String(e||"").trim());return t?{family:t[1],window:t[2]}:null}function W(e=[]){let t=[];for(let a of e){let e=F(a?.name),n=e?.family||null,r=t[t.length-1];n&&r&&r.family===n?r.rows.push(a):t.push({family:n,rows:[a]})}return t}let T=[[0,4],[15,22],[35,40],[65,130],[100,158]];function I(e){let t=Math.min(100,Math.max(0,Number(e)||0));for(let e=1;e<T.length;e+=1){let[a,n]=T[e];if(t<=a){let[r,i]=T[e-1];return Math.round(i+(n-i)*(t-r)/(a-r))}}return T[T.length-1][1]}},67852:(e,t,a)=>{a.d(t,{A:()=>ep});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(8247),o=a(35650),d=a(41658),c=a(74519),u=a(69036),m=a(50247),x=a(77622),p=a(89403),h=a(29892),g=a(70224),f=a(84670),b=a(68031),v=a(54173),y=a(49651),k=a(87111),j=a(41909),w=a(50159),N=a(80323),C=a(54689),S=a(41185),O=a(53006),F=a(36900),W=a(71657),T=a(40942),I=a(62391),$=a(42887),A=a(25097),P=a(82640),D=a(10572),z=a(91685),E=a(73119),_=a(50661),M=a(86619),L=a(89717),R=a(50658),U=a(59435),q=a(4722),V=a(85836),K=a(76189),B=a(12068),G=a(76147),J=a(37058),H=a(46201),Q=a(83482),Y=a(72057),X=a(72638),Z=a(16743),ee=a(35811),et=a(28296),ea=a(52302),en=a(72769),er=a(85979),ei=a(13448),es=a(37841),el=a(9897),eo=a(94938),ed=a(56513),ec=a(86097),eu=a(8297);let em={openai:o.A,anthropic:d.A,claude:c.A,gemini:u.A,deepseek:m.A,minimax:x.A,"minimax-cn":x.A,groq:p.A,nvidia:h.A,xai:g.A,openrouter:f.A,mistral:b.A,cohere:v.A,perplexity:y.A,together:k.A,fireworks:j.A,siliconflow:w.A,"siliconflow-cn":w.A,kimi:N.A,glm:C.A,"glm-cn":C.A,"aws-polly":S.A,azure:O.A,"cloudflare-ai":F.A,huggingface:W.A,ollama:T.A,sambanova:I.A,cerebras:$.A,venice:A.A,nebius:P.A,hyperbolic:D.A,featherless:z.A,baidu:E.A,tencent:_.A,"volcengine-ark":M.A,github:L.A,cursor:R.A,cline:U.A,windsurf:q.A,kiro:V.A,trae:K.A,"jina-ai":B.A,exa:G.A,tavily:J.A,"brave-search":H.A,searchapi:Q.A,searxng:Y.A,"fish-audio":X.A,assemblyai:Z.A,elevenlabs:ee.A,"voyage-ai":et.A,"fal-ai":ea.A,recraft:en.A,"stability-ai":er.A,runwayml:ei.A,morph:es.A,comfyui:el.A,sensenova:eo.A,longcat:ed.A,vertex:ec.A,"vercel-ai-gateway":eu.A};function ex({providerId:e,size:t=32,className:a=""}){let r=em[e];if(!r)return null;let i=r.Color||r;return(0,n.jsx)(i,{size:t,className:a})}function ep({src:e,providerId:t,alt:a,size:i=32,className:s="",fallbackText:o="?",fallbackColor:d}){let c=function(e,t){if(t)return(0,l.HY)(t);if(!e)return null;let a=String(e).match(/^\/providers\/([^/]+)\.png$/i);return a?(0,l.HY)(a[1]):e}(e,t),[u,m]=(0,r.useState)(!1);return t&&em[t]?(0,n.jsx)(ex,{providerId:t,size:i,className:s}):!c||u?(0,n.jsx)("span",{className:`inline-flex items-center justify-center font-bold rounded-lg ${s}`.trim(),style:{width:i,height:i,color:d,fontSize:Math.max(10,Math.floor(.38*i))},children:o}):(0,n.jsx)("img",{src:c,alt:a,width:i,height:i,className:s,loading:"lazy",decoding:"async",onError:()=>{let e=c.match(/^\/providers\/([^/]+)\.png$/i);e&&(0,l.Kw)(e[1]),t&&(0,l.Kw)(t),m(!0)}})}ep.propTypes={src:s().string,providerId:s().string,alt:s().string,size:s().number,className:s().string,fallbackText:s().string,fallbackColor:s().string}},72767:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(1934),r=a(90620);let i=null,s=(0,n.v)((e,t)=>({settings:null,loading:!1,error:null,lastFetched:0,invalidate:()=>e({lastFetched:0}),fetchSettings:async({force:a=!1}={})=>{let{lastFetched:n,settings:s}=t();return!a&&s&&Date.now()-n<r.U5?s:i||(e({loading:!0,error:null}),i=(async()=>{try{let t=await fetch("/api/settings"),a=await t.json();if(t.ok)return e({settings:a,loading:!1,lastFetched:Date.now()}),a;e({error:a.error,loading:!1})}catch(t){e({error:"Failed to fetch settings",loading:!1})}finally{i=null}return null})())},patchSettings:async a=>{try{let n=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!n.ok)return null;let r=await n.json();return e({settings:{...t().settings,...r},lastFetched:Date.now()}),r}catch{return null}}}))},72908:(e,t,a)=>{a.d(t,{default:()=>f});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(81127),o=a(67852),d=a(29366),c=a(929),u=a(28777),m=a(88105),x=a(73006);let p=[...Object.keys(m.zN),...Object.keys(m.IS),...Object.keys(m.nJ),...Object.keys(m.fg)],h=Object.keys(m.IS).filter(e=>m.IS[e].noAuth),g=["cursor","zed"];function f({isOpen:e,onClose:t,onSelect:a,onDeselect:i,selectedModel:s,activeProviders:b=[],title:v,modelAliases:y={},kindFilter:k=null,capFilter:j=null,addedModelValues:w=[],closeOnSelect:N=!0}){let C=(0,r.useMemo)(()=>k?b.filter(e=>{let t=m.Q2[e.provider];return(t?.serviceKinds||["llm"]).includes(k)}):b,[b,k]),{getCaps:S}=(0,c.yU)(),[O,F]=(0,r.useState)(""),[W,T]=(0,r.useState)([]),[I,$]=(0,r.useState)([]),[A,P]=(0,r.useState)([]),[D,z]=(0,r.useState)({}),[E,_]=(0,r.useState)({}),M=(0,r.useMemo)(()=>{let e=Object.fromEntries(g.map(e=>[e,[]]));for(let t of b)Object.hasOwn(e,t.provider)&&t.id&&e[t.provider].push(t.id);return e},[b]);(0,r.useEffect)(()=>{if(!e)return void _({});let t=!1;return Promise.all(g.map(async e=>{let t=M[e];if(0===t.length)return[e,[]];let a=await Promise.all(t.map(async e=>{let t=await fetch(`/api/providers/${e}/models`,{cache:"no-store"});if(!t.ok)return[];let a=await t.json();return Array.isArray(a.models)?a.models:[]})),n=new Set;return[e,a.flat().filter(e=>!(!e?.id||n.has(e.id))&&(n.add(e.id),!0))]})).then(e=>{t||_(Object.fromEntries(e))}).catch(e=>{console.warn("Unable to load live catalog models for selector:",e),t||_({})}),()=>{t=!0}},[e,M]);let L=async()=>{try{let e=await fetch("/api/combos");if(!e.ok)throw Error(`Failed to fetch combos: ${e.status}`);let t=await e.json();T(t.combos||[])}catch(e){console.error("Error fetching combos:",e),T([])}};(0,r.useEffect)(()=>{e&&L()},[e]);let R=async()=>{try{let e=await fetch("/api/provider-nodes");if(!e.ok)throw Error(`Failed to fetch provider nodes: ${e.status}`);let t=await e.json();$(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),$([])}};(0,r.useEffect)(()=>{e&&R()},[e]);let U=async()=>{try{let e=await fetch("/api/models/custom");if(!e.ok)throw Error(`Failed to fetch custom models: ${e.status}`);let t=await e.json();P(t.models||[])}catch(e){console.error("Error fetching custom models:",e),P([])}};(0,r.useEffect)(()=>{e&&U()},[e]);let q=async()=>{try{let e=await fetch("/api/models/disabled");if(!e.ok)throw Error(`Failed to fetch disabled models: ${e.status}`);let t=await e.json();z(t.disabled||{})}catch(e){console.error("Error fetching disabled models:",e),z({})}};(0,r.useEffect)(()=>{e&&q()},[e]);let V=(0,r.useMemo)(()=>({...m.zN,...m.IS,...m.nJ,...m.fg}),[]),K=(0,r.useMemo)(()=>{let e={},t=new Set(["webSearch","webFetch"]),a=new Set(["image","tts","stt","embedding","imageToText"]),n=new Set(["tts","image","webFetch"]);return[...new Set([...C.map(e=>e.provider),...k?h.filter(e=>(m.Q2[e]?.serviceKinds||["llm"]).includes(k)):h])].sort((e,t)=>{let a=p.indexOf(e),n=p.indexOf(t);return(-1===a?999:a)-(-1===n?999:n)}).forEach(r=>{let i=(0,m.wG)(r),s=V[r]||{name:r,color:"#666"},l=(0,m.mq)(r)||(0,m.gb)(r);if(k&&t.has(k)){e[r]={name:s.name,alias:i,color:s.color,models:[{id:r,name:s.name,value:r}]};return}if(s.passthroughModels){let t=Object.entries(y).filter(([,e])=>e.startsWith(`${i}/`)).map(([e,t])=>({id:t.replace(`${i}/`,""),name:e,value:t})),l=A.filter(e=>e.providerAlias===i).map(e=>({id:e.id,name:e.name||e.id,value:`${i}/${e.id}`,kind:(0,u.CP)(e),isCustom:!0})),o=t;if(k&&a.has(k)){let e=l.filter(e=>(0,u.CP)(e)===k);0===(o=[...e,...(0,u.KC)(r).filter(e=>(0,u.CP)(e)===k).map(e=>({id:e.id,name:e.name,value:`${i}/${e.id}`,kind:(0,u.CP)(e)})).filter(t=>!e.some(e=>e.value===t.value))]).length&&n.has(k)&&(s.serviceKinds||["llm"]).includes(k)&&(o=[{id:r,name:s.name,value:i}])}else{let e=l.filter(e=>!(0,u.CP)(e)||"llm"===(0,u.CP)(e)),a=new Set([...t,...e].map(e=>e.value)),n=(0,u.KC)(r).filter(e=>!(0,u.CP)(e)||"llm"===(0,u.CP)(e)).map(e=>({id:e.id,name:e.name,value:`${i}/${e.id}`,kind:(0,u.CP)(e)})).filter(e=>!a.has(e.value));o=[...e,...t.filter(t=>!e.some(e=>e.value===t.value)),...n]}if(o.length>0){let t=I.find(e=>e.id===r),a=t?.name||s.name;e[r]={name:a,alias:i,color:s.color,models:o}}}else if(l){if(k&&a.has(k))return;let t=b.find(e=>e.provider===r),n=I.find(e=>e.id===r),i=n?.name||t?.name||s.name,l=t?.providerSpecificData?.prefix||n?.prefix||r,o=Object.entries(y).filter(([,e])=>e.startsWith(`${r}/`)).map(([e,t])=>({id:t.replace(`${r}/`,""),name:e,value:`${l}/${t.replace(`${r}/`,"")}`})),d=A.filter(e=>e.providerAlias===r).map(e=>({id:e.id,name:e.name||e.id,value:`${l}/${e.id}`,isCustom:!0})),c=new Set(o.map(e=>e.value)),u=[...o,...d.filter(e=>!c.has(e.value))],m=u.length>0?u:[{id:`__placeholder__${r}`,name:`${l}/model-id`,value:`${l}/model-id`,isPlaceholder:!0}];e[r]={name:i,alias:l,color:s.color,models:m,isCustom:!0,hasModels:u.length>0}}else{var o;let t=E[r]||[],l=t.length>0?t:(0,u.KC)(r),d=new Set(l.map(e=>e.id)),c=l.length>0,m=Object.entries(y).filter(([e,t])=>t.startsWith(`${i}/`)&&(!c||e===t.replace(`${i}/`,""))&&!d.has(t.replace(`${i}/`,""))).map(([e,t])=>({id:t.replace(`${i}/`,""),name:e,value:t,isCustom:!0})),x=new Set(m.map(e=>e.id)),p=A.filter(e=>e.providerAlias===i&&!d.has(e.id)&&!x.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${i}/${e.id}`,isCustom:!0})),h=[...l.map(e=>({id:e.id,name:e.name,value:`${i}/${e.id}`,kind:(0,u.CP)(e)})),...m,...p],g=new Set,f=(o=h.filter(e=>!g.has(e.value)&&(g.add(e.value),!0)),k?a.has(k)?o.filter(e=>e.isPlaceholder||(0,u.CP)(e)===k):o:o.filter(e=>e.isPlaceholder||e.isCustom||!(0,u.CP)(e)||"llm"===(0,u.CP)(e)));0===f.length&&k&&n.has(k)&&(s.serviceKinds||["llm"]).includes(k)&&(f=[{id:r,name:s.name,value:i}]),f.length>0&&(e[r]={name:s.name,alias:i,color:s.color,models:f})}}),Object.entries(e).forEach(([t,a])=>{let n=new Set([...D[(0,m.wG)(t)]||[],...D[t]||[]]);0!==n.size&&(a.models=a.models.filter(e=>!n.has(e.id)),0===a.models.length&&delete e[t])}),e},[C,y,V,I,A,D,k,b,E]),B=(0,r.useMemo)(()=>{if(k||j)return[];if(!O.trim())return W;let e=O.toLowerCase();return W.filter(t=>t.name.toLowerCase().includes(e))},[W,O,k]),G=(0,r.useMemo)(()=>{let e=O.trim().toLowerCase(),t={};return Object.entries(K).forEach(([a,n])=>{var r;let i=n.models;if(!j||0!==(i=i.filter(e=>S(e.value)?.[j]===!0)).length){if(e){let t=n.name.toLowerCase().includes(e);if(0===(i=i.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e))).length&&!t)return}t[a]={...n,models:[...(r=i).filter(e=>w.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name)),...r.filter(e=>!w.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name))]}}}),t},[K,O,w]),J=e=>{let n=e?.value||e?.name||e;w.includes(n)&&i?i(e):a(e),N&&(t(),F(""))};return(0,n.jsxs)(l.default,{isOpen:e,onClose:()=>{t(),F("")},title:v??(0,x.Tl)("Select Model"),size:"md",className:"p-4!",footer:null,children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-2.5 py-2 bg-primary/8 border border-primary/20 rounded-lg text-xs text-text-muted",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary shrink-0",style:{fontSize:"14px"},children:"info"}),(0,n.jsx)("span",{children:(0,x.Tl)("Click to add, click again to remove. Changes are saved automatically.")})]}),(0,n.jsx)("div",{className:"mb-3",children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,n.jsx)("input",{type:"text",placeholder:(0,x.Tl)("Search..."),value:O,onChange:e=>F(e.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,n.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-3",children:[B.length>0&&(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,n.jsx)("span",{className:"text-xs font-medium text-primary",children:(0,x.Tl)("Combos")}),(0,n.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",B.length,")"]})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5",children:B.map(e=>{let t=s===e.name;return(0,n.jsxs)("button",{onClick:()=>J({id:e.name,name:e.name,value:e.name}),className:`
2
- px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer flex items-center gap-1
3
- ${t?"bg-primary text-white border-primary":w.includes(e.name)?"bg-primary border-primary text-white hover:bg-primary-hover":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
4
- `,children:[w.includes(e.name)&&(0,n.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),e.name]},e.id)})})]}),Object.entries(G).map(([e,t])=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,n.jsx)(o.A,{src:`/providers/${e}.png`,alt:t.name,size:14,fallbackText:(t.name||e).slice(0,2).toUpperCase(),fallbackColor:t.color}),(0,n.jsx)("span",{className:"text-xs font-medium text-primary",children:t.name}),(0,n.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",t.models.length,")"]})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.models.map(e=>{let t=s===e.value,a=e.isPlaceholder;return(0,n.jsx)("button",{onClick:()=>J(e),title:a?"Select to pre-fill, then edit model ID in the input":void 0,className:`
5
- px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer
6
- ${a?"border-dashed border-border text-text-muted hover:border-primary/50 hover:text-primary bg-surface italic":t?"bg-primary text-white border-primary":w.includes(e.value)?"bg-primary border-primary text-white hover:bg-primary-hover":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
7
- `,children:(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[w.includes(e.value)&&!a&&(0,n.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"edit"}),e.name]}):e.isCustom?(0,n.jsxs)(n.Fragment,{children:[e.name,(0,n.jsx)("span",{className:"text-[9px] opacity-60 font-normal",children:"custom"}),(0,n.jsx)(d.default,{caps:S(e.value)})]}):(0,n.jsxs)(n.Fragment,{children:[e.name,(0,n.jsx)(d.default,{caps:S(e.value)})]})]})},e.value)})})]},e)),0===Object.keys(G).length&&0===B.length&&(0,n.jsxs)("div",{className:"text-center py-4 text-text-muted",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-2xl mb-1 block",children:"search_off"}),(0,n.jsx)("p",{className:"text-xs",children:(0,x.Tl)("No models found")})]})]})]})}f.propTypes={isOpen:s().bool.isRequired,onClose:s().func.isRequired,onSelect:s().func.isRequired,onDeselect:s().func,selectedModel:s().string,activeProviders:s().arrayOf(s().shape({provider:s().string.isRequired})),title:s().string,modelAliases:s().object,kindFilter:s().string,addedModelValues:s().arrayOf(s().string),closeOnSelect:s().bool}},73579:(e,t,a)=>{a.d(t,{default:()=>p});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(81127),o=a(11910),d=a(92542),c=a(56061),u=a(88105),m=a(98),x=a(73006);function p({isOpen:e,connection:t,proxyPools:a,onSave:i,onClose:s}){let h,g,f,[b,v]=(0,r.useState)({name:"",priority:1,apiKey:""}),[y,k]=(0,r.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[j,w]=(0,r.useState)({accountId:""}),[N,C]=(0,r.useState)(""),[S,O]=(0,r.useState)(null),[F,W]=(0,r.useState)(!1),[T,I]=(0,r.useState)(null),[$,A]=(0,r.useState)(!1),[P,D]=(0,r.useState)(null),[z,E]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(t){v({name:t.name||"",priority:t.priority||1,apiKey:""}),"azure"===t.provider&&t.providerSpecificData&&k({azureEndpoint:t.providerSpecificData.azureEndpoint||"",apiVersion:t.providerSpecificData.apiVersion||"2024-10-01-preview",deployment:t.providerSpecificData.deployment||"",organization:t.providerSpecificData.organization||""}),"cloudflare-ai"===t.provider&&t.providerSpecificData&&w({accountId:t.providerSpecificData.accountId||""});let e=u.Q2?.[t.provider];e?.regions&&(C(t.providerSpecificData?.region||e.defaultRegion||e.regions[0]?.id||""),fetch("/api/network/egress-region").then(e=>e.json()).then(e=>{let a=e?.recommendedRegions?.[t.provider];a&&O({country:e.country||e.countryCode,regionId:a})}).catch(()=>{})),I(null),D(null)}},[t]);let _=t?.providerSpecificData?.authMethod,M=t?.authType==="oauth"||"oauth"===_||"desktop-session"===_||"string"==typeof t?.accessToken&&t.accessToken.startsWith("mimo-desktop-session"),L=t?.provider==="azure",R=t?.provider==="cloudflare-ai",U=!!t&&((0,u.mq)(t.provider)||(0,u.gb)(t.provider)),q=t&&u.Q2?.[t.provider]?.regions||null,V=()=>{if(q&&N)return{...t?.providerSpecificData||{},region:N}},K=async()=>{if(t?.provider){W(!0),I(null);try{let e=await fetch(`/api/providers/${t.id}/test`,{method:"POST"}),a=await e.json();I(a.valid?"success":"failed")}catch{I("failed")}finally{W(!1)}}},B=async()=>{if(t?.provider&&b.apiKey){A(!0),D(null);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:b.apiKey,...L?{providerSpecificData:y}:{},...R?{providerSpecificData:j}:{},...q?{providerSpecificData:V()}:{}})}),a=await e.json();D(a.valid?"success":"failed")}catch{D("failed")}finally{A(!1)}}},G=async()=>{if(t){E(!0);try{let e={name:b.name,priority:b.priority};if(!M&&b.apiKey){e.apiKey=b.apiKey;let a="success"===P;if(!a)try{A(!0),D(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:b.apiKey,...L?{providerSpecificData:y}:{},...R?{providerSpecificData:j}:{},...q?{providerSpecificData:V()}:{}})});a=!!(await e.json()).valid,D(a?"success":"failed")}catch{D("failed")}finally{A(!1)}a&&(e.testStatus="active",e.lastError=null,e.lastErrorAt=null)}L&&(e.providerSpecificData={azureEndpoint:y.azureEndpoint,apiVersion:y.apiVersion,deployment:y.deployment,organization:y.organization}),R&&(e.providerSpecificData={accountId:j.accountId}),q&&N&&(e.providerSpecificData=V()),await i(e)}finally{E(!1)}}};return t?(0,n.jsx)(l.default,{isOpen:e,title:"Edit Connection",onClose:s,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)(o.default,{label:"Name",value:b.name,onChange:e=>v({...b,name:e.target.value}),placeholder:M?"Account name":"Production Key"}),M&&t.email&&(h=t.providerSpecificData?.mimoUserId||t.providerSpecificData?.uid||null,f=(g="xiaomi-mimo"===t.provider||"xiaomi-tokenplan"===t.provider||/^\d+@xiaomi$/.test(t.email))&&h?h:t.email,(0,n.jsxs)("div",{className:"bg-sidebar/50 p-3 rounded-lg",children:[(0,n.jsx)("p",{className:"text-sm text-text-muted mb-1",children:g?"UID":"Email"}),(0,n.jsx)("p",{className:"font-medium",children:f})]})),(0,n.jsx)(o.default,{label:"Priority",type:"number",value:b.priority,onChange:e=>v({...b,priority:Number.parseInt(e.target.value,10)||1})}),!M&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.default,{label:"API Key",type:"password",value:b.apiKey,onChange:e=>v({...b,apiKey:e.target.value}),placeholder:"Enter new API key",hint:"Leave blank to keep the current API key.",className:"flex-1"}),(0,n.jsx)("div",{className:"pt-6",children:(0,n.jsx)(d.default,{onClick:B,disabled:!b.apiKey||$||z,variant:"secondary",children:$?"Checking...":"Check"})})]}),P&&(0,n.jsx)(c.default,{variant:"success"===P?"success":"error",children:"success"===P?"Valid":"Invalid"})]}),L&&(0,n.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,n.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsx)(o.default,{label:"Azure Endpoint",value:y.azureEndpoint,onChange:e=>k({...y,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com",hint:"Your Azure OpenAI resource endpoint URL"}),(0,n.jsx)(o.default,{label:"Deployment Name",value:y.deployment,onChange:e=>k({...y,deployment:e.target.value}),placeholder:"gpt-4",hint:"The deployment name in your Azure resource"}),(0,n.jsx)(o.default,{label:"API Version",value:y.apiVersion,onChange:e=>k({...y,apiVersion:e.target.value}),placeholder:"2024-10-01-preview",hint:"Azure OpenAI API version to use"}),(0,n.jsx)(o.default,{label:"Organization",value:y.organization,onChange:e=>k({...y,organization:e.target.value}),placeholder:"Organization ID",hint:"Required for billing"})]})]}),q&&(0,n.jsxs)("div",{children:[(0,n.jsx)(m.default,{label:"Region",value:N,onChange:e=>C(e.target.value),options:q.map(e=>({value:e.id,label:e.label}))}),S&&(0,n.jsxs)("p",{className:"text-xs text-text-muted mt-1 flex items-center gap-1",children:[(0,n.jsx)("span",{children:"\uD83C\uDF10"}),(0,n.jsx)("span",{children:(0,x.Tl)("Current network location ({country}) recommended region: {region}").replace("{country}",S.country).replace("{region}",S.regionId)})]})]}),!U&&!L&&!R&&(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(d.default,{onClick:K,variant:"secondary",disabled:F,children:F?"Testing...":"Test Connection"}),T&&(0,n.jsx)(c.default,{variant:"success"===T?"success":"error",children:"success"===T?"Valid":"Failed"})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(d.default,{onClick:G,fullWidth:!0,disabled:z,children:z?"Saving...":"Save"}),(0,n.jsx)(d.default,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}p.propTypes={isOpen:s().bool.isRequired,connection:s().shape({id:s().string,name:s().string,email:s().string,priority:s().number,authType:s().string,provider:s().string,providerSpecificData:s().object}),proxyPools:s().arrayOf(s().shape({id:s().string,name:s().string})),onSave:s().func.isRequired,onClose:s().func.isRequired}},75958:(e,t,a)=>{a.d(t,{M:()=>r});var n=a(73006);function r(e){let t=String(e||"").trim();if(!t)return"";let a=(0,n.Tl)(t);if(a!==t)return a;let r=/^(.+?)\s+·\s+(.+)$/.exec(t);if(r)return`${(0,n.Tl)(r[1])} \xb7 ${(0,n.Tl)(r[2])}`;let i=/^Bonus Pack (\d+)$/.exec(t);if(i)return`${(0,n.Tl)("Bonus Pack")} ${i[1]}`;let s=/^weekly\s+(.+)\s+\(7d\)$/i.exec(t);if(s)return`${(0,n.Tl)("Weekly")} ${s[1]} (7d)`;let l=/^Balance(?:\s*\((.+)\))?$/i.exec(t);if(l)return l[1]?`${(0,n.Tl)("Balance")} (${l[1]})`:(0,n.Tl)("Balance");let o=/^Voucher(?:\s*\((.+)\))?$/i.exec(t);if(o)return o[1]?`${(0,n.Tl)("Voucher")} (${o[1]})`:(0,n.Tl)("Voucher");let d=/^Cash(?:\s*\((.+)\))?$/i.exec(t);return d?d[1]?`${(0,n.Tl)("Cash")} (${d[1]})`:(0,n.Tl)("Cash"):t}},76432:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(11059);function i({code:e,label:t="Invite code"}){let{copied:a,copy:s}=(0,r.C)();return e?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border border-border bg-bg-alt px-1.5 py-0.5 text-xs text-text-muted whitespace-nowrap",children:[(0,n.jsx)("span",{children:t}),(0,n.jsx)("code",{className:"font-mono text-text-main",children:e}),(0,n.jsx)("button",{type:"button",onClick:()=>s(e,"invite-code"),title:"Copy invite code",className:"inline-flex items-center text-text-muted hover:text-text transition-colors cursor-pointer",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-sm",children:"invite-code"===a?"check":"content_copy"})})]}):null}},80229:(e,t,a)=>{a.d(t,{default:()=>f});var n=a(95155),r=a(12115),i=a(47650),s=a(14051),l=a.n(s),o=a(73006),d=a(90620);function c({currentVersion:e,latestVersion:t}={}){let a=[u(e),u(t)].filter(Boolean);if(!a.length)return null;let n=a.reduce((e,t)=>m(e,t)>=0?e:t);return 0===n[0]&&0===n[1]&&0===n[2]?null:n.join(".")}function u(e){if("string"!=typeof e)return null;let t=e.trim().match(/^v?(\d+)\.(\d+)\.(\d+)/);return t?[Number(t[1]),Number(t[2]),Number(t[3])]:null}function m(e,t){for(let a=0;a<3;a++){if(e[a]>t[a])return 1;if(e[a]<t[a])return -1}return 0}let x=null,p=["en","zh-CN","zh-TW"];function h(e,t=1e4){let a=new AbortController,n=setTimeout(()=>a.abort(),t);return fetch(e,{signal:a.signal}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.text()}).finally(()=>clearTimeout(n))}function g(e){let[t,...a]=e;return t?h(t).catch(()=>g(a)):Promise.reject(Error("Failed to load changelog"))}function f({isOpen:e,onClose:t}){let[s,l]=(0,r.useState)(""),[b,v]=(0,r.useState)(!1),[y,k]=(0,r.useState)(""),j=(0,r.useRef)(null);(0,r.useEffect)(()=>{var t;let n;if(!e||s)return;v(!0),k("");let r=(n="zh"===(t=(0,o.kk)())?"zh-CN":t,p.includes(n)?n:"en"),i=[`${d.Nu.changelogUrlBase}${r}.md`,`${d.Nu.changelogUrlFallbackBase}${r}.md`],f=h("/api/version").then(e=>e.json()).then(c).catch(()=>null),b=(e,t)=>(!x&&(x=a.e(9233).then(a.bind(a,9233)).then(({marked:e})=>(e.setOptions({gfm:!0,breaks:!0}),e.use({link({href:e,title:t,tokens:a}){let n=a?this.parser.parseInline(a):t||e;return`<a href="${e}" target="_blank" rel="noopener noreferrer">${n}</a>`}}),e))),x).then(a=>l(a.parse(function(e,t){if(!e||"string"!=typeof e)return e||"";let a=u(t);if(!a)return e;let n=e.split("\n"),r=e=>/^##\s+/.test(e),i=[],s=[],l=!1,o=()=>{l||i.push(...s),s=[]};for(let e of n){if(r(e)){o();let t=u(e.replace(/^##\s+/,""));l=null!==t&&m(t,a)>0}s.push(e)}return o(),i.join("\n").replace(/\n{3,}/g,"\n\n").replace(/\s+$/,"")+"\n"}(e,t))));Promise.all([g(i),f]).then(([e,t])=>b(e,t)).then(()=>{k(""),v(!1)}).catch(()=>{"en"!==r?g([`${d.Nu.changelogUrlBase}en.md`,`${d.Nu.changelogUrlFallbackBase}en.md`]).then(e=>f.then(t=>b(e,t))).then(()=>k("")).catch(e=>k(e.message||"Failed to load")).finally(()=>v(!1)):(k("Failed to load"),v(!1))})},[e,s]);let w=(0,o.kk)();return((0,r.useEffect)(()=>{e&&s&&l("")},[w]),(0,r.useEffect)(()=>{let a=e=>{j.current&&!j.current.contains(e.target)&&t()};if(e)return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[e,t]),!e||"u"<typeof document)?null:(0,i.createPortal)((0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:t}),(0,n.jsxs)("div",{ref:j,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-3xl flex flex-col max-h-[85vh]",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:(0,o.Tl)("Change Log")}),(0,n.jsx)("button",{onClick:t,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":(0,o.Tl)("Close"),children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,n.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[b&&(0,n.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,n.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),(0,o.Tl)("Loading...")]}),y&&(0,n.jsxs)("div",{className:"text-red-500 py-4",children:[(0,o.Tl)("Failed to load changelog: "),y]}),!b&&!y&&s&&(0,n.jsx)("div",{className:"changelog-body text-text-main",dangerouslySetInnerHTML:{__html:s}})]})]})]}),document.body)}f.propTypes={isOpen:l().bool.isRequired,onClose:l().func.isRequired}},80752:(e,t,a)=>{a.d(t,{default:()=>m});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(1620),o=a(80229),d=a(81127),c=a(73006);function u({icon:e,label:t,onClick:a,trailing:r,danger:i}){return(0,n.jsxs)("button",{onClick:a,className:`flex items-center gap-3 w-full px-4 py-2.5 text-sm transition-colors ${i?"text-red-500 hover:bg-red-500/10":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"}`,children:[(0,n.jsx)("span",{className:`material-symbols-outlined text-[20px] ${i?"":"text-text-muted"}`,children:e}),(0,n.jsx)("span",{className:"flex-1 text-left",children:t}),r&&(0,n.jsx)("span",{className:"text-base",children:r})]})}function m({onLogout:e}){let[t,a]=(0,r.useState)(!1),[i,s]=(0,r.useState)(!1),[x,p]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),{theme:f,toggleTheme:b}=(0,l.D)(),v=(0,r.useRef)(null),y=async()=>{g(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}g(!1),p(!1)};return(0,r.useEffect)(()=>{let e=e=>{v.current&&!v.current.contains(e.target)&&a(!1)};if(t)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[t]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"relative",ref:v,children:[(0,n.jsx)("button",{onClick:()=>a(e=>!e),className:"flex items-center justify-center p-2 rounded-lg text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5 transition-all",title:(0,c.Tl)("Menu"),children:(0,n.jsx)("span",{className:"material-symbols-outlined",children:"grid_view"})}),t&&(0,n.jsxs)("div",{className:"absolute right-0 top-full mt-2 w-60 bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl z-50 animate-in fade-in zoom-in-95 duration-150 overflow-hidden py-1",children:[(0,n.jsx)(u,{icon:"history",label:(0,c.Tl)("Change Log"),onClick:()=>{a(!1),s(!0)}}),(0,n.jsx)(u,{icon:"system"===f?"routine":"light"===f?"light_mode":"dark_mode",label:(0,c.Tl)("system"===f?"Theme: system":"light"===f?"Theme: light":"Theme: dark"),onClick:()=>{b(),a(!1)}}),(0,n.jsx)(u,{icon:"power_settings_new",label:(0,c.Tl)("Shutdown"),danger:!0,onClick:()=>{a(!1),p(!0)}}),(0,n.jsx)(u,{icon:"logout",label:(0,c.Tl)("Logout"),danger:!0,onClick:()=>{a(!1),e()}})]})]}),(0,n.jsx)(o.default,{isOpen:i,onClose:()=>s(!1)}),(0,n.jsx)(d.ConfirmModal,{isOpen:x,onClose:()=>p(!1),onConfirm:y,title:(0,c.Tl)("Close Proxy"),message:(0,c.Tl)("Are you sure you want to close the proxy server?"),confirmText:(0,c.Tl)("Close"),cancelText:(0,c.Tl)("Cancel"),variant:"danger",loading:h})]})}u.propTypes={icon:s().string.isRequired,label:s().string.isRequired,onClick:s().func.isRequired,trailing:s().node,danger:s().bool},m.propTypes={onLogout:s().func.isRequired}},81127:(e,t,a)=>{a.d(t,{ConfirmModal:()=>d,default:()=>o});var n=a(95155),r=a(12115),i=a(31474),s=a(92542),l=a(97677);function o({isOpen:e,onClose:t,title:a,children:s,footer:d,size:c="md",closeOnOverlay:u=!0,showTrafficLights:m=!0,className:x}){return((0,r.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,r.useEffect)(()=>{let a=a=>{"Escape"===a.key&&e&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),e)?(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in",onClick:u?t:void 0}),(0,n.jsxs)("div",{className:(0,i.cn)("relative w-full bg-surface","border border-border-subtle","rounded-[14px] shadow-[var(--shadow-elev)]","fade-in",{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-4xl"}[c],x),children:[(a||m)&&(0,n.jsxs)("div",{className:"flex items-center justify-between p-2 border-b border-border-subtle",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[m&&(0,n.jsxs)("div",{className:"hidden md:flex items-center gap-2 mr-4 ml-2",children:[(0,n.jsx)(l.default,{text:"Close",position:"top",color:"#FF5F56",children:(0,n.jsx)("button",{onClick:t,"aria-label":"Close",title:"Close",className:"w-4 h-4 rounded-full bg-[#FF5F56] hover:brightness-90 transition-all cursor-pointer flex items-center justify-center group/dot",children:(0,n.jsx)("span",{className:"text-[9px] font-bold text-white opacity-0 group-hover/dot:opacity-100 transition-opacity leading-none",children:"✕"})})}),(0,n.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"}),(0,n.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"})]}),a&&(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:a})]}),(0,n.jsx)("button",{onClick:t,"aria-label":"Close",className:"md:hidden p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,n.jsx)("div",{className:"p-6 max-h-[calc(85vh-100px)] overflow-y-auto custom-scrollbar",children:s}),d&&(0,n.jsx)("div",{className:"flex items-center justify-end gap-3 p-6 border-t border-border-subtle",children:d})]})]}):null}function d({isOpen:e,onClose:t,onConfirm:a,title:r="Confirm",message:i,confirmText:l="Confirm",cancelText:c="Cancel",variant:u="danger",loading:m=!1}){return(0,n.jsx)(o,{isOpen:e,onClose:t,title:r,size:"sm",footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.default,{variant:"ghost",onClick:t,disabled:m,children:c}),(0,n.jsx)(s.default,{variant:u,onClick:a,loading:m,children:l})]}),children:(0,n.jsx)("p",{className:"text-text-muted",children:i})})}},84588:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(31474);function i({children:e,title:t,subtitle:a,icon:s,action:l,padding:o="md",hover:d=!1,elev:c=!1,className:u,...m}){return(0,n.jsxs)("div",{className:(0,r.cn)("bg-surface border border-border-subtle",c?"rounded-[14px] shadow-[var(--shadow-elev)]":"rounded-[14px] shadow-[var(--shadow-soft)]",d&&"hover:shadow-[var(--shadow-warm)] hover:border-brand-500/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[o],u),...m,children:[(t||l)&&(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[s&&(0,n.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:s})}),(0,n.jsxs)("div",{children:[t&&(0,n.jsx)("h3",{className:"text-text-main font-semibold",children:t}),a&&(0,n.jsx)("p",{className:"text-sm text-text-muted",children:a})]})]}),l]}),e]})}i.Section=function({children:e,className:t,...a}){return(0,n.jsx)("div",{className:(0,r.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",t),...a,children:e})},i.Row=function({children:e,className:t,...a}){return(0,n.jsx)("div",{className:(0,r.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",t),...a,children:e})},i.ListItem=function({children:e,actions:t,className:a,...i}){return(0,n.jsxs)("div",{className:(0,r.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",a),...i,children:[(0,n.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,n.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},90882:(e,t,a)=>{a.d(t,{default:()=>u});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(35497),o=a(11059);let d=new Set(["trae","windsurf","zed"]),c={trae:{label:"Cloud-IDE-JWT",instructions:"Sign in at trae.ai (or solo.trae.ai), open DevTools → Network, copy the Cloud-IDE-JWT token from any request's Authorization header (~14-day lifetime).",placeholder:"Paste Cloud-IDE-JWT here...",ideName:"Trae",ideOptional:!0},windsurf:{label:"Windsurf API key",instructions:'In the Windsurf/VS Code IDE, run the "Windsurf: Provide Auth Token" command, then copy the displayed sk-ws-... key.',placeholder:"Paste sk-ws-... key here...",ideName:"Windsurf",ideOptional:!1}};function u({isOpen:e,provider:t,providerInfo:a,onSuccess:i,onClose:s,oauthMeta:m,idcConfig:x}){let[p,h]=(0,r.useState)("waiting"),[g,f]=(0,r.useState)(null),[b,v]=(0,r.useState)(""),[y,k]=(0,r.useState)(null),[j,w]=(0,r.useState)(!1),[N,C]=(0,r.useState)(null),[S,O]=(0,r.useState)(!1),[F,W]=(0,r.useState)("browser"),[T,I]=(0,r.useState)(""),[$,A]=(0,r.useState)(null),P=(0,r.useRef)(null),D=(0,r.useRef)(!1),z=(0,r.useRef)(!1),{copied:E,copy:_}=(0,o.C)(),[M,L]=(0,r.useState)(!1),[R,U]=(0,r.useState)("/callback?code=..."),q=(0,r.useRef)(!1);(0,r.useEffect)(()=>{L("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname),U(`${window.location.origin}/callback?code=...`)},[]);let V=(0,r.useCallback)(async(e,a)=>{if(g)try{let n=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,redirectUri:g.redirectUri,codeVerifier:g.codeVerifier,state:a,...m?{meta:m}:{}})}),r=await n.json();if(!n.ok)throw Error(r.error);h("success"),i?.()}catch(e){k(e.message),h("error")}},[g,t,i,m]),K=(0,r.useCallback)(async e=>{if(g?.state)try{let t=await fetch("/api/oauth/xai/manual-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,state:g.state})}),a=await t.json();if(!t.ok)throw Error(a.error);h("success"),i?.()}catch(e){k(e.message),h("error")}},[g,i]),B=(0,r.useCallback)(async(e,a,n,r,s)=>{D.current=!1,O(!0);let l=Date.now()+(Number.isFinite(s)&&s>0?s:12e4);for(;Date.now()<l;){if(D.current){console.log("[OAuthModal] Polling aborted"),O(!1);return}if(await new Promise(e=>setTimeout(e,1e3*n)),D.current){console.log("[OAuthModal] Polling aborted after sleep"),O(!1);return}try{let s=await fetch(`/api/oauth/${t}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:e,codeVerifier:a,extraData:r})}),l=await s.json();if(l.success){D.current=!0,h("success"),O(!1),i?.();return}if("expired_token"===l.error||"access_denied"===l.error||l.fatal)throw Error(l.errorDescription||l.error);"slow_down"===l.error&&(n=Math.min(n+5,30))}catch(e){k(e.message),h("error"),O(!1);return}}k("Authorization timeout"),h("error"),O(!1)},[t,i]),G=(0,r.useCallback)(async e=>{let t=await fetch(`/api/oauth/${e}/start-proxy`),a=await t.json();if(!t.ok||!a.success||!a.callbackUrl)throw Error(a.reason||a.error||`Failed to start ${e} callback server`);let n=new URL(`/api/oauth/${e}/authorize`,window.location.origin);n.searchParams.set("redirect_uri",a.callbackUrl);let r=await fetch(n),i=await r.json();if(!r.ok)throw Error(i.error);let s={state:i.state};i.codeVerifier&&(s.codeVerifier=i.codeVerifier),await fetch(`/api/oauth/${e}/register-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),f({...i,proxyProvider:e}),h("waiting"),P.current=window.open(i.authUrl,"oauth_popup","width=600,height=700"),P.current||h("input")},[]),J=(0,r.useCallback)(async()=>{if(t)try{let e;if(k(null),d.has(t)&&"browser"===F)return void await G(t);if(["github","kiro","kimi","kimi-coding","kilocode","codebuddy-cn","codebuddy-intl","qoder","qoder-cn","grok-cli","glm","muse"].includes(t)){w(!0),h("waiting");let e=new URL(`/api/oauth/${t}/device-code`,window.location.origin);"kiro"===t&&x?.startUrl&&(e.searchParams.set("start_url",x.startUrl),x.region&&e.searchParams.set("region",x.region),e.searchParams.set("auth_method","idc"));let a=await fetch(e.toString()),n=await a.json();if(!a.ok)throw Error(n.error);C(n);let r=n.verification_uri_complete||n.verification_uri;r&&window.open(r,"_blank","noopener,noreferrer");let i="kiro"===t?{_clientId:n._clientId,_clientSecret:n._clientSecret,_region:n._region,_authMethod:n._authMethod,_startUrl:n._startUrl}:"qoder"===t?{_qoderNonce:n._qoderNonce,_qoderMachineId:n._qoderMachineId,_qoderVerifier:n.codeVerifier}:"kimi"===t||"kimi-coding"===t?{_kimiDeviceId:n._kimiDeviceId}:"glm"===t?{_zcodePollToken:n._zcodePollToken}:null;B(n.device_code,n.codeVerifier,n.interval||5,i,Number.isFinite(n.expires_in)&&n.expires_in>0?1e3*n.expires_in:void 0);return}let a=window.location.port||("https:"===window.location.protocol?"443":"80");e="codex"===t?"http://localhost:1455/auth/callback":"xai"===t?"http://127.0.0.1:56121/callback":`http://localhost:${a}/callback`;let n=new URL(`/api/oauth/${t}/authorize`,window.location.origin);n.searchParams.set("redirect_uri",e),m&&Object.entries(m).forEach(([e,t])=>{t&&n.searchParams.set(e,t)});let r=await fetch(n.toString()),i=await r.json();if(!r.ok)throw Error(i.error);let s=!1,l=!1;if("codex"===t)try{let t=new URL("/api/oauth/codex/start-proxy",window.location.origin);t.searchParams.set("app_port",a),t.searchParams.set("state",i.state),t.searchParams.set("code_verifier",i.codeVerifier),t.searchParams.set("redirect_uri",e);let n=await fetch(t.toString()),r=await n.json();s=r.success,l=!!r.serverSide}catch{s=!1}let o=!1,c=!1;if("xai"===t)try{let t=new URL("/api/oauth/xai/start-proxy",window.location.origin);t.searchParams.set("app_port",a),t.searchParams.set("state",i.state),t.searchParams.set("code_verifier",i.codeVerifier),t.searchParams.set("redirect_uri",e);let n=await fetch(t.toString()),r=await n.json();if(o=r.success,c=!!r.serverSide,!o&&"port_busy"===r.reason)throw Error("Port 56121 in use; close the conflicting process and retry")}catch(e){if(e?.message)throw e;o=!1}if(f({...i,redirectUri:e,codexServerSide:l,xaiServerSide:c}),!i.authUrl){if("device_code"===i.flowType)throw Error(`Provider ${t} uses device-code login but is not wired in the OAuth modal device-code list`);throw Error("No authorization URL returned from OAuth provider")}"codex"===t&&s||"xai"===t&&o||M&&"codex"!==t&&"xai"!==t?(h("waiting"),P.current=window.open(i.authUrl,"oauth_popup","width=600,height=700"),P.current||h("input")):(h("input"),window.open(i.authUrl,"_blank"))}catch(e){k(e.message),h("error")}},[t,M,B,m,x,F,G]);(0,r.useEffect)(()=>{e&&t?z.current||(z.current=!0,f(null),v(""),k(null),w(!1),C(null),O(!1),W("browser"),I(""),A(null),D.current=!1,c[t]&&fetch(`/api/oauth/${t}/ide-status`).then(e=>e.json()).then(e=>A(e)).catch(()=>A({installed:!1,path:null})),J()):e||(D.current=!0,z.current=!1,"codex"===t?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===t?fetch("/api/oauth/xai/stop-proxy").catch(()=>{}):"trae"===t?fetch("/api/oauth/trae/stop-proxy").catch(()=>{}):"windsurf"===t?fetch("/api/oauth/windsurf/stop-proxy").catch(()=>{}):"zed"===t&&fetch("/api/oauth/zed/stop-proxy").catch(()=>{}))},[e,t,J]),(0,r.useEffect)(()=>{let e=g?.codexServerSide?"codex":g?.xaiServerSide?"xai":g?.proxyProvider?g.proxyProvider:null;if(!e||!g?.state||q.current)return;let t=!1,a=0,n=async()=>{if(!t&&!q.current){a+=1;try{let a=await fetch(`/api/oauth/${e}/poll-status?state=${encodeURIComponent(g.state)}`),n=await a.json();if(t||q.current)return;if("done"===n.status){q.current=!0,h("success"),i?.();return}if("error"===n.status){q.current=!0,k(n.error||"Authentication failed"),h("error");return}}catch{}if(a>=200){q.current=!0,k("Authentication timeout"),h("error");return}setTimeout(n,1500)}};return setTimeout(n,1500),()=>{t=!0}},[g,i]),(0,r.useEffect)(()=>{let e;if(!g)return;q.current=!1;let t=async e=>{if(q.current)return;let{code:t,token:a,state:n,error:r,errorDescription:i}=e;if(r){q.current=!0,k(i||r),h("error");return}(a||t)&&(q.current=!0,await V(a||t,n))},a=e=>{let a=e.origin.includes("localhost")||e.origin.includes("127.0.0.1"),n=e.origin===window.location.origin;(a||n)&&e.data?.type==="oauth_callback"&&t(e.data.data)};window.addEventListener("message",a);try{(e=new BroadcastChannel("oauth_callback")).onmessage=e=>t(e.data)}catch(e){console.log("BroadcastChannel not supported")}let n=e=>{if("oauth_callback"===e.key&&e.newValue)try{let a=JSON.parse(e.newValue);t(a),localStorage.removeItem("oauth_callback")}catch(e){console.log("Failed to parse localStorage data")}};window.addEventListener("storage",n);try{let e=localStorage.getItem("oauth_callback");if(e){let a=JSON.parse(e);a.timestamp&&Date.now()-a.timestamp<3e4&&t(a),localStorage.removeItem("oauth_callback")}}catch{}return()=>{window.removeEventListener("message",a),window.removeEventListener("storage",n),e&&e.close()}},[g,V]);let H=async()=>{try{if(k(null),"paste-token"===F&&c[t]){let e=T.trim();if(!e)throw Error("Missing token");let a=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e})}),n=await a.json();if(!a.ok)throw Error(n.error);h("success"),i?.();return}let e=b.trim();if(d.has(t)&&e){let a=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,state:g?.state})}),n=await a.json();if(!a.ok)throw Error(n.error);h("success"),i?.();return}if(e.startsWith("eyJ")&&e.includes("."))return void await V(e,null);if("xai"===t&&e&&!e.includes("://")&&!e.includes("?")&&!e.includes("code="))return void await K(e);if("kimchi"===t&&e&&!e.includes("://")&&!e.includes("?"))return void await V(e,null);let a=new URL(e),n=a.searchParams.get("code"),r=a.searchParams.get("token"),s=a.searchParams.get("state"),l=a.searchParams.get("error");if(l)throw Error(a.searchParams.get("error_description")||l);if(!n&&!r)throw Error("xai"===t?"Paste the callback URL or copied xAI code":"kimchi"===t?"No Kimchi token found in URL":"No authorization code found in URL");await V(r||n,s)}catch(e){k(e.message),h("error")}},Q=(0,r.useCallback)(()=>{"codex"===t?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===t?fetch("/api/oauth/xai/stop-proxy").catch(()=>{}):"trae"===t?fetch("/api/oauth/trae/stop-proxy").catch(()=>{}):"windsurf"===t?fetch("/api/oauth/windsurf/stop-proxy").catch(()=>{}):"zed"===t&&fetch("/api/oauth/zed/stop-proxy").catch(()=>{}),s()},[s,t]);if(!t||!a)return null;let Y="xai"===t,X="kimchi"===t,Z=N?.verification_uri_complete||N?.verification_uri||"",ee=Y?"Connect Grok Build OAuth":`Connect ${a.name}`,et=Y?"http://127.0.0.1:56121/callback?code=... or copied code":X?`${R.replace("code=...","token=...")} or copied token`:R;return(0,n.jsx)(l.aF,{isOpen:e,title:ee,onClose:Q,size:"lg",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[d.has(t)&&("waiting"===p||"input"===p||"error"===p)&&(0,n.jsxs)(n.Fragment,{children:[c[t]&&(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:()=>{W("browser"),k(null),h("waiting"),J()},className:`flex-1 rounded-lg border px-3 py-2 text-sm transition-colors ${"browser"===F?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:"\uD83C\uDF10 Sign in with browser"}),(0,n.jsx)("button",{type:"button",onClick:()=>{W("paste-token"),k(null),h("input")},className:`flex-1 rounded-lg border px-3 py-2 text-sm transition-colors ${"paste-token"===F?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:"\uD83D\uDD11 Paste token"})]}),"browser"===F&&(0,n.jsxs)(n.Fragment,{children:["waiting"===p&&(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border border-border rounded-lg bg-sidebar/50",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-base text-primary animate-spin",children:"progress_activity"}),(0,n.jsx)("span",{className:"text-sm",children:"Waiting for browser authorization…"})]}),"input"===p&&(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Popup was blocked. After authorizing in the browser, paste the full callback URL here:"}),(0,n.jsx)(l.pd,{value:b,onChange:e=>v(e.target.value),placeholder:"http://127.0.0.1:.../callback?...",className:"font-mono text-xs"}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:H,fullWidth:!0,disabled:!b,children:"Connect"}),(0,n.jsx)(l.$n,{onClick:Q,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]}),"paste-token"===F&&c[t]&&(0,n.jsxs)("div",{className:"space-y-3",children:[$&&!$.installed&&(0,n.jsxs)("div",{className:`px-3 py-2 rounded-lg text-sm ${c[t].ideOptional?"bg-blue-500/10 text-blue-700 dark:text-blue-300":"bg-yellow-500/10 text-yellow-700 dark:text-yellow-300"}`,children:[c[t].ideName," IDE not detected.",c[t].ideOptional?" You can still grab the token from DevTools.":` Install ${c[t].ideName} IDE to get the token, or use "Sign in with browser".`]}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:c[t].instructions}),(0,n.jsx)(l.pd,{value:T,onChange:e=>I(e.target.value),placeholder:c[t].placeholder,className:"font-mono text-xs"}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:H,fullWidth:!0,disabled:!T,children:"Connect"}),(0,n.jsx)(l.$n,{onClick:Q,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]}),("waiting"===p||"input"===p)&&!j&&!d.has(t)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border border-border rounded-lg bg-sidebar/50",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-base text-primary animate-spin",children:"progress_activity"}),(0,n.jsx)("span",{className:"text-sm",children:Y?"Waiting for Grok Build OAuth…":"Waiting for popup authorization…"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 my-1",children:[(0,n.jsx)("div",{className:"flex-1 h-px bg-border"}),(0,n.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wider",children:"Or paste callback URL manually"}),(0,n.jsx)("div",{className:"flex-1 h-px bg-border"})]}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 1: Open this ",Y?"Grok Build OAuth URL":"URL"," in your browser"]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.pd,{value:g?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,n.jsx)(l.$n,{variant:"secondary",icon:"auth_url"===E?"check":"content_copy",onClick:()=>_(g?.authUrl,"auth_url"),disabled:!g?.authUrl,children:"Copy"})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 2: Paste the ","xai"===t?"callback URL or copied code":X?"callback URL or copied token":"callback URL"," here"]}),(0,n.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"xai"===t?"If xAI shows a code instead of redirecting, paste that code here.":X?"After authorization, copy the full callback URL or token from your browser.":"After authorization, copy the full URL from your browser."}),(0,n.jsx)(l.pd,{value:b,onChange:e=>v(e.target.value),placeholder:et,className:"font-mono text-xs"})]})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:H,fullWidth:!0,disabled:!b,children:"Connect"}),(0,n.jsx)(l.$n,{onClick:Q,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"waiting"===p&&j&&N&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center py-4",children:[(0,n.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Visit the login URL below and authorize:"}),(0,n.jsxs)("div",{className:"bg-sidebar p-4 rounded-lg mb-4",children:[(0,n.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Login URL"}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("code",{className:"flex-1 text-sm break-all",children:Z}),(0,n.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"login_url"===E?"check":"content_copy",onClick:()=>_(Z,"login_url"),disabled:!Z}),(0,n.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"open_in_new",onClick:()=>window.open(Z,"_blank","noopener,noreferrer"),disabled:!Z,children:"Open"})]})]}),N.user_code&&(0,n.jsxs)("div",{className:"bg-primary/10 p-4 rounded-lg",children:[(0,n.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Your Code"}),(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,n.jsx)("p",{className:"text-2xl font-mono font-bold text-primary",children:N.user_code}),(0,n.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"user_code"===E?"check":"content_copy",onClick:()=>_(N.user_code,"user_code")})]})]})]}),S&&(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-text-muted",children:[(0,n.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),"Waiting for authorization..."]})]}),"success"===p&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,n.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your ",a.name," account has been connected."]}),(0,n.jsx)(l.$n,{onClick:Q,fullWidth:!0,children:"Done"})]}),"error"===p&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,n.jsx)("p",{className:"text-sm text-red-600 mb-4",children:y}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:J,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,n.jsx)(l.$n,{onClick:Q,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}u.propTypes={isOpen:s().bool.isRequired,provider:s().string,providerInfo:s().shape({name:s().string}),onSuccess:s().func,onClose:s().func.isRequired,oauthMeta:s().object,idcConfig:s().shape({startUrl:s().string,region:s().string})}},91450:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(14051),i=a.n(r),s=a(38587);function l({children:e}){return(0,n.jsxs)("div",{className:"min-h-screen flex flex-col relative bg-bg transition-colors duration-500 overflow-x-hidden selection:bg-primary/20 selection:text-primary",children:[(0,n.jsx)("div",{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-primary/5 dark:bg-primary/5 rounded-full blur-[100px] pointer-events-none z-0"}),(0,n.jsx)("div",{className:"fixed bottom-0 right-0 w-[600px] h-[600px] bg-orange-200/20 dark:bg-orange-900/10 rounded-full blur-[120px] pointer-events-none z-0 translate-y-1/3 translate-x-1/3"}),(0,n.jsx)("div",{className:"absolute top-6 right-6 z-20",children:(0,n.jsx)(s.default,{variant:"card"})}),(0,n.jsx)("main",{className:"flex-1 flex flex-col items-center justify-center p-4 sm:p-6 z-10 w-full h-full",children:e})]})}l.propTypes={children:i().node.isRequired}},92173:(e,t,a)=>{a.d(t,{default:()=>c});var n=a(95155),r=a(98500),i=a.n(r),s=a(90620);let l=[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"},{label:"Changelog",href:"#"}],o=[{label:"Documentation",href:"#"},{label:"API Reference",href:"#"},{label:"Help Center",href:"#"}],d=[{label:"About",href:"#"},{label:"Blog",href:"#"},{label:"Contact",href:"#"}];function c(){return(0,n.jsx)("footer",{className:"bg-bg border-t border-border pt-16 pb-12",children:(0,n.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[(0,n.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-10 mb-12",children:[(0,n.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,n.jsx)("div",{className:"size-6 text-primary",children:(0,n.jsx)("svg",{className:"w-full h-full",fill:"currentColor",viewBox:"0 0 48 48",children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M12.0799 24L4 19.2479L9.95537 8.75216L18.04 13.4961L18.0446 4H29.9554L29.96 13.4961L38.0446 8.75216L44 19.2479L35.92 24L44 28.7521L38.0446 39.2479L29.96 34.5039L29.9554 44H18.0446L18.04 34.5039L9.95537 39.2479L4 28.7521L12.0799 24Z",fillRule:"evenodd"})})}),(0,n.jsx)("span",{className:"text-xl font-bold text-text-main",children:s.vQ.name})]}),(0,n.jsx)("p",{className:"text-text-muted mb-6 max-w-sm font-light",children:"The unified interface for modern AI infrastructure. Secure, observable, and scalable."}),(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"Twitter",children:(0,n.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"})})}),(0,n.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"GitHub",children:(0,n.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"})})})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Product"}),(0,n.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:l.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Resources"}),(0,n.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:o.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Company"}),(0,n.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:d.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]})]}),(0,n.jsxs)("div",{className:"border-t border-border pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,n.jsxs)("p",{className:"text-sm text-text-muted",children:["\xa9 ",new Date().getFullYear()," ",s.vQ.name," Inc. All rights reserved."]}),(0,n.jsxs)("div",{className:"flex gap-6 text-sm text-text-muted",children:[(0,n.jsx)(i(),{href:"#",className:"hover:text-primary transition-colors",children:"Privacy Policy"}),(0,n.jsx)(i(),{href:"#",className:"hover:text-primary transition-colors",children:"Terms of Service"})]})]})]})})}},92542:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(31474);let i={primary:"bg-brand-500 hover:bg-brand-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-brand-500/40",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-red-500 hover:bg-red-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-green-600 hover:bg-green-700 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},s={xs:"h-6 px-2 text-[11px] rounded-md",sm:"h-7 px-3 text-xs rounded-[8px]",md:"h-9 px-4 text-sm rounded-[10px]",lg:"h-11 px-6 text-sm rounded-[10px]"};function l({children:e,variant:t="primary",size:a="md",icon:o,iconRight:d,disabled:c=!1,loading:u=!1,fullWidth:m=!1,className:x,...p}){return(0,n.jsxs)("button",{className:(0,r.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.97] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100",i[t],s[a],m&&"w-full",x),disabled:c||u,...p,children:[u?(0,n.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}):o?(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:o}):null,e,d&&!u&&(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:d})]})}},92622:(e,t,a)=>{a.d(t,{default:()=>N});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(98500),o=a.n(l),d=a(73321),c=a(31474),u=a(90620),m=a(88105),x=a(11059),p=a(65635),h=a(73006),g=a(72767),f=a(92542),b=a(81127);let v=["embedding","image","video","tts","stt","systemone"],y="/dashboard/media-providers/web",k=[{href:"/dashboard/endpoint",label:"Endpoint & Key",icon:"api"},{href:"/dashboard/providers",label:"Providers",icon:"dns"},{href:"/dashboard/combos",label:"Combo & Vision Adapter",icon:"layers"},{href:"/dashboard/usage",label:"Usage",icon:"bar_chart"},{href:"/dashboard/quota",label:"Quota Tracker",icon:"data_usage"},{href:"/dashboard/token-saver",label:"Token Saver",icon:"savings"},{href:"/dashboard/cli-tools",label:"CLI Tools",icon:"terminal"}],j=[{href:"/dashboard/console-log",label:"Console Log",icon:"terminal"},{href:"/dashboard/translator",label:"Translator",icon:"translate"}],w=[{href:"/dashboard/proxy-pools",label:"Proxy Pools",icon:"lan"},{href:"/dashboard/skills",label:"Skills",icon:"extension"}];function N({onClose:e}){let t=(0,d.usePathname)(),[a,i]=(0,r.useState)(!1),[s,l]=(0,r.useState)(!1),[S,O]=(0,r.useState)(null),[F,W]=(0,r.useState)(null),[T,I]=(0,r.useState)(!1),[$,A]=(0,r.useState)(!1),[P,D]=(0,r.useState)(0),[z,E]=(0,r.useState)(!1),{copied:_,copy:M}=(0,x.C)(2e3),L=u.h0.installCmdLatest;(0,r.useEffect)(()=>{g.A.getState().fetchSettings().then(e=>{e?.enableTranslator&&E(!0)})},[]),(0,r.useEffect)(()=>{let e=setTimeout(()=>{fetch("/api/version").then(e=>e.json()).then(e=>{e.hasUpdate&&O(e)}).catch(()=>{})},2500);return()=>clearTimeout(e)},[]),(0,r.useEffect)(()=>{fetch("/api/version",{cache:"no-store"}).then(e=>e.json()).then(e=>{e.diskVersion&&e.currentVersion&&e.diskVersion!==e.currentVersion&&W(e)}).catch(()=>{})},[]);let R=e=>"/dashboard/endpoint"===e?"/dashboard"===t||t.startsWith("/dashboard/endpoint"):t.startsWith(e),U=async()=>{await (0,p.e)(L),M(L);let e=u.h0.shutdownCountdownSec;D(e);let t=setInterval(()=>{D(e-=1),e<=0&&(clearInterval(t),fetch("/api/version/shutdown",{method:"POST"}).catch(()=>{}),l(!0))},1e3)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("aside",{className:"flex w-72 flex-col border-r border-border-subtle bg-vibrancy backdrop-blur-xl transition-colors duration-300 min-h-full",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 px-6 pt-5 pb-2",children:[(0,n.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,n.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,n.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"})]}),(0,n.jsxs)("div",{className:"px-6 py-4 flex flex-col gap-2",children:[(0,n.jsxs)(o(),{href:"/dashboard",className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"flex items-center justify-center size-9 rounded-[10px] bg-gradient-to-br from-brand-500 to-brand-700 shadow-[var(--shadow-warm)]",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-white text-[20px]",children:"hub"})}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("h1",{className:"text-lg font-semibold tracking-tight text-text-main",children:"10Router Proxy"}),(0,n.jsxs)("span",{className:"text-xs text-text-muted",children:["v",u.vQ.version]})]})]}),F&&(0,n.jsxs)("div",{className:"flex flex-col gap-1 rounded p-1.5 -m-1 bg-amber-500/10 border border-amber-500/40",children:[(0,n.jsx)("span",{className:"text-xs font-semibold text-amber-700 dark:text-amber-500",children:(0,h.Tl)("Installed version ${disk} differs from the running build ${current}.").replace("${disk}",F.diskVersion).replace("${current}",F.currentVersion)}),(0,n.jsx)("span",{className:"text-[11px] text-text-muted",children:(0,h.Tl)("Quit and reopen 10router, then refresh this page.")})]}),S&&(0,n.jsxs)("div",{className:"flex flex-col gap-1.5 rounded p-1 -m-1",children:[(0,n.jsxs)("span",{className:"text-xs font-semibold text-green-600 dark:text-amber-500",children:[(0,h.Tl)("↑ New version available:")," v",S.latestVersion]}),"fpk"===S.installChannel||"desktop"===S.installChannel?(0,n.jsx)("a",{href:S.releaseUrl,target:"_blank",rel:"noreferrer",className:"px-2 py-1 rounded bg-green-600 hover:bg-green-700 dark:bg-amber-500 dark:hover:bg-amber-600 text-white text-[11px] font-semibold transition-colors text-center",children:"fpk"===S.installChannel?(0,h.Tl)("Get the fpk from Releases"):(0,h.Tl)("Get the installer from Releases")}):(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("button",{onClick:()=>I(!0),className:"px-2 py-1 rounded bg-green-600 hover:bg-green-700 dark:bg-amber-500 dark:hover:bg-amber-600 text-white text-[11px] font-semibold transition-colors cursor-pointer",children:(0,h.Tl)("Update now")}),(0,n.jsx)("button",{onClick:()=>M(L),title:(0,h.Tl)("Copy install command"),className:"flex-1 text-left hover:opacity-80 transition-opacity cursor-pointer min-w-0",children:(0,n.jsx)("code",{className:"block text-[10px] text-green-600/80 dark:text-amber-400/70 font-mono truncate",children:_?"✓ "+(0,h.Tl)("copied!"):L})})]})]})]}),(0,n.jsxs)("nav",{className:"flex-1 px-4 py-2 space-y-0.5 overflow-y-auto custom-scrollbar",children:[k.map(t=>(0,n.jsxs)(o(),{href:t.href,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",R(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,n.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",R(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,n.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href)),(0,n.jsxs)("div",{className:"pt-3 mt-2 space-y-0.5",children:[(0,n.jsx)("p",{className:"px-4 text-xs font-semibold text-text-muted/60 uppercase tracking-wider mb-2",children:"System"}),(0,n.jsxs)("button",{onClick:()=>i(e=>!e),className:(0,c.cn)("w-full flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",t.startsWith("/dashboard/media-providers")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"perm_media"}),(0,n.jsx)("span",{className:"text-[13px] font-medium flex-1 text-left",children:"Media Providers"}),m.rj.some(e=>v.includes(e.id)&&e.isNew)&&(0,n.jsx)("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded-[3px] bg-green-500/15 text-green-400",children:"NEW"}),(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px] transition-transform",style:{transform:a?"rotate(180deg)":"rotate(0deg)"},children:"expand_more"})]}),a&&(0,n.jsxs)("div",{className:"pl-4",children:[m.rj.filter(e=>v.includes(e.id)).map(a=>(0,n.jsxs)(o(),{href:`/dashboard/media-providers/${a.id}`,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-4 py-1 rounded-lg transition-all group",t.startsWith(`/dashboard/media-providers/${a.id}`)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:a.icon}),(0,n.jsx)("span",{className:"text-sm",children:a.label}),a.isNew&&(0,n.jsx)("span",{className:"ml-auto text-[10px] font-semibold px-1.5 py-0.5 rounded-[3px] bg-green-500/15 text-green-400",children:"NEW"})]},a.id)),(0,n.jsxs)(o(),{href:y,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-4 py-1 rounded-lg transition-all group",t.startsWith(y)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"travel_explore"}),(0,n.jsx)("span",{className:"text-sm",children:"Web Fetch & Search"})]},"web")]}),w.map(t=>(0,n.jsxs)(o(),{href:t.href,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",R(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,n.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",R(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,n.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href)),j.map(t=>"/dashboard/translator"!==t.href||z?(0,n.jsxs)(o(),{href:t.href,onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",R(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,n.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",R(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),(0,n.jsx)("span",{className:"text-[13px] font-medium",children:t.label})]},t.href):null),(0,n.jsxs)(o(),{href:"/dashboard/experimental",onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",R("/dashboard/experimental")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,n.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",R("/dashboard/experimental")?"fill-1":"group-hover:text-primary transition-colors"),children:"science"}),(0,n.jsx)("span",{className:"text-[13px] font-medium",children:"Experimental"})]}),(0,n.jsxs)(o(),{href:"/dashboard/profile",onClick:e,className:(0,c.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",R("/dashboard/profile")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,n.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",R("/dashboard/profile")?"fill-1":"group-hover:text-primary transition-colors"),children:"settings"}),(0,n.jsx)("span",{className:"text-[13px] font-medium",children:"Settings"})]})]})]})]}),(0,n.jsx)(b.ConfirmModal,{isOpen:T,onClose:()=>I(!1),onConfirm:()=>{I(!1),A(!0)},title:(0,h.Tl)("Update 10Router"),message:(0,h.Tl)("Show install command for v${version}? You can copy it and shutdown to install manually.").replace("${version}",S?.latestVersion||""),confirmText:(0,h.Tl)("Show Command"),cancelText:(0,h.Tl)("Cancel"),variant:"primary"}),(s||$)&&(0,n.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm p-6",children:$?(0,n.jsx)(C,{latestVersion:S?.latestVersion,installCmd:L,copied:_,onCopyAndShutdown:U,onCancel:()=>{A(!1),D(0)},countdown:P,isDisconnected:s}):(0,n.jsxs)("div",{className:"text-center p-8",children:[(0,n.jsx)("div",{className:"flex items-center justify-center size-16 rounded-full bg-red-500/20 text-red-500 mx-auto mb-4",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"power_off"})}),(0,n.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:(0,h.Tl)("Server Disconnected")}),(0,n.jsx)("p",{className:"text-text-muted mb-6",children:(0,h.Tl)("The proxy server has been stopped.")}),(0,n.jsx)(f.default,{variant:"secondary",onClick:()=>globalThis.location.reload(),children:(0,h.Tl)("Reload Page")})]})})]})}function C({latestVersion:e,installCmd:t,copied:a,onCopyAndShutdown:r,onCancel:i,countdown:s,isDisconnected:l}){let o=s>0;return(0,n.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-neutral-900/95 border border-white/10 p-6 text-white",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,n.jsx)("div",{className:"flex items-center justify-center size-11 rounded-full bg-amber-500/20 text-amber-400",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"content_copy"})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("h2",{className:"text-lg font-semibold",children:[(0,h.Tl)("Update 10Router"),e?` v${e}`:""]}),(0,n.jsx)("p",{className:"text-xs text-white/60",children:l?(0,h.Tl)("Server stopped. Paste the command into a terminal to install."):o?(0,h.Tl)("Command copied. Server will stop in {s}s...").replace("{s}",String(s)):(0,h.Tl)("Click the button below to copy the install command and shutdown.")})]})]}),(0,n.jsx)("p",{className:"text-sm text-white/80 mb-2",children:(0,h.Tl)("Install command:")}),(0,n.jsx)("div",{className:"w-full px-3 py-2 rounded bg-white/5 mb-4",children:(0,n.jsx)("code",{className:"text-xs font-mono text-amber-400 break-all",children:t})}),(0,n.jsxs)("ol",{className:"text-xs text-white/70 space-y-1 list-decimal list-inside mb-4",children:[(0,n.jsx)("li",{children:(0,h.Tl)("Click Copy & Shutdown below.")}),(0,n.jsx)("li",{children:(0,h.Tl)("Paste the command into your terminal and press Enter.")}),(0,n.jsx)("li",{children:(0,h.Tl)("Run 10router again after install.")})]}),l?(0,n.jsx)(f.default,{variant:"secondary",fullWidth:!0,onClick:()=>globalThis.location.reload(),children:(0,h.Tl)("Reload Page")}):(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(f.default,{variant:"secondary",onClick:i,disabled:o,className:"whitespace-nowrap shrink-0",children:(0,h.Tl)("Cancel")}),(0,n.jsx)(f.default,{variant:"primary",fullWidth:!0,onClick:r,disabled:o,children:a?(0,h.Tl)("✓ Copied — shutting down..."):o?(0,h.Tl)("Shutting down in {s}s").replace("{s}",String(s)):(0,h.Tl)("Copy & Shutdown")})]})]})}N.propTypes={onClose:s().func},C.propTypes={latestVersion:s().string,installCmd:s().string.isRequired,copied:s().bool,onCopyAndShutdown:s().func.isRequired,onCancel:s().func.isRequired,countdown:s().number,isDisconnected:s().bool}},94230:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(35497),o=a(11059);function d({isOpen:e,provider:t,onSuccess:a,onClose:i}){let[s,c]=(0,r.useState)("loading"),[u,m]=(0,r.useState)(""),[x,p]=(0,r.useState)(null),[h,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(null),{copied:v,copy:y}=(0,o.C)(),k=(0,r.useRef)(!1);(0,r.useEffect)(()=>{e||(k.current=!1)},[e]),(0,r.useEffect)(()=>{e&&t&&(async()=>{try{b(null),c("loading");let e=await fetch(`/api/oauth/kiro/social-authorize?provider=${t}`),a=await e.json();if(!e.ok)throw Error(a.error);p(a),m(a.authUrl),c("input"),k.current||(k.current=!0,window.open(a.authUrl,"_blank"))}catch(e){b(e.message),c("error")}})()},[e,t]);let j=async()=>{try{let e;b(null);try{e=new URL(h)}catch(e){throw Error("Invalid callback URL format")}let n=e.searchParams.get("code");e.searchParams.get("state");let r=e.searchParams.get("error");if(r)throw Error(e.searchParams.get("error_description")||r);if(!n)throw Error("No authorization code found in URL");let i=await fetch("/api/oauth/kiro/social-exchange",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:n,codeVerifier:x.codeVerifier,provider:t})}),s=await i.json();if(!i.ok)throw Error(s.error);c("success"),a?.()}catch(e){b(e.message),c("error")}},w="google"===t?"Google":"GitHub";return(0,n.jsx)(l.aF,{isOpen:e,title:`Connect Kiro via ${w}`,onClose:i,size:"lg",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:["loading"===s&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Initializing..."}),(0,n.jsxs)("p",{className:"text-sm text-text-muted",children:["Setting up ",w," authentication"]})]}),"input"===s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.pd,{value:u,readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,n.jsx)(l.$n,{variant:"secondary",icon:"auth_url"===v?"check":"content_copy",onClick:()=>y(u,"auth_url"),children:"Copy"})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,n.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser address bar."}),(0,n.jsx)(l.pd,{value:h,onChange:e=>g(e.target.value),placeholder:"kiro://kiro.kiroAgent/authenticate-success?code=...",className:"font-mono text-xs"})]})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:j,fullWidth:!0,disabled:!h,children:"Connect"}),(0,n.jsx)(l.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===s&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,n.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your Kiro account via ",w," has been connected."]}),(0,n.jsx)(l.$n,{onClick:i,fullWidth:!0,children:"Done"})]}),"error"===s&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,n.jsx)("p",{className:"text-sm text-red-600 mb-4",children:f}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:()=>c("input"),variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,n.jsx)(l.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}d.propTypes={isOpen:s().bool.isRequired,provider:s().oneOf(["google","github"]).isRequired,onSuccess:s().func,onClose:s().func.isRequired}},95088:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(35497);let o="https://gitlab.com";function d({isOpen:e,providerInfo:t,onSuccess:a,onClose:i}){let s,[c,u]=(0,r.useState)(null),[m,x]=(0,r.useState)(o),[p,h]=(0,r.useState)(""),[g,f]=(0,r.useState)(""),[b,v]=(0,r.useState)(""),[y,k]=(0,r.useState)(!1),[j,w]=(0,r.useState)(null),[N,C]=(0,r.useState)(!1),[S,O]=(0,r.useState)(null),F=()=>{u(null),x(o),h(""),f(""),v(""),w(null),k(!1),C(!1),O(null),i()},W=async()=>{if(!b.trim())return void w("Personal Access Token is required");k(!0),w(null);try{let e=await fetch("/api/oauth/gitlab/pat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:b.trim(),baseUrl:m.trim()||o})}),t=await e.json();if(!e.ok)throw Error(t.error||"Authentication failed");a?.(),F()}catch(e){w(e.message)}finally{k(!1)}};return e?N&&S?(0,n.jsx)(l.LF,{isOpen:!0,provider:"gitlab",providerInfo:t,oauthMeta:S,onSuccess:()=>{a?.(),F()},onClose:()=>{C(!1),O(null)}}):(0,n.jsx)(l.aF,{isOpen:e,title:"Connect GitLab Duo",onClose:F,size:"lg",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[!c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Choose how to authenticate with GitLab Duo:"}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,n.jsxs)("button",{onClick:()=>u("oauth"),className:"flex flex-col items-center gap-2 p-4 rounded-lg border border-border hover:border-primary hover:bg-primary/5 transition-colors text-left",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-2xl text-primary",children:"lock_open"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium",children:"OAuth App"}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:"Use a GitLab OAuth application"})]})]}),(0,n.jsxs)("button",{onClick:()=>u("pat"),className:"flex flex-col items-center gap-2 p-4 rounded-lg border border-border hover:border-primary hover:bg-primary/5 transition-colors text-left",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-2xl text-primary",children:"key"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium",children:"Personal Access Token"}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:"Use a GitLab PAT with api scope"})]})]})]})]}),"oauth"===c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"text-xs text-text-muted",children:["Create an OAuth app at"," ",(0,n.jsx)("a",{href:`${m.trim()||o}/-/profile/applications`,target:"_blank",rel:"noreferrer",className:"text-primary underline",children:"GitLab Applications"})," ","with redirect URI"," ",(0,n.jsx)("code",{className:"bg-sidebar px-1 rounded text-xs",children:(s=window.location.port||("https:"===window.location.protocol?"443":"80"),`http://localhost:${s}/callback`)})]}),(0,n.jsx)(l.pd,{label:"GitLab Base URL",value:m,onChange:e=>x(e.target.value),placeholder:o}),(0,n.jsx)(l.pd,{label:"Client ID",value:p,onChange:e=>h(e.target.value),placeholder:"Your OAuth application client ID"}),(0,n.jsx)(l.pd,{label:"Client Secret (optional for PKCE)",value:g,onChange:e=>f(e.target.value),placeholder:"Leave empty for public PKCE app"}),j&&(0,n.jsx)("p",{className:"text-sm text-red-500",children:j}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:()=>{p.trim()?(w(null),O({baseUrl:m.trim()||o,clientId:p.trim(),clientSecret:g.trim()}),C(!0)):w("Client ID is required")},fullWidth:!0,disabled:!p.trim(),children:"Authorize"}),(0,n.jsx)(l.$n,{onClick:()=>{u(null),w(null)},variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"pat"===c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"text-xs text-text-muted",children:["Create a PAT at"," ",(0,n.jsx)("a",{href:`${m.trim()||o}/-/user_settings/personal_access_tokens`,target:"_blank",rel:"noreferrer",className:"text-primary underline",children:"GitLab Access Tokens"})," ","with scopes: ",(0,n.jsx)("code",{className:"bg-sidebar px-1 rounded text-xs",children:"api"}),","," ",(0,n.jsx)("code",{className:"bg-sidebar px-1 rounded text-xs",children:"read_user"}),", and"," ",(0,n.jsx)("code",{className:"bg-sidebar px-1 rounded text-xs",children:"ai_features"}),"."]}),(0,n.jsx)(l.pd,{label:"GitLab Base URL",value:m,onChange:e=>x(e.target.value),placeholder:o}),(0,n.jsx)(l.pd,{label:"Personal Access Token",value:b,onChange:e=>v(e.target.value),placeholder:"glpat-xxxxxxxxxxxxxxxxxxxx",type:"password"}),j&&(0,n.jsx)("p",{className:"text-sm text-red-500",children:j}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:W,fullWidth:!0,disabled:!b.trim()||y,loading:y,children:"Connect"}),(0,n.jsx)(l.$n,{onClick:()=>{u(null),w(null)},variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})}):null}d.propTypes={isOpen:s().bool.isRequired,providerInfo:s().shape({name:s().string}),onSuccess:s().func,onClose:s().func.isRequired}},96748:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),l=a(35497);let o="https://api.openai.com/v1";function d({isOpen:e,onClose:t,onCreated:a,onSaved:i,node:s}){let c=!!s,[u,m]=(0,r.useState)({name:"",prefix:"",baseUrl:o}),[x,p]=(0,r.useState)(!1),[h,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1),[k,j]=(0,r.useState)(null);(0,r.useEffect)(()=>{e&&(j(null),g(""),b(""),c?m({name:s.name||"",prefix:s.prefix||"",baseUrl:s.baseUrl||o}):m({name:"",prefix:"",baseUrl:o}))},[e,c,s]);let w=async()=>{if(u.name.trim()&&u.prefix.trim()&&u.baseUrl.trim()){p(!0);try{let e=c?`/api/provider-nodes/${s.id}`:"/api/provider-nodes",t=c?"PUT":"POST",n={name:u.name,prefix:u.prefix,baseUrl:u.baseUrl};c||(n.type="custom-embedding");let r=await fetch(e,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}),l=await r.json();r.ok&&(c?i?.(l.node):a?.(l.node))}catch(e){console.log("Error saving custom embedding node:",e)}finally{p(!1)}}},N=async()=>{y(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:u.baseUrl,apiKey:h,type:"custom-embedding",modelId:f.trim()||void 0})}),t=await e.json();j(t)}catch{j({valid:!1,error:"Network error"})}finally{y(!1)}};return(0,n.jsx)(l.aF,{isOpen:e,title:c?"Edit Custom Embedding":"Add Custom Embedding",onClose:t,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)(l.pd,{label:"Name",value:u.name,onChange:e=>m({...u,name:e.target.value}),placeholder:"Voyage AI",hint:"Required. A friendly label for this embedding provider."}),(0,n.jsx)(l.pd,{label:"Prefix",value:u.prefix,onChange:e=>m({...u,prefix:e.target.value}),placeholder:"voyage",hint:"Required. Used as the provider prefix for model IDs (e.g. voyage/voyage-3)."}),(0,n.jsx)(l.pd,{label:"Base URL",value:u.baseUrl,onChange:e=>m({...u,baseUrl:e.target.value}),placeholder:"https://api.voyageai.com/v1",hint:"Most embedding APIs are OpenAI-compatible: Voyage, Cohere, Jina, Mistral, Together..."}),(0,n.jsx)(l.pd,{label:"API Key (for Check)",type:"password",value:h,onChange:e=>g(e.target.value)}),(0,n.jsx)(l.pd,{label:"Model ID (for Check)",value:f,onChange:e=>b(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",hint:"Required for validation. Will send a test embeddings request."}),(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(l.$n,{onClick:N,disabled:!h||!f.trim()||v||!u.baseUrl.trim(),variant:"secondary",children:v?"Checking...":"Check"}),(()=>{if(!k)return null;let{valid:e,error:t,dimensions:a}=k;return e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.Ex,{variant:"success",children:"Valid"}),a&&(0,n.jsxs)("span",{className:"text-sm text-text-muted",children:[a," dims"]})]}):(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)(l.Ex,{variant:"error",children:"Invalid"}),t&&(0,n.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.$n,{onClick:w,fullWidth:!0,disabled:!u.name.trim()||!u.prefix.trim()||!u.baseUrl.trim()||x,children:x?c?"Saving...":"Creating...":c?"Save":"Create"}),(0,n.jsx)(l.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}d.propTypes={isOpen:s().bool.isRequired,onClose:s().func.isRequired,onCreated:s().func,onSaved:s().func,node:s().shape({id:s().string,name:s().string,prefix:s().string,baseUrl:s().string})}},97677:(e,t,a)=>{a.d(t,{default:()=>r});var n=a(95155);function r({text:e,children:t,position:a="top",color:i}){let s=i?"":"bg-gray-900";return(0,n.jsxs)("div",{className:"relative inline-flex group/tt",children:[t,(0,n.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-1.5",bottom:"top-full left-1/2 -translate-x-1/2 mt-1.5",left:"right-full top-1/2 -translate-y-1/2 mr-1.5",right:"left-full top-1/2 -translate-y-1/2 ml-1.5"}[a]} z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug ${s} text-white opacity-0 group-hover/tt:opacity-100 transition-opacity duration-150 whitespace-normal`,style:i?{backgroundColor:i}:{},children:e})]})}},98542:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(31474);function i({checked:e=!1,onChange:t,label:a,description:s,disabled:l=!1,size:o="md",className:d}){let c={sm:{track:"w-8 h-4",thumb:"size-3",translate:"translate-x-4"},md:{track:"w-11 h-6",thumb:"size-5",translate:"translate-x-5"},lg:{track:"w-14 h-7",thumb:"size-6",translate:"translate-x-7"}};return(0,n.jsxs)("div",{className:(0,r.cn)("flex items-center gap-3",l&&"opacity-50 cursor-not-allowed",d),children:[(0,n.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:l,onClick:()=>{!l&&t&&t(!e)},className:(0,r.cn)("relative inline-flex shrink-0 cursor-pointer rounded-full","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-2 focus:ring-brand-500/30",e?"bg-brand-500":"bg-surface-3",c[o].track,l&&"cursor-not-allowed"),children:(0,n.jsx)("span",{className:(0,r.cn)("pointer-events-none inline-block rounded-full bg-white shadow-sm","transform transition duration-200 ease-in-out",e?c[o].translate:"translate-x-0.5",c[o].thumb,"mt-0.5")})}),(a||s)&&(0,n.jsxs)("div",{className:"flex flex-col",children:[a&&(0,n.jsx)("span",{className:"text-sm font-medium text-text-main",children:a}),s&&(0,n.jsx)("span",{className:"text-xs text-text-muted",children:s})]})]})}}}]);