@ltgiang/9router 0.4.84 → 0.5.10

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 (1071) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +19 -12
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/required-server-files.json +6 -1
  5. package/app/.next-cli-build/routes-manifest.json +61 -12
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  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 +3 -3
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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/media-providers/[kind]/[id]/page.js +30 -30
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +10 -3
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +4 -4
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  70. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  73. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  74. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  75. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  76. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  81. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  84. package/app/.next-cli-build/server/app/_not-found.rsc +17 -16
  85. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +17 -16
  86. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -5
  88. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
  91. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -0
  102. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -0
  103. package/app/.next-cli-build/server/app/api/auth/reset-password/route_client-reference-manifest.js +1 -0
  104. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
  107. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  109. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  113. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  119. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  121. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  127. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  129. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/combos/reorder/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/combos/reorder/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -0
  147. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -0
  148. package/app/.next-cli-build/server/app/api/headroom/start/route_client-reference-manifest.js +1 -0
  149. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -0
  150. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -0
  151. package/app/.next-cli-build/server/app/api/headroom/status/route_client-reference-manifest.js +1 -0
  152. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -0
  153. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -0
  154. package/app/.next-cli-build/server/app/api/headroom/stop/route_client-reference-manifest.js +1 -0
  155. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +3 -3
  166. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +6 -6
  168. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/models/order/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/models/order/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -0
  196. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -0
  197. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route_client-reference-manifest.js +1 -0
  198. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  201. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -0
  209. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -0
  210. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route_client-reference-manifest.js +1 -0
  211. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/providers/[id]/connections/disabled/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/providers/[id]/connections/disabled/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/providers/[id]/pool/pull/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/providers/[id]/pool/pull/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/providers/[id]/pool/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/providers/[id]/pool/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +43 -0
  258. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -0
  259. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route_client-reference-manifest.js +1 -0
  260. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +40 -0
  261. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -0
  262. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route_client-reference-manifest.js +1 -0
  263. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  266. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  282. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  304. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -0
  306. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -0
  307. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route_client-reference-manifest.js +1 -0
  308. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  323. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  337. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  369. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  371. package/app/.next-cli-build/server/app/callback.html +1 -1
  372. package/app/.next-cli-build/server/app/callback.rsc +21 -20
  373. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +21 -20
  374. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  375. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -5
  376. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -3
  377. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  378. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  379. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  380. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +19 -18
  381. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  382. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  383. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  384. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  385. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +19 -18
  386. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  387. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +6 -5
  388. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +3 -3
  389. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  390. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +20 -19
  391. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  392. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  394. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  395. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +20 -19
  396. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +6 -5
  398. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -3
  399. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  400. package/app/.next-cli-build/server/app/dashboard/combos.rsc +22 -21
  401. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  402. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  405. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +22 -21
  406. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +6 -5
  408. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -3
  409. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  410. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +20 -19
  411. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  412. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +20 -19
  416. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +6 -5
  418. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -3
  419. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +22 -21
  421. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  422. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  426. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +22 -21
  427. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +6 -5
  429. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +3 -3
  430. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  431. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +19 -18
  432. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  433. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  436. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +19 -18
  437. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +6 -5
  439. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
  440. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/profile.rsc +22 -21
  442. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  443. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  446. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +22 -21
  447. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +6 -5
  449. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -3
  450. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +22 -21
  452. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  453. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  456. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  457. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +22 -21
  458. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +6 -5
  460. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -3
  461. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/providers.rsc +22 -21
  463. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  464. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  467. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +22 -21
  468. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +6 -5
  470. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -3
  471. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +22 -21
  473. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  474. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +22 -21
  478. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +6 -5
  480. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +3 -3
  481. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  482. package/app/.next-cli-build/server/app/dashboard/quota.rsc +20 -19
  483. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  484. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  486. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  487. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +20 -19
  488. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  489. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +6 -5
  490. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +3 -3
  491. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  492. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +21 -20
  496. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +21 -20
  497. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -5
  499. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
  500. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  501. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  502. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/skills.rsc +22 -21
  506. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  507. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  509. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  510. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +22 -21
  511. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  512. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +6 -5
  513. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +3 -3
  514. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/translator.rsc +22 -21
  516. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  517. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  519. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  520. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +22 -21
  521. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  522. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +6 -5
  523. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -3
  524. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/usage.rsc +22 -21
  526. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  527. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  529. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  530. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +22 -21
  531. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  532. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +6 -5
  533. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -3
  534. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  535. package/app/.next-cli-build/server/app/dashboard.rsc +20 -19
  536. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  537. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +20 -19
  540. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  541. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +6 -5
  542. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
  543. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  544. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  545. package/app/.next-cli-build/server/app/index.html +1 -1
  546. package/app/.next-cli-build/server/app/index.rsc +16 -15
  547. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +16 -15
  549. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  550. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -5
  551. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
  552. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  553. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  554. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  555. package/app/.next-cli-build/server/app/landing.html +1 -1
  556. package/app/.next-cli-build/server/app/landing.rsc +21 -20
  557. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +21 -20
  558. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  559. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -5
  560. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -3
  561. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  562. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  563. package/app/.next-cli-build/server/app/login/page.js +2 -2
  564. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  565. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  566. package/app/.next-cli-build/server/app/login.html +1 -1
  567. package/app/.next-cli-build/server/app/login.rsc +21 -20
  568. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +21 -20
  569. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  570. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -5
  571. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -3
  572. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  573. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  574. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  575. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  576. package/app/.next-cli-build/server/app/page.js +2 -2
  577. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  578. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  579. package/app/.next-cli-build/server/app-paths-manifest.json +19 -12
  580. package/app/.next-cli-build/server/chunks/1220.js +1 -1
  581. package/app/.next-cli-build/server/chunks/1241.js +1 -0
  582. package/app/.next-cli-build/server/chunks/1260.js +1 -0
  583. package/app/.next-cli-build/server/chunks/1275.js +73 -0
  584. package/app/.next-cli-build/server/chunks/2091.js +1 -0
  585. package/app/.next-cli-build/server/chunks/2231.js +1 -0
  586. package/app/.next-cli-build/server/chunks/{4013.js → 2391.js} +1 -1
  587. package/app/.next-cli-build/server/chunks/2722.js +3 -3
  588. package/app/.next-cli-build/server/chunks/2996.js +1 -0
  589. package/app/.next-cli-build/server/chunks/318.js +36 -30
  590. package/app/.next-cli-build/server/chunks/319.js +3 -3
  591. package/app/.next-cli-build/server/chunks/3390.js +1 -0
  592. package/app/.next-cli-build/server/chunks/3453.js +1 -0
  593. package/app/.next-cli-build/server/chunks/3535.js +1 -0
  594. package/app/.next-cli-build/server/chunks/3546.js +1 -0
  595. package/app/.next-cli-build/server/chunks/412.js +5 -5
  596. package/app/.next-cli-build/server/chunks/4161.js +1 -0
  597. package/app/.next-cli-build/server/chunks/4306.js +1 -0
  598. package/app/.next-cli-build/server/chunks/4632.js +1 -1
  599. package/app/.next-cli-build/server/chunks/4741.js +2 -2
  600. package/app/.next-cli-build/server/chunks/4746.js +1 -7
  601. package/app/.next-cli-build/server/chunks/4827.js +1 -0
  602. package/app/.next-cli-build/server/chunks/5002.js +1 -0
  603. package/app/.next-cli-build/server/chunks/5615.js +43 -0
  604. package/app/.next-cli-build/server/chunks/5692.js +1 -0
  605. package/app/.next-cli-build/server/chunks/5699.js +1 -0
  606. package/app/.next-cli-build/server/chunks/595.js +1 -0
  607. package/app/.next-cli-build/server/chunks/5961.js +1 -0
  608. package/app/.next-cli-build/server/chunks/6070.js +1 -0
  609. package/app/.next-cli-build/server/chunks/615.js +1 -0
  610. package/app/.next-cli-build/server/chunks/6182.js +18 -4
  611. package/app/.next-cli-build/server/chunks/6306.js +1 -0
  612. package/app/.next-cli-build/server/chunks/6445.js +10 -0
  613. package/app/.next-cli-build/server/chunks/6457.js +4 -0
  614. package/app/.next-cli-build/server/chunks/6482.js +11 -0
  615. package/app/.next-cli-build/server/chunks/6568.js +3 -0
  616. package/app/.next-cli-build/server/chunks/6763.js +1 -0
  617. package/app/.next-cli-build/server/chunks/7774.js +15 -15
  618. package/app/.next-cli-build/server/chunks/7828.js +1 -0
  619. package/app/.next-cli-build/server/chunks/8080.js +1 -0
  620. package/app/.next-cli-build/server/chunks/8238.js +1 -0
  621. package/app/.next-cli-build/server/chunks/8255.js +1 -1
  622. package/app/.next-cli-build/server/chunks/8271.js +1 -0
  623. package/app/.next-cli-build/server/chunks/{7250.js → 8658.js} +1 -1
  624. package/app/.next-cli-build/server/chunks/8895.js +13 -8
  625. package/app/.next-cli-build/server/chunks/8910.js +2 -0
  626. package/app/.next-cli-build/server/chunks/8914.js +1 -0
  627. package/app/.next-cli-build/server/chunks/8920.js +1 -0
  628. package/app/.next-cli-build/server/chunks/914.js +4 -4
  629. package/app/.next-cli-build/server/chunks/9549.js +1 -0
  630. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  631. package/app/.next-cli-build/server/middleware.js +4 -4
  632. package/app/.next-cli-build/server/pages/404.html +1 -1
  633. package/app/.next-cli-build/server/pages/500.html +1 -1
  634. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  635. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  636. package/app/.next-cli-build/static/chunks/1321-ff4f0d7aebb129a2.js +1 -0
  637. package/app/.next-cli-build/static/chunks/{3794-ba2500baa4c52d55.js → 3794-e569667691edc8f7.js} +1 -1
  638. package/app/.next-cli-build/static/chunks/5497-9693b69a6ba714c2.js +7 -0
  639. package/app/.next-cli-build/static/chunks/6069-d17e2e7f5a573a73.js +53 -0
  640. package/app/.next-cli-build/static/chunks/6502-54f3e96cead0a0a3.js +3 -0
  641. package/app/.next-cli-build/static/chunks/8982-6d1803817450bcd4.js +11 -0
  642. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-dccb4480c20cb67f.js → page-35beb2949f0feaa0.js} +1 -1
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-a93420694c4be022.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-fad4cd709b370642.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-9548f5a1140005d5.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-0a3bdda39731c8e8.js +59 -0
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-0736ad13c70c1c56.js → page-7c57929647c07f91.js} +1 -1
  648. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-50ee3aa1bd8fa967.js → page-f2545778dd849c11.js} +1 -1
  649. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-f828e7a7fa3010d8.js → page-8eb2e65f0ce52b79.js} +1 -1
  650. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-f587e9c9d0a62533.js → page-734221f9292c2f0b.js} +1 -1
  651. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-1d82df0c59998142.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-31cc0cda6436a0b9.js +10 -0
  653. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-753b0a5d477ae4e7.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-32cc33885248badf.js +4 -0
  655. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-fb204465ae19409a.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-ab3c8b6b84d1bddf.js → page-893cbf6a96a3e92c.js} +1 -1
  657. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-9d94f30df88cbcd7.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/_global-error/page-0006630ca3232027.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-0006630ca3232027.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-0006630ca3232027.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-0006630ca3232027.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-0006630ca3232027.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-0006630ca3232027.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-0006630ca3232027.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-0006630ca3232027.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-0006630ca3232027.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-0006630ca3232027.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-0006630ca3232027.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-0006630ca3232027.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-0006630ca3232027.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-0006630ca3232027.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-0006630ca3232027.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-0006630ca3232027.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-0006630ca3232027.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-0006630ca3232027.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-0006630ca3232027.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-0006630ca3232027.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-0006630ca3232027.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-0006630ca3232027.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-0006630ca3232027.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-0006630ca3232027.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-0006630ca3232027.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-0006630ca3232027.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/combos/reorder/route-0006630ca3232027.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/combos/route-0006630ca3232027.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-0006630ca3232027.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-0006630ca3232027.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-0006630ca3232027.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/health/route-0006630ca3232027.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/init/route-0006630ca3232027.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-0006630ca3232027.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/keys/route-0006630ca3232027.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/locale/route-0006630ca3232027.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-0006630ca3232027.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-0006630ca3232027.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-0006630ca3232027.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-0006630ca3232027.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-0006630ca3232027.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-0006630ca3232027.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-0006630ca3232027.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-0006630ca3232027.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-0006630ca3232027.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-0006630ca3232027.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-0006630ca3232027.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/models/order/route-0006630ca3232027.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/models/route-0006630ca3232027.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/models/test/route-0006630ca3232027.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-0006630ca3232027.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-0006630ca3232027.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-0006630ca3232027.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-0006630ca3232027.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-0006630ca3232027.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-0006630ca3232027.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-0006630ca3232027.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-0006630ca3232027.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-0006630ca3232027.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-0006630ca3232027.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-0006630ca3232027.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-0006630ca3232027.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/pricing/route-0006630ca3232027.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-0006630ca3232027.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-0006630ca3232027.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-0006630ca3232027.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/connections/disabled/route-0006630ca3232027.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-0006630ca3232027.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/pool/pull/route-0006630ca3232027.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/pool/route-0006630ca3232027.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-0006630ca3232027.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-0006630ca3232027.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-0006630ca3232027.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-0006630ca3232027.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-0006630ca3232027.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/providers/route-0006630ca3232027.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-0006630ca3232027.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-0006630ca3232027.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-0006630ca3232027.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-0006630ca3232027.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-0006630ca3232027.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-0006630ca3232027.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-0006630ca3232027.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-0006630ca3232027.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-0006630ca3232027.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-0006630ca3232027.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-0006630ca3232027.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-0006630ca3232027.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/settings/route-0006630ca3232027.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-0006630ca3232027.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/tags/route-0006630ca3232027.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-0006630ca3232027.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-0006630ca3232027.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-0006630ca3232027.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-0006630ca3232027.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-0006630ca3232027.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-0006630ca3232027.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-0006630ca3232027.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-0006630ca3232027.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-0006630ca3232027.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-0006630ca3232027.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-0006630ca3232027.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-0006630ca3232027.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-0006630ca3232027.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-0006630ca3232027.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-0006630ca3232027.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-0006630ca3232027.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-0006630ca3232027.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-0006630ca3232027.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-0006630ca3232027.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-0006630ca3232027.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-0006630ca3232027.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-0006630ca3232027.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-0006630ca3232027.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-0006630ca3232027.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-0006630ca3232027.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-0006630ca3232027.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-0006630ca3232027.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-0006630ca3232027.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-0006630ca3232027.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-0006630ca3232027.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-0006630ca3232027.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-0006630ca3232027.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-0006630ca3232027.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-0006630ca3232027.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-0006630ca3232027.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-0006630ca3232027.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/v1/route-0006630ca3232027.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-0006630ca3232027.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-0006630ca3232027.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-0006630ca3232027.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-0006630ca3232027.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/version/route-0006630ca3232027.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-0006630ca3232027.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/version/update/route-0006630ca3232027.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-feda7f7a9c272877.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/layout-ad10b603c07438f2.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/login/page-100ca7d1326036fd.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-0006630ca3232027.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/page-0006630ca3232027.js +1 -0
  798. package/app/.next-cli-build/static/chunks/{main-b8d198db3858ff3e.js → main-7070798b89352aeb.js} +2 -2
  799. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-0006630ca3232027.js +1 -0
  800. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-0006630ca3232027.js +1 -0
  801. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-0006630ca3232027.js +1 -0
  802. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-0006630ca3232027.js +1 -0
  803. package/app/.next-cli-build/static/css/88fb3376e840da30.css +1 -0
  804. package/app/.next-cli-build/static/css/d434f5eb81ebb26f.css +1 -0
  805. package/app/.next-cli-build/static/uQPgBtqsN6RwwN0iGU5kL/_buildManifest.js +1 -0
  806. package/app/cli/.build-home/.9router/db/backups/{upgrade-0.4.80-to-0.4.81-0.4.81-20260619-094420 → upgrade-0.4.83-to-0.4.84-0.4.84-20260625-092251}/data.sqlite +0 -0
  807. package/app/cli/.build-home/.9router/db/backups/upgrade-0.4.84-to-0.5.9-0.5.9-20260625-151604/data.sqlite +0 -0
  808. package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
  809. package/app/custom-server.js +32 -0
  810. package/app/node_modules/@next/env/package.json +2 -2
  811. package/app/node_modules/next/dist/build/swc/index.js +1 -1
  812. package/app/node_modules/next/dist/build/webpack-config.js +3 -3
  813. package/app/node_modules/next/dist/client/dev/debug-channel.js +102 -2
  814. package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +10 -10
  815. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +11 -11
  816. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +13 -13
  817. package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +10 -10
  818. package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +2 -2
  819. package/app/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +1 -1
  820. package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  821. package/app/node_modules/next/dist/server/app-render/action-handler.js +18 -8
  822. package/app/node_modules/next/dist/server/config-schema.js +1 -0
  823. package/app/node_modules/next/dist/server/config.js +1 -1
  824. package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  825. package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  826. package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  827. package/app/node_modules/next/dist/server/lib/encode-cache-tag.js +45 -0
  828. package/app/node_modules/next/dist/server/lib/implicit-tags.js +6 -3
  829. package/app/node_modules/next/dist/server/lib/patch-fetch.js +5 -1
  830. package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
  831. package/app/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  832. package/app/node_modules/next/dist/shared/lib/router/router.js +8 -1
  833. package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  834. package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  835. package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
  836. package/app/node_modules/next/package.json +15 -15
  837. package/app/package.json +7 -4
  838. package/app/public/i18n/literals/ar.json +2 -1
  839. package/app/public/i18n/literals/bn.json +2 -1
  840. package/app/public/i18n/literals/cs.json +2 -1
  841. package/app/public/i18n/literals/da.json +2 -1
  842. package/app/public/i18n/literals/de.json +2 -1
  843. package/app/public/i18n/literals/el.json +2 -1
  844. package/app/public/i18n/literals/es.json +2 -1
  845. package/app/public/i18n/literals/fi.json +2 -1
  846. package/app/public/i18n/literals/fr.json +2 -1
  847. package/app/public/i18n/literals/he.json +2 -1
  848. package/app/public/i18n/literals/hi.json +2 -1
  849. package/app/public/i18n/literals/hu.json +2 -1
  850. package/app/public/i18n/literals/id.json +2 -1
  851. package/app/public/i18n/literals/it.json +2 -1
  852. package/app/public/i18n/literals/ja.json +2 -1
  853. package/app/public/i18n/literals/ko.json +2 -1
  854. package/app/public/i18n/literals/nl.json +2 -1
  855. package/app/public/i18n/literals/no.json +2 -1
  856. package/app/public/i18n/literals/pl.json +2 -1
  857. package/app/public/i18n/literals/pt-BR.json +2 -1
  858. package/app/public/i18n/literals/pt-PT.json +2 -1
  859. package/app/public/i18n/literals/ro.json +2 -1
  860. package/app/public/i18n/literals/ru.json +2 -1
  861. package/app/public/i18n/literals/sv.json +2 -1
  862. package/app/public/i18n/literals/th.json +2 -1
  863. package/app/public/i18n/literals/tl.json +2 -1
  864. package/app/public/i18n/literals/tr.json +2 -1
  865. package/app/public/i18n/literals/uk.json +2 -1
  866. package/app/public/i18n/literals/ur.json +2 -1
  867. package/app/public/i18n/literals/vi.json +2 -1
  868. package/app/public/i18n/literals/zh-CN.json +5 -1
  869. package/app/public/i18n/literals/zh-TW.json +2 -1
  870. package/app/public/providers/codebuddy-cn.png +0 -0
  871. package/app/public/providers/mimo-free.png +0 -0
  872. package/app/public/providers/qoder.png +0 -0
  873. package/app/server.js +1 -1
  874. package/app/src/lib/oauth/services/qoder.js +216 -0
  875. package/app/src/mitm/server.js +34 -29
  876. package/cli.js +28 -4
  877. package/hooks/sqliteRuntime.js +20 -3
  878. package/package.json +1 -1
  879. package/src/cli/api/client.js +9 -0
  880. package/src/cli/menus/providers.js +8 -6
  881. package/src/cli/menus/settings.js +25 -28
  882. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +0 -1
  883. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +0 -1
  884. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route_client-reference-manifest.js +0 -1
  885. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +0 -2
  886. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +0 -1
  887. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route_client-reference-manifest.js +0 -1
  888. package/app/.next-cli-build/server/chunks/1051.js +0 -1
  889. package/app/.next-cli-build/server/chunks/2409.js +0 -1
  890. package/app/.next-cli-build/server/chunks/2506.js +0 -4
  891. package/app/.next-cli-build/server/chunks/2971.js +0 -1
  892. package/app/.next-cli-build/server/chunks/3104.js +0 -43
  893. package/app/.next-cli-build/server/chunks/3110.js +0 -65
  894. package/app/.next-cli-build/server/chunks/3196.js +0 -1
  895. package/app/.next-cli-build/server/chunks/3813.js +0 -1
  896. package/app/.next-cli-build/server/chunks/4177.js +0 -1
  897. package/app/.next-cli-build/server/chunks/42.js +0 -1
  898. package/app/.next-cli-build/server/chunks/4304.js +0 -1
  899. package/app/.next-cli-build/server/chunks/4372.js +0 -1
  900. package/app/.next-cli-build/server/chunks/4404.js +0 -1
  901. package/app/.next-cli-build/server/chunks/4657.js +0 -1
  902. package/app/.next-cli-build/server/chunks/4720.js +0 -1
  903. package/app/.next-cli-build/server/chunks/5024.js +0 -1
  904. package/app/.next-cli-build/server/chunks/5433.js +0 -1
  905. package/app/.next-cli-build/server/chunks/5681.js +0 -1
  906. package/app/.next-cli-build/server/chunks/6064.js +0 -1
  907. package/app/.next-cli-build/server/chunks/6108.js +0 -1
  908. package/app/.next-cli-build/server/chunks/6936.js +0 -15
  909. package/app/.next-cli-build/server/chunks/7153.js +0 -1
  910. package/app/.next-cli-build/server/chunks/7341.js +0 -1
  911. package/app/.next-cli-build/server/chunks/7568.js +0 -1
  912. package/app/.next-cli-build/server/chunks/7899.js +0 -3
  913. package/app/.next-cli-build/server/chunks/8590.js +0 -1
  914. package/app/.next-cli-build/server/chunks/879.js +0 -1
  915. package/app/.next-cli-build/server/chunks/9489.js +0 -1
  916. package/app/.next-cli-build/server/chunks/9609.js +0 -1
  917. package/app/.next-cli-build/static/chunks/1321-b86a86e3b2a7fa56.js +0 -1
  918. package/app/.next-cli-build/static/chunks/5497-d36fd3c83eca15a9.js +0 -7
  919. package/app/.next-cli-build/static/chunks/6069-cc2decdd4cf8a742.js +0 -53
  920. package/app/.next-cli-build/static/chunks/6502-612e6a0c29fdfd96.js +0 -3
  921. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-a9ac6b258809e7fa.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-c359f496024e3673.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a314df50240def0b.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-432e13b0930a1e77.js +0 -59
  925. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0d670718f2e33561.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-4ca2effca1e07a8e.js +0 -3
  927. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-8e1f581c3c66272d.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-5ee9e3e13d6015bb.js +0 -4
  929. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-b0fae7cb91ea57a8.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-3e9190b29f8110a6.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/_global-error/page-518fdf69d56f1834.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-518fdf69d56f1834.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-518fdf69d56f1834.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-518fdf69d56f1834.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-518fdf69d56f1834.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-518fdf69d56f1834.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-518fdf69d56f1834.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-518fdf69d56f1834.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-518fdf69d56f1834.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-518fdf69d56f1834.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-518fdf69d56f1834.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-518fdf69d56f1834.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-518fdf69d56f1834.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-518fdf69d56f1834.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-518fdf69d56f1834.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-518fdf69d56f1834.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-518fdf69d56f1834.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-518fdf69d56f1834.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-518fdf69d56f1834.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-518fdf69d56f1834.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-518fdf69d56f1834.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-518fdf69d56f1834.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-518fdf69d56f1834.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-518fdf69d56f1834.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-518fdf69d56f1834.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/combos/reorder/route-518fdf69d56f1834.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/combos/route-518fdf69d56f1834.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/health/route-518fdf69d56f1834.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/init/route-518fdf69d56f1834.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-518fdf69d56f1834.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/keys/route-518fdf69d56f1834.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/locale/route-518fdf69d56f1834.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-518fdf69d56f1834.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-518fdf69d56f1834.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-518fdf69d56f1834.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-518fdf69d56f1834.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-518fdf69d56f1834.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-518fdf69d56f1834.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-518fdf69d56f1834.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-518fdf69d56f1834.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-518fdf69d56f1834.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-518fdf69d56f1834.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-518fdf69d56f1834.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/models/order/route-518fdf69d56f1834.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/models/route-518fdf69d56f1834.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/models/test/route-518fdf69d56f1834.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-518fdf69d56f1834.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-518fdf69d56f1834.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-518fdf69d56f1834.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-518fdf69d56f1834.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-518fdf69d56f1834.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-518fdf69d56f1834.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-518fdf69d56f1834.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-518fdf69d56f1834.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-518fdf69d56f1834.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-518fdf69d56f1834.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/pricing/route-518fdf69d56f1834.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-518fdf69d56f1834.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-518fdf69d56f1834.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-518fdf69d56f1834.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/connections/disabled/route-518fdf69d56f1834.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-518fdf69d56f1834.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/pool/pull/route-518fdf69d56f1834.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/pool/route-518fdf69d56f1834.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-518fdf69d56f1834.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-518fdf69d56f1834.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-518fdf69d56f1834.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-518fdf69d56f1834.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-518fdf69d56f1834.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/providers/route-518fdf69d56f1834.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-518fdf69d56f1834.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-518fdf69d56f1834.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-518fdf69d56f1834.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-518fdf69d56f1834.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-518fdf69d56f1834.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-518fdf69d56f1834.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-518fdf69d56f1834.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-518fdf69d56f1834.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-518fdf69d56f1834.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-518fdf69d56f1834.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/settings/route-518fdf69d56f1834.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-518fdf69d56f1834.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/tags/route-518fdf69d56f1834.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-518fdf69d56f1834.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-518fdf69d56f1834.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-518fdf69d56f1834.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-518fdf69d56f1834.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-518fdf69d56f1834.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-518fdf69d56f1834.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-518fdf69d56f1834.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-518fdf69d56f1834.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-518fdf69d56f1834.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-518fdf69d56f1834.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-518fdf69d56f1834.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-518fdf69d56f1834.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-518fdf69d56f1834.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-518fdf69d56f1834.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-518fdf69d56f1834.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-518fdf69d56f1834.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-518fdf69d56f1834.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-518fdf69d56f1834.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-518fdf69d56f1834.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-518fdf69d56f1834.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-518fdf69d56f1834.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-518fdf69d56f1834.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-518fdf69d56f1834.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-518fdf69d56f1834.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-518fdf69d56f1834.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-518fdf69d56f1834.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-518fdf69d56f1834.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-518fdf69d56f1834.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-518fdf69d56f1834.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-518fdf69d56f1834.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-518fdf69d56f1834.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-518fdf69d56f1834.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-518fdf69d56f1834.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-518fdf69d56f1834.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-518fdf69d56f1834.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-518fdf69d56f1834.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-518fdf69d56f1834.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/v1/route-518fdf69d56f1834.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-518fdf69d56f1834.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-518fdf69d56f1834.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-518fdf69d56f1834.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-518fdf69d56f1834.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/version/route-518fdf69d56f1834.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-518fdf69d56f1834.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/version/update/route-518fdf69d56f1834.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-717fc9bdbe424b20.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/layout-aff6bda55ff6881b.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/login/page-5b1e256b0ca9cc40.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-518fdf69d56f1834.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/page-518fdf69d56f1834.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-518fdf69d56f1834.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-518fdf69d56f1834.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-518fdf69d56f1834.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-518fdf69d56f1834.js +0 -1
  1068. package/app/.next-cli-build/static/css/090d5175372e4b28.css +0 -1
  1069. package/app/.next-cli-build/static/css/0f03023a765dc337.css +0 -1
  1070. package/app/.next-cli-build/static/nObVsvmtPq3sqkOwjFPZZ/_buildManifest.js +0 -1
  1071. /package/app/.next-cli-build/static/{nObVsvmtPq3sqkOwjFPZZ → uQPgBtqsN6RwwN0iGU5kL}/_ssgManifest.js +0 -0
@@ -0,0 +1,3 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6502],{46502:(e,t,s)=>{Promise.resolve().then(s.bind(s,76648))},76648:(e,t,s)=>{"use strict";s.d(t,{default:()=>j});var a=s(95155),l=s(12115),n=s(14051),r=s.n(n),i=s(35497),o=s(11059),c=s(73006);let d=["zh-CN","zh-TW"],m=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],x=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],u=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}];async function h(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(5e3)})).ok}catch{return!1}}async function p(...e){let t=e.filter(Boolean).map(h);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}function f({label:e,url:t,copyId:s,copied:l,onCopy:n,badge:r,actions:o}){return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${"CF"===r||"TS"===r?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:e}),(0,a.jsx)(i.pd,{value:t,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>n(t,s),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l===s?"check":"content_copy"})}),o]})}function g({status:e,className:t=""}){return(0,a.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function b({text:e}){return(0,a.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,a.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function y({message:e,action:t}){return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-xs flex-1",children:e}),t&&(0,a.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}function j({machineId:e}){let[t,s]=(0,l.useState)([]),[n,r]=(0,l.useState)(!0),[v,k]=(0,l.useState)(!1),[w,N]=(0,l.useState)(""),[C,S]=(0,l.useState)(null),[T,E]=(0,l.useState)(null),[P,_]=(0,l.useState)(!1),[$,U]=(0,l.useState)(!0),[A,O]=(0,l.useState)(!0),[I,D]=(0,l.useState)(!1),[L,F]=(0,l.useState)(!0),[R,W]=(0,l.useState)(!1),[q,K]=(0,l.useState)("http://localhost:8787"),[H,z]=(0,l.useState)(!1),[M,J]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[B,G]=(0,l.useState)(!1),[Q,Y]=(0,l.useState)(!1),[Z,V]=(0,l.useState)(""),[X,ee]=(0,l.useState)(!1),[et,es]=(0,l.useState)("full"),[ea,el]=(0,l.useState)(!1),[en,er]=(0,l.useState)("full"),[ei,eo]=(0,l.useState)("en"),[ec,ed]=(0,l.useState)(!0),[em,ex]=(0,l.useState)(!1),[eu,eh]=(0,l.useState)(!1),[ep,ef]=(0,l.useState)(""),[eg,eb]=(0,l.useState)(""),[ey,ej]=(0,l.useState)(!1),[ev,ek]=(0,l.useState)(""),[ew,eN]=(0,l.useState)(null),[eC,eS]=(0,l.useState)(!1),[eT,eE]=(0,l.useState)(!1),[eP,e_]=(0,l.useState)(!1),[e$,eU]=(0,l.useState)(!1),[eA,eO]=(0,l.useState)(""),[eI,eD]=(0,l.useState)(!1),[eL,eF]=(0,l.useState)(""),[eR,eW]=(0,l.useState)(null),[eq,eK]=(0,l.useState)(""),[eH,ez]=(0,l.useState)(""),[eM,eJ]=(0,l.useState)(null),[eB,eG]=(0,l.useState)(!1),[eQ,eY]=(0,l.useState)([]),[eZ,eV]=(0,l.useState)(""),[eX,e0]=(0,l.useState)(!1),[e1,e5]=(0,l.useState)(!1),[e2,e4]=(0,l.useState)(!1),e8=(0,l.useRef)(null),e3=(0,l.useRef)(0),e6=(0,l.useRef)(0),e7=(0,l.useRef)(!1),e9=(0,l.useRef)(!1),te=(0,l.useRef)(!1),tt=(0,l.useRef)(!1),[ts,ta]=(0,l.useState)(!1),[tl,tn]=(0,l.useState)(!1),[tr,ti]=(0,l.useState)(new Set),[to,tc]=(0,l.useState)(!1);(0,l.useEffect)(()=>{tc(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]),(0,l.useEffect)(()=>(eo((0,c.kk)()),(0,c.oQ)(()=>eo((0,c.kk)()))),[]);let td=d.includes(ei),tm=td?x:x.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=x.find(e=>e.id===et);e?.wenyan&&!td&&(es("ultra"),tk({cavemanLevel:"ultra"}))},[td,et]);let{copied:tx,copy:tu}=(0,o.C)(),th=!$||!A,tp=$?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,l.useEffect)(()=>{e8.current&&(e8.current.scrollTop=e8.current.scrollHeight)},[eQ]),(0,l.useEffect)(()=>{tT(),tb()},[]),(0,l.useEffect)(()=>{if(!(em||eP))return;let e=!em||eu,t=!eP||e$,s=()=>{document.hidden||tg()};if(document.addEventListener("visibilitychange",s),e&&t)return()=>document.removeEventListener("visibilitychange",s);let a=setInterval(()=>{document.hidden||tg()},5e3);return()=>{clearInterval(a),document.removeEventListener("visibilitychange",s)}},[em,eP,eu,e$]),(0,l.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(em&&(ep||eg)){let e=await p(eg,ep);e7.current=e,e?(e3.current=0,eh(!0),te.current||(te.current=!0,ta(!0))):(e3.current+=1,e3.current>=5&&eh(!1))}else e7.current=!1;if(eP&&eA){let e=await h(eA);e9.current=e,e?(e6.current=0,eU(!0),tt.current||(tt.current=!0,tn(!0))):(e6.current+=1,e6.current>=5&&eU(!1))}else e9.current=!1}};if(!(em&&(ep||eg)||eP&&eA))return;e();let t=!eP||e$;if((!em||eu)&&t)return;let s=setInterval(e,1e4);return()=>clearInterval(s)},[em,ep,eg,eP,eA,eu,e$]);let tf=(0,l.useCallback)((e,t,s,a,l,n)=>{t.current?(s.current=0,a(!0),l.current||(l.current=!0,n(!0))):(s.current+=1,s.current>=5&&a(!1))},[]),tg=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,a=t.tunnel?.tunnelUrl||"";ef(a),eb(t.tunnel?.publicUrl||""),ex(s),tf(null,e7,e3,eh,te,ta);let l=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,n=t.tailscale?.tunnelUrl||"";eO(n),e_(l),tf(null,e9,e6,eU,tt,tn)}catch{}},tb=async()=>{ed(!0);try{let[e,t]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e.ok){let t=await e.json();_(t.requireApiKey||!1),U(!1!==t.requireLogin),O(t.hasPassword||!1),D(t.tunnelDashboardAccess||!1),F(!1!==t.rtkEnabled),W(!!t.headroomEnabled),K(t.headroomUrl||"http://localhost:8787"),z(!!t.headroomCompressUserMessages),tN(),ee(!!t.cavemanEnabled),es(t.cavemanLevel||"full"),el(!!t.ponytailEnabled),er(t.ponytailLevel||"full")}if(t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,a=e.tunnel?.tunnelUrl||"";ef(a),eb(e.tunnel?.publicUrl||""),ex(s),tf(null,e7,e3,eh,te,ta);let l=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,n=e.tailscale?.tunnelUrl||"";eO(n),e_(l),tf(null,e9,e6,eU,tt,tn)}}catch(e){console.log("Error loading settings:",e)}finally{ed(!1)}},ty=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:e})})).ok&&D(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},tj=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:e})})).ok&&_(e)}catch(e){console.log("Error updating requireApiKey:",e)}},tv=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&F(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},tk=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},tw=async()=>{let e=q.trim()||"http://localhost:8787";K(e),await tk({headroomUrl:e}),tN()},tN=(0,l.useCallback)(async()=>{J(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();J({...t,loading:!1})}catch{J({installed:!1,running:!1,python:null,loading:!1})}},[]),tC=(0,l.useCallback)(async()=>{V(""),Y(!0);try{let e=await fetch("/api/headroom/start",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to start proxy");await tN()}catch(e){V(e.message)}finally{Y(!1)}},[tN]),tS=(0,l.useCallback)(async()=>{Y(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await tN()}finally{Y(!1)}},[tN]),tT=async()=>{try{let e=await fetch("/api/keys"),t=await e.json();e.ok&&s(t.keys||[])}catch(e){console.log("Error fetching data:",e)}finally{r(!1)}},tE=async(...e)=>{ej(!0),ek("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),s=Date.now();for(;Date.now()-s<3e5;){if(await new Promise(e=>setTimeout(e,2e3)),await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return ex(!0),ej(!1),ek(""),!0;if((Date.now()-s)%1e4<2e3)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return eN({type:"error",message:"Tunnel process stopped unexpectedly."}),ej(!1),ek(""),!1}}catch{}}return eN({type:"error",message:"Tunnel created but not reachable. Please try again."}),ej(!1),ek(""),!1},tP=async()=>{eS(!1),ej(!0),eN(null),ek("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let s=await t.json();s.download?.downloading?ek(`Downloading cloudflared... ${s.download.progress}%`):e&&ek("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let s=await t.json();if(!t.ok)return void eN({type:"error",message:s.error||"Failed to enable tunnel"});let a=s.tunnelUrl;if(!a)return void eN({type:"error",message:"No tunnel URL returned"});ef(a),eb(s.publicUrl||""),await tE(s.publicUrl,a)}catch(e){eN({type:"error",message:e.message})}finally{e=!1,ej(!1),ek("")}},t_=async()=>{ej(!0),eN(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(ex(!1),ef(""),eE(!1),eN({type:"success",message:"Tunnel disabled"})):eN({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){eN({type:"error",message:e.message})}finally{ej(!1)}},t$=async()=>{eJ(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return eJ(t.installed),t}}catch{}return eJ(!1),{installed:!1}},tU=async()=>{eG(!0),eW(null),eY([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eZ})});eV("");let t=e.body.getReader(),s=new TextDecoder,a="";for(;;){let{done:e,value:l}=await t.read();if(e)break;let n=(a+=s.decode(l,{stream:!0})).split("\n\n");for(let e of(a=n.pop()||"",n)){let t=e.split("\n"),s="progress",a=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{a=JSON.parse(e.slice(6))}catch{}if(a)if("progress"===s)eY(e=>[...e.slice(-50),a.message]);else if("done"===s){eJ(!0),eG(!1),e5(!1),tD();return}else"error"===s&&eW({type:"error",message:a.error||"Install failed"})}}}catch(e){eW({type:"error",message:e.message})}finally{eG(!1)}},tA=async e=>{eF("Waiting for Tailscale ready...");let t=`${e}/api/health`,s=Date.now();for(;Date.now()-s<3e5;){await new Promise(e=>setTimeout(e,2e3));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},tO=(e,t)=>{eK(e),ez(t)},tI=()=>{eK(""),ez("")},tD=async()=>{e5(!1),e0(!0),eD(!0),eW(null),eF("Connecting..."),tI();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eO(t.tunnelUrl||"");let e=await tA(t.tunnelUrl);e_(!0),eW(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.needsLogin&&t.authUrl){tO(t.authUrl,"Open Login Page"),eF('Login required — click "Open Login Page" to continue');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){tI(),eF("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eO(t.tunnelUrl||"");let e=await tA(t.tunnelUrl);e_(!0),eW(e?null:{type:"warning",message:"Connected but not reachable yet."})}else t.funnelNotEnabled&&t.enableUrl?await tL(t.enableUrl):eW({type:"error",message:t.error||"Failed to start funnel"});return}}catch{}}tI(),eW({type:"error",message:"Login timed out. Please try again."});return}if(t.funnelNotEnabled&&t.enableUrl)return void await tL(t.enableUrl);eW({type:"error",message:t.error||"Failed to connect"})}catch(e){eW({type:"error",message:e.message})}finally{eD(!1),e0(!1),eF(""),tI()}},tL=async e=>{tO(e,"Open Funnel Settings"),eF('Click "Open Funnel Settings" to enable Funnel...');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){tI(),eO(t.tunnelUrl||"");let e=await tA(t.tunnelUrl);e_(!0),eW(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.funnelNotEnabled)continue;if(t.error){tI(),eW({type:"error",message:t.error});return}}catch{}}tI(),eW({type:"error",message:"Timed out waiting for Funnel to be enabled."})},tF=async()=>{eD(!0),eW(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(e_(!1),eO(""),e4(!1),eW({type:"success",message:"Tailscale disabled"})):eW({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){eW({type:"error",message:e.message})}finally{eD(!1)}},tR=async()=>{eW(null),eY([]);let e=await t$();e?.installed&&e?.hasCachedPassword?tD():e5(!0)},tW=async()=>{if(w.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:w})}),t=await e.json();e.ok&&(S(t.key),await tT(),N(""),k(!1))}catch(e){console.log("Error creating key:",e)}},tq=async e=>{E({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{E(null);try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(s(t.filter(t=>t.id!==e)),ti(t=>{let s=new Set(t);return s.delete(e),s}))}catch(e){console.log("Error deleting key:",e)}}})},tK=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error toggling key:",e)}},[tH,tz]=(0,l.useState)("/v1");if((0,l.useEffect)(()=>{tz(`${window.location.origin}/v1`)},[]),n)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(i.Qv,{}),(0,a.jsx)(i.Qv,{})]});let tM=!!M.running,tJ=!1!==M.localUrl,tB=!!M.canStart,tG=tJ&&!!M.managedPid,tQ=M.loading?"Checking…":tM?"Running":tJ&&!M.installed?"Not installed":tJ?"Proxy off":"Unreachable";return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(f,{label:"Local",url:tH,copyId:"local_url",copied:tx,onCopy:tu}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${em?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),em&&!ey&&eu?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${eg||ep}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>tu(`${eg||ep}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===tx?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>eE(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!em||ey||eu?ey?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),ev||"Creating tunnel..."]}),(0,a.jsx)("button",{onClick:()=>{ej(!1),ek("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ew?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ew.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>eS(!0),children:"Enable"})]}):ec?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,a.jsx)("button",{onClick:()=>ed(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{th?eN({type:"error",message:`Security required: ${tp}`}):P?eS(!0):eN({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),ts?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,a.jsx)("button",{onClick:()=>eE(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${eP?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),eP&&!eI&&e$?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${eA}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>tu(`${eA}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===tx?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>e4(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!eP||eI||e$?eI||eX?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eL||"Connecting..."]}),eq&&(0,a.jsx)(i.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(eq,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:eH||"Open"}),(0,a.jsx)("button",{onClick:()=>{eD(!1),e0(!1),eF(""),tI()},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):eR?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),eR.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:tR,children:"Enable"})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{th?eW({type:"error",message:`Security required: ${tp}`}):tR()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),tl?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,a.jsx)("button",{onClick:()=>e4(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),th&&!em&&!eP&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(y,{message:tp,action:{label:"Open settings",href:"/dashboard/profile"}})}),(em||eP)&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!P&&(0,a.jsx)(y,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!$||!A)&&(0,a.jsx)(y,{message:$?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:$?"Change password":"Enable",href:"/dashboard/profile"}})]}),(em||eP)&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,a.jsx)(i.lM,{checked:I,onChange:()=>ty(!I)}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,a.jsx)(b,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,a.jsxs)(i.Zp,{id:"require-api-key",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>k(!0),children:"Create Key"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,a.jsx)(i.lM,{checked:P,onChange:()=>tj(!P)})]}),to&&!P&&(0,a.jsx)("div",{className:"mb-4 -mt-2",children:(0,a.jsx)(y,{message:"Endpoint is exposed without an API key."})}),0===t.length?(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>k(!0),children:"Create Key"})]}):(0,a.jsx)("div",{className:"flex flex-col",children:t.map(e=>{var t;return(0,a.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono",children:tr.has(e.id)?e.key:(t=e.key)&&!(t.length<=10)?t.slice(0,6)+"•".repeat(t.length-10)+t.slice(-4):t||""}),(0,a.jsx)("button",{onClick:()=>{var t;return t=e.id,void ti(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:tr.has(e.id)?"Hide key":"Show key",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:tr.has(e.id)?"visibility_off":"visibility"})}),(0,a.jsx)("button",{onClick:()=>tu(e.key,e.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:tx===e.id?"check":"content_copy"})})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,a.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?E({title:"Pause API Key",message:`Pause API key "${e.name}"?
2
+
3
+ This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{E(null),tK(e.id,t)}}):tK(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,a.jsx)("button",{onClick:()=>tq(e.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsxs)(i.Zp,{id:"rtk",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,a.jsx)(i.lM,{checked:L,onChange:()=>tv(!L)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-4 border-b border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,a.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${tM?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:tQ}),(0,a.jsx)("button",{type:"button",onClick:()=>G(!0),className:"text-xs text-primary underline hover:opacity-80",children:tM?"Manage":"Setup"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,a.jsx)(i.lM,{checked:R&&tM,disabled:!tM,onChange:()=>{var e;let t;return e=!R,void(K(t=q.trim()||"http://localhost:8787"),W(e),tk({headroomEnabled:e,headroomUrl:t}))}})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[X&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:tm.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;es(t=e.id),tk({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${et===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:x.find(e=>e.id===et)?.desc})]}),(0,a.jsx)(i.lM,{checked:X,onChange:()=>{var e;ee(e=!X),tk({cavemanEnabled:e})}})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,a.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[ea&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:u.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;er(t=e.id),tk({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${en===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:u.find(e=>e.id===en)?.desc})]}),(0,a.jsx)(i.lM,{checked:ea,onChange:()=>{var e;el(e=!ea),tk({ponytailEnabled:e})}})]})]})]}),(0,a.jsx)(i.aF,{isOpen:v,title:"Create API Key",onClose:()=>{k(!1),N("")},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(i.pd,{label:"Key Name",value:w,onChange:e=>N(e.target.value),placeholder:"Production Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tW,fullWidth:!0,disabled:!w.trim(),children:"Create"}),(0,a.jsx)(i.$n,{onClick:()=>{k(!1),N("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!C,title:"API Key Created",onClose:()=>S(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.pd,{value:C||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(i.$n,{variant:"secondary",icon:"created_key"===tx?"check":"content_copy",onClick:()=>tu(C,"created_key"),children:"created_key"===tx?"Copied!":"Copy"})]}),(0,a.jsx)(i.$n,{onClick:()=>S(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(i.aF,{isOpen:eC,title:"Enable Tunnel",onClose:()=>eS(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local 9Router to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:m.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tP,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(i.$n,{onClick:()=>eS(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:eT,title:"Disable Tunnel",onClose:()=>!ey&&eE(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:t_,fullWidth:!0,disabled:ey,variant:"danger",children:ey?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>eE(!1),variant:"ghost",fullWidth:!0,disabled:ey,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:e1,title:"Tailscale Funnel",onClose:()=>{eB||(e5(!1),eV(""),eW(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===eM&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===eM&&!eB&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tU,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(i.$n,{onClick:()=>e5(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eB&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),eQ.length>0&&(0,a.jsx)("div",{ref:e8,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:eQ.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===eM&&!eB&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:()=>tD(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(i.$n,{onClick:()=>e5(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eR&&(0,a.jsx)(g,{status:eR})]})}),(0,a.jsx)(i.aF,{isOpen:e2,title:"Disable Tailscale",onClose:()=>!eI&&e4(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tF,fullWidth:!0,disabled:eI,variant:"danger",children:eI?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>e4(!1),variant:"ghost",fullWidth:!0,disabled:eI,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:B,title:tM?"Headroom":"Setup Headroom",onClose:()=>G(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsx)("span",{children:"Status"}),(0,a.jsx)("span",{className:tM?"text-success":"text-warning",children:tQ})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,a.jsx)(i.pd,{value:q,onChange:e=>K(e.target.value),onBlur:tw,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a local proxy for Start/Stop, or an external Docker sidecar like http://headroom:8787."})]}),tG?(0,a.jsx)(i.$n,{onClick:tS,variant:"ghost",fullWidth:!0,disabled:Q,children:Q?"Stopping…":"Stop Headroom"}):tM?(0,a.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):tB?(0,a.jsx)(i.$n,{onClick:tC,fullWidth:!0,disabled:Q,children:Q?"Starting…":"Start Headroom"}):tJ?M.python?(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("pre",{className:"flex-1 rounded bg-black/5 dark:bg-white/5 p-2 text-xs font-mono overflow-x-auto",children:'pip install "headroom-ai[proxy]"'}),(0,a.jsx)(i.$n,{size:"sm",variant:"ghost",onClick:()=>tu('pip install "headroom-ai[proxy]"'),children:tx?"Copied":"Copy"})]})]}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Python ≥ 3.10 required for local managed mode. Install Python first, or use an external proxy URL."}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),Z&&(0,a.jsx)("p",{className:"text-sm text-warning",children:Z}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:()=>tN(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,a.jsx)(i.$n,{onClick:()=>G(!1),fullWidth:!0,children:"Done"})]})]})}),(0,a.jsx)(i.uo,{isOpen:!!T,onClose:()=>E(null),onConfirm:T?.onConfirm,title:T?.title||"Confirm",message:T?.message,variant:"danger"})]})}j.propTypes={machineId:r().string.isRequired}}}]);
@@ -0,0 +1,11 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8982],{1934:(e,t,r)=>{"use strict";r.d(t,{v:()=>u});var n=r(12115);let a=e=>{let t,r=new Set,n=(e,n)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=n?n:"object"!=typeof a||null===a)?a:Object.assign({},t,a),r.forEach(r=>r(t,e))}},a=()=>t,i={setState:n,getState:a,getInitialState:()=>u,subscribe:e=>(r.add(e),()=>r.delete(e))},u=t=e(n,a,i);return i},i=e=>{let t=e?a(e):a,r=e=>(function(e,t=e=>e){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),n.useCallback(()=>t(e.getInitialState()),[e,t]));return n.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},u=e=>e?i(e):i},5887:()=>{},26300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({html:e,height:t=null,width:r=null,children:i,dataNtpc:u=""}){return(0,a.useEffect)(()=>{u&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${u}`}})},[u]),(0,n.jsxs)(n.Fragment,{children:[i,e?(0,n.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=r?`${r}px`:"auto"},"data-ntpc":u,dangerouslySetInnerHTML:{__html:e}}):null]})};let n=r(95155),a=r(12115)},28356:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={cancelIdleCallback:function(){return i},requestIdleCallback:function(){return a}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let a="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},i="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},30565:(e,t,r)=>{"use strict";var n;let a;Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=function(e){let{gaId:t,debugMode:r,dataLayerName:n="dataLayer",nonce:l}=e;return void 0===a&&(a=n),(0,u.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:`
2
+ window['${n}'] = window['${n}'] || [];
3
+ function gtag(){window['${n}'].push(arguments);}
4
+ gtag('js', new Date());
5
+
6
+ gtag('config', '${t}' ${r?",{ 'debug_mode': true }":""});`},nonce:l}),(0,i.jsx)(s.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${t}`,nonce:l})]})},t.sendGAEvent=function(){void 0===a?console.warn("@next/third-parties: GA has not been initialized"):window[a]?window[a].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${a} does not exist`)};let i=r(95155),u=r(12115),s=(n=r(65596))&&n.__esModule?n:{default:n}},31692:(e,t,r)=>{"use strict";r.d(t,{Zr:()=>a});let n=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>n(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>n(t)(e)}}},a=(e,t)=>(r,a,i)=>{let u,s={storage:function(e){let t;try{t=e()}catch(e){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e,void 0),a=null!=(r=t.getItem(e))?r:null;return a instanceof Promise?a.then(n):n(a)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r,void 0)),removeItem:e=>t.removeItem(e)}}(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,o=0,c=new Set,d=new Set,f=s.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},a,i);let m=()=>{let e=s.partialize({...a()});return f.setItem(s.name,{state:e,version:s.version})},g=i.setState;i.setState=(e,t)=>(g(e,t),m());let p=e((...e)=>(r(...e),m()),a,i);i.getInitialState=()=>p;let h=()=>{var e,t;if(!f)return;let i=++o;l=!1,c.forEach(e=>{var t;return e(null!=(t=a())?t:p)});let g=(null==(t=s.onRehydrateStorage)?void 0:t.call(s,null!=(e=a())?e:p))||void 0;return n(f.getItem.bind(f))(s.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return[!1,e.state];else{if(s.migrate){let t=s.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;if(i!==o)return;let[n,l]=e;if(r(u=s.merge(l,null!=(t=a())?t:p),!0),n)return m()}).then(()=>{i===o&&(null==g||g(a(),void 0),u=a(),l=!0,d.forEach(e=>e(u)))}).catch(e=>{i===o&&(null==g||g(void 0,e))})};return i.persist={setOptions:e=>{s={...s,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},s.skipHydration||h(),u||p}},35154:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},42593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={default:function(){return w},handleClientScriptLoad:function(){return _},initScriptLoader:function(){return y}};for(var a in n)Object.defineProperty(t,a,{enumerable:!0,get:n[a]});let i=r(73623),u=r(66388),s=r(95155),l=i._(r(47650)),o=u._(r(12115)),c=r(75368),d=r(3584),f=r(28356),m=r(71922),g=new Map,p=new Set,h=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:a=null,dangerouslySetInnerHTML:i,children:u="",strategy:s="afterInteractive",onError:o,stylesheets:c}=e,f=r||t;if(f&&p.has(f))return;if(g.has(t)){p.add(f),g.get(t).then(n,o);return}let m=()=>{a&&a(),p.add(f)},h=document.createElement("script"),_=new Promise((e,t)=>{h.addEventListener("load",function(t){e(),n&&n.call(this,t),m()}),h.addEventListener("error",function(e){t(e)})}).catch(function(e){o&&o(e)});i?(h.innerHTML=i.__html||"",m()):u?(h.textContent="string"==typeof u?u:Array.isArray(u)?u.join(""):"",m()):t&&(h.src=t,g.set(t,_)),(0,d.setAttributesFromProps)(h,e),"worker"===s&&h.setAttribute("type","text/partytown"),h.setAttribute("data-nscript",s),c&&(e=>{if(l.default.preinit)return e.forEach(e=>{l.default.preinit(e,{as:"style"})});{let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}})(c),document.body.appendChild(h)};function _(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,f.requestIdleCallback)(()=>h(e))}):h(e)}function y(e){e.forEach(_),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");p.add(t)})}function v(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:a=null,strategy:i="afterInteractive",onError:u,stylesheets:d,...g}=e,{updateScripts:_,scripts:y,getIsSsr:v,appDir:w,nonce:b}=(0,o.useContext)(c.HeadManagerContext);b=g.nonce||b;let S=(0,o.useRef)(!1);(0,o.useEffect)(()=>{let e=t||r;S.current||(a&&e&&p.has(e)&&a(),S.current=!0)},[a,t,r]);let I=(0,o.useRef)(!1);if((0,o.useEffect)(()=>{if(!I.current){if("afterInteractive"===i)h(e);else"lazyOnload"===i&&("complete"===document.readyState?(0,f.requestIdleCallback)(()=>h(e)):window.addEventListener("load",()=>{(0,f.requestIdleCallback)(()=>h(e))}));I.current=!0}},[e,i]),("beforeInteractive"===i||"worker"===i)&&(_?(y[i]=(y[i]||[]).concat([{id:t,src:r,onLoad:n,onReady:a,onError:u,...g,nonce:b}]),_(y)):v&&v()?p.add(t||r):v&&!v()&&h({...e,nonce:b})),w){if(d&&d.forEach(e=>{l.default.preinit(e,{as:"style"})}),"beforeInteractive"===i)if(!r)return g.dangerouslySetInnerHTML&&(g.children=g.dangerouslySetInnerHTML.__html,delete g.dangerouslySetInnerHTML),(0,s.jsx)("script",{nonce:b,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,m.htmlEscapeJsonString)(JSON.stringify([0,{...g,id:t}]))})`}});else return l.default.preload(r,g.integrity?{as:"script",integrity:g.integrity,nonce:b,crossOrigin:g.crossOrigin}:{as:"script",nonce:b,crossOrigin:g.crossOrigin}),(0,s.jsx)("script",{nonce:b,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,m.htmlEscapeJsonString)(JSON.stringify([r,{...g,id:t}]))})`}});"afterInteractive"===i&&r&&l.default.preload(r,g.integrity?{as:"script",integrity:g.integrity,nonce:b,crossOrigin:g.crossOrigin}:{as:"script",nonce:b,crossOrigin:g.crossOrigin})}return null}Object.defineProperty(v,"__nextScript",{value:!0});let w=v;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54642:e=>{var t;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="//"),(t={}).endianness=function(){return"LE"},t.hostname=function(){return"u">typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"u">typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"},e.exports=t},65596:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a.a});var n=r(42593),a=r.n(n),i={};for(let e in n)"default"!==e&&(i[e]=()=>n[e]);r.d(t,i)},71922:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={ESCAPE_REGEX:function(){return i},htmlEscapeAttributeString:function(){return o},htmlEscapeJsonString:function(){return l}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let a={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},i=/[&><\u2028\u2029]/g,u={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},s=/[&"'<>]/g;function l(e){return e.replace(i,e=>a[e])}function o(e){return e.replace(s,e=>u[e])}},73321:(e,t,r)=>{"use strict";var n=r(74645);r.o(n,"notFound")&&r.d(t,{notFound:function(){return n.notFound}}),r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},90285:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.sendGTMEvent=void 0,t.GoogleTagManager=function(e){let{gtmId:t,gtmScriptUrl:r,dataLayerName:n="dataLayer",auth:l,preview:o,dataLayer:c,nonce:d}=e;s=n;let f=new URL(r||"https://www.googletagmanager.com/gtm.js");return t&&f.searchParams.set("id",t),"dataLayer"!==n&&f.searchParams.set("l",n),l&&f.searchParams.set("gtm_auth",l),o&&(f.searchParams.set("gtm_preview",o),f.searchParams.set("gtm_cookies_win","x")),(0,i.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:`
7
+ (function(w,l){
8
+ w[l]=w[l]||[];
9
+ w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
10
+ ${c?`w[l].push(${JSON.stringify(c)})`:""}
11
+ })(window,'${n}');`},nonce:d}),(0,a.jsx)(u.default,{id:"_next-gtm","data-ntpc":"GTM",src:f.href,nonce:d})]})};let a=r(95155),i=r(12115),u=(n=r(65596))&&n.__esModule?n:{default:n},s="dataLayer";t.sendGTMEvent=(e,t)=>{let r=t||s;window[r]=window[r]||[],window[r].push(e)}}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var s=r(95155),a=r(12115),i=r(35497),l=r(28777),n=r(52679);let o="basic-chat.sessions",d="basic-chat.activeSessionId",c="basic-chat.activeProviderId",m="basic-chat.draft";function u(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function p(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(p).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function h(e=""){let t=p(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function x(e){return await new Promise((t,r)=>{let s=new FileReader;s.onload=()=>t(String(s.result||"")),s.onerror=()=>r(s.error||Error("Failed to read file")),s.readAsDataURL(e)})}function f(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function g(){let[e,t]=(0,a.useState)([]),[r,g]=(0,a.useState)(!0),[w,v]=(0,a.useState)(""),[b,N]=(0,a.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(o),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[y,j]=(0,a.useState)(()=>globalThis.localStorage.getItem(d)||""),[S,I]=(0,a.useState)(()=>globalThis.localStorage.getItem(c)||""),[A,k]=(0,a.useState)(""),[D,O]=(0,a.useState)(()=>globalThis.localStorage.getItem(m)||""),[$,C]=(0,a.useState)([]),[_,M]=(0,a.useState)(!1),[E,T]=(0,a.useState)(""),[U,R]=(0,a.useState)(""),[z,q]=(0,a.useState)(!1),[P,J]=(0,a.useState)(!1),[B,F]=(0,a.useState)(!1),K=(0,a.useRef)(null),L=(0,a.useRef)(null),W=(0,a.useRef)(!1),H=(0,a.useRef)(null),Y=(0,a.useRef)(null);(0,a.useEffect)(()=>{q(!0)},[]),(0,a.useEffect)(()=>{let e=!1;return async function(){g(!0),v("");try{let r=await fetch("/api/providers",{cache:"no-store"}),s=await r.json().catch(()=>({})),a=Array.isArray(s.connections)?s.connections.filter(e=>e?.isActive!==!1):[];if(0===a.length){e||(t([]),v("No providers connected yet."));return}let i=new Map;for(let e of a){let t=e.provider||e.id,r=f(e),s=(0,n.mq)(t)?"openai-compatible":(0,n.gb)(t)?"anthropic-compatible":t;i.has(t)||i.set(t,{providerId:t,providerName:r,providerType:s,connections:[],models:[]});let a=i.get(t);a.providerName=a.providerName||r,a.providerType=a.providerType||s,a.connections.push(e);let o=(0,l.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:f(e),source:"static"}:null).filter(Boolean);a.models.push(...o)}for(let e of(await Promise.all(a.map(async e=>{try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)return{connection:e,models:[]};let s=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(t=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let s="string"==typeof e?e:e?.name||e?.displayName||r,a=r;return((0,n.mq)(t.provider)||(0,n.gb)(t.provider))&&!r.includes("/")&&(a=`${t.provider}/${r}`),{id:a,requestModel:a,name:s,providerId:t.provider,providerName:f(t),source:"live"}})(t,e)).filter(Boolean);return{connection:e,models:s}}catch{return{connection:e,models:[]}}})))){let t=e.connection.provider||e.connection.id,r=i.get(t);r&&r.models.push(...e.models)}let o=Array.from(i.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName));e||(t(o),0===o.length&&v("Providers connected but no models available."))}catch(r){e||(v(p(r?.message)||"Failed to load providers/models."),t([]))}finally{e||g(!1)}}(),()=>{e=!0}},[]),(0,a.useEffect)(()=>{let e=e=>{H.current&&!H.current.contains(e.target)&&J(!1),Y.current&&!Y.current.contains(e.target)&&F(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let G=(0,a.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),Q=(0,a.useMemo)(()=>e.find(e=>e.providerId===S)||e[0]||null,[e,S]),V=(0,a.useMemo)(()=>{if(A&&G.has(A))return G.get(A);if(y){let e=b.find(e=>e.id===y);if(e?.modelId&&G.has(e.modelId))return G.get(e.modelId)}return Q?.models?.[0]||null},[A,G,Q,b,y]),X=(0,a.useMemo)(()=>b.find(e=>e.id===y)||null,[b,y]),Z=X?.messages||[],ee=(0,a.useMemo)(()=>[...b].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[b]),et=!_&&!!V&&(D.trim().length>0||$.length>0);(0,a.useEffect)(()=>{if(z)try{globalThis.localStorage.setItem(o,JSON.stringify(b)),globalThis.localStorage.setItem(d,y),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,D)}catch{}},[z,b,y,S,D]),(0,a.useEffect)(()=>{if(!z||r||W.current||0===e.length)return;let t=e.find(e=>e.providerId===S)||e[0],s=A&&G.has(A)?G.get(A):t.models[0];if(b.length>0){let e=b.find(e=>e.id===y)||b[0],r=e?.modelId&&G.has(e.modelId)?G.get(e.modelId):s;W.current=!0,j(e.id),I(r?.providerId||t.providerId),k(r?.id||s.id);return}let a={id:u(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:s.id,modelName:s.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};W.current=!0,N([a]),j(a.id),I(t.providerId),k(s.id)},[z,r,e,G,b,y,S,A]);let er=(e,t)=>{N(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},es=e=>e?{id:u(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,ea=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let s=await Promise.all(r.map(async e=>({id:u(),name:e.name,type:e.type,size:e.size,dataUrl:await x(e)})));C(e=>[...e,...s]),e.target.value=""},ei=async()=>{let e=V||Q?.models?.[0]||null;if(!e)return;let t=D.trim();if(!t&&0===$.length)return;let r=y,s=b.find(e=>e.id===r);if(!s){if(!(s=es(e)))return;r=s.id,N(e=>[s,...e]),j(r)}let a={id:u(),role:"user",content:t,attachments:$.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},i=u(),l={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...s.messages||[],a,l];N(s=>s.map(s=>s.id===r?{...s,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===s.title?h(t):s.title}:s)),O(""),C([]),M(!0),T(i),R(""),L.current?.abort(),L.current=new AbortController;let o=n.filter(e=>"assistant"!==e.role||e.id!==i).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=p(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let s=[];for(let e of(t&&s.push({type:"text",text:t}),r))e?.dataUrl&&s.push({type:"image_url",image_url:{url:e.dataUrl}});return s.length>0?s:t}(e):e.content}));try{var d;let s,a=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:o,stream:!0}),signal:L.current.signal});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(p(e.error||e.message||`Request failed (${a.status})`))}let l=a.body?.getReader();if(!l){let e=await a.json().catch(()=>({})),t=p(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await l.read();if(t)break;let s=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=s.pop()||"",s)){let t=e.trim();if(!t.startsWith("data:"))continue;let s=t.slice(5).trim();if(s&&"[DONE]"!==s)try{let e=JSON.parse(s),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(p).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,R(m),er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),d=r,s=h(t),er(d,e=>({...e,title:"New chat"===e.title?s:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=p(e?.message||e);er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),v(t||"Failed to send message.")}}finally{M(!1),T(""),R(""),L.current=null}},el=V?`${V.name}`:"Select model",en=V?V.requestModel:"Choose from connected providers";return(0,s.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-[#212121] text-white overflow-hidden",children:(0,s.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,s.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,s.jsxs)("div",{ref:H,className:"relative",children:[(0,s.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-left transition hover:bg-white/8",children:(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-white",children:el}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-white/70",children:"expand_more"})]}),(0,s.jsx)("p",{className:"truncate text-xs text-white/55",children:en})]})}),P?(0,s.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-white/10 bg-[#262626] shadow-2xl shadow-black/50",children:[(0,s.jsxs)("div",{className:"border-b border-white/10 px-4 py-3",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Models"}),(0,s.jsx)("p",{className:"text-sm text-white/75",children:"Only from connected providers"})]}),(0,s.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,s.jsxs)("div",{className:"mb-2 rounded-[16px] border border-white/10 bg-black/20 p-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-white",children:e.providerName}),(0,s.jsx)(i.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===A;return(0,s.jsx)("button",{type:"button",onClick:()=>(e=>{let t=G.get(e);if(!t)return;let r=b.find(e=>e.id===y);if(r&&r.messages.length>0){let e=es(t);if(!e)return;N(t=>[e,...t]),j(e.id)}else if(r)N(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),j(r.id);else{let e=es(t);if(!e)return;N(t=>[e,...t]),j(e.id)}I(t.providerId),k(t.id),J(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.name}),(0,s.jsx)("p",{className:"truncate text-[11px] text-white/45",children:e.requestModel})]}),t?(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-blue-300",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white/80 transition hover:bg-white/8",children:"History"}),(0,s.jsx)(i.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!y)return;let e=b.filter(e=>e.id!==y),t=e[0]||null;N(e),t?(j(t.id),I(t.providerId),k(t.modelId)):(j(""),I(""),k(""))},disabled:!y||0===b.length,children:"Clear"})]})]}),B?(0,s.jsxs)("div",{ref:Y,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-white/10 bg-[#262626] p-2 shadow-2xl shadow-black/50 lg:right-6",children:[(0,s.jsx)("div",{className:"px-3 py-2",children:(0,s.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Recent chats"})}),(0,s.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===ee.length?(0,s.jsx)("div",{className:"rounded-[16px] border border-dashed border-white/10 bg-white/5 p-4 text-sm text-white/55",children:"No conversations yet."}):ee.map(e=>{let t=e.id===y,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,s.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=b.find(e=>e.id===t))&&(j(t),I(r.providerId||S),k(r.modelId||A),F(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.title}),(0,s.jsx)("p",{className:"mt-1 truncate text-xs text-white/50",children:p(r?.content)||"Empty chat"})]}),(0,s.jsx)("span",{className:"text-[10px] text-white/40 shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let s=Math.round(r/60);return s<24?`${s}h`:`${Math.round(s/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,w?(0,s.jsx)("div",{className:"mt-4 rounded-[18px] border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-rose-100",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,s.jsx)("p",{className:"text-sm leading-6",children:w})]})}):null,(0,s.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===Z.length?(0,s.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,s.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,s.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-white/10 bg-white/5 text-white/80",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h2",{className:"text-2xl font-semibold text-white",children:"Start a conversation"}),(0,s.jsx)("p",{className:"text-sm leading-6 text-white/60",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,s.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:Z.map(e=>{let t="user"===e.role,r="assistant"===e.role,a=r&&e.id===E&&"streaming"===e.status,i=p(e.content)||(r?U:"");return(0,s.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,s.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-[#2f2f2f] px-5 py-3.5 text-white":"text-white/90"}`,children:[(0,s.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,s.jsx)("span",{className:"text-xs font-semibold",children:t?"You":V?.name||"Assistant"})}),e.attachments?.length?(0,s.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,s.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-white/10 bg-black/20",children:(0,s.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover"})},e.id))}):null,(0,s.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[i,r&&a&&!U?(0,s.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,s.jsxs)("div",{className:"shrink-0 pt-2",children:[$.length>0?(0,s.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:$.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-2",children:[(0,s.jsx)("span",{className:"text-xs text-white/80 max-w-[12rem] truncate",children:e.name}),(0,s.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void C(e=>e.filter(e=>e.id!==t))},className:"text-white/55 hover:text-white","aria-label":"Remove attachment",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,s.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,s.jsxs)("div",{className:"rounded-[26px] bg-[#2f2f2f] px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-white/5",children:[(0,s.jsx)("textarea",{value:D,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),et&&ei())},placeholder:"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-white outline-none placeholder:text-white/40 custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,s.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>K.current?.click(),disabled:!V||r,className:"p-2 text-white/50 hover:text-white transition rounded-full hover:bg-white/5",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,s.jsx)("input",{ref:K,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ea}),(0,s.jsx)("span",{className:"text-xs font-medium text-white/30 truncate max-w-[120px]",children:V?V.name:"No model"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[_?(0,s.jsx)("button",{type:"button",onClick:()=>{L.current?.abort()},className:"p-2 text-white bg-white/10 hover:bg-white/20 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,s.jsx)("button",{onClick:ei,disabled:!et,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${et?"bg-white text-black hover:opacity-90":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,s.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-white/30",children:"Model list is filtered from connected providers."})]})]})})}},98125:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=98125)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var s=r(95155),a=r(12115),i=r(35497),l=r(28777),n=r(88105);let o="basic-chat.sessions",d="basic-chat.activeSessionId",c="basic-chat.activeProviderId",m="basic-chat.draft";function u(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function p(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(p).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function h(e=""){let t=p(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function x(e){return await new Promise((t,r)=>{let s=new FileReader;s.onload=()=>t(String(s.result||"")),s.onerror=()=>r(s.error||Error("Failed to read file")),s.readAsDataURL(e)})}function f(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function g(){let[e,t]=(0,a.useState)([]),[r,g]=(0,a.useState)(!0),[w,v]=(0,a.useState)(""),[b,N]=(0,a.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(o),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[y,j]=(0,a.useState)(()=>globalThis.localStorage.getItem(d)||""),[S,I]=(0,a.useState)(()=>globalThis.localStorage.getItem(c)||""),[A,k]=(0,a.useState)(""),[D,O]=(0,a.useState)(()=>globalThis.localStorage.getItem(m)||""),[$,C]=(0,a.useState)([]),[_,M]=(0,a.useState)(!1),[E,T]=(0,a.useState)(""),[U,R]=(0,a.useState)(""),[z,q]=(0,a.useState)(!1),[P,J]=(0,a.useState)(!1),[B,F]=(0,a.useState)(!1),K=(0,a.useRef)(null),L=(0,a.useRef)(null),W=(0,a.useRef)(!1),H=(0,a.useRef)(null),Y=(0,a.useRef)(null);(0,a.useEffect)(()=>{q(!0)},[]),(0,a.useEffect)(()=>{let e=!1;return async function(){g(!0),v("");try{let r=await fetch("/api/providers",{cache:"no-store"}),s=await r.json().catch(()=>({})),a=Array.isArray(s.connections)?s.connections.filter(e=>e?.isActive!==!1):[];if(0===a.length){e||(t([]),v("No providers connected yet."));return}let i=new Map;for(let e of a){let t=e.provider||e.id,r=f(e),s=(0,n.mq)(t)?"openai-compatible":(0,n.gb)(t)?"anthropic-compatible":t;i.has(t)||i.set(t,{providerId:t,providerName:r,providerType:s,connections:[],models:[]});let a=i.get(t);a.providerName=a.providerName||r,a.providerType=a.providerType||s,a.connections.push(e);let o=(0,l.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:f(e),source:"static"}:null).filter(Boolean);a.models.push(...o)}for(let e of(await Promise.all(a.map(async e=>{try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)return{connection:e,models:[]};let s=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(t=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let s="string"==typeof e?e:e?.name||e?.displayName||r,a=r;return((0,n.mq)(t.provider)||(0,n.gb)(t.provider))&&!r.includes("/")&&(a=`${t.provider}/${r}`),{id:a,requestModel:a,name:s,providerId:t.provider,providerName:f(t),source:"live"}})(t,e)).filter(Boolean);return{connection:e,models:s}}catch{return{connection:e,models:[]}}})))){let t=e.connection.provider||e.connection.id,r=i.get(t);r&&r.models.push(...e.models)}let o=Array.from(i.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName));e||(t(o),0===o.length&&v("Providers connected but no models available."))}catch(r){e||(v(p(r?.message)||"Failed to load providers/models."),t([]))}finally{e||g(!1)}}(),()=>{e=!0}},[]),(0,a.useEffect)(()=>{let e=e=>{H.current&&!H.current.contains(e.target)&&J(!1),Y.current&&!Y.current.contains(e.target)&&F(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let G=(0,a.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),Q=(0,a.useMemo)(()=>e.find(e=>e.providerId===S)||e[0]||null,[e,S]),V=(0,a.useMemo)(()=>{if(A&&G.has(A))return G.get(A);if(y){let e=b.find(e=>e.id===y);if(e?.modelId&&G.has(e.modelId))return G.get(e.modelId)}return Q?.models?.[0]||null},[A,G,Q,b,y]),X=(0,a.useMemo)(()=>b.find(e=>e.id===y)||null,[b,y]),Z=X?.messages||[],ee=(0,a.useMemo)(()=>[...b].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[b]),et=!_&&!!V&&(D.trim().length>0||$.length>0);(0,a.useEffect)(()=>{if(z)try{globalThis.localStorage.setItem(o,JSON.stringify(b)),globalThis.localStorage.setItem(d,y),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,D)}catch{}},[z,b,y,S,D]),(0,a.useEffect)(()=>{if(!z||r||W.current||0===e.length)return;let t=e.find(e=>e.providerId===S)||e[0],s=A&&G.has(A)?G.get(A):t.models[0];if(b.length>0){let e=b.find(e=>e.id===y)||b[0],r=e?.modelId&&G.has(e.modelId)?G.get(e.modelId):s;W.current=!0,j(e.id),I(r?.providerId||t.providerId),k(r?.id||s.id);return}let a={id:u(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:s.id,modelName:s.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};W.current=!0,N([a]),j(a.id),I(t.providerId),k(s.id)},[z,r,e,G,b,y,S,A]);let er=(e,t)=>{N(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},es=e=>e?{id:u(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,ea=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let s=await Promise.all(r.map(async e=>({id:u(),name:e.name,type:e.type,size:e.size,dataUrl:await x(e)})));C(e=>[...e,...s]),e.target.value=""},ei=async()=>{let e=V||Q?.models?.[0]||null;if(!e)return;let t=D.trim();if(!t&&0===$.length)return;let r=y,s=b.find(e=>e.id===r);if(!s){if(!(s=es(e)))return;r=s.id,N(e=>[s,...e]),j(r)}let a={id:u(),role:"user",content:t,attachments:$.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},i=u(),l={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...s.messages||[],a,l];N(s=>s.map(s=>s.id===r?{...s,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===s.title?h(t):s.title}:s)),O(""),C([]),M(!0),T(i),R(""),L.current?.abort(),L.current=new AbortController;let o=n.filter(e=>"assistant"!==e.role||e.id!==i).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=p(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let s=[];for(let e of(t&&s.push({type:"text",text:t}),r))e?.dataUrl&&s.push({type:"image_url",image_url:{url:e.dataUrl}});return s.length>0?s:t}(e):e.content}));try{var d;let s,a=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:o,stream:!0}),signal:L.current.signal});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(p(e.error||e.message||`Request failed (${a.status})`))}let l=a.body?.getReader();if(!l){let e=await a.json().catch(()=>({})),t=p(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await l.read();if(t)break;let s=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=s.pop()||"",s)){let t=e.trim();if(!t.startsWith("data:"))continue;let s=t.slice(5).trim();if(s&&"[DONE]"!==s)try{let e=JSON.parse(s),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(p).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,R(m),er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),d=r,s=h(t),er(d,e=>({...e,title:"New chat"===e.title?s:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=p(e?.message||e);er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),v(t||"Failed to send message.")}}finally{M(!1),T(""),R(""),L.current=null}},el=V?`${V.name}`:"Select model",en=V?V.requestModel:"Choose from connected providers";return(0,s.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-[#212121] text-white overflow-hidden",children:(0,s.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,s.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,s.jsxs)("div",{ref:H,className:"relative",children:[(0,s.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-left transition hover:bg-white/8",children:(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-white",children:el}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-white/70",children:"expand_more"})]}),(0,s.jsx)("p",{className:"truncate text-xs text-white/55",children:en})]})}),P?(0,s.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-white/10 bg-[#262626] shadow-2xl shadow-black/50",children:[(0,s.jsxs)("div",{className:"border-b border-white/10 px-4 py-3",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Models"}),(0,s.jsx)("p",{className:"text-sm text-white/75",children:"Only from connected providers"})]}),(0,s.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,s.jsxs)("div",{className:"mb-2 rounded-[16px] border border-white/10 bg-black/20 p-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-white",children:e.providerName}),(0,s.jsx)(i.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===A;return(0,s.jsx)("button",{type:"button",onClick:()=>(e=>{let t=G.get(e);if(!t)return;let r=b.find(e=>e.id===y);if(r&&r.messages.length>0){let e=es(t);if(!e)return;N(t=>[e,...t]),j(e.id)}else if(r)N(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),j(r.id);else{let e=es(t);if(!e)return;N(t=>[e,...t]),j(e.id)}I(t.providerId),k(t.id),J(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.name}),(0,s.jsx)("p",{className:"truncate text-[11px] text-white/45",children:e.requestModel})]}),t?(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-blue-300",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white/80 transition hover:bg-white/8",children:"History"}),(0,s.jsx)(i.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!y)return;let e=b.filter(e=>e.id!==y),t=e[0]||null;N(e),t?(j(t.id),I(t.providerId),k(t.modelId)):(j(""),I(""),k(""))},disabled:!y||0===b.length,children:"Clear"})]})]}),B?(0,s.jsxs)("div",{ref:Y,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-white/10 bg-[#262626] p-2 shadow-2xl shadow-black/50 lg:right-6",children:[(0,s.jsx)("div",{className:"px-3 py-2",children:(0,s.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Recent chats"})}),(0,s.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===ee.length?(0,s.jsx)("div",{className:"rounded-[16px] border border-dashed border-white/10 bg-white/5 p-4 text-sm text-white/55",children:"No conversations yet."}):ee.map(e=>{let t=e.id===y,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,s.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=b.find(e=>e.id===t))&&(j(t),I(r.providerId||S),k(r.modelId||A),F(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.title}),(0,s.jsx)("p",{className:"mt-1 truncate text-xs text-white/50",children:p(r?.content)||"Empty chat"})]}),(0,s.jsx)("span",{className:"text-[10px] text-white/40 shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let s=Math.round(r/60);return s<24?`${s}h`:`${Math.round(s/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,w?(0,s.jsx)("div",{className:"mt-4 rounded-[18px] border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-rose-100",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,s.jsx)("p",{className:"text-sm leading-6",children:w})]})}):null,(0,s.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===Z.length?(0,s.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,s.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,s.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-white/10 bg-white/5 text-white/80",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h2",{className:"text-2xl font-semibold text-white",children:"Start a conversation"}),(0,s.jsx)("p",{className:"text-sm leading-6 text-white/60",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,s.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:Z.map(e=>{let t="user"===e.role,r="assistant"===e.role,a=r&&e.id===E&&"streaming"===e.status,i=p(e.content)||(r?U:"");return(0,s.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,s.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-[#2f2f2f] px-5 py-3.5 text-white":"text-white/90"}`,children:[(0,s.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,s.jsx)("span",{className:"text-xs font-semibold",children:t?"You":V?.name||"Assistant"})}),e.attachments?.length?(0,s.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,s.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-white/10 bg-black/20",children:(0,s.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover"})},e.id))}):null,(0,s.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[i,r&&a&&!U?(0,s.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,s.jsxs)("div",{className:"shrink-0 pt-2",children:[$.length>0?(0,s.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:$.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-2",children:[(0,s.jsx)("span",{className:"text-xs text-white/80 max-w-[12rem] truncate",children:e.name}),(0,s.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void C(e=>e.filter(e=>e.id!==t))},className:"text-white/55 hover:text-white","aria-label":"Remove attachment",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,s.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,s.jsxs)("div",{className:"rounded-[26px] bg-[#2f2f2f] px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-white/5",children:[(0,s.jsx)("textarea",{value:D,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),et&&ei())},placeholder:"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-white outline-none placeholder:text-white/40 custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,s.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>K.current?.click(),disabled:!V||r,className:"p-2 text-white/50 hover:text-white transition rounded-full hover:bg-white/5",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,s.jsx)("input",{ref:K,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ea}),(0,s.jsx)("span",{className:"text-xs font-medium text-white/30 truncate max-w-[120px]",children:V?V.name:"No model"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[_?(0,s.jsx)("button",{type:"button",onClick:()=>{L.current?.abort()},className:"p-2 text-white bg-white/10 hover:bg-white/20 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,s.jsx)("button",{onClick:ei,disabled:!et,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${et?"bg-white text-black hover:opacity-90":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,s.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-white/30",children:"Model list is filtered from connected providers."})]})]})})}},98125:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=98125)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{43752:(e,t,a)=>{Promise.resolve().then(a.bind(a,85309))},85309:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var s=a(95155),l=a(12115),r=a(98500),i=a.n(r),o=a(35497),n=a(3534),c=a(28777),d=a(43666);let u=a(41463).env.NEXT_PUBLIC_CLOUD_URL;function x({toolId:e,machineId:t}){let a=n.dM[e],[r,v]=(0,l.useState)([]),[m,h]=(0,l.useState)(!0),[p,b]=(0,l.useState)({}),[f,j]=(0,l.useState)(!1),[E,P]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[g,N]=(0,l.useState)(!1),[_,y]=(0,l.useState)(""),[S,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,a,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/keys")]);if(!e)return;if(t.ok){let e=await t.json();v(e.connections||[])}if(a.ok){let e=await a.json();j(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();P(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),k(e.tunnel?.publicUrl||""),N(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),y(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();A(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&h(!1)}})(),()=>{e=!1}},[]);let C=()=>r.filter(e=>!1!==e.isActive),U=(0,l.useCallback)((e,t,a)=>{b(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);return a?(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:a.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:a.description})]}),m?(0,s.jsx)(o.Qv,{}):(()=>{let t,l,r,i=(t=C(),l=[],r=new Set,t.forEach(e=>{let t=c.Xg[e.provider]||e.provider;(0,c.KC)(e.provider).forEach(a=>{let s=`${t}/${a.id}`;r.has(s)||(r.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),l).length>0,o={tool:a,isExpanded:!0,onToggle:()=>{},baseUrl:E&&w?w:f&&u?u:window.location.origin,apiKeys:S,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_};switch(e){case"claude":return(0,s.jsx)(d.Tk,{...o,activeProviders:C(),modelMappings:p[e]||{},onModelMappingChange:(t,a)=>U(e,t,a),hasActiveProviders:i,cloudEnabled:f});case"codex":return(0,s.jsx)(d.Ah,{...o,activeProviders:C(),cloudEnabled:f});case"opencode":return(0,s.jsx)(d.qO,{...o,activeProviders:C(),cloudEnabled:f});case"cowork":return(0,s.jsx)(d.Q6,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f,cloudUrl:u,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_});case"droid":return(0,s.jsx)(d.ZM,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"openclaw":return(0,s.jsx)(d.yZ,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"hermes":return(0,s.jsx)(d.RF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"copilot":return(0,s.jsx)(d.h1,{...o,activeProviders:C(),cloudEnabled:f});case"cline":return(0,s.jsx)(d.aG,{...o,activeProviders:C(),cloudEnabled:f});case"kilo":return(0,s.jsx)(d.c9,{...o,activeProviders:C(),cloudEnabled:f});case"deepseek-tui":return(0,s.jsx)(d.lF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"jcode":return(0,s.jsx)(d.mW,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});default:return(0,s.jsx)(d.a7,{toolId:e,...o,activeProviders:C(),cloudEnabled:f,tunnelEnabled:E})}})()]}):(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,6069,8441,3794,7358],()=>e(e.s=43752)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var t=l(95155),a=l(12115),r=l(35497),i=l(3534),c=l(43666),n=l(98500),o=l.n(n),d=l(5772);function x({toolId:e,tool:s,status:l}){let a=l?l.installed?l.has9Router?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,t.jsx)(o(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(r.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.cls}`,children:a.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,a.useState)(!0),[n,o]=(0,a.useState)({});if((0,a.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&o(await s.json())}catch(e){console.log("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{})]});let d=Object.entries(i.dM),g=Object.entries(i.wn);return(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:d.map(([e,s])=>(0,t.jsx)(x,{toolId:e,tool:s,status:n[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:g.map(([e,s])=>(0,t.jsx)(c.gY,{tool:s},e))})]})]})}},70693:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501))}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,6069,8441,3794,7358],()=>e(e.s=70693)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{21927:(e,t,s)=>{Promise.resolve().then(s.bind(s,47295))},47295:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var l=s(95155),a=s(12115),r=s(44923),o=s(87256),i=s(39768),n=s(5020),d=s(35497),c=s(11059);s(88105);let m=/^[a-zA-Z0-9_.\-\[\]]+$/;function x(){let[e,t]=(0,a.useState)([]),[s,r]=(0,a.useState)(!0),[o,i]=(0,a.useState)(!1),[n,m]=(0,a.useState)(null),[x,u]=(0,a.useState)([]),[p,f]=(0,a.useState)({}),[g,j]=(0,a.useState)({}),[y,v]=(0,a.useState)(null),{copied:N,copy:w}=(0,c.C)();(0,a.useEffect)(()=>{k()},[]);let k=async()=>{try{let[e,s,l,a]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings"),fetch("/api/models")]),r=await e.json(),o=await s.json(),i=l.ok?await l.json():{};if(e.ok&&t((r.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),s.ok&&u(o.connections||[]),a.ok){let e=await a.json(),t={};for(let s of e.models||[])s.caps&&(t[s.fullModel]=s.caps);j(t)}f(i.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{r(!1)}},C=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await k(),i(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},S=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await k(),m(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},E=async s=>{v({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{v(null);try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&t(e.filter(e=>e.id!==s))}catch(e){console.log("Error deleting combo:",e)}}})},M=async(e,t)=>{try{let s={...p},l={...s[e]||{},...t};l.fallbackStrategy&&"fallback"!==l.fallbackStrategy?s[e]=l:delete s[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})}),f(s)}catch(e){console.log("Error updating combo strategy:",e)}};return s?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(d.Qv,{}),(0,l.jsx)(d.Qv,{})]}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Group models under one name, then pick a strategy per combo:"}),(0,l.jsxs)("ul",{className:"text-sm text-text-muted mt-2 flex flex-col gap-1",children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Fallback"})," — tries models in order (next on failure)"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Round Robin"})," — rotates models across requests to spread load"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Fusion"})," — queries all models in parallel, then a judge synthesizes one answer. Best quality, but costs the most: every request bills all panel models + the judge (N+1 calls)"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Capacity auto-switch"})," — sends image/PDF/audio requests to a model that supports them first"]})]})]}),(0,l.jsx)(d.$n,{icon:"add",onClick:()=>i(!0),className:"w-full sm:w-auto whitespace-nowrap",children:"Create Combo"})]}),0===e.length?(0,l.jsx)(d.Zp,{children:(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,l.jsx)(d.$n,{icon:"add",onClick:()=>i(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,l.jsx)("div",{className:"flex flex-col gap-4",children:e.map(e=>(0,l.jsx)(h,{combo:e,modelCaps:g,activeProviders:x,copied:N,onCopy:w,onEdit:()=>m(e),onDelete:()=>E(e.id),strategy:p[e.name]||{},onSetStrategy:t=>M(e.name,t)},e.id))}),(0,l.jsx)(b,{isOpen:o,onClose:()=>i(!1),onSave:C,activeProviders:x},"create"),(0,l.jsx)(b,{isOpen:!!n,combo:n,onClose:()=>m(null),onSave:e=>S(n.id,e),activeProviders:x},n?.id||"new"),(0,l.jsx)(d.uo,{isOpen:!!y,onClose:()=>v(null),onConfirm:y?.onConfirm,title:y?.title||"Confirm",message:y?.message,variant:"danger"})]})}let u=[{value:"fallback",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate"},{value:"fusion",label:"Fusion — panel + judge"}];function h({combo:e,modelCaps:t={},activeProviders:s=[],copied:r,onCopy:o,onEdit:i,onDelete:n,strategy:c={},onSetStrategy:m}){let[x,p]=(0,a.useState)(!1),b=c.fallbackStrategy||"fallback",f=c.judgeModel||"";return(0,l.jsxs)(d.Zp,{padding:"sm",className:"group",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,s)=>(0,l.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,l.jsx)("span",{children:e}),(0,l.jsx)(d.nh,{caps:t[e]})]},s)),e.models.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]}),"fusion"===b&&(0,l.jsxs)("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Judge"}),(0,l.jsxs)("button",{onClick:()=>p(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Pick the model that fuses panel answers",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"gavel"}),(0,l.jsx)("span",{className:"truncate",children:f||`Auto — ${e.models[0]||"first model"}`})]}),f&&(0,l.jsx)("button",{onClick:()=>m({judgeModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:"Reset judge to Auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]})]})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsx)("div",{className:"w-full sm:w-[200px]",children:(0,l.jsx)(d.l6,{options:u,value:b,onChange:e=>m({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),o(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:i,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,l.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),(0,l.jsx)(d.rq,{isOpen:x,onClose:()=>p(!1),onSelect:e=>{m({judgeModel:e?.value||""}),p(!1)},activeProviders:s,title:"Select Judge Model",addedModelValues:f?[f]:[],closeOnSelect:!0})]})}function p({id:e,index:t,model:s,isFirst:r,isLast:n,onEdit:d,onMoveUp:c,onMoveDown:m,onRemove:x}){let{attributes:u,listeners:h,setNodeRef:b,transform:f,isDragging:g}=(0,o.gl)({id:e}),j={transform:i.Ks.Transform.toString(f),opacity:g?.4:1,zIndex:g?999:void 0},[y,v]=(0,a.useState)(!1),[N,w]=(0,a.useState)(s),k=()=>{let e=N.trim();e&&e!==s?d(e):w(s),v(!1)};return(0,l.jsxs)("div",{ref:b,style:j,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${g?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,l.jsx)("button",{...u,...h,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,l.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,l.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,l.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),y?(0,l.jsx)("input",{autoFocus:!0,value:N,onChange:e=>w(e.target.value),onBlur:k,onKeyDown:e=>{"Enter"===e.key&&k(),"Escape"===e.key&&(w(s),v(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,l.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>v(!0),title:"Click to edit",children:s}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,l.jsx)("button",{onClick:c,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:m,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,l.jsx)("button",{onClick:x,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function b({isOpen:e,combo:t,onClose:s,onSave:i,activeProviders:c,kindFilter:x=null}){let[u,h]=(0,a.useState)(t?.name||""),[f,g]=(0,a.useState)(t?.models||[]),[j,y]=(0,a.useState)(!1),[v,N]=(0,a.useState)(!1),[w,k]=(0,a.useState)(""),[C,S]=(0,a.useState)({}),E=(0,r.FR)((0,r.MS)(r.AN,{activationConstraint:{distance:5}}),(0,r.MS)(r.uN,{coordinateGetter:o.JR})),M=f.map((e,t)=>({uid:`item-${t}`,model:e})),O=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();S(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,a.useEffect)(()=>{e&&O()},[e]);let F=e=>e.trim()?m.test(e)?(k(""),!0):(k("Only letters, numbers, -, _, . and [] allowed"),!1):(k("Name is required"),!1),$=async()=>{F(u)&&(N(!0),await i({name:u.trim(),models:f}),N(!1))},D=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.aF,{isOpen:e,onClose:s,title:D?"Edit Combo":"Create Combo",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(d.pd,{label:"Combo Name",value:u,onChange:e=>{let t=e.target.value;h(t),t?F(t):k("")},placeholder:"my-combo",error:w}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _, . and [] allowed"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===f.length?(0,l.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,l.jsx)(r.Mp,{sensors:E,collisionDetection:r.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=M.findIndex(e=>e.uid===t.id),l=M.findIndex(e=>e.uid===s.id);-1!==e&&-1!==l&&g(t=>(0,o.be)(t,e,l))}},modifiers:[n.FN,n.gj],children:(0,l.jsx)(o.gB,{items:M.map(e=>e.uid),strategy:o._G,children:(0,l.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:M.map(({uid:e,model:t},s)=>(0,l.jsx)(p,{id:e,index:s,model:t,isFirst:0===s,isLast:s===M.length-1,onEdit:e=>{let t=[...f];t[s]=e,g(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...f];[t[e-1],t[e]]=[t[e],t[e-1]],g(t)})(s),onMoveDown:()=>(e=>{if(e===f.length-1)return;let t=[...f];[t[e],t[e+1]]=[t[e+1],t[e]],g(t)})(s),onRemove:()=>{g(f.filter((e,t)=>t!==s))}},e))})})}),(0,l.jsxs)("button",{onClick:()=>y(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,l.jsx)(d.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(d.$n,{onClick:$,fullWidth:!0,size:"sm",disabled:!u.trim()||!!w||v,children:v?"Saving...":D?"Save":"Create"})]})]})}),(0,l.jsx)(d.rq,{isOpen:j,onClose:()=>y(!1),onSelect:e=>{f.includes(e.value)||g([...f,e.value])},onDeselect:e=>{g(f.filter(t=>t!==e.value))},activeProviders:c,modelAliases:C,title:"Add Model to Combo",kindFilter:x,addedModelValues:f,closeOnSelect:!1})]})}}},e=>{e.O(0,[2574,3862,1051,7055,1321,5497,8441,3794,7358],()=>e(e.s=21927)),_N_E=e.O()}]);