@techysy/10router 1.2.1 → 1.3.0

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 (1122) hide show
  1. package/README.md +240 -240
  2. package/README.zh-CN.md +210 -210
  3. package/app/.next-cli-build/BUILD_ID +1 -1
  4. package/app/.next-cli-build/app-path-routes-manifest.json +16 -8
  5. package/app/.next-cli-build/build-manifest.json +3 -3
  6. package/app/.next-cli-build/prerender-manifest.json +27 -27
  7. package/app/.next-cli-build/react-loadable-manifest.json +29 -0
  8. package/app/.next-cli-build/routes-manifest.json +50 -0
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +15 -9
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  82. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  90. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  92. package/app/.next-cli-build/server/app/_not-found.html +9 -1
  93. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  94. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  95. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -6
  96. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  97. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/status/route.js +2 -2
  118. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +26 -11
  122. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  124. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js +2 -0
  128. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js.nft.json +1 -0
  129. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route_client-reference-manifest.js +1 -0
  130. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +4 -0
  135. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -0
  136. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -0
  137. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -2
  146. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  154. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +23 -9
  156. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +3 -2
  158. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  160. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  162. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  164. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/models/caps/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/network/egress-region/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/network/egress-region/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  268. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route.js +2 -0
  270. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route.js.nft.json +1 -0
  271. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route_client-reference-manifest.js +1 -0
  272. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route.js +2 -0
  273. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route.js.nft.json +1 -0
  274. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route_client-reference-manifest.js +1 -0
  275. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +42 -0
  276. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -0
  277. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route_client-reference-manifest.js +1 -0
  278. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -0
  279. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -0
  280. package/app/.next-cli-build/server/app/api/oauth/zed/import/route_client-reference-manifest.js +1 -0
  281. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  314. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  316. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  320. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  322. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  324. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  326. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  328. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  330. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  332. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  334. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  336. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/security/status/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/security/status/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  356. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  378. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -0
  380. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -0
  381. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route_client-reference-manifest.js +1 -0
  382. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/usage/quotas/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/usage/quotas/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -0
  439. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -0
  440. package/app/.next-cli-build/server/app/api/v1/systemone/route_client-reference-manifest.js +1 -0
  441. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  454. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  455. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  456. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  457. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  460. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  461. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  462. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  464. package/app/.next-cli-build/server/app/callback.html +9 -1
  465. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  466. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  467. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  468. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +6 -6
  469. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +9 -1
  470. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +21 -19
  471. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +15 -11
  472. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +21 -19
  473. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  474. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +9 -1
  475. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +22 -20
  476. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +15 -11
  477. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +22 -20
  478. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  479. package/app/.next-cli-build/server/app/dashboard/combos.html +9 -1
  480. package/app/.next-cli-build/server/app/dashboard/combos.rsc +25 -22
  481. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +15 -11
  482. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +25 -22
  483. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  484. package/app/.next-cli-build/server/app/dashboard/endpoint.html +9 -1
  485. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +22 -20
  486. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +15 -11
  487. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +22 -20
  488. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/experimental.html +9 -1
  490. package/app/.next-cli-build/server/app/dashboard/experimental.rsc +21 -19
  491. package/app/.next-cli-build/server/app/dashboard/experimental.segments/!KGRhc2hib2FyZCk/dashboard/experimental/__PAGE__.segment.rsc +15 -11
  492. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_full.segment.rsc +21 -19
  493. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_tree.segment.rsc +2 -2
  494. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +9 -1
  495. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +25 -22
  496. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +14 -11
  497. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +25 -22
  498. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/mitm.html +9 -1
  500. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +22 -19
  501. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +15 -11
  502. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +22 -19
  503. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  504. package/app/.next-cli-build/server/app/dashboard/profile.html +9 -1
  505. package/app/.next-cli-build/server/app/dashboard/profile.rsc +25 -22
  506. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +15 -11
  507. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +25 -22
  508. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/providers/new.html +9 -1
  510. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +25 -22
  511. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +14 -11
  512. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +25 -22
  513. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  514. package/app/.next-cli-build/server/app/dashboard/providers.html +9 -1
  515. package/app/.next-cli-build/server/app/dashboard/providers.rsc +24 -22
  516. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +15 -11
  517. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +24 -22
  518. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  519. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +9 -1
  520. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +24 -22
  521. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +15 -11
  522. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +24 -22
  523. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  524. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +9 -1
  525. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +22 -19
  526. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +15 -11
  527. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +22 -19
  528. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/dashboard/quota.html +10 -2
  530. package/app/.next-cli-build/server/app/dashboard/quota.rsc +23 -20
  531. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +16 -12
  532. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +23 -20
  533. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  536. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +9 -1
  538. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  539. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  540. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  541. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
  542. package/app/.next-cli-build/server/app/dashboard/skills.html +9 -1
  543. package/app/.next-cli-build/server/app/dashboard/skills.rsc +25 -22
  544. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +15 -11
  545. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +25 -22
  546. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  547. package/app/.next-cli-build/server/app/dashboard/token-saver.html +9 -1
  548. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +21 -19
  549. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +15 -11
  550. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +21 -19
  551. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  552. package/app/.next-cli-build/server/app/dashboard/translator.html +9 -1
  553. package/app/.next-cli-build/server/app/dashboard/translator.rsc +24 -22
  554. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +15 -11
  555. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +24 -22
  556. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  557. package/app/.next-cli-build/server/app/dashboard/usage.html +9 -1
  558. package/app/.next-cli-build/server/app/dashboard/usage.rsc +25 -22
  559. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +15 -11
  560. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +25 -22
  561. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  562. package/app/.next-cli-build/server/app/dashboard.html +9 -1
  563. package/app/.next-cli-build/server/app/dashboard.rsc +8 -8
  564. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +15 -11
  565. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -8
  566. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  567. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  568. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  569. package/app/.next-cli-build/server/app/index.html +1 -1
  570. package/app/.next-cli-build/server/app/index.rsc +6 -6
  571. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +6 -6
  572. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  573. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  574. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  575. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  576. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  577. package/app/.next-cli-build/server/app/landing.html +9 -1
  578. package/app/.next-cli-build/server/app/landing.rsc +7 -7
  579. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +7 -7
  580. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  581. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +7 -7
  582. package/app/.next-cli-build/server/app/login/page.js +1 -1
  583. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  584. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  585. package/app/.next-cli-build/server/app/login.html +9 -1
  586. package/app/.next-cli-build/server/app/login.rsc +7 -7
  587. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  588. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  589. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +7 -7
  590. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  591. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  592. package/app/.next-cli-build/server/app/page.js +1 -1
  593. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  594. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  595. package/app/.next-cli-build/server/app-paths-manifest.json +16 -8
  596. package/app/.next-cli-build/server/chunks/1159.js +5 -3
  597. package/app/.next-cli-build/server/chunks/1219.js +1 -1
  598. package/app/.next-cli-build/server/chunks/1329.js +1 -0
  599. package/app/.next-cli-build/server/chunks/1386.js +9 -0
  600. package/app/.next-cli-build/server/chunks/1710.js +1 -1
  601. package/app/.next-cli-build/server/chunks/2112.js +1 -1
  602. package/app/.next-cli-build/server/chunks/2116.js +1 -0
  603. package/app/.next-cli-build/server/chunks/2120.js +1 -1
  604. package/app/.next-cli-build/server/chunks/2132.js +1 -1
  605. package/app/.next-cli-build/server/chunks/{9528.js → 2750.js} +2 -3
  606. package/app/.next-cli-build/server/chunks/3500.js +2 -2
  607. package/app/.next-cli-build/server/chunks/3792.js +1 -1
  608. package/app/.next-cli-build/server/chunks/3885.js +1 -1
  609. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  610. package/app/.next-cli-build/server/chunks/4190.js +1 -0
  611. package/app/.next-cli-build/server/chunks/4282.js +1 -1
  612. package/app/.next-cli-build/server/chunks/4290.js +1 -0
  613. package/app/.next-cli-build/server/chunks/436.js +1 -1
  614. package/app/.next-cli-build/server/chunks/4575.js +1 -1
  615. package/app/.next-cli-build/server/chunks/4689.js +1 -0
  616. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  617. package/app/.next-cli-build/server/chunks/4886.js +1 -0
  618. package/app/.next-cli-build/server/chunks/4927.js +7 -6
  619. package/app/.next-cli-build/server/chunks/5210.js +24 -24
  620. package/app/.next-cli-build/server/chunks/5330.js +8 -8
  621. package/app/.next-cli-build/server/chunks/539.js +1 -1
  622. package/app/.next-cli-build/server/chunks/5485.js +1 -1
  623. package/app/.next-cli-build/server/chunks/5781.js +1 -1
  624. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  625. package/app/.next-cli-build/server/chunks/6133.js +1 -1
  626. package/app/.next-cli-build/server/chunks/615.js +1 -1
  627. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  628. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  629. package/app/.next-cli-build/server/chunks/6756.js +1 -1
  630. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  631. package/app/.next-cli-build/server/chunks/6921.js +65 -0
  632. package/app/.next-cli-build/server/chunks/6922.js +1 -1
  633. package/app/.next-cli-build/server/chunks/6956.js +1 -1
  634. package/app/.next-cli-build/server/chunks/6960.js +2 -2
  635. package/app/.next-cli-build/server/chunks/7066.js +1 -0
  636. package/app/.next-cli-build/server/chunks/7067.js +1 -1
  637. package/app/.next-cli-build/server/chunks/7122.js +1 -1
  638. package/app/.next-cli-build/server/chunks/7239.js +2 -1
  639. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  640. package/app/.next-cli-build/server/chunks/7274.js +3 -3
  641. package/app/.next-cli-build/server/chunks/7322.js +2 -2
  642. package/app/.next-cli-build/server/chunks/8172.js +9 -1
  643. package/app/.next-cli-build/server/chunks/8247.js +1 -0
  644. package/app/.next-cli-build/server/chunks/8370.js +103 -0
  645. package/app/.next-cli-build/server/chunks/8499.js +12 -12
  646. package/app/.next-cli-build/server/chunks/8595.js +1 -1
  647. package/app/.next-cli-build/server/chunks/8672.js +1 -1
  648. package/app/.next-cli-build/server/chunks/8895.js +9 -9
  649. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  650. package/app/.next-cli-build/server/chunks/8988.js +1 -1
  651. package/app/.next-cli-build/server/chunks/9055.js +2 -0
  652. package/app/.next-cli-build/server/chunks/9154.js +1 -1
  653. package/app/.next-cli-build/server/chunks/939.js +1 -1
  654. package/app/.next-cli-build/server/chunks/{4990.js → 9451.js} +1 -1
  655. package/app/.next-cli-build/server/chunks/9489.js +2 -2
  656. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  657. package/app/.next-cli-build/server/chunks/9628.js +1 -1
  658. package/app/.next-cli-build/server/chunks/976.js +9 -0
  659. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  660. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  661. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  662. package/app/.next-cli-build/server/middleware.js +7 -7
  663. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  664. package/app/.next-cli-build/server/pages/404.html +9 -1
  665. package/app/.next-cli-build/server/pages/500.html +1 -1
  666. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  667. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  668. package/app/.next-cli-build/static/chunks/124.8b2f018d999d9a51.js +1 -0
  669. package/app/.next-cli-build/static/chunks/1243-25be5a7b0193949d.js +3 -0
  670. package/app/.next-cli-build/static/chunks/1321-b226b10e6272fc21.js +1 -0
  671. package/app/.next-cli-build/static/chunks/305-f019439bbcf9152e.js +1 -0
  672. package/app/.next-cli-build/static/chunks/3842-da1878db3339b090.js +1 -0
  673. package/app/.next-cli-build/static/chunks/5497-c5b293fd9b36c51d.js +7 -0
  674. package/app/.next-cli-build/static/chunks/6808-d3ffacc1373713c6.js +1 -0
  675. package/app/.next-cli-build/static/chunks/839-e45391c69a64b949.js +1 -0
  676. package/app/.next-cli-build/static/chunks/9233.4e4be172e7d96210.js +65 -0
  677. package/app/.next-cli-build/static/chunks/{3346-509e8dd58ea4832d.js → 9749-80768075d38162d1.js} +27 -16
  678. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-5d45a84bf4178e23.js → page-e9d0cc59613084a7.js} +1 -1
  679. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-c50454e03482deef.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-a010a9c6a7805814.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-14745e08d1edafb2.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-30c02c5c5eefddbd.js → page-38d0f0202be6d8bc.js} +1 -1
  683. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-47886089f369810c.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/experimental/{page-4dd5e46a2d6f4486.js → page-f2be5e1e9fb2a81d.js} +1 -1
  685. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-9ca09f92fcb7be9f.js → page-3b6db6cc6c16b9ad.js} +18 -12
  686. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-9a471accf206ea43.js → page-ee6bbb288b22cf1b.js} +1 -1
  687. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-244f4c72b60bf0a0.js → page-ef6ad6f6950d28ae.js} +1 -1
  688. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-a2510813ebd64f72.js → page-fa1fbe256586f3e4.js} +1 -1
  689. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-17b2097c5effd063.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-188d4a1bfdaa48a9.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-912bf60e8bad7f94.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-2bc7898568623185.js +14 -0
  693. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-40e882239717e69f.js → page-071c0cece99e2a14.js} +1 -1
  694. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-9ec9a9251e22a7c8.js → page-e638376663f056c2.js} +1 -1
  695. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-4f50d3385b23743f.js → page-a82cb7be5341c406.js} +1 -1
  696. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-e84b8de5542a9dc9.js → page-07d2009205f82daf.js} +1 -1
  697. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-f7223ed3275a94a5.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-6a0eb15b8664e682.js → page-c2a93a81da890302.js} +1 -1
  699. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-7833d8a884ba922a.js → page-598b62c6e8742bbc.js} +1 -1
  700. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-ff17dc8ecbe63ec9.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-5e0f32afe647c545.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-528e2bc2a1bb20da.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/_global-error/page-2b9ff155b9d0f304.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-2b9ff155b9d0f304.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-2b9ff155b9d0f304.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-2b9ff155b9d0f304.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-2b9ff155b9d0f304.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-2b9ff155b9d0f304.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-2b9ff155b9d0f304.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-2b9ff155b9d0f304.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-2b9ff155b9d0f304.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-2b9ff155b9d0f304.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-2b9ff155b9d0f304.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-2b9ff155b9d0f304.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-2b9ff155b9d0f304.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-2b9ff155b9d0f304.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-2b9ff155b9d0f304.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-2b9ff155b9d0f304.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-profiles/route-2b9ff155b9d0f304.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-2b9ff155b9d0f304.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-2b9ff155b9d0f304.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-2b9ff155b9d0f304.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-2b9ff155b9d0f304.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-2b9ff155b9d0f304.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-2b9ff155b9d0f304.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-2b9ff155b9d0f304.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-2b9ff155b9d0f304.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-2b9ff155b9d0f304.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-2b9ff155b9d0f304.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-2b9ff155b9d0f304.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-2b9ff155b9d0f304.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-2b9ff155b9d0f304.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-2b9ff155b9d0f304.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-2b9ff155b9d0f304.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-2b9ff155b9d0f304.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-2b9ff155b9d0f304.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-2b9ff155b9d0f304.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/combos/route-2b9ff155b9d0f304.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-2b9ff155b9d0f304.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-2b9ff155b9d0f304.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-2b9ff155b9d0f304.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-2b9ff155b9d0f304.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-2b9ff155b9d0f304.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-2b9ff155b9d0f304.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/health/route-2b9ff155b9d0f304.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/init/route-2b9ff155b9d0f304.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-2b9ff155b9d0f304.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-2b9ff155b9d0f304.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/keys/route-2b9ff155b9d0f304.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/locale/route-2b9ff155b9d0f304.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-2b9ff155b9d0f304.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-2b9ff155b9d0f304.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-2b9ff155b9d0f304.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-2b9ff155b9d0f304.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-2b9ff155b9d0f304.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-2b9ff155b9d0f304.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-2b9ff155b9d0f304.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-2b9ff155b9d0f304.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-2b9ff155b9d0f304.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/models/caps/route-2b9ff155b9d0f304.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-2b9ff155b9d0f304.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-2b9ff155b9d0f304.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-2b9ff155b9d0f304.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/models/route-2b9ff155b9d0f304.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/models/test/route-2b9ff155b9d0f304.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-2b9ff155b9d0f304.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-2b9ff155b9d0f304.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-2b9ff155b9d0f304.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-2b9ff155b9d0f304.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-2b9ff155b9d0f304.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-2b9ff155b9d0f304.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-2b9ff155b9d0f304.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-2b9ff155b9d0f304.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-2b9ff155b9d0f304.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-2b9ff155b9d0f304.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-2b9ff155b9d0f304.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-2b9ff155b9d0f304.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-2b9ff155b9d0f304.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-2b9ff155b9d0f304.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-2b9ff155b9d0f304.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-2b9ff155b9d0f304.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-2b9ff155b9d0f304.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder/checkin/route-2b9ff155b9d0f304.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder-cn/checkin/route-2b9ff155b9d0f304.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-2b9ff155b9d0f304.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-2b9ff155b9d0f304.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-2b9ff155b9d0f304.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-2b9ff155b9d0f304.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-kill/route-2b9ff155b9d0f304.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-status/route-2b9ff155b9d0f304.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-2b9ff155b9d0f304.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-2b9ff155b9d0f304.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/pricing/route-2b9ff155b9d0f304.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-2b9ff155b9d0f304.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-2b9ff155b9d0f304.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-2b9ff155b9d0f304.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-2b9ff155b9d0f304.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-2b9ff155b9d0f304.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-2b9ff155b9d0f304.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-2b9ff155b9d0f304.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-2b9ff155b9d0f304.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-2b9ff155b9d0f304.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/providers/route-2b9ff155b9d0f304.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-2b9ff155b9d0f304.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-2b9ff155b9d0f304.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-2b9ff155b9d0f304.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-2b9ff155b9d0f304.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-2b9ff155b9d0f304.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-2b9ff155b9d0f304.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-2b9ff155b9d0f304.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-2b9ff155b9d0f304.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-2b9ff155b9d0f304.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-2b9ff155b9d0f304.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-2b9ff155b9d0f304.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-2b9ff155b9d0f304.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-2b9ff155b9d0f304.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-2b9ff155b9d0f304.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-2b9ff155b9d0f304.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-2b9ff155b9d0f304.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-2b9ff155b9d0f304.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/security/status/route-2b9ff155b9d0f304.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-2b9ff155b9d0f304.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-2b9ff155b9d0f304.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-2b9ff155b9d0f304.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-2b9ff155b9d0f304.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/settings/route-2b9ff155b9d0f304.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-2b9ff155b9d0f304.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/tags/route-2b9ff155b9d0f304.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-2b9ff155b9d0f304.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-2b9ff155b9d0f304.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-2b9ff155b9d0f304.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-2b9ff155b9d0f304.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-2b9ff155b9d0f304.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-2b9ff155b9d0f304.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-2b9ff155b9d0f304.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-2b9ff155b9d0f304.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-2b9ff155b9d0f304.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-2b9ff155b9d0f304.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-2b9ff155b9d0f304.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-2b9ff155b9d0f304.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-2b9ff155b9d0f304.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-2b9ff155b9d0f304.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-2b9ff155b9d0f304.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-2b9ff155b9d0f304.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-2b9ff155b9d0f304.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-2b9ff155b9d0f304.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-2b9ff155b9d0f304.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-2b9ff155b9d0f304.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-2b9ff155b9d0f304.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/usage/quotas/route-2b9ff155b9d0f304.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-2b9ff155b9d0f304.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-2b9ff155b9d0f304.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-2b9ff155b9d0f304.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-2b9ff155b9d0f304.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-2b9ff155b9d0f304.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-2b9ff155b9d0f304.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-2b9ff155b9d0f304.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-2b9ff155b9d0f304.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-2b9ff155b9d0f304.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-2b9ff155b9d0f304.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-2b9ff155b9d0f304.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-2b9ff155b9d0f304.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-2b9ff155b9d0f304.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-2b9ff155b9d0f304.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-2b9ff155b9d0f304.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-2b9ff155b9d0f304.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-2b9ff155b9d0f304.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-2b9ff155b9d0f304.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/v1/route-2b9ff155b9d0f304.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-2b9ff155b9d0f304.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-2b9ff155b9d0f304.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-2b9ff155b9d0f304.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-2b9ff155b9d0f304.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-2b9ff155b9d0f304.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-2b9ff155b9d0f304.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-2b9ff155b9d0f304.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-2b9ff155b9d0f304.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-2b9ff155b9d0f304.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/version/route-2b9ff155b9d0f304.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-2b9ff155b9d0f304.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/version/update/route-2b9ff155b9d0f304.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/landing/page-38924391f8649361.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/login/{page-38ed66b1e6930f46.js → page-0c4e2808c937c740.js} +1 -1
  884. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-2b9ff155b9d0f304.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/page-2b9ff155b9d0f304.js +1 -0
  886. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-2b9ff155b9d0f304.js +1 -0
  887. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-2b9ff155b9d0f304.js +1 -0
  888. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-2b9ff155b9d0f304.js +1 -0
  889. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-2b9ff155b9d0f304.js +1 -0
  890. package/app/.next-cli-build/static/chunks/webpack-34fe8baab4ced03b.js +1 -0
  891. package/app/.next-cli-build/static/css/bdf1d87cd5f4db94.css +1 -0
  892. package/app/.next-cli-build/static/wj14lzSQILIu20--ipzW4/_buildManifest.js +1 -0
  893. package/app/custom-server.js +177 -177
  894. package/app/package.json +71 -69
  895. package/app/public/i18n/changelog/en.md +337 -308
  896. package/app/public/i18n/changelog/zh-CN.md +335 -306
  897. package/app/public/i18n/changelog/zh-TW.md +337 -308
  898. package/app/public/i18n/literals/zh-CN.json +1960 -1879
  899. package/app/public/i18n/literals/zh-TW.json +802 -720
  900. package/app/public/providers/drex.png +0 -0
  901. package/app/public/providers/fish-audio.png +0 -0
  902. package/app/public/providers/keenable.png +0 -0
  903. package/app/public/providers/ollama-search.png +0 -0
  904. package/app/public/providers/tinyfish.png +0 -0
  905. package/app/public/providers/xquik.png +0 -0
  906. package/app/public/providers/zcode-free.png +0 -0
  907. package/app/src/lib/consoleArchiveStandalone.mjs +73 -73
  908. package/app/src/lib/oauth/providers/xiaomi-mimo.js +169 -169
  909. package/app/src/sse/services/qoderCheckin.js +437 -437
  910. package/package.json +61 -61
  911. package/src/cli/doctor.js +525 -525
  912. package/src/cli/i18n/locales/en/utils.json +4 -0
  913. package/src/cli/i18n/locales/zh-CN/utils.json +4 -0
  914. package/src/cli/i18n/locales/zh-TW/utils.json +4 -0
  915. package/src/cli/staleServer.js +216 -216
  916. package/src/cli/utils/modelSelector.js +76 -10
  917. package/app/.next-cli-build/server/chunks/112.js +0 -1
  918. package/app/.next-cli-build/server/chunks/1330.js +0 -1
  919. package/app/.next-cli-build/server/chunks/2182.js +0 -9
  920. package/app/.next-cli-build/server/chunks/271.js +0 -1
  921. package/app/.next-cli-build/server/chunks/3651.js +0 -92
  922. package/app/.next-cli-build/server/chunks/869.js +0 -1
  923. package/app/.next-cli-build/server/chunks/877.js +0 -65
  924. package/app/.next-cli-build/server/chunks/9539.js +0 -9
  925. package/app/.next-cli-build/static/Qmgbf1CsCnKFbpB4QvL8M/_buildManifest.js +0 -1
  926. package/app/.next-cli-build/static/chunks/1243-d0e0b9458266e912.js +0 -3
  927. package/app/.next-cli-build/static/chunks/1321-502b5305b875636f.js +0 -1
  928. package/app/.next-cli-build/static/chunks/1728-9783950fd2b6ad81.js +0 -65
  929. package/app/.next-cli-build/static/chunks/5497-10ab12f860a6a157.js +0 -7
  930. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-d9b185c845eb0735.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-baf9fb2b236ff509.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-fa4ba47a6bf0da15.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-c748c385fd4207db.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-12cb89849a36b78d.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-6abbed908eb3721a.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-93f4c31ccd56a895.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-d3edcb35175434d5.js +0 -14
  938. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-f62700ce9aa54572.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-b2a5c4828ff3f6e0.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-bf55da31ba675aa9.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-434f2e27f8b21ae1.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/_global-error/page-72924bfdaa66606d.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-72924bfdaa66606d.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-72924bfdaa66606d.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-72924bfdaa66606d.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-72924bfdaa66606d.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-72924bfdaa66606d.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-72924bfdaa66606d.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-72924bfdaa66606d.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-72924bfdaa66606d.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-72924bfdaa66606d.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-72924bfdaa66606d.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-72924bfdaa66606d.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-72924bfdaa66606d.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-72924bfdaa66606d.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-72924bfdaa66606d.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-72924bfdaa66606d.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-72924bfdaa66606d.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-72924bfdaa66606d.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-72924bfdaa66606d.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-72924bfdaa66606d.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-72924bfdaa66606d.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-72924bfdaa66606d.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-72924bfdaa66606d.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-72924bfdaa66606d.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-72924bfdaa66606d.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-72924bfdaa66606d.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-72924bfdaa66606d.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-72924bfdaa66606d.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-72924bfdaa66606d.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-72924bfdaa66606d.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-72924bfdaa66606d.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-72924bfdaa66606d.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-72924bfdaa66606d.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/combos/route-72924bfdaa66606d.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-72924bfdaa66606d.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-72924bfdaa66606d.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-72924bfdaa66606d.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-72924bfdaa66606d.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-72924bfdaa66606d.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-72924bfdaa66606d.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/health/route-72924bfdaa66606d.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/init/route-72924bfdaa66606d.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-72924bfdaa66606d.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-72924bfdaa66606d.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/keys/route-72924bfdaa66606d.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/locale/route-72924bfdaa66606d.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-72924bfdaa66606d.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-72924bfdaa66606d.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-72924bfdaa66606d.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-72924bfdaa66606d.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-72924bfdaa66606d.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-72924bfdaa66606d.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-72924bfdaa66606d.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-72924bfdaa66606d.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-72924bfdaa66606d.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/models/caps/route-72924bfdaa66606d.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-72924bfdaa66606d.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-72924bfdaa66606d.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-72924bfdaa66606d.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/models/route-72924bfdaa66606d.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/models/test/route-72924bfdaa66606d.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-72924bfdaa66606d.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-72924bfdaa66606d.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-72924bfdaa66606d.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-72924bfdaa66606d.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-72924bfdaa66606d.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-72924bfdaa66606d.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-72924bfdaa66606d.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-72924bfdaa66606d.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-72924bfdaa66606d.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-72924bfdaa66606d.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-72924bfdaa66606d.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-72924bfdaa66606d.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-72924bfdaa66606d.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-72924bfdaa66606d.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-72924bfdaa66606d.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-72924bfdaa66606d.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-72924bfdaa66606d.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder/checkin/route-72924bfdaa66606d.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder-cn/checkin/route-72924bfdaa66606d.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-72924bfdaa66606d.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-72924bfdaa66606d.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-72924bfdaa66606d.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-72924bfdaa66606d.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/pricing/route-72924bfdaa66606d.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-72924bfdaa66606d.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-72924bfdaa66606d.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-72924bfdaa66606d.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-72924bfdaa66606d.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-72924bfdaa66606d.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-72924bfdaa66606d.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-72924bfdaa66606d.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-72924bfdaa66606d.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-72924bfdaa66606d.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/providers/route-72924bfdaa66606d.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-72924bfdaa66606d.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-72924bfdaa66606d.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-72924bfdaa66606d.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-72924bfdaa66606d.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-72924bfdaa66606d.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-72924bfdaa66606d.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-72924bfdaa66606d.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-72924bfdaa66606d.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-72924bfdaa66606d.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-72924bfdaa66606d.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-72924bfdaa66606d.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-72924bfdaa66606d.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-72924bfdaa66606d.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-72924bfdaa66606d.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-72924bfdaa66606d.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-72924bfdaa66606d.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-72924bfdaa66606d.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/security/status/route-72924bfdaa66606d.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-72924bfdaa66606d.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-72924bfdaa66606d.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-72924bfdaa66606d.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-72924bfdaa66606d.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/settings/route-72924bfdaa66606d.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-72924bfdaa66606d.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/tags/route-72924bfdaa66606d.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-72924bfdaa66606d.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-72924bfdaa66606d.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-72924bfdaa66606d.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-72924bfdaa66606d.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-72924bfdaa66606d.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-72924bfdaa66606d.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-72924bfdaa66606d.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-72924bfdaa66606d.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-72924bfdaa66606d.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-72924bfdaa66606d.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-72924bfdaa66606d.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-72924bfdaa66606d.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-72924bfdaa66606d.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-72924bfdaa66606d.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-72924bfdaa66606d.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-72924bfdaa66606d.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-72924bfdaa66606d.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-72924bfdaa66606d.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-72924bfdaa66606d.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-72924bfdaa66606d.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/usage/quotas/route-72924bfdaa66606d.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-72924bfdaa66606d.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-72924bfdaa66606d.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-72924bfdaa66606d.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-72924bfdaa66606d.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-72924bfdaa66606d.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-72924bfdaa66606d.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-72924bfdaa66606d.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-72924bfdaa66606d.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-72924bfdaa66606d.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-72924bfdaa66606d.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-72924bfdaa66606d.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-72924bfdaa66606d.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-72924bfdaa66606d.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-72924bfdaa66606d.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-72924bfdaa66606d.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-72924bfdaa66606d.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-72924bfdaa66606d.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-72924bfdaa66606d.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/v1/route-72924bfdaa66606d.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-72924bfdaa66606d.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-72924bfdaa66606d.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-72924bfdaa66606d.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-72924bfdaa66606d.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-72924bfdaa66606d.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-72924bfdaa66606d.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-72924bfdaa66606d.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-72924bfdaa66606d.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/version/route-72924bfdaa66606d.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-72924bfdaa66606d.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/version/update/route-72924bfdaa66606d.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/landing/page-acb1434862d18ac7.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-72924bfdaa66606d.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/page-72924bfdaa66606d.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-72924bfdaa66606d.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-72924bfdaa66606d.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-72924bfdaa66606d.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-72924bfdaa66606d.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/webpack-b43a2a1c513882e9.js +0 -1
  1121. package/app/.next-cli-build/static/css/ab87cc8491e8d0fb.css +0 -1
  1122. /package/app/.next-cli-build/static/{Qmgbf1CsCnKFbpB4QvL8M → wj14lzSQILIu20--ipzW4}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
1
  (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6812],{17871:(e,t,l)=>{Promise.resolve().then(l.bind(l,57076))},57076:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>n});var r=l(95155),s=l(12115),o=l(35497),a=l(65921);function i(e={}){return{name:e.name||"",proxyUrl:e.proxyUrl||"",noProxy:e.noProxy||"",isActive:!1!==e.isActive,strictProxy:!0===e.strictProxy}}function n(){let[e,t]=(0,s.useState)([]),[l,n]=(0,s.useState)(!0),[d,c]=(0,s.useState)(!1),[x,p]=(0,s.useState)(!1),[m,h]=(0,s.useState)(!1),[u,y]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[j,b]=(0,s.useState)(!1),[v,k]=(0,s.useState)(null),[N,w]=(0,s.useState)(i()),[C,P]=(0,s.useState)(""),[$,D]=(0,s.useState)({vercelToken:"",projectName:"vercel-relay"}),[S,T]=(0,s.useState)({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),[A,E]=(0,s.useState)({denoToken:"",orgDomain:"",projectName:""}),[I,U]=(0,s.useState)(!1),[O,z]=(0,s.useState)(!1),[F,W]=(0,s.useState)(!1),[R,_]=(0,s.useState)(null),[L,q]=(0,s.useState)([]),[V,J]=(0,s.useState)(!1),[B,G]=(0,s.useState)({current:0,total:0}),[M,H]=(0,s.useState)(!1),[Y,Q]=(0,s.useState)(null),K=(0,s.useRef)(null),Z=(0,a.i)();(0,s.useEffect)(()=>{let e=e=>{K.current&&!K.current.contains(e.target)&&b(!1)};return j&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[j]);let X=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/proxy-pools?includeUsage=true",{cache:"no-store"}),l=await e.json();e.ok&&t(l.proxyPools||[])}catch(e){console.log("Error fetching proxy pools:",e)}finally{n(!1)}},[]);(0,s.useEffect)(()=>{X()},[X]);let ee=()=>{k(null),w(i())},et=()=>{ee(),c(!0)},el=()=>{c(!1),ee()},er=async()=>{let e={name:N.name.trim(),proxyUrl:N.proxyUrl.trim(),noProxy:N.noProxy.trim(),isActive:!0===N.isActive,strictProxy:!0===N.strictProxy};if(e.name&&e.proxyUrl){U(!0);try{let t=!!v,l=await fetch(t?`/api/proxy-pools/${v.id}`:"/api/proxy-pools",{method:t?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(l.ok)await X(),el(),Z.success(v?"Proxy pool updated":"Proxy pool created");else{let e=await l.json();Z.error(e.error||"Failed to save proxy pool")}}catch(e){console.log("Error saving proxy pool:",e)}finally{U(!1)}}},es=async e=>{Q({title:"Delete Proxy Pool",message:`Delete proxy pool "${e.name}"?`,onConfirm:async()=>{Q(null);try{let l=await fetch(`/api/proxy-pools/${e.id}`,{method:"DELETE"});if(l.ok){t(t=>t.filter(t=>t.id!==e.id)),Z.success("Proxy pool deleted");return}let r=await l.json();409===l.status?Z.warning(`Cannot delete: ${r.boundConnectionCount||0} connection(s) are still using this pool.`):Z.error(r.error||"Failed to delete proxy pool")}catch(e){console.log("Error deleting proxy pool:",e),Z.error("Failed to delete proxy pool")}}})},eo=async e=>{_(e);try{let t=await fetch(`/api/proxy-pools/${e}/test`,{method:"POST"}),l=await t.json();if(!t.ok)return void Z.error(l.error||"Failed to test proxy");await X(),Z.success(l.ok?"Proxy test passed":"Proxy test failed")}catch(e){console.log("Error testing proxy pool:",e),Z.error("Failed to test proxy")}finally{_(null)}},ea=async e=>{let l=!e.isActive;t(t=>t.map(t=>t.id===e.id?{...t,isActive:l}:t));try{(await fetch(`/api/proxy-pools/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:l})})).ok||(t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t)),Z.error("Failed to update active state"))}catch(l){console.log("Error toggling active:",l),t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t))}},ei=e.length>0&&L.length===e.length,en=()=>q([]),ed=async t=>{let l=L.length>0?L:e.map(e=>e.id);if(0!==l.length){H(!0);try{let e=0,r=0;for(let s of l)try{(await fetch(`/api/proxy-pools/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok?e+=1:r+=1}catch{r+=1}await X(),Z.success(`${t?"Activated":"Deactivated"} ${e}${r?`, failed ${r}`:""}`)}finally{H(!1)}}},ec=async()=>{0!==L.length&&Q({title:"Delete Proxy Pools",message:`Delete ${L.length} proxy pool(s)?`,onConfirm:async()=>{Q(null),H(!0);try{let e=0,t=0,l=0;for(let r of L)try{let s=await fetch(`/api/proxy-pools/${r}`,{method:"DELETE"});s.ok?e+=1:409===s.status?t+=1:l+=1}catch{l+=1}await X(),en(),Z.success(`Deleted ${e}${t?`, ${t} bound`:""}${l?`, ${l} failed`:""}`)}finally{H(!1)}}})},ex=async()=>{let t=L.length>0?e.filter(e=>L.includes(e.id)):e;if(0===t.length)return;J(!0),G({current:0,total:t.length});let l=0,r=[],s=0,o=[...t],a=async()=>{for(;o.length>0;){let e=o.shift();if(!e)break;try{let t=await fetch(`/api/proxy-pools/${e.id}/test`,{method:"POST"}),s=await t.json();t.ok&&s.ok?l+=1:r.push(e.id)}catch{r.push(e.id)}finally{G({current:s+=1,total:t.length})}}};await Promise.all(Array.from({length:Math.min(10,t.length)},a)),await X(),J(!1),G({current:0,total:0}),r.length>0?Q({title:"Disable Dead Proxies",message:`Alive: ${l}, Dead: ${r.length}.
2
2
 
3
3
  Disable ${r.length} dead proxies?`,onConfirm:async()=>{Q(null),H(!0);try{for(let e of r)try{await fetch(`/api/proxy-pools/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:!1})})}catch{}await X(),Z.success(`Disabled ${r.length} dead proxies`)}finally{H(!1)}}}):Z.success(`Health check done. Alive: ${l}, Dead: ${r.length}`)};(0,s.useEffect)(()=>{q(t=>t.filter(t=>e.some(e=>e.id===t)))},[e]);let ep=()=>{O||p(!1)},em=()=>{F||h(!1)},eh=()=>{F||y(!1)},eu=()=>{F||g(!1)},ey=async()=>{if($.vercelToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/vercel-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)}),t=await e.json();e.ok?(await X(),em(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Vercel relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},ef=async()=>{if(S.accountId.trim()&&S.apiToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/cloudflare-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)}),t=await e.json();e.ok?(await X(),eh(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Cloudflare relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},eg=async()=>{if(A.denoToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/deno-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)}),t=await e.json();e.ok?(await X(),eu(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Deno relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},ej=async()=>{let t=C.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===t.length)return void Z.warning("Please paste at least one proxy line.");let l=[],r=[];if(t.forEach((e,t)=>{try{let r=(e=>{let t=e.trim();if(!t)return null;if(t.includes("://")){let e=new URL(t),l=e.port?`${e.hostname}:${e.port}`:e.hostname;return{proxyUrl:e.toString(),name:`Imported ${l}`}}let l=t.split(":");if(4===l.length){let[e,t,r,s]=l;if(!e||!t||!r||!s)throw Error("Invalid host:port:user:pass format");return{proxyUrl:new URL(`http://${encodeURIComponent(r)}:${encodeURIComponent(s)}@${e}:${t}`).toString(),name:`Imported ${e}:${t}`}}throw Error("Unsupported format")})(e);r&&l.push({...r,lineNumber:t+1})}catch(e){r.push(`Line ${t+1}: ${e.message}`)}}),r.length>0)return void Z.error(`Invalid proxy format:
4
- ${r.join("\n")}`);z(!0);try{let t=new Set(e.map(e=>`${(e.proxyUrl||"").trim()}|||${(e.noProxy||"").trim()}`)),r=0,s=0,o=0;for(let e of l){let l=`${e.proxyUrl}|||`;if(t.has(l)){s+=1;continue}(await fetch("/api/proxy-pools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,proxyUrl:e.proxyUrl,noProxy:"",isActive:!0})})).ok?(r+=1,t.add(l)):o+=1}await X(),p(!1),Z.success(`Batch import completed: Created ${r}, Skipped ${s}, Failed ${o}`)}catch(e){console.log("Error batch importing proxies:",e),Z.error("Batch import failed")}finally{z(!1)}},eb=(0,s.useMemo)(()=>e.filter(e=>!0===e.isActive).length,[e]);return l?(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,r.jsx)(o.Qv,{}),(0,r.jsx)(o.Qv,{})]}):(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)("h1",{className:"text-xl font-semibold sm:text-2xl",children:"Proxy Pools"})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,r.jsxs)("div",{className:"relative",ref:K,children:[(0,r.jsxs)(o.$n,{size:"sm",variant:"secondary",icon:"rocket_launch",onClick:()=>b(!j),children:["Deploy Relay",(0,r.jsx)("span",{className:"material-symbols-outlined ml-1 text-[18px]",children:j?"expand_less":"expand_more"})]}),j&&(0,r.jsxs)("div",{className:"absolute left-0 top-full z-50 mt-1 w-48 rounded-xl border border-black/10 bg-white p-1 shadow-xl dark:border-white/10 dark:bg-zinc-900 sm:left-auto sm:right-0",children:[(0,r.jsxs)("button",{onClick:()=>{T({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),y(!0),b(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-orange-500",children:"cloud"}),"Cloudflare Relay"]}),(0,r.jsxs)("button",{onClick:()=>{D({vercelToken:"",projectName:"vercel-relay"}),h(!0),b(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-blue-500",children:"cloud_upload"}),"Vercel Relay"]}),(0,r.jsxs)("button",{onClick:()=>{E({denoToken:"",orgDomain:"",projectName:""}),g(!0),b(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-green-500",children:"terminal"}),"Deno Relay"]})]})]}),(0,r.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>{P(""),p(!0)},children:"Batch Import"}),(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:et,children:"Add Proxy Pool"})]})]}),(0,r.jsxs)(o.Zp,{children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.length>0&&(0,r.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer",children:[(0,r.jsx)("input",{type:"checkbox",checked:ei,onChange:()=>q(ei?[]:e.map(e=>e.id)),className:"size-4 rounded border-black/20 dark:border-white/20"}),ei?"Unselect all":"Select all"]}),(0,r.jsxs)(o.Ex,{variant:"default",children:["Total: ",e.length]}),(0,r.jsxs)(o.Ex,{variant:"success",children:["Active: ",eb]})]}),(L.length>0||V)&&(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-primary/30 bg-primary/5 px-3 py-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"checklist"}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:L.length>0?`${L.length} selected`:"All pools"}),(0,r.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,r.jsx)(o.$n,{size:"sm",icon:V?"progress_activity":"health_and_safety",onClick:ex,disabled:V||M||0===e.length,children:V?`Checking ${B.current}/${B.total}`:"Health Check"}),L.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_on",onClick:()=>ed(!0),disabled:M||V,children:"Activate"}),(0,r.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_off",onClick:()=>ed(!1),disabled:M||V,children:"Deactivate"}),(0,r.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:ec,disabled:M||V,children:"Delete"}),(0,r.jsx)(o.$n,{size:"sm",variant:"ghost",onClick:en,disabled:M||V,children:"Clear"})]})]})]}),0===e.length?(0,r.jsxs)("div",{className:"text-center py-10",children:[(0,r.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No proxy pool entries yet"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create a proxy pool entry, then assign it to connections."}),(0,r.jsx)(o.$n,{icon:"add",onClick:et,children:"Add Proxy Pool"})]}):(0,r.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.04] dark:divide-white/[0.05]",children:e.map(e=>{var t;return(0,r.jsxs)("div",{className:"flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[(0,r.jsx)("input",{type:"checkbox",checked:L.includes(e.id),onChange:()=>{let t;return t=e.id,q(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"mt-1 size-4 shrink-0 rounded border-black/20 dark:border-white/20"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)("p",{className:"min-w-0 max-w-full truncate text-sm font-medium sm:max-w-[18rem]",children:e.name}),(0,r.jsx)(o.Ex,{variant:"active"===(t=e.testStatus)?"success":"error"===t?"error":"default",size:"sm",dot:!0,children:e.testStatus||"unknown"}),(0,r.jsx)(o.Ex,{variant:e.isActive?"success":"default",size:"sm",children:e.isActive?"active":"inactive"}),"vercel"===e.type&&(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"vercel relay"}),"cloudflare"===e.type&&(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"cloudflare relay"}),(0,r.jsxs)(o.Ex,{variant:"default",size:"sm",children:[e.boundConnectionCount||0," bound"]})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted truncate mt-1",children:e.proxyUrl}),e.noProxy?(0,r.jsxs)("p",{className:"text-xs text-text-muted truncate",children:["No proxy: ",e.noProxy]}):null,(0,r.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["Last tested: ",function(e){if(!e)return"Never";let t=new Date(e);return Number.isNaN(t.getTime())?"Never":t.toLocaleString()}(e.lastTestedAt),e.lastError?` \xb7 ${e.lastError}`:""]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,r.jsx)(o.lM,{size:"sm",checked:!0===e.isActive,onChange:()=>ea(e),title:e.isActive?"Disable":"Enable"}),(0,r.jsx)("button",{onClick:()=>eo(e.id),className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Test proxy",disabled:R===e.id,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:R===e.id?{animation:"spin 1s linear infinite"}:void 0,children:R===e.id?"progress_activity":"science"})}),(0,r.jsx)("button",{onClick:()=>{k(e),w(i(e)),c(!0)},className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Edit",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,r.jsx)("button",{onClick:()=>es(e),className:"p-2 rounded hover:bg-red-500/10 text-red-500",title:"Delete",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,r.jsx)(o.aF,{isOpen:x,title:"Batch Import Proxies",onClose:ep,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-sm font-medium text-text-main mb-1 block",children:"Paste Proxy List (One per line)"}),(0,r.jsx)("textarea",{value:C,onChange:e=>P(e.target.value),placeholder:"http://user:pass@127.0.0.1:7897\n127.0.0.1:7897:user:pass",className:"w-full min-h-[180px] py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Supported formats: protocol://user:pass@host:port, host:port:user:pass"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:ej,disabled:!C.trim()||O,children:O?"Importing...":"Import"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:ep,disabled:O,children:"Cancel"})]})]})}),(0,r.jsx)(o.aF,{isOpen:m,title:"Deploy Vercel Relay",onClose:em,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-blue-500/5 border border-blue-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Vercel Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys an edge relay function to Vercel. All AI provider requests will be forwarded through Vercel's edge network, masking your real IP from providers."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Your IP is replaced by Vercel's dynamic edge IPs (hundreds of IPs across 20+ global regions)"}),(0,r.jsx)("li",{children:"Vercel serves millions of apps — providers can't block Vercel IPs without affecting legitimate traffic"}),(0,r.jsx)("li",{children:"Free tier: 100GB bandwidth/month, 500K edge invocations"}),(0,r.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]})]}),(0,r.jsx)(o.pd,{label:"Vercel API Token",value:$.vercelToken,onChange:e=>D(t=>({...t,vercelToken:e.target.value})),placeholder:"your-vercel-api-token",hint:(0,r.jsxs)(r.Fragment,{children:["Token is used once for deployment and not stored. ",(0,r.jsx)("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,r.jsx)(o.pd,{label:"Project Name",value:$.projectName,onChange:e=>D(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Vercel project. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:ey,disabled:!$.vercelToken.trim()||F,children:F?"Deploying... (may take ~1 min)":"Deploy"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:em,disabled:F,children:"Cancel"})]})]})}),(0,r.jsx)(o.aF,{isOpen:u,title:"Deploy Cloudflare Relay",onClose:eh,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-orange-500/5 border border-orange-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Cloudflare Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a Cloudflare Worker as a proxy relay. All AI provider requests will be forwarded through Cloudflare's global edge network."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"High performance global routing and IP masking via Cloudflare Workers"}),(0,r.jsx)("li",{children:"Free tier: 100,000 requests per day"}),(0,r.jsx)("li",{children:"Requires Cloudflare Account ID and a Workers API Token (Edit Workers permission)"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-orange-500/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate your API Token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"My Profile"})," → ",(0,r.jsx)("b",{children:"API Tokens"})," → ",(0,r.jsx)("b",{children:"Create Token"})]}),(0,r.jsxs)("li",{children:["Scroll down to ",(0,r.jsx)("b",{children:"Custom Token"})," and click ",(0,r.jsx)("b",{children:"Get started"})]}),(0,r.jsxs)("li",{children:["Under ",(0,r.jsx)("b",{children:"Permissions"}),": Account | Workers Scripts | Edit"]}),(0,r.jsxs)("li",{children:["Under ",(0,r.jsx)("b",{children:"Account Resources"}),": Include | Account | ",(0,r.jsx)("i",{children:"Your Account Name"})]}),(0,r.jsxs)("li",{children:["Click ",(0,r.jsx)("b",{children:"Continue to summary"})," → ",(0,r.jsx)("b",{children:"Create Token"})]})]})]})]}),(0,r.jsx)(o.pd,{label:"Account ID",value:S.accountId,onChange:e=>T(t=>({...t,accountId:e.target.value})),placeholder:"your-cloudflare-account-id",hint:(0,r.jsx)(r.Fragment,{children:"Found on the right side of the Cloudflare dashboard overview page."})}),(0,r.jsx)(o.pd,{label:"API Token",value:S.apiToken,onChange:e=>T(t=>({...t,apiToken:e.target.value})),placeholder:"your-cloudflare-api-token",hint:(0,r.jsxs)(r.Fragment,{children:['Requires "Workers Scripts: Edit" permission. ',(0,r.jsx)("a",{href:"https://dash.cloudflare.com/profile/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,r.jsx)(o.pd,{label:"Worker Name",value:S.projectName,onChange:e=>T(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Cloudflare Worker. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:ef,disabled:!S.accountId.trim()||!S.apiToken.trim()||F,children:F?"Deploying...":"Deploy Worker"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eh,disabled:F,children:"Cancel"})]})]})}),(0,r.jsx)(o.aF,{isOpen:f,title:"Deploy Deno Relay",onClose:eu,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 border border-black/10 dark:border-white/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Deno Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a relay worker to Deno Deploy's global edge network. All AI provider requests are forwarded through Deno's edge, masking your real IP."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Deno Deploy v2 runs on a high-performance global edge network"}),(0,r.jsx)("li",{children:"Free tier: 1M requests & 100GiB outbound traffic per month"}),(0,r.jsx)("li",{children:"No per-request CPU time limits (unlike Vercel/Cloudflare)"}),(0,r.jsx)("li",{children:"Support up to 20 active apps & 50 custom domains"}),(0,r.jsx)("li",{children:"Deploy multiple relays for maximum IP diversity"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-black/10 dark:border-white/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"console.deno.com"})]}),(0,r.jsxs)("li",{children:["Select your ",(0,r.jsx)("b",{children:"Organization"})," → ",(0,r.jsx)("b",{children:"Settings"})," → ",(0,r.jsx)("b",{children:"Organization Tokens"})]}),(0,r.jsxs)("li",{children:["Create a ",(0,r.jsx)("b",{children:"Organization Token"})," (prefix ",(0,r.jsx)("b",{children:"ddo_"}),")"]})]})]})]}),(0,r.jsx)(o.pd,{label:"Deno Deploy API Token",value:A.denoToken,onChange:e=>E(t=>({...t,denoToken:e.target.value})),placeholder:"ddo_xxxxxxxxxxxxxxxx",hint:(0,r.jsx)(r.Fragment,{children:"Token is used once for deployment, not stored. Found in Organization Settings."}),type:"password"}),(0,r.jsx)(o.pd,{label:"Organization Domain",value:A.orgDomain,onChange:e=>E(t=>({...t,orgDomain:e.target.value})),placeholder:"your-org.deno.net",hint:"Organization's default domain. Your relay URL will be in the format: https://my-relay.your-org.deno.net"}),(0,r.jsx)(o.pd,{label:"App Name",value:A.projectName,onChange:e=>E(t=>({...t,projectName:e.target.value})),placeholder:"deno-relay",hint:"Unique app name. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:eg,disabled:!A.denoToken.trim()||!A.orgDomain.trim()||F,children:F?"Deploying...":"Deploy Relay"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eu,disabled:F,children:"Cancel"})]})]})}),(0,r.jsx)(o.aF,{isOpen:d,title:v?"Edit Proxy Pool":"Add Proxy Pool",onClose:el,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.pd,{label:"Name",value:N.name,onChange:e=>w(t=>({...t,name:e.target.value})),placeholder:"Office Proxy"}),(0,r.jsx)(o.pd,{label:"Proxy URL",value:N.proxyUrl,onChange:e=>w(t=>({...t,proxyUrl:e.target.value})),placeholder:"http://127.0.0.1:7897"}),(0,r.jsx)(o.pd,{label:"No Proxy",value:N.noProxy,onChange:e=>w(t=>({...t,noProxy:e.target.value})),placeholder:"localhost,127.0.0.1,.internal",hint:"Comma-separated hosts/domains to bypass proxy"}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:"Active"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Inactive pools are ignored by runtime resolution."})]}),(0,r.jsx)(o.lM,{checked:!0===N.isActive,onChange:()=>w(e=>({...e,isActive:!e.isActive})),disabled:I})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:"Strict Proxy"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Fail request if proxy is unreachable instead of falling back to direct."})]}),(0,r.jsx)(o.lM,{checked:!0===N.strictProxy,onChange:()=>w(e=>({...e,strictProxy:!e.strictProxy})),disabled:I})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:er,disabled:!N.name.trim()||!N.proxyUrl.trim()||I,children:I?"Saving...":"Save"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:el,disabled:I,children:"Cancel"})]})]})}),(0,r.jsx)(o.uo,{isOpen:!!Y,onClose:()=>Q(null),onConfirm:Y?.onConfirm,title:Y?.title||"Confirm",message:Y?.message,variant:"danger"})]})}}},e=>{e.O(0,[3170,1728,1321,5497,8441,3794,7358],()=>e(e.s=17871)),_N_E=e.O()}]);
4
+ ${r.join("\n")}`);z(!0);try{let t=new Set(e.map(e=>`${(e.proxyUrl||"").trim()}|||${(e.noProxy||"").trim()}`)),r=0,s=0,o=0;for(let e of l){let l=`${e.proxyUrl}|||`;if(t.has(l)){s+=1;continue}(await fetch("/api/proxy-pools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,proxyUrl:e.proxyUrl,noProxy:"",isActive:!0})})).ok?(r+=1,t.add(l)):o+=1}await X(),p(!1),Z.success(`Batch import completed: Created ${r}, Skipped ${s}, Failed ${o}`)}catch(e){console.log("Error batch importing proxies:",e),Z.error("Batch import failed")}finally{z(!1)}},eb=(0,s.useMemo)(()=>e.filter(e=>!0===e.isActive).length,[e]);return l?(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,r.jsx)(o.Qv,{}),(0,r.jsx)(o.Qv,{})]}):(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)("h1",{className:"text-xl font-semibold sm:text-2xl",children:"Proxy Pools"})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,r.jsxs)("div",{className:"relative",ref:K,children:[(0,r.jsxs)(o.$n,{size:"sm",variant:"secondary",icon:"rocket_launch",onClick:()=>b(!j),children:["Deploy Relay",(0,r.jsx)("span",{className:"material-symbols-outlined ml-1 text-[18px]",children:j?"expand_less":"expand_more"})]}),j&&(0,r.jsxs)("div",{className:"absolute left-0 top-full z-50 mt-1 w-48 rounded-xl border border-black/10 bg-white p-1 shadow-xl dark:border-white/10 dark:bg-zinc-900 sm:left-auto sm:right-0",children:[(0,r.jsxs)("button",{onClick:()=>{T({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),y(!0),b(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-orange-500",children:"cloud"}),"Cloudflare Relay"]}),(0,r.jsxs)("button",{onClick:()=>{D({vercelToken:"",projectName:"vercel-relay"}),h(!0),b(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-blue-500",children:"cloud_upload"}),"Vercel Relay"]}),(0,r.jsxs)("button",{onClick:()=>{E({denoToken:"",orgDomain:"",projectName:""}),g(!0),b(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-green-500",children:"terminal"}),"Deno Relay"]})]})]}),(0,r.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>{P(""),p(!0)},children:"Batch Import"}),(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:et,children:"Add Proxy Pool"})]})]}),(0,r.jsxs)(o.Zp,{children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.length>0&&(0,r.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer",children:[(0,r.jsx)("input",{type:"checkbox",checked:ei,onChange:()=>q(ei?[]:e.map(e=>e.id)),className:"size-4 rounded border-black/20 dark:border-white/20"}),ei?"Unselect all":"Select all"]}),(0,r.jsxs)(o.Ex,{variant:"default",children:["Total: ",e.length]}),(0,r.jsxs)(o.Ex,{variant:"success",children:["Active: ",eb]})]}),(L.length>0||V)&&(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-primary/30 bg-primary/5 px-3 py-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"checklist"}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:L.length>0?`${L.length} selected`:"All pools"}),(0,r.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,r.jsx)(o.$n,{size:"sm",icon:V?"progress_activity":"health_and_safety",onClick:ex,disabled:V||M||0===e.length,children:V?`Checking ${B.current}/${B.total}`:"Health Check"}),L.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_on",onClick:()=>ed(!0),disabled:M||V,children:"Activate"}),(0,r.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_off",onClick:()=>ed(!1),disabled:M||V,children:"Deactivate"}),(0,r.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:ec,disabled:M||V,children:"Delete"}),(0,r.jsx)(o.$n,{size:"sm",variant:"ghost",onClick:en,disabled:M||V,children:"Clear"})]})]})]}),0===e.length?(0,r.jsxs)("div",{className:"text-center py-10",children:[(0,r.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No proxy pool entries yet"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create a proxy pool entry, then assign it to connections."}),(0,r.jsx)(o.$n,{icon:"add",onClick:et,children:"Add Proxy Pool"})]}):(0,r.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.04] dark:divide-white/[0.05]",children:e.map(e=>{var t;return(0,r.jsxs)("div",{className:"flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[(0,r.jsx)("input",{type:"checkbox",checked:L.includes(e.id),onChange:()=>{let t;return t=e.id,q(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"mt-1 size-4 shrink-0 rounded border-black/20 dark:border-white/20"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)("p",{className:"min-w-0 max-w-full truncate text-sm font-medium sm:max-w-[18rem]",children:e.name}),(0,r.jsx)(o.Ex,{variant:"active"===(t=e.testStatus)?"success":"error"===t?"error":"default",size:"sm",dot:!0,children:e.testStatus||"unknown"}),(0,r.jsx)(o.Ex,{variant:e.isActive?"success":"default",size:"sm",children:e.isActive?"active":"inactive"}),"vercel"===e.type&&(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"vercel relay"}),"cloudflare"===e.type&&(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"cloudflare relay"}),(0,r.jsxs)(o.Ex,{variant:"default",size:"sm",children:[e.boundConnectionCount||0," bound"]})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted truncate mt-1",children:e.proxyUrl}),e.noProxy?(0,r.jsxs)("p",{className:"text-xs text-text-muted truncate",children:["No proxy: ",e.noProxy]}):null,(0,r.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["Last tested: ",function(e){if(!e)return"Never";let t=new Date(e);return Number.isNaN(t.getTime())?"Never":t.toLocaleString()}(e.lastTestedAt),e.lastError?` \xb7 ${e.lastError}`:""]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,r.jsx)(o.lM,{size:"sm",checked:!0===e.isActive,onChange:()=>ea(e),title:e.isActive?"Disable":"Enable"}),(0,r.jsx)("button",{onClick:()=>eo(e.id),className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Test proxy",disabled:R===e.id,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:R===e.id?{animation:"spin 1s linear infinite"}:void 0,children:R===e.id?"progress_activity":"science"})}),(0,r.jsx)("button",{onClick:()=>{k(e),w(i(e)),c(!0)},className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Edit",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,r.jsx)("button",{onClick:()=>es(e),className:"p-2 rounded hover:bg-red-500/10 text-red-500",title:"Delete",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,r.jsx)(o.aF,{isOpen:x,title:"Batch Import Proxies",onClose:ep,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-sm font-medium text-text-main mb-1 block",children:"Paste Proxy List (One per line)"}),(0,r.jsx)("textarea",{value:C,onChange:e=>P(e.target.value),placeholder:"http://user:pass@127.0.0.1:7897\n127.0.0.1:7897:user:pass",className:"w-full min-h-[180px] py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Supported formats: protocol://user:pass@host:port, host:port:user:pass"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:ej,disabled:!C.trim()||O,children:O?"Importing...":"Import"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:ep,disabled:O,children:"Cancel"})]})]})}),(0,r.jsx)(o.aF,{isOpen:m,title:"Deploy Vercel Relay",onClose:em,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-blue-500/5 border border-blue-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Vercel Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys an edge relay function to Vercel. All AI provider requests will be forwarded through Vercel's edge network, masking your real IP from providers."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Your IP is replaced by Vercel's dynamic edge IPs (hundreds of IPs across 20+ global regions)"}),(0,r.jsx)("li",{children:"Vercel serves millions of apps — providers can't block Vercel IPs without affecting legitimate traffic"}),(0,r.jsx)("li",{children:"Free tier: 100GB bandwidth/month, 500K edge invocations"}),(0,r.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]})]}),(0,r.jsx)(o.pd,{label:"Vercel API Token",value:$.vercelToken,onChange:e=>D(t=>({...t,vercelToken:e.target.value})),placeholder:"your-vercel-api-token",hint:(0,r.jsxs)(r.Fragment,{children:["Token is used once for deployment and not stored. ",(0,r.jsx)("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,r.jsx)(o.pd,{label:"Project Name",value:$.projectName,onChange:e=>D(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Vercel project. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:ey,disabled:!$.vercelToken.trim()||F,children:F?"Deploying... (may take ~1 min)":"Deploy"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:em,disabled:F,children:"Cancel"})]})]})}),(0,r.jsx)(o.aF,{isOpen:u,title:"Deploy Cloudflare Relay",onClose:eh,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-orange-500/5 border border-orange-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Cloudflare Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a Cloudflare Worker as a proxy relay. All AI provider requests will be forwarded through Cloudflare's global edge network."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"High performance global routing and IP masking via Cloudflare Workers"}),(0,r.jsx)("li",{children:"Free tier: 100,000 requests per day"}),(0,r.jsx)("li",{children:"Requires Cloudflare Account ID and a Workers API Token (Edit Workers permission)"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-orange-500/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate your API Token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"My Profile"})," → ",(0,r.jsx)("b",{children:"API Tokens"})," → ",(0,r.jsx)("b",{children:"Create Token"})]}),(0,r.jsxs)("li",{children:["Scroll down to ",(0,r.jsx)("b",{children:"Custom Token"})," and click ",(0,r.jsx)("b",{children:"Get started"})]}),(0,r.jsxs)("li",{children:["Under ",(0,r.jsx)("b",{children:"Permissions"}),": Account | Workers Scripts | Edit"]}),(0,r.jsxs)("li",{children:["Under ",(0,r.jsx)("b",{children:"Account Resources"}),": Include | Account | ",(0,r.jsx)("i",{children:"Your Account Name"})]}),(0,r.jsxs)("li",{children:["Click ",(0,r.jsx)("b",{children:"Continue to summary"})," → ",(0,r.jsx)("b",{children:"Create Token"})]})]})]})]}),(0,r.jsx)(o.pd,{label:"Account ID",value:S.accountId,onChange:e=>T(t=>({...t,accountId:e.target.value})),placeholder:"your-cloudflare-account-id",hint:(0,r.jsx)(r.Fragment,{children:"Found on the right side of the Cloudflare dashboard overview page."})}),(0,r.jsx)(o.pd,{label:"API Token",value:S.apiToken,onChange:e=>T(t=>({...t,apiToken:e.target.value})),placeholder:"your-cloudflare-api-token",hint:(0,r.jsxs)(r.Fragment,{children:['Requires "Workers Scripts: Edit" permission. ',(0,r.jsx)("a",{href:"https://dash.cloudflare.com/profile/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,r.jsx)(o.pd,{label:"Worker Name",value:S.projectName,onChange:e=>T(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Cloudflare Worker. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:ef,disabled:!S.accountId.trim()||!S.apiToken.trim()||F,children:F?"Deploying...":"Deploy Worker"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eh,disabled:F,children:"Cancel"})]})]})}),(0,r.jsx)(o.aF,{isOpen:f,title:"Deploy Deno Relay",onClose:eu,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 border border-black/10 dark:border-white/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Deno Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a relay worker to Deno Deploy's global edge network. All AI provider requests are forwarded through Deno's edge, masking your real IP."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Deno Deploy v2 runs on a high-performance global edge network"}),(0,r.jsx)("li",{children:"Free tier: 1M requests & 100GiB outbound traffic per month"}),(0,r.jsx)("li",{children:"No per-request CPU time limits (unlike Vercel/Cloudflare)"}),(0,r.jsx)("li",{children:"Support up to 20 active apps & 50 custom domains"}),(0,r.jsx)("li",{children:"Deploy multiple relays for maximum IP diversity"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-black/10 dark:border-white/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"console.deno.com"})]}),(0,r.jsxs)("li",{children:["Select your ",(0,r.jsx)("b",{children:"Organization"})," → ",(0,r.jsx)("b",{children:"Settings"})," → ",(0,r.jsx)("b",{children:"Organization Tokens"})]}),(0,r.jsxs)("li",{children:["Create a ",(0,r.jsx)("b",{children:"Organization Token"})," (prefix ",(0,r.jsx)("b",{children:"ddo_"}),")"]})]})]})]}),(0,r.jsx)(o.pd,{label:"Deno Deploy API Token",value:A.denoToken,onChange:e=>E(t=>({...t,denoToken:e.target.value})),placeholder:"ddo_xxxxxxxxxxxxxxxx",hint:(0,r.jsx)(r.Fragment,{children:"Token is used once for deployment, not stored. Found in Organization Settings."}),type:"password"}),(0,r.jsx)(o.pd,{label:"Organization Domain",value:A.orgDomain,onChange:e=>E(t=>({...t,orgDomain:e.target.value})),placeholder:"your-org.deno.net",hint:"Organization's default domain. Your relay URL will be in the format: https://my-relay.your-org.deno.net"}),(0,r.jsx)(o.pd,{label:"App Name",value:A.projectName,onChange:e=>E(t=>({...t,projectName:e.target.value})),placeholder:"deno-relay",hint:"Unique app name. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:eg,disabled:!A.denoToken.trim()||!A.orgDomain.trim()||F,children:F?"Deploying...":"Deploy Relay"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eu,disabled:F,children:"Cancel"})]})]})}),(0,r.jsx)(o.aF,{isOpen:d,title:v?"Edit Proxy Pool":"Add Proxy Pool",onClose:el,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.pd,{label:"Name",value:N.name,onChange:e=>w(t=>({...t,name:e.target.value})),placeholder:"Office Proxy"}),(0,r.jsx)(o.pd,{label:"Proxy URL",value:N.proxyUrl,onChange:e=>w(t=>({...t,proxyUrl:e.target.value})),placeholder:"http://127.0.0.1:7897"}),(0,r.jsx)(o.pd,{label:"No Proxy",value:N.noProxy,onChange:e=>w(t=>({...t,noProxy:e.target.value})),placeholder:"localhost,127.0.0.1,.internal",hint:"Comma-separated hosts/domains to bypass proxy"}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:"Active"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Inactive pools are ignored by runtime resolution."})]}),(0,r.jsx)(o.lM,{checked:!0===N.isActive,onChange:()=>w(e=>({...e,isActive:!e.isActive})),disabled:I})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:"Strict Proxy"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Fail request if proxy is unreachable instead of falling back to direct."})]}),(0,r.jsx)(o.lM,{checked:!0===N.strictProxy,onChange:()=>w(e=>({...e,strictProxy:!e.strictProxy})),disabled:I})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:er,disabled:!N.name.trim()||!N.proxyUrl.trim()||I,children:I?"Saving...":"Save"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:el,disabled:I,children:"Cancel"})]})]})}),(0,r.jsx)(o.uo,{isOpen:!!Y,onClose:()=>Q(null),onConfirm:Y?.onConfirm,title:Y?.title||"Confirm",message:Y?.message,variant:"danger"})]})}}},e=>{e.O(0,[3170,305,1321,5497,8441,3794,7358],()=>e(e.s=17871)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7414],{71470:(e,t,s)=>{"use strict";s.d(t,{default:()=>j});var a=s(95155),l=s(12115),r=s(21742),i=s(63346),d=s(77496),n=s(32539),o=s(59656),x=s(77621),c=s(31310),m=s(35497);let p=e=>e>=1e6?`${(e/1e6).toFixed(2)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),h=[{id:"today",label:"Today"},{id:"yesterday",label:"Yesterday"},{id:"last7d",label:"7 days"},{id:"last30d",label:"30 days"},{id:"all",label:"All time"}],u={applied:"Prompt exceeded threshold",below_threshold:"Below size threshold",not_profitable:"Compression not profitable",below_min_chars:"Below minimum chars",below_min_tokens:"Below minimum tokens",unsupported_model:"Model not in allowlist",unsupported_format:"Non-Claude request format",timeout:"Compression timed out",transform_error:"Transform error",passthrough:"Passthrough",disabled:"Disabled",not_installed:"Not installed"};function g({label:e,value:t,sub:s,tone:l}){return(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted uppercase tracking-wide",children:e}),(0,a.jsx)("p",{className:`text-xl font-semibold mt-1 ${l||""}`,children:t}),s&&(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:s})]})}function j(){let[e,t]=(0,l.useState)(null),[s,j]=(0,l.useState)(null),[b,f]=(0,l.useState)(null),[N,y]=(0,l.useState)(null),[v,w]=(0,l.useState)("last7d"),[k,S]=(0,l.useState)(!0),P=(0,l.useCallback)(async()=>{S(!0);try{let[e,s,a]=await Promise.all([fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),fetch("/api/pxpipe/stats"),fetch("/api/pxpipe/logs?limit=50")]);t(await e.json()),f(await s.json()),y(await a.json());let l=await fetch("/api/pxpipe/health",{method:"POST"});j(await l.json())}catch{}finally{S(!1)}},[]);(0,l.useEffect)(()=>{P()},[P]);let E=b?.windows?.[v],$=e?e.installed?s?.healthy?"Healthy":e.running?"Running":"Stopped":"Not installed":"—";return(0,a.jsxs)("div",{className:"space-y-6 p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",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:"image"}),"PXPIPE Dashboard"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("a",{href:"/dashboard/token-saver",className:"text-xs text-primary underline hover:opacity-80",children:"Token Saver settings"}),(0,a.jsx)(m.$n,{size:"sm",variant:"ghost",onClick:P,disabled:k,children:k?"Refreshing…":"Refresh"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:[(0,a.jsx)(g,{label:"Status",value:$,tone:s?.healthy?"text-success":e?.installed?"text-warning":"text-text-muted",sub:e?.enabled?"Enabled in pipeline":"Disabled in pipeline"}),(0,a.jsx)(g,{label:"Version",value:e?.version?`v${e.version}`:"—",sub:"pxpipe-proxy"}),(0,a.jsx)(g,{label:"Uptime",value:(e=>{if(!e||e<=0)return"—";let t=Math.floor(e/6e4),s=Math.floor(t/60);return s>0?`${s}h${String(t%60).padStart(2,"0")}m`:`${t}m`})(e?.uptimeMs),sub:"module loaded"}),(0,a.jsx)(g,{label:"Requests",value:E?E.requests.toLocaleString():"—"}),(0,a.jsx)(g,{label:"Compressed",value:E?E.compressed.toLocaleString():"—",tone:"text-success"}),(0,a.jsx)(g,{label:"Bypassed",value:E?E.bypassed.toLocaleString():"—"})]}),(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3 mb-4",children:[(0,a.jsx)("h3",{className:"font-medium",children:"Token savings (estimated)"}),(0,a.jsx)("div",{className:"flex items-center gap-1 rounded-lg border border-border bg-bg-alt p-1",children:h.map(e=>(0,a.jsx)("button",{onClick:()=>w(e.id),className:`px-3 py-1 rounded-md text-xs font-medium transition-colors ${v===e.id?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-surface-2"}`,children:e.label},e.id))})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-center",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Original tokens"}),(0,a.jsx)("p",{className:"text-lg font-semibold",children:E?p(E.tokensBeforeEst):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"After PXPIPE"}),(0,a.jsx)("p",{className:"text-lg font-semibold",children:E?p(E.tokensAfterEst):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Saved"}),(0,a.jsx)("p",{className:"text-lg font-semibold text-success",children:E?p(E.tokensSavedEst):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Reduction"}),(0,a.jsx)("p",{className:"text-lg font-semibold text-success",children:E?`${E.savedPct}%`:"—"})]})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-3",children:["Estimates from body size before/after imaging; billed usage per request (recorded on the Usage page) remains the ground truth. Images generated:"," ",E?E.imagesGenerated.toLocaleString():"—"," \xb7 avg compression time:"," ",E?`${E.avgCompressionMs}ms`:"—"," \xb7 errors: ",E?E.errors:"—"]})]}),(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsx)("h3",{className:"font-medium mb-3",children:"Tokens saved — last 30 days"}),b?.timeline?.some(e=>e.tokensSavedEst>0)?(0,a.jsx)(r.u,{width:"100%",height:220,children:(0,a.jsxs)(i.Q,{data:b.timeline,margin:{top:4,right:8,left:0,bottom:0},children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"gradPxpipe",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#10b981",stopOpacity:.25}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#10b981",stopOpacity:0})]})}),(0,a.jsx)(d.d,{strokeDasharray:"3 3",strokeOpacity:.2}),(0,a.jsx)(n.W,{dataKey:"date",tick:{fontSize:11},tickFormatter:e=>e.slice(5)}),(0,a.jsx)(o.h,{tick:{fontSize:11},tickFormatter:p,width:48}),(0,a.jsx)(x.m,{formatter:e=>[p(e),"Tokens saved"],labelFormatter:e=>e}),(0,a.jsx)(c.Gk,{type:"monotone",dataKey:"tokensSavedEst",stroke:"#10b981",fill:"url(#gradPxpipe)",strokeWidth:2})]})}):(0,a.jsx)("div",{className:"h-32 flex items-center justify-center text-text-muted text-sm",children:"No savings recorded yet — enable PXPIPE in the Token Saver and route a large Claude-format request."})]}),(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsx)("h3",{className:"font-medium mb-3",children:"History"}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border",children:[(0,a.jsx)("th",{className:"py-2 pr-3",children:"Time"}),(0,a.jsx)("th",{className:"py-2 pr-3",children:"Model"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Original"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Compressed"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Saved"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"%"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Duration"}),(0,a.jsx)("th",{className:"py-2",children:"Status"})]})}),(0,a.jsxs)("tbody",{children:[(b?.recent||[]).slice(0,50).map((e,t)=>(0,a.jsxs)("tr",{className:"border-b border-border/50",children:[(0,a.jsx)("td",{className:"py-1.5 pr-3 whitespace-nowrap text-text-muted",children:new Date(e.ts).toLocaleString()}),(0,a.jsx)("td",{className:"py-1.5 pr-3 font-mono text-xs",children:e.provider?`${e.provider}/${e.model}`:e.model||"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:e.applied?p(e.tokensBeforeEst):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:e.applied?p(e.tokensAfterEst):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs text-success",children:e.applied?p(e.tokensSavedEst):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:e.applied?`${e.savedPct}%`:"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:null!=e.durationMs?`${e.durationMs}ms`:"—"}),(0,a.jsx)("td",{className:"py-1.5",children:(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${e.applied?"bg-success/15 text-success":"transform_error"===e.reason||"timeout"===e.reason?"bg-danger/15 text-danger":"bg-warning/15 text-warning"}`,title:e.detail||"",children:e.applied?"Compressed":u[e.reason]||e.reason})})]},`${e.ts}-${t}`)),(!b?.recent||0===b.recent.length)&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:8,className:"py-6 text-center text-text-muted text-sm",children:"No PXPIPE activity yet"})})]})]})})]}),(0,a.jsxs)(m.Zp,{className:"p-4",id:"logs",children:[(0,a.jsx)("h3",{className:"font-medium mb-3",children:"PXPIPE Logs"}),N?.installLog?(0,a.jsx)("pre",{className:"rounded bg-black/5 dark:bg-white/5 p-3 text-xs font-mono overflow-x-auto max-h-64 overflow-y-auto whitespace-pre-wrap",children:N.installLog}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No install log yet."})]})]})}},93224:(e,t,s)=>{Promise.resolve().then(s.bind(s,71470))}},e=>{e.O(0,[3170,1728,1321,5497,8441,3794,7358],()=>e(e.s=93224)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7414],{71470:(e,t,s)=>{"use strict";s.d(t,{default:()=>j});var a=s(95155),l=s(12115),r=s(21742),i=s(63346),d=s(77496),n=s(32539),o=s(59656),x=s(77621),c=s(31310),m=s(35497);let p=e=>e>=1e6?`${(e/1e6).toFixed(2)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),h=[{id:"today",label:"Today"},{id:"yesterday",label:"Yesterday"},{id:"last7d",label:"7 days"},{id:"last30d",label:"30 days"},{id:"all",label:"All time"}],u={applied:"Prompt exceeded threshold",below_threshold:"Below size threshold",not_profitable:"Compression not profitable",below_min_chars:"Below minimum chars",below_min_tokens:"Below minimum tokens",unsupported_model:"Model not in allowlist",unsupported_format:"Non-Claude request format",timeout:"Compression timed out",transform_error:"Transform error",passthrough:"Passthrough",disabled:"Disabled",not_installed:"Not installed"};function g({label:e,value:t,sub:s,tone:l}){return(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted uppercase tracking-wide",children:e}),(0,a.jsx)("p",{className:`text-xl font-semibold mt-1 ${l||""}`,children:t}),s&&(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:s})]})}function j(){let[e,t]=(0,l.useState)(null),[s,j]=(0,l.useState)(null),[b,f]=(0,l.useState)(null),[N,y]=(0,l.useState)(null),[v,w]=(0,l.useState)("last7d"),[k,S]=(0,l.useState)(!0),P=(0,l.useCallback)(async()=>{S(!0);try{let[e,s,a]=await Promise.all([fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),fetch("/api/pxpipe/stats"),fetch("/api/pxpipe/logs?limit=50")]);t(await e.json()),f(await s.json()),y(await a.json());let l=await fetch("/api/pxpipe/health",{method:"POST"});j(await l.json())}catch{}finally{S(!1)}},[]);(0,l.useEffect)(()=>{P()},[P]);let E=b?.windows?.[v],$=e?e.installed?s?.healthy?"Healthy":e.running?"Running":"Stopped":"Not installed":"—";return(0,a.jsxs)("div",{className:"space-y-6 p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",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:"image"}),"PXPIPE Dashboard"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("a",{href:"/dashboard/token-saver",className:"text-xs text-primary underline hover:opacity-80",children:"Token Saver settings"}),(0,a.jsx)(m.$n,{size:"sm",variant:"ghost",onClick:P,disabled:k,children:k?"Refreshing…":"Refresh"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:[(0,a.jsx)(g,{label:"Status",value:$,tone:s?.healthy?"text-success":e?.installed?"text-warning":"text-text-muted",sub:e?.enabled?"Enabled in pipeline":"Disabled in pipeline"}),(0,a.jsx)(g,{label:"Version",value:e?.version?`v${e.version}`:"—",sub:"pxpipe-proxy"}),(0,a.jsx)(g,{label:"Uptime",value:(e=>{if(!e||e<=0)return"—";let t=Math.floor(e/6e4),s=Math.floor(t/60);return s>0?`${s}h${String(t%60).padStart(2,"0")}m`:`${t}m`})(e?.uptimeMs),sub:"module loaded"}),(0,a.jsx)(g,{label:"Requests",value:E?E.requests.toLocaleString():"—"}),(0,a.jsx)(g,{label:"Compressed",value:E?E.compressed.toLocaleString():"—",tone:"text-success"}),(0,a.jsx)(g,{label:"Bypassed",value:E?E.bypassed.toLocaleString():"—"})]}),(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3 mb-4",children:[(0,a.jsx)("h3",{className:"font-medium",children:"Token savings (estimated)"}),(0,a.jsx)("div",{className:"flex items-center gap-1 rounded-lg border border-border bg-bg-alt p-1",children:h.map(e=>(0,a.jsx)("button",{onClick:()=>w(e.id),className:`px-3 py-1 rounded-md text-xs font-medium transition-colors ${v===e.id?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-surface-2"}`,children:e.label},e.id))})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-center",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Original tokens"}),(0,a.jsx)("p",{className:"text-lg font-semibold",children:E?p(E.tokensBeforeEst):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"After PXPIPE"}),(0,a.jsx)("p",{className:"text-lg font-semibold",children:E?p(E.tokensAfterEst):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Saved"}),(0,a.jsx)("p",{className:"text-lg font-semibold text-success",children:E?p(E.tokensSavedEst):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Reduction"}),(0,a.jsx)("p",{className:"text-lg font-semibold text-success",children:E?`${E.savedPct}%`:"—"})]})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-3",children:["Estimates from body size before/after imaging; billed usage per request (recorded on the Usage page) remains the ground truth. Images generated:"," ",E?E.imagesGenerated.toLocaleString():"—"," \xb7 avg compression time:"," ",E?`${E.avgCompressionMs}ms`:"—"," \xb7 errors: ",E?E.errors:"—"]})]}),(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsx)("h3",{className:"font-medium mb-3",children:"Tokens saved — last 30 days"}),b?.timeline?.some(e=>e.tokensSavedEst>0)?(0,a.jsx)(r.u,{width:"100%",height:220,children:(0,a.jsxs)(i.Q,{data:b.timeline,margin:{top:4,right:8,left:0,bottom:0},children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"gradPxpipe",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#10b981",stopOpacity:.25}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#10b981",stopOpacity:0})]})}),(0,a.jsx)(d.d,{strokeDasharray:"3 3",strokeOpacity:.2}),(0,a.jsx)(n.W,{dataKey:"date",tick:{fontSize:11},tickFormatter:e=>e.slice(5)}),(0,a.jsx)(o.h,{tick:{fontSize:11},tickFormatter:p,width:48}),(0,a.jsx)(x.m,{formatter:e=>[p(e),"Tokens saved"],labelFormatter:e=>e}),(0,a.jsx)(c.Gk,{type:"monotone",dataKey:"tokensSavedEst",stroke:"#10b981",fill:"url(#gradPxpipe)",strokeWidth:2})]})}):(0,a.jsx)("div",{className:"h-32 flex items-center justify-center text-text-muted text-sm",children:"No savings recorded yet — enable PXPIPE in the Token Saver and route a large Claude-format request."})]}),(0,a.jsxs)(m.Zp,{className:"p-4",children:[(0,a.jsx)("h3",{className:"font-medium mb-3",children:"History"}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border",children:[(0,a.jsx)("th",{className:"py-2 pr-3",children:"Time"}),(0,a.jsx)("th",{className:"py-2 pr-3",children:"Model"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Original"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Compressed"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Saved"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"%"}),(0,a.jsx)("th",{className:"py-2 pr-3 text-right",children:"Duration"}),(0,a.jsx)("th",{className:"py-2",children:"Status"})]})}),(0,a.jsxs)("tbody",{children:[(b?.recent||[]).slice(0,50).map((e,t)=>(0,a.jsxs)("tr",{className:"border-b border-border/50",children:[(0,a.jsx)("td",{className:"py-1.5 pr-3 whitespace-nowrap text-text-muted",children:new Date(e.ts).toLocaleString()}),(0,a.jsx)("td",{className:"py-1.5 pr-3 font-mono text-xs",children:e.provider?`${e.provider}/${e.model}`:e.model||"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:e.applied?p(e.tokensBeforeEst):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:e.applied?p(e.tokensAfterEst):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs text-success",children:e.applied?p(e.tokensSavedEst):"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:e.applied?`${e.savedPct}%`:"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-3 text-right font-mono text-xs",children:null!=e.durationMs?`${e.durationMs}ms`:"—"}),(0,a.jsx)("td",{className:"py-1.5",children:(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${e.applied?"bg-success/15 text-success":"transform_error"===e.reason||"timeout"===e.reason?"bg-danger/15 text-danger":"bg-warning/15 text-warning"}`,title:e.detail||"",children:e.applied?"Compressed":u[e.reason]||e.reason})})]},`${e.ts}-${t}`)),(!b?.recent||0===b.recent.length)&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:8,className:"py-6 text-center text-text-muted text-sm",children:"No PXPIPE activity yet"})})]})]})})]}),(0,a.jsxs)(m.Zp,{className:"p-4",id:"logs",children:[(0,a.jsx)("h3",{className:"font-medium mb-3",children:"PXPIPE Logs"}),N?.installLog?(0,a.jsx)("pre",{className:"rounded bg-black/5 dark:bg-white/5 p-3 text-xs font-mono overflow-x-auto max-h-64 overflow-y-auto whitespace-pre-wrap",children:N.installLog}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No install log yet."})]})]})}},93224:(e,t,s)=>{Promise.resolve().then(s.bind(s,71470))}},e=>{e.O(0,[3170,305,3842,839,1321,5497,8441,3794,7358],()=>e(e.s=93224)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{26048:(e,t,r)=>{Promise.resolve().then(r.bind(r,33769)),Promise.resolve().then(r.bind(r,25086))},33769:(e,t,r)=>{"use strict";r.d(t,{default:()=>eN});var a=r(95155),n=r(12115),s=r(67852),i=r(66996),l=r(14051),o=r.n(l),c=r(73006),d=r(31474),u=r(45564),m=r(67352);let x="quotaCacheData",p="quotaAutoRefresh",h=[10,20,50,100],b=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],g=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function f(e){return"qoder"===e.provider||"qoder-cn"===e.provider?e.displayName?.trim()||e.name?.trim()||e.email?.trim()||null:e.name?.trim()||e.email?.trim()||e.displayName?.trim()||null}function y(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function w(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}function v({start:e,end:t,total:r}){return r>0?`Showing ${e}-${t} of ${r}`:"Showing 0 of 0"}async function k(e,t){return await e(t)}function j(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function N(e){return e&&"object"==typeof e?String(e.modelKey||e.name||"").trim():""}function C(e,t,r,a=[]){let n=null,s=t?.[e]?.hidden;if(Array.isArray(s))n=s.map(String);else if(r&&r!==e){let e=t?.[r]?.hidden;Array.isArray(e)&&(n=e.map(String))}return n?new Set(Array.isArray(a)&&a.length>0?function(e=[],t=[]){if(!Array.isArray(e)||0===e.length)return[];let r=new Set(t.map(N).filter(Boolean));return[...new Set(e.map(e=>String(e).trim()).filter(e=>r.has(e)))]}(n,a):n):new Set}let S="flex h-8 shrink-0 items-center gap-1.5 rounded-lg border border-black/10 bg-surface px-2.5 text-xs text-text transition-colors hover:bg-black/[0.04] disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/[0.06]",A="border-primary/30 bg-primary/10 text-primary hover:bg-primary/15",T="material-symbols-outlined text-[16px] leading-none",q={all:"apps",active:"check_circle",inactive:"block"};function $({open:e,onClose:t,align:r="left",className:n,children:s}){return e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 cursor-default bg-transparent","aria-label":"Close",onClick:t}),(0,a.jsx)("div",{className:(0,d.cn)("absolute z-40 mt-1.5 overflow-hidden rounded-xl border border-black/10 bg-surface/95 p-1 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10","right"===r?"right-0":"left-0",n),children:s})]}):null}function P({selected:e=!1,onClick:t,icon:r,children:n,hint:s,disabled:i=!1}){return(0,a.jsxs)("button",{type:"button",onClick:t,disabled:i,className:(0,d.cn)("flex w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left text-xs transition-colors disabled:opacity-50",e?"bg-primary/10 text-primary":"text-text hover:bg-black/[0.04] dark:hover:bg-white/[0.06]"),children:[r,(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block font-medium",children:n}),s?(0,a.jsx)("span",{className:"mt-0.5 block text-[11px] text-text-muted",children:s}):null]}),e?(0,a.jsx)("span",{className:(0,d.cn)(T,"text-[14px]"),children:"check"}):null]})}function D({provider:e,size:t=16}){return"all"===e?(0,a.jsx)("span",{className:(0,d.cn)(T,"text-text-muted"),children:"apps"}):(0,a.jsx)(s.A,{src:`/providers/${e}.png`,alt:e,size:t,className:"rounded object-contain",fallbackText:e.slice(0,2).toUpperCase()})}function M({view:e="cards",onViewChange:t,providerFilter:r,providerOptions:s,providerLabel:i,onProviderChange:l,accountFilter:o,onAccountChange:u,showCodexSort:m,quotaSortMode:x,onQuotaSortChange:p,expiringFirst:h,onToggleExpiringFirst:f,onDisableDepleted:y,onEnableAvailable:w,bulkToggling:v,autoRefresh:k,onToggleAutoRefresh:j,countdown:N,refreshingAll:C,onRefreshAll:E,accountCount:O}){let[R,F]=(0,n.useState)(!1),[_,I]=(0,n.useState)(!1),z="cards"===e;return(0,a.jsxs)("div",{className:"@container flex flex-wrap items-center gap-2",children:[t&&(0,a.jsx)("div",{role:"tablist","aria-label":(0,c.Tl)("View"),className:"flex h-8 items-center rounded-lg border border-black/10 bg-surface p-0.5 dark:border-white/10",children:[{value:"cards",icon:"grid_view",label:(0,c.Tl)("Cards")},{value:"windows",icon:"date_range",label:(0,c.Tl)("Quota windows")}].map(r=>(0,a.jsxs)("button",{type:"button",role:"tab","aria-selected":e===r.value,"aria-label":r.label,onClick:()=>t(r.value),className:(0,d.cn)("flex h-full items-center gap-1 rounded-md px-2.5 text-xs transition-colors",e===r.value?"bg-primary/10 font-medium text-primary":"text-text-muted hover:text-text"),children:[(0,a.jsx)("span",{className:(0,d.cn)(T,"text-[15px]"),children:r.icon}),(0,a.jsx)("span",{className:"hidden @min-[900px]:inline",children:r.label})]},r.value))}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 @max-[640px]:order-last @max-[640px]:w-full",children:[(0,a.jsxs)("div",{className:"relative min-w-0",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>F(e=>!e),className:(0,d.cn)(S,"all"!==r&&A),"aria-haspopup":"menu","aria-expanded":R,title:(0,c.Tl)("Filter quota providers"),children:[(0,a.jsx)(D,{provider:r}),(0,a.jsx)("span",{className:"max-w-[9rem] truncate capitalize @max-[640px]:max-w-[5rem]",children:i}),(0,a.jsx)("span",{className:(0,d.cn)(T,"text-[14px] text-text-muted"),children:"expand_more"})]}),(0,a.jsxs)($,{open:R,onClose:()=>F(!1),className:"w-64",children:[(0,a.jsx)(P,{selected:"all"===r,icon:(0,a.jsx)(D,{provider:"all",size:18}),onClick:()=>{l("all"),F(!1)},children:(0,c.Tl)("All providers")}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/5 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto",children:s.map(e=>(0,a.jsx)(P,{selected:r===e,icon:(0,a.jsx)(D,{provider:e,size:18}),onClick:()=>{l(e),F(!1)},children:(0,a.jsx)("span",{className:"capitalize",children:e})},e))})]})]}),(0,a.jsx)("div",{role:"radiogroup","aria-label":(0,c.Tl)("Filter accounts by status"),className:"flex h-8 shrink-0 items-center rounded-lg border border-black/10 bg-surface p-0.5 dark:border-white/10",children:b.map(e=>{let t=o===e.value;return(0,a.jsxs)("button",{type:"button",role:"radio","aria-checked":t,"aria-label":(0,c.Tl)(e.label),onClick:()=>u(e.value),className:(0,d.cn)("flex h-full items-center gap-1 rounded-md px-2.5 text-xs transition-colors @max-[640px]:px-2",t?"bg-primary/10 font-medium text-primary":"text-text-muted hover:text-text"),children:[(0,a.jsx)("span",{className:(0,d.cn)(T,"hidden text-[14px] @max-[640px]:inline"),children:q[e.value]}),(0,a.jsx)("span",{className:"@max-[640px]:hidden",children:(0,c.Tl)(e.label)})]},e.value)})}),z&&(0,a.jsx)("button",{type:"button",onClick:f,"aria-pressed":h,className:(0,d.cn)(S,"w-8 justify-center px-0",h&&A),title:(0,c.Tl)("Sort accounts by earliest reset or expiry time"),"aria-label":(0,c.Tl)("Resets first"),children:(0,a.jsx)("span",{className:T,children:"hourglass_top"})}),z&&m&&(0,a.jsx)("select",{value:x,onChange:e=>p(e.target.value),className:(0,d.cn)(S,"pr-1 outline-none"),"aria-label":(0,c.Tl)("Sort Codex quotas by remaining"),children:g.map(e=>(0,a.jsx)("option",{value:e.value,children:(0,c.Tl)(e.label)},e.value))})]}),(0,a.jsxs)("div",{className:"ml-auto flex items-center gap-2 @max-[640px]:order-2",children:[z&&Number.isFinite(O)&&(0,a.jsx)("span",{className:"hidden text-xs tabular-nums text-text-muted @min-[1130px]:inline",children:(0,c.Tl)("{count} accounts").replace("{count}",String(O))}),z&&(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>I(e=>!e),disabled:v,className:S,"aria-haspopup":"menu","aria-expanded":_,title:(0,c.Tl)("Bulk actions"),"aria-label":(0,c.Tl)("Bulk actions"),children:[(0,a.jsx)("span",{className:T,children:v?"progress_activity":"checklist"}),(0,a.jsx)("span",{className:"hidden @min-[1060px]:inline",children:(0,c.Tl)("Bulk actions")}),(0,a.jsx)("span",{className:(0,d.cn)(T,"text-[14px] text-text-muted"),children:"expand_more"})]}),(0,a.jsxs)($,{open:_,onClose:()=>I(!1),align:"right",className:"w-72",children:[(0,a.jsx)(P,{disabled:v,icon:(0,a.jsx)("span",{className:(0,d.cn)(T,"mt-px text-red-500"),children:"block"}),hint:(0,c.Tl)("Disable connections with depleted quota on the current page"),onClick:()=>{I(!1),y()},children:(0,c.Tl)("Turn off Empty")}),(0,a.jsx)(P,{disabled:v,icon:(0,a.jsx)("span",{className:(0,d.cn)(T,"mt-px text-emerald-500"),children:"check_circle"}),hint:(0,c.Tl)("Enable connections that still have quota on the current page"),onClick:()=>{I(!1),w()},children:(0,c.Tl)("Turn on Available")})]})]}),z&&(0,a.jsxs)("button",{type:"button",role:"switch","aria-checked":k,onClick:j,className:S,title:(0,c.Tl)(k?"Disable auto-refresh":"Enable auto-refresh"),children:[(0,a.jsx)("span",{"aria-hidden":"true",className:(0,d.cn)("relative h-4 w-7 rounded-full transition-colors",k?"bg-primary":"bg-black/15 dark:bg-white/20"),children:(0,a.jsx)("span",{className:(0,d.cn)("absolute top-0.5 size-3 rounded-full bg-white shadow transition-[left]",k?"left-[14px]":"left-0.5")})}),(0,a.jsx)("span",{className:"hidden @min-[980px]:inline",children:(0,c.Tl)("Auto-refresh")}),k&&(0,a.jsxs)("span",{className:"w-6 text-right text-[11px] tabular-nums text-text-muted",children:[N,"s"]})]}),(0,a.jsx)("button",{type:"button",onClick:E,disabled:C,className:(0,d.cn)(S,"w-8 justify-center px-0"),title:(0,c.Tl)("Refresh all"),"aria-label":(0,c.Tl)("Refresh all"),children:(0,a.jsx)("span",{className:(0,d.cn)(T,C&&"animate-spin"),children:"refresh"})})]})]})}$.propTypes={open:o().bool,onClose:o().func.isRequired,align:o().oneOf(["left","right"]),className:o().string,children:o().node},P.propTypes={selected:o().bool,onClick:o().func,icon:o().node,children:o().node,hint:o().node,disabled:o().bool},D.propTypes={provider:o().string.isRequired,size:o().number},M.propTypes={view:o().oneOf(["cards","windows"]),onViewChange:o().func,providerFilter:o().string.isRequired,providerOptions:o().arrayOf(o().string).isRequired,providerLabel:o().node,onProviderChange:o().func.isRequired,accountFilter:o().string.isRequired,onAccountChange:o().func.isRequired,showCodexSort:o().bool,quotaSortMode:o().string,onQuotaSortChange:o().func,expiringFirst:o().bool,onToggleExpiringFirst:o().func.isRequired,onDisableDepleted:o().func.isRequired,onEnableAvailable:o().func.isRequired,bulkToggling:o().bool,autoRefresh:o().bool,onToggleAutoRefresh:o().func.isRequired,countdown:o().number,refreshingAll:o().bool,onRefreshAll:o().func.isRequired,accountCount:o().number};var E=r(98500),O=r.n(E),R=r(84588),F=r(35655),_=r(75958);let I=[{re:/5h|five[\s_-]?hour|session|rolling|滚动|5\s*小时/i,ms:18e6,key:"5h"},{re:/daily|\bday\b|24h|每日|每天/i,ms:864e5,key:"day"},{re:/week|7d|周/i,ms:6048e5,key:"week"},{re:/month|月/i,ms:null,key:"month"}];function z(e,t){let r=new Date(e),a=r.getDate();r.setDate(1),r.setMonth(r.getMonth()+t);let n=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return r.setDate(Math.min(a,n)),r.getTime()}let L={week:{kinds:["day","week","month"],spanMs:12096e5,stepMs:6048e5,tickMs:864e5},hours:{kinds:["5h"],spanMs:864e5,stepMs:864e5,tickMs:36e5}},H="quotaWindowsCache",U="w-[220px] shrink-0",B=e=>String(e).padStart(2,"0"),J=e=>{let t=new Date(e);return`${B(t.getMonth()+1)}/${B(t.getDate())}`},W=e=>{let t=new Date(e);return`${B(t.getHours())}:${B(t.getMinutes())}`};function K(e){let t=(0,m.TM)(e);return t?(0,c.Tl)(t.family):(0,_.M)(e)}function V({value:e,options:t,onChange:r}){return(0,a.jsx)("div",{className:"flex h-8 items-center rounded-lg border border-black/10 bg-surface p-0.5 dark:border-white/10",children:t.map(t=>(0,a.jsx)("button",{type:"button",onClick:()=>r(t.value),"aria-pressed":e===t.value,className:(0,d.cn)("h-full rounded-md px-2.5 text-xs transition-colors",e===t.value?"bg-primary/10 font-medium text-primary":"text-text-muted hover:text-text"),children:t.label},t.value))})}function G({win:e,lane:t,range:r,showLabel:n,view:s}){let i=e=>"hours"===s?W(e):`${J(e)} ${W(e)}`,l=r.end-r.start,o=100*Math.max(0,(e.start-r.start)/l),u=Math.max(.5,100*Math.min(1,(e.end-r.start)/l)-o),m=e.start<r.start,x=e.end>r.end,p=(0,d.cn)(!m&&"rounded-l-[4px]",!x&&"rounded-r-[4px]"),h={left:`${o}%`,width:`${u}%`};if(!e.current)return(0,a.jsx)("div",{className:(0,d.cn)("absolute inset-y-0 overflow-hidden border border-dashed border-black/15 dark:border-white/15",p),style:h,title:`${K(t.name)} \xb7 ${J(e.start)} ${W(e.start)} – ${J(e.end)} ${W(e.end)}`,children:(0,a.jsx)("span",{className:"absolute inset-y-0 left-1.5 right-1.5 flex items-center truncate text-[10px] tabular-nums text-text-muted/70",children:i(e.start)})});let b=Math.round(t.pct),g=(0,c.Tl)("resets {date}").replace("{date}",i(e.end)),f=`${n?`${K(t.name)} \xb7 `:""}${b}% \xb7 ${g}`;return(0,a.jsxs)("div",{className:(0,d.cn)("absolute inset-y-0 overflow-hidden bg-black/[0.06] dark:bg-white/[0.08]",p),style:h,title:f,children:[(0,a.jsx)("div",{className:"absolute inset-y-0 left-0",style:{width:`${b}%`,opacity:.85,...(0,F.jE)(b)}}),(0,a.jsx)("span",{className:"absolute inset-y-0 left-1.5 right-1.5 flex items-center truncate text-[10px] font-medium tabular-nums text-text",children:f})]})}function Q({providerFilter:e="all",accountFilter:t="all",refreshKey:r=0,showTrackerLink:i=!0}){let[l,o]=(0,n.useState)(null),[u,x]=(0,n.useState)(null),[p,h]=(0,n.useState)(!1),[b,g]=(0,n.useState)("week"),[f,y]=(0,n.useState)(0),[w,v]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e=!1,t=0===r?function(){try{let e=window.localStorage.getItem(H);return e?JSON.parse(e):null}catch{return null}}():null;(async()=>{t?.connections&&o(t.connections),v(Date.now()),h(!0);try{let t=await fetch(`/api/usage/quotas${r>0?"?force=1":""}`,{cache:"no-store"}),n=await t.json();if(!t.ok)throw Error(n?.error||`HTTP ${t.status}`);if(e)return;o(n.connections||[]),x(null);var a=n.connections||[];try{window.localStorage.setItem(H,JSON.stringify({connections:a,at:Date.now()}))}catch{}}catch(t){e||x(t.message||"Failed to load quotas")}finally{e||h(!1)}})();let a=setInterval(()=>v(Date.now()),6e4);return()=>{e=!0,clearInterval(a)}},[r]);let k=(0,n.useMemo)(()=>(l||[]).filter(r=>("all"===e||r.provider===e)&&("active"!==t||!1!==r.isActive)&&("inactive"!==t||!1===r.isActive)),[l,e,t]),j=(0,n.useMemo)(()=>w?function(e,t,r=0){let a,n,s,i=L[e]||L.week,l=("hours"===e?((a=new Date(t-432e5)).setMinutes(0,0,0),a.getTime()):((n=new Date(t)).setHours(0,0,0,0),s=(n.getDay()+6)%7,n.setDate(n.getDate()-s),n.getTime()))+r*i.stepMs;return{start:l,end:l+i.spanMs}}(b,w,f):null,[b,w,f]),N=(0,n.useMemo)(()=>j&&l?function(e=[],{view:t="week",rangeStart:r,rangeEnd:a}={}){let n=(L[t]||L.week).kinds,s=[];for(let t of e||[]){let e=(Array.isArray(t?.quotas)?t.quotas:[]).map(e=>({q:e,kind:function(e){if(e?.giftPack===!0||e?.detailOnly===!0||!(0,m.OG)(e)||!e?.resetAt)return null;let t=String(e?.name||""),r=(0,m.TM)(t)?.window||t;for(let e of I)if(e.re.test(r))return e.key;return null}(e)})).filter(e=>e.kind);if(0===e.length)continue;let i=e.map(({q:e,kind:t})=>({name:e.name,kind:t,pct:Math.round((0,m.pR)(e))})),l=e.filter(({kind:e})=>n.includes(e)).map(({q:e,kind:t})=>({name:e.name,kind:t,pct:(0,m.pR)(e),resetAt:e.resetAt,windows:function(e,t,r,a,n=60){let s=[],i=new Date(e?.resetAt).getTime(),l=function(e,t){let r=new Date(t).getTime();if("month"===e)return z(r,-1);let a=I.find(t=>t.key===e);return a?.ms?r-a.ms:NaN}(t,i);if(!Number.isFinite(i)||!Number.isFinite(l))return s;for(let e=0;e<=n&&l<a;e+=1){i>r&&s.push({start:l,end:i,current:0===e});let a=function(e,t){let r=new Date(t).getTime();if("month"===e)return z(r,1);let a=I.find(t=>t.key===e);return a?.ms?r+a.ms:NaN}(t,i);if(!Number.isFinite(a))break;l=i,i=a}return s}(e,t,r,a)})).filter(e=>e.windows.length>0);s.push({id:t.id,provider:t.provider,label:t.name||t.email||t.providerName||t.provider,providerName:t.providerName||t.provider,isActive:!1!==t.isActive,chips:i,lanes:l})}return s}(k,{view:b,rangeStart:j.start,rangeEnd:j.end}):[],[l,k,b,j]),C=(0,n.useMemo)(()=>{if(!j)return[];let e=L[b].tickMs,t=[];for(let r=j.start;r<j.end;r+=e)t.push(r);return t},[j,b]),S=j&&w>=j.start&&w<j.end?(w-j.start)/(j.end-j.start)*100:null,A=w?new Date(new Date(w).setHours(0,0,0,0)).getTime():null,T=j?"hours"===b?`${J(j.start)} ${W(j.start)} – ${J(j.end)} ${W(j.end)}`:`${J(j.start)} – ${J(j.end-864e5)} \xb7 ${(0,c.Tl)("two weeks")}`:"";return(0,a.jsxs)(R.default,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-lg font-semibold",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"date_range"}),(0,c.Tl)("Quota windows"),p&&(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px] text-text-muted","aria-label":(0,c.Tl)("Refreshing"),children:"progress_activity"})]}),(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted tabular-nums",children:[T,0===f&&T?` \xb7 ${(0,c.Tl)("current")}`:""]})]}),(0,a.jsxs)("div",{className:"flex h-8 items-center rounded-lg border border-black/10 bg-surface dark:border-white/10",children:[(0,a.jsx)("button",{type:"button",onClick:()=>y(e=>e-1),className:"flex h-full w-8 items-center justify-center text-text-muted hover:text-text","aria-label":(0,c.Tl)("Previous"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>y(0),disabled:0===f,className:"h-full border-x border-black/10 px-2.5 text-xs text-text disabled:text-text-muted dark:border-white/10",children:(0,c.Tl)("hours"===b?"current":"Today")}),(0,a.jsx)("button",{type:"button",onClick:()=>y(e=>e+1),className:"flex h-full w-8 items-center justify-center text-text-muted hover:text-text","aria-label":(0,c.Tl)("Next"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})})]}),(0,a.jsx)(V,{value:b,onChange:e=>{g(e),y(0)},options:[{value:"week",label:(0,c.Tl)("By week")},{value:"hours",label:(0,c.Tl)("5 hours")}]}),i&&(0,a.jsxs)(O(),{href:"/dashboard/quota",className:"flex h-8 items-center gap-1 rounded-lg px-2 text-xs text-text-muted hover:bg-black/[0.04] hover:text-text dark:hover:bg-white/[0.06]",children:[(0,c.Tl)("Quota Tracker"),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_forward"})]})]}),null===l?(0,a.jsx)("div",{className:"py-10 text-center text-xs text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[22px]",children:"progress_activity"})}):0===N.length?(0,a.jsx)("div",{className:"py-8 text-center text-xs text-text-muted",children:u?`${(0,c.Tl)("Failed to load quotas")} \xb7 ${u}`:(0,c.Tl)("No accounts with recurring quota windows")}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"min-w-[760px]",children:[(0,a.jsxs)("div",{className:"flex border-b border-black/10 bg-black/[0.015] dark:border-white/10 dark:bg-white/[0.02]",children:[(0,a.jsx)("div",{className:(0,d.cn)(U,"flex items-end px-3 pb-1.5 text-[11px] text-text-muted"),children:(0,c.Tl)("Account")}),(0,a.jsx)("div",{className:"relative flex flex-1",children:C.map((e,t)=>{let r="week"===b&&e===A,n="hours"!==b||new Date(e).getHours()%2==0;return(0,a.jsx)("div",{className:(0,d.cn)("flex-1 border-l border-black/5 px-0.5 py-1.5 text-center dark:border-white/5",0===t&&"border-l-0",r&&"bg-primary/[0.06]"),children:"hours"===b?(0,a.jsx)("div",{className:"text-[10px] tabular-nums text-text-muted",children:n?`${B(new Date(e).getHours())}`:""}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:(0,d.cn)("text-[10px]",r?"text-primary":"text-text-muted"),children:function(e){try{return new Date(e).toLocaleDateString((0,c.kk)()||void 0,{weekday:"short"})}catch{return""}}(e)}),(0,a.jsx)("div",{className:(0,d.cn)("text-[11px] font-medium tabular-nums",r?"text-primary":"text-text"),children:J(e)})]})},e)})})]}),N.map(e=>(0,a.jsxs)("div",{className:(0,d.cn)("flex border-b border-black/5 last:border-b-0 dark:border-white/5",!e.isActive&&"opacity-55"),children:[(0,a.jsxs)("div",{className:(0,d.cn)(U,"space-y-1 px-3 py-2.5"),children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)(s.A,{src:`/providers/${e.provider}.png`,alt:e.provider,size:16,className:"shrink-0 rounded object-contain",fallbackText:String(e.provider||"?").slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate text-xs font-medium text-text",title:`${e.providerName} \xb7 ${e.label}`,children:e.label})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:e.chips.map(e=>(0,a.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1 rounded-[3px] bg-black/[0.04] px-1.5 py-px text-[10px] text-text-muted dark:bg-white/[0.06]",title:(0,_.M)(e.name),children:[(0,a.jsx)("span",{className:"size-1.5 shrink-0 rounded-full",style:{background:(0,F.dI)(e.pct)}}),(0,a.jsx)("span",{className:"truncate",children:(0,_.M)(e.name)}),(0,a.jsxs)("b",{className:"font-semibold tabular-nums text-text",children:[e.pct,"%"]})]},e.name))})]}),(0,a.jsxs)("div",{className:"relative flex-1 py-2.5",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 flex",children:C.map((e,t)=>(0,a.jsx)("div",{className:(0,d.cn)("flex-1 border-l border-black/[0.04] dark:border-white/[0.05]",0===t&&"border-l-0","week"===b&&e===A&&"bg-primary/[0.04]")},e))}),null!==S&&(0,a.jsx)("div",{className:"pointer-events-none absolute inset-y-0 w-px bg-primary/60",style:{left:`${S}%`}}),(0,a.jsx)("div",{className:"relative space-y-1",children:0===e.lanes.length?(0,a.jsx)("div",{className:"flex h-[18px] items-center px-2 text-[10px] text-text-muted/70",children:(0,c.Tl)("hours"===b?"No 5-hour window":"No daily / weekly / monthly window")}):e.lanes.map(t=>(0,a.jsx)("div",{className:"relative h-[18px]",children:t.windows.map(r=>(0,a.jsx)(G,{win:r,lane:t,range:j,view:b,showLabel:e.lanes.length>1},`${t.name}-${r.start}`))},t.name))})]})]},e.id))]})})]})}V.propTypes={value:o().string.isRequired,options:o().arrayOf(o().shape({value:o().string,label:o().node})).isRequired,onChange:o().func.isRequired},G.propTypes={win:o().object.isRequired,lane:o().object.isRequired,range:o().object.isRequired,showLabel:o().bool,view:o().string},Q.propTypes={providerFilter:o().string,accountFilter:o().string,refreshKey:o().number,showTrackerLink:o().bool};let Y="quotaConnectionsCache";function Z(e){try{let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}}function X(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function ee({page:e,pageSize:t,accountFilter:r,providerFilter:a}){return[e,t,r,a].join("|")}function et(e){if(!e?.providerSpecificData?.connectionProxyUrl)return e;let t={...e.providerSpecificData};return delete t.connectionProxyUrl,{...e,providerSpecificData:t}}function er(e){let t=e?.cachedAt?new Date(e.cachedAt).getTime():NaN;return Number.isFinite(t)?t:0}function ea(e){let t=Z(x)||{},r={};for(let a of e||[])t[a.id]&&(r[a.id]=t[a.id]);return r}function en(e,t,r=Date.now()){let a=Z(x)||{};for(let[n,s]of(a[e]={...function(e){if(!e||"object"!=typeof e)return e;let{raw:t,...r}=e;return t?.resetCredits?{...r,raw:{resetCredits:t.resetCredits}}:r}(t),cachedAt:new Date(r).toISOString()},Object.entries(a)))r-er(s)>6048e5&&delete a[n];X(x,a)}function es(e){return Number(Number(e||0).toFixed(2)).toLocaleString("en-US")}function ei({quota:e,now:t,onHide:r}){let n=(0,m.Cd)(e,e.pct),s=(0,m.OG)(e),i=(0,m.D2)(e,t),l=!!e.resetAt&&2099>=new Date(e.resetAt).getFullYear(),o=l?function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e;if(Number.isNaN(t?.getTime?.())||t.getFullYear()>2099||t-new Date<=0)return"-";return(0,m.TV)(t)||"-"}catch(e){return"-"}}(e.resetAt):"-",d=l?[function(e){let t=new Date(e);if(Number.isNaN(t.getTime())||t.getFullYear()>2099)return"";let r=e=>String(e).padStart(2,"0");return`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())} ${r(t.getHours())}:${r(t.getMinutes())}`}(e.resetAt),"-"!==o?o:null].filter(Boolean).join(" \xb7 "):void 0,u=e.percentScale?`${e.pct}%`:e.unlimited?"∞":`${es(Math.max(0,e.total-e.used))} / ${es(e.total)}`;return(0,a.jsxs)("div",{className:"group min-w-0 space-y-1 py-1",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2 text-[11px] tabular-nums",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-[8px] shrink-0 rounded-[2px]",style:{background:(0,F.dI)(e.pct)},"aria-hidden":"true"}),(0,a.jsx)("span",{className:"truncate text-text",children:(0,_.M)(e.name)})]}),(0,a.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[(0,a.jsx)("span",{className:F.pM[n],title:e.percentScale||e.unlimited?void 0:`${(0,c.Tl)("Used")} ${es(e.used)}`,children:u}),l?(0,a.jsx)("span",{className:"text-text-muted",title:d,children:(0,F.h7)(s,e.resetAt,{expired:i})}):null,r?(0,a.jsx)("button",{type:"button",onClick:()=>r(e),className:"-my-1 inline-flex size-5 items-center justify-center rounded text-text-muted opacity-30 transition hover:bg-black/5 hover:text-text group-hover:opacity-100 focus-visible:opacity-100 dark:hover:bg-white/5",title:(0,c.Tl)("Hide this quota row"),"aria-label":`${(0,c.Tl)("Hide this quota row")}: ${(0,_.M)(e.name)}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"visibility_off"})}):null]})]}),(0,a.jsx)(F.Ay,{pct:e.pct})]})}function el({rows:e,now:t,onHide:r,limit:n,onMore:s}){let i=e.length-n;return(0,a.jsxs)(a.Fragment,{children:[e.slice(0,n).map(e=>(0,a.jsx)(ei,{quota:e,now:t,onHide:r},`${e.name}-${e.index}`)),i>0&&(0,a.jsx)("button",{type:"button",onClick:s,className:"w-full rounded-md py-1 text-[11px] text-text-muted transition-colors hover:bg-black/5 hover:text-text dark:hover:bg-white/5",children:(0,c.Tl)("Show {count} more").replace("{count}",String(Math.min(10,i)))})]})}function eo({quotas:e=[],sortMode:t="default",showSortLabel:r=!1,onHideQuota:s=null}){let[i,l]=(0,n.useState)(10),[o,u]=(0,n.useState)(10),[x,p]=(0,n.useState)(!1),[h,b]=(0,n.useState)(()=>Date.now());(0,n.useEffect)(()=>{b(Date.now())},[e]);let{live:g,history:f}=(0,n.useMemo)(()=>{var r;let a=(r=e.map((e,t)=>({...e,index:t,used:Number(e.used||0),total:Number(e.total||0),pct:e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):e?.remaining!==void 0&&(e?.total===100||e?.total===void 0)?Math.max(0,Math.round(e.remaining)):j(e?.used,e?.total)})),"remaining-asc"===t?[...r].sort((e,t)=>e.pct-t.pct||e.name.localeCompare(t.name)):"remaining-desc"===t?[...r].sort((e,t)=>t.pct-e.pct||e.name.localeCompare(t.name)):r);return{live:a.filter(e=>!(0,m.UY)(e,h)),history:a.filter(e=>(0,m.UY)(e,h))}},[e,t,h]);if(!e||0===e.length)return null;let y="function"==typeof s?s:null;return(0,a.jsxs)("div",{className:"space-y-0.5",children:[r&&(0,a.jsx)("div",{className:"pb-1 text-[10px] text-text-muted",children:(0,c.Tl)("Sorted by account remaining")}),(0,a.jsx)(el,{rows:g,now:h,onHide:y,limit:i,onMore:()=>l(e=>e+10)}),f.length>0&&(0,a.jsxs)("div",{className:(0,d.cn)(g.length>0&&"mt-1 border-t border-black/5 pt-1 dark:border-white/5"),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>p(e=>!e),className:"flex w-full items-center gap-1 rounded-md py-1 text-[11px] text-text-muted transition-colors hover:bg-black/5 hover:text-text dark:hover:bg-white/5","aria-expanded":x,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:x?"expand_less":"expand_more"}),(0,c.Tl)("Used up / expired"),(0,a.jsxs)("span",{className:"tabular-nums opacity-60",children:["(",f.length,")"]})]}),x&&(0,a.jsx)("div",{className:"opacity-60",children:(0,a.jsx)(el,{rows:f,now:h,onHide:y,limit:o,onMore:()=>u(e=>e+10)})})]})]})}ei.propTypes={quota:o().object.isRequired,now:o().number.isRequired,onHide:o().func},el.propTypes={rows:o().array.isRequired,now:o().number.isRequired,onHide:o().func,limit:o().number.isRequired,onMore:o().func.isRequired},eo.propTypes={quotas:o().array,sortMode:o().string,showSortLabel:o().bool,onHideQuota:o().func};var ec=r(98542),ed=r(97677),eu=r(35497),em=r(88105),ex=r(11059);let ep={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},eh={claude:"claudeAutoPing",codex:"codexAutoPing"},eb={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota."};function eg(e){let t=f(e);if(e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()){let r=e.email.trim();if(r!==t)return r}if(e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()){let r=e.displayName.trim();if(r!==t)return r}return null}function ef(e){let t=e.providerSpecificData?.region;if(t)return t;let r=e.providerSpecificData?.profileArn;return("string"==typeof r?r.split(":")[3]:"")||""}let ey={five_hour:"session",seven_day:"weekly",seven_day_overage_included:"weekly",seven_day_opus:"Opus weekly",seven_day_sonnet:"Sonnet weekly"};function ew(e){let t=[...new Set((e||[]).map(e=>ey[e]).filter(Boolean))];return t.length?`${t.join(" + ")} limits`:"limits"}function ev(e){if(!e)return"N/A";let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"N/A"}function ek(e){if(!e)return"N/A";let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t))return"N/A";if(t<=0)return"Expired";let r=Math.ceil(t/36e5),a=Math.floor(r/24),n=r%24;return a>0?`${a}d ${n}h`:`${n}h`}let ej={"qoder-cn":"Qoder CN",qoder:"Qoder","codebuddy-cn":"CodeBuddy CN","codebuddy-intl":"CodeBuddy Intl","minimax-cn":"MiniMax CN","glm-cn":"GLM CN","kimi-cn":"Kimi CN"};function eN(){let{copied:e,copy:t}=(0,ex.C)(),[r,l]=(0,n.useState)([]),[o,d]=(0,n.useState)({}),[b,g]=(0,n.useState)({}),[S,A]=(0,n.useState)({}),[T,q]=(0,n.useState)(!0),[$,P]=(0,n.useState)({claude:{},codex:{}}),[D,E]=(0,n.useState)(null),[O,F]=(0,n.useState)(!1),[I,z]=(0,n.useState)(!1),[L,H]=(0,n.useState)(60),[U,B]=(0,n.useState)(!0),[J,W]=(0,n.useState)(null),[K,V]=(0,n.useState)(null),[G,es]=(0,n.useState)(null),[ei,el]=(0,n.useState)(null),[ey,eN]=(0,n.useState)(null),[eC,eS]=(0,n.useState)(!1),[eA,eT]=(0,n.useState)(null),[eq,e$]=(0,n.useState)([]),[eP,eD]=(0,n.useState)(()=>window.localStorage.getItem("quotaProviderFilter")||"all"),[eM,eE]=(0,n.useState)([]),[eO,eR]=(0,n.useState)(()=>window.localStorage.getItem("quotaAccountFilter")||"all");(0,n.useEffect)(()=>{window.localStorage.setItem("quotaProviderFilter",eP)},[eP]),(0,n.useEffect)(()=>{window.localStorage.setItem("quotaAccountFilter",eO)},[eO]);let[eF,e_]=(0,n.useState)("default"),[eI,ez]=(0,n.useState)("cards"),[eL,eH]=(0,n.useState)(0),[eU,eB]=(0,n.useState)({}),[eJ,eW]=(0,n.useState)(!1),[eK]=(0,n.useState)(()=>"1"===window.localStorage.getItem("quotaHideNoQuota")),[eV,eG]=(0,n.useState)(!1),[eQ,eY]=(0,n.useState)(()=>new Set),eZ=(0,n.useCallback)(e=>{eY(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),[eX,e0]=(0,n.useState)(1),[e1,e5]=(0,n.useState)(20),[e2,e3]=(0,n.useState)(String(20)),[e4,e6]=(0,n.useState)({page:1,pageSize:20,total:0,totalPages:1}),[e8,e9]=(0,n.useState)({eligibleConnections:0,providerFilteredConnections:0}),e7=(0,n.useRef)(null),te=(0,n.useRef)(null),tt=(0,n.useRef)(0),tr=(0,n.useCallback)(async(e=eX)=>{try{var t,r;let a=new URLSearchParams({page:String(e),pageSize:String(e1),accountStatus:eO,sort:"priority"});"all"!==eP&&a.set("provider",eP);let n=await fetch(`/api/providers/client?${a.toString()}`);if(!n.ok)throw Error("Failed to fetch connections");let s=await n.json(),i=s.connections||[],o=(t=s.pagination,t||{page:1,pageSize:e1,total:0,totalPages:1}),c=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(s.totals,i.length);return l(i),eE(s.providerOptions||[]),e6(o),e9(c),e0((r=s.pagination,r?.page||e)),!function(e,{connections:t,pagination:r,totals:a,providerOptions:n}){X(Y,{key:e,connections:(t||[]).map(et),pagination:r,totals:a,providerOptions:n,cachedAt:Date.now()})}(ee({page:e,pageSize:e1,accountFilter:eO,providerFilter:eP}),{connections:i,pagination:o,totals:c,providerOptions:s.providerOptions}),i}catch(e){return console.error("Error fetching connections:",e),null}},[eO,eJ,eX,e1,eP]),ta=(0,n.useCallback)(async(e,t,{force:r=!1}={})=>{g(t=>({...t,[e]:!0})),A(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let a=`/api/usage/${e}${r?"?force=1":""}`,n=await fetch(a);if(!n.ok){let r=(await n.json().catch(()=>({}))).error||n.statusText;if(404===n.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===n.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,r);let a={quotas:[],message:r,cachedAt:new Date().toISOString()};d(t=>({...t,[e]:a})),en(e,a);return}throw Error(`HTTP ${n.status}: ${r}`)}let s=await n.json();console.log(`[ProviderLimits] Got quota for ${t}:`,s);let i={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":if(t.quotas){let e=Object.entries(t.quotas),a=e.filter(([e])=>e.startsWith("gemini-")&&!e.includes("image")),n=e.filter(([e])=>e.startsWith("claude-")||e.startsWith("gpt-")),s=e.filter(([e])=>e.includes("image")),i=e.filter(([e])=>!e.startsWith("gemini-")&&!e.startsWith("claude-")&&!e.startsWith("gpt-")&&!e.includes("image"));if(a.length>0){let e=a.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1];r.push({name:"Gemini (Flash / Pro)",modelKey:"gemini",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage,percentScale:!0})}if(n.length>0){let e=n.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1];r.push({name:"Claude (Sonnet / Opus / GPT)",modelKey:"claude",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage,percentScale:!0})}s.forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,percentScale:!0})}),i.forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,percentScale:!0})})}break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":case"qoder-cn":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{let a=Number(t?.total)||0;if("user"===e||("organization"===e||"addOn"===e)&&0===a)return;let n=t.resetAt&&2099>=new Date(t.resetAt).getFullYear()?t.resetAt:null;r.push({name:"addOn"===e?"Resource Package":"organization"===e?"Organization":e,used:t.used||0,total:a,unit:t.unit,resetAt:"addOn"===e?null:n,unlimited:!0===t.unlimited,aggregate:!0,..."addOn"===e&&Array.isArray(t.packs)&&t.packs.length>0?{summarizesDetail:!0}:{}}),"addOn"===e&&Array.isArray(t.packs)&&t.packs.forEach((e,a)=>{r.push({name:e.name||(e.unitemized?"Bonus Pack (unitemized)":`Bonus Pack ${a+1}`),used:e.used||0,total:e.total||0,unit:t.unit,resetAt:e.expiresAt&&2099>=new Date(e.expiresAt).getFullYear()?e.expiresAt:null,unlimited:!1,recurring:!1,detailOnly:!0})})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:void 0!==t.remaining?t.remaining:Math.max(0,(t.total||100)-(t.used||0)),remainingPercentage:void 0!==t.remainingPercentage?t.remainingPercentage:j(t.used,t.total),resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codebuddy-cn":case"codebuddy-intl":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,recurring:!1!==t.recurring,displayRemaining:!0,..."Monthly"===e?{giftPack:!0}:{}})});break;case"grok-cli":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"kimi":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"deepseek":case"stepfun":case"stepfun-cn":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,displayRemaining:t.displayRemaining})});break;case"ollama":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"commandcode":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:void 0!==t.remaining?t.remaining:Math.max(0,(t.total||0)-(t.used||0)),remainingPercentage:void 0!==t.remainingPercentage?t.remainingPercentage:j(t.used,t.total),resetAt:t.resetAt||null,recurring:!0===t.recurring,displayRemaining:!0})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}if(e?.toLowerCase()==="claude"){let e={"session (5h)":0,"weekly (7d)":1,"weekly fable (7d)":2,"weekly opus (7d)":3,"weekly sonnet (7d)":4};return r.sort((t,r)=>(e[t.name]??99)-(e[r.name]??99)),r}if(e?.toLowerCase()==="commandcode"){let e={"session (5h)":0,"weekly (7d)":1,"Monthly Credits":2,"Purchased Credits":3};return r.sort((t,r)=>(e[t.name]??99)-(e[r.name]??99)),r}let a=(0,u.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,n=r.modelKey||r.name;return(e.get(a)??999)-(e.get(n)??999)})}return r}(t,s),plan:s.plan||null,message:s.message||null,raw:s,cachedAt:new Date().toISOString()};d(t=>({...t,[e]:i})),en(e,i)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),A(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{g(t=>({...t,[e]:!1}))}},[]),[tn]=(0,n.useState)(()=>(function(e=4){let t=0,r=[],a=()=>{if(t>=e||0===r.length)return;t+=1;let{fn:n,resolve:s,reject:i}=r.shift();Promise.resolve().then(n).then(s,i).finally(()=>{t-=1,a()})};return e=>new Promise((t,n)=>{r.push({fn:e,resolve:t,reject:n}),a()})})()),ts=(0,n.useRef)(new Set),ti=(0,n.useRef)(new Map),tl=(0,n.useRef)(null),to=(0,n.useRef)(ta);(0,n.useEffect)(()=>{to.current=ta},[ta]);let tc=(0,n.useCallback)(()=>(tl.current||"u"<typeof IntersectionObserver||(tl.current=new IntersectionObserver(e=>{for(let t of e){let e=t.target.dataset.connId;if(e){if(!t.isIntersecting){ts.current.delete(e);continue}if(ts.current.add(e),ti.current.has(e)){let t=ti.current.get(e);ti.current.delete(e),tn(()=>to.current(e,t))}}}},{rootMargin:"200px 0px"})),tl.current),[tn]);(0,n.useEffect)(()=>()=>tl.current?.disconnect(),[]);let td=(0,n.useCallback)(e=>{let t=tc();if(e&&t)return t.observe(e),()=>{t.unobserve(e),ts.current.delete(e.dataset.connId)}},[tc]),tu=(0,n.useCallback)((e,{lazy:t=!0,skipFreshFrom:r=null}={})=>{let a="u">typeof IntersectionObserver,n=[];for(let s of e)if(!(r&&function(e,t=Date.now(),r=6e4){let a=er(e);return a>0&&t-a<r}(r[s.id]))){if(t&&a&&!ts.current.has(s.id)){ti.current.set(s.id,s.provider);continue}ti.current.delete(s.id),n.push(tn(()=>to.current(s.id,s.provider)))}return Promise.all(n)},[tn]),tm=(0,n.useCallback)(async(e,t)=>{await ta(e,t,{force:!0}),E(new Date)},[ta]),tx=(0,n.useCallback)(async(e,t)=>{if(("codex"===t||"claude"===t)&&!G){es(e),A(t=>({...t,[e]:null}));try{let r="claude"===t?await fetch(`/api/usage/${e}/claude-reset`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grantId:o[e]?.raw?.resetCredits?.nextGrantId})}):await fetch(`/api/usage/${e}/codex-reset-credits`,{method:"POST"}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a.message||a.error||a.code||"Failed to reset limit");await ta(e,t,{force:!0}),E(new Date)}catch(t){A(r=>({...r,[e]:t.message||"Failed to reset limit"}))}finally{es(null)}}},[ta,G,o]),tp=(0,n.useCallback)((e,t)=>{eN({connection:e,loading:!1,error:null,data:{kind:"claude",...t}})},[]),th=(0,n.useCallback)(async e=>{eN({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||r.message||"Failed to load Codex reset credits");let a=Array.isArray(r.credits)?[...r.credits]:[];a.sort((e,t)=>{let r=e.expiresAt?new Date(e.expiresAt).getTime():1/0,a=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return r-a}),eN({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){eN({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),tb=(0,n.useCallback)(async e=>{if(confirm("Delete this connection?")){W(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){d(t=>{let r={...t};return delete r[e],r}),g(t=>{let r={...t};return delete r[e],r}),A(t=>{let r={...t};return delete r[e],r});try{let t=function(){try{let e=window.localStorage.getItem(x);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}();t[e]&&(delete t[e],window.localStorage.setItem(x,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await k(tr,eX)}}catch(e){console.error("Error deleting connection:",e)}finally{W(null)}}},[tr,eX]),tg=(0,n.useCallback)(async(e,t)=>{V(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(d(e=>({...e})),await k(tr,eX))}catch(e){console.error("Error updating connection status:",e)}finally{V(null)}},[tr,eX]),tf=(0,n.useCallback)(async e=>{if(!eA?.id)return;let t=eA.id,r=eA.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tr(),eS(!1),eT(null),em.wb.includes(r)&&await ta(t,r))}catch(e){console.error("Error saving connection:",e)}},[eA,tr,ta]);(0,n.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&e$(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let ty=(0,n.useCallback)(async(e=!1)=>{if(I)return;z(!0),H(60);let t=tt.current+=1,r=Math.round(10);try{let a=await tr(eX);if(!a)return;A(e=>w(e,a)),d(e=>w(e,a)),await tu(a.filter(a=>e||"claude"!==a.provider||t%r==0),{lazy:!e}),E(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{z(!1)}},[I,tr,tu,eX]);(0,n.useEffect)(()=>{var e;let t,r=!1,a=(e=ee({page:eX,pageSize:e1,accountFilter:eO,providerFilter:eP}),(t=Z(Y))&&t.key===e&&Array.isArray(t.connections)?t:null);return a?(l(a.connections),eE(a.providerOptions||[]),a.pagination&&e6(a.pagination),a.totals&&e9(a.totals),d(e=>({...ea(a.connections),...e})),B(!1)):B(!0),(async()=>{let e=await tr(eX);if(r||(B(!1),!e))return;let t=ea(e);A(t=>w(t,e)),d(r=>({...t,...w(r,e)})),await tu(e,{skipFreshFrom:t}),r||E(new Date)})(),()=>{r=!0}},[tr,tu,eX,e1,eO,eP]),(0,n.useEffect)(()=>{let e=window.localStorage.getItem(p);q(null===e||"true"===e),F(!0)},[]),(0,n.useEffect)(()=>{O&&window.localStorage.setItem(p,String(T))},[T,O]),(0,n.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>{P({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}}),eB(e?.quotaVisibility||{})}).catch(()=>{})},[]);let tw=(0,n.useCallback)(async(e,t,r)=>{let a=eh[t];if(!a)return;let n={...$[t]||{},[e]:r};P({...$,[t]:n});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[a]||{},connections:n};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[a]:t})})}catch{P($)}},[$]);(0,n.useCallback)(async(e,t)=>{eB(e);try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:e})})).ok)throw Error("Failed to update quota visibility")}catch(e){console.error("Error updating quota visibility:",e),eB(t)}},[]);let tv=(0,n.useCallback)((e,t)=>{e&&eB(r=>{let a=r[e]||{},n=t(new Set(a.hidden||[])),s={...r,[e]:{...a,hidden:[...n]}};return(async()=>{try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:s})})).ok)throw Error("Failed to update quota visibility")}catch(e){console.error("Error updating quota visibility:",e),eB(r)}})(),s})},[]),tk=(e,t)=>{if("gemini"===t)for(let t of e)t.startsWith("gemini-")&&!t.includes("image")&&e.delete(t);else if("claude"===t)for(let t of e)(t.startsWith("claude-")||t.startsWith("gpt-"))&&e.delete(t)},tj=(0,n.useCallback)((e,t,r)=>{let a=N(t);e&&a&&tv(e,e=>(e.add(a),"antigravity"===r&&tk(e,a),e))},[tv]),tN=(0,n.useCallback)(e=>{e&&tv(e,()=>new Set)},[tv]),tC=(0,n.useCallback)((e,t,r)=>{let a=N(t);e&&a&&tv(e,e=>(e.delete(a),"antigravity"===r&&tk(e,a),e))},[tv]);(0,n.useCallback)((e,t)=>{e.length&&eB(r=>{let a={...r},n=!1;for(let r of e){let e=a[r]||{},s=t(r,e);if(null===s)continue;let i=e.hidden||[];(s.length!==i.length||s.some((e,t)=>e!==i[t]))&&(a[r]={...e,hidden:s},n=!0)}return n?((async()=>{try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:a})})).ok)throw Error("Failed to update quota visibility")}catch(e){console.error("Error updating quota visibility:",e),eB(r)}})(),a):r})},[]),(0,n.useEffect)(()=>{if(!O||!T){e7.current&&(clearInterval(e7.current),e7.current=null),te.current&&(clearInterval(te.current),te.current=null);return}return e7.current=setInterval(()=>{ty()},6e4),te.current=setInterval(()=>{H(e=>e<=1?60:e-1)},1e3),()=>{e7.current&&clearInterval(e7.current),te.current&&clearInterval(te.current)}},[T,ty,O]),(0,n.useEffect)(()=>{let e=()=>{document.hidden?(e7.current&&(clearInterval(e7.current),e7.current=null),te.current&&(clearInterval(te.current),te.current=null)):T&&O&&(e7.current=setInterval(()=>ty(),6e4),te.current=setInterval(()=>{H(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[T,ty,O]);let tS=(0,n.useMemo)(()=>(function(e,t,r,a,n){if("codex"===a&&"default"!==n)return[...e].sort((e,r)=>{let a=y(e,t),s=y(r,t),i="remaining-asc"===n?a-s:s-a;return 0!==i?i:(f(e)||"").localeCompare(f(r)||"")});if(!r){let t=new Map;for(let r of e){let e=r.provider||"";t.has(e)||t.set(e,[]),t.get(e).push(r)}return Array.from(t.values()).flat()}let s=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=s(e)-s(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(f(e)||"").localeCompare(f(t)||"")})})(r,o,eJ,eP,eF),[r,o,eJ,eP,eF]),tA=(0,n.useMemo)(()=>eK?tS.filter(e=>{if(b[e.id]||S[e.id])return!0;let t=o[e.id];return!t||(t.quotas?.length??0)>0}):tS,[tS,eK,b,S,o]),tT=e=>{let t=o[e.id]?.quotas;if(!t?.length)return!1;let r=t.filter(e=>!0!==e.unlimited);return 0!==r.length&&r.every(e=>{let t=e.total||0;return t<=0||(e.used||0)>=t})},tq=(0,n.useCallback)(async(e,t)=>{if(e.length&&!eV){eG(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await k(tr,eX)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eG(!1)}}},[eV,tr,eX]),t$="all"===eP?"All providers":eP,tP=e8.eligibleConnections>0,tD=tA.length>0,tM=e8.eligibleConnections?e8.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===eP?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===eO?"turned off":"active"===eO?"active":"matching"} accounts found for ${eP}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},tE=({start:e,end:t,total:r})=>(0,c.Tl)("Showing {start}-{end} of {total}").replace("{start}",String(e)).replace("{end}",String(t)).replace("{total}",String(r)),tO=function(e,t=v){var r;let{start:a,end:n}=(r=e).total?{start:(r.page-1)*r.pageSize+1,end:Math.min(r.page*r.pageSize,r.total)}:{start:0,end:0};return t({start:a,end:n,total:e.total})}(e4,tE),tR=tA.length!==tS.length,tF=function(e,t,r=v){let a=Math.max(0,Number(e)||0);if(0===a)return r({start:0,end:0,total:0});let n=Math.max(1,Number(t)||a);return r({start:1,end:Math.min(a,n),total:a})}(tA.length,e1,tE),t_=!h.includes(e1),tI=U||tP?U||tD?null:(0,a.jsx)(R.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:tM.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text",children:tM.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:tM.description})]})}):(0,a.jsx)(R.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})});return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(M,{view:eI,onViewChange:ez,providerFilter:eP,providerOptions:eM,providerLabel:"all"===eP?(0,c.Tl)("All providers"):t$,onProviderChange:e=>{eP!==e&&e0(1),eD(e)},accountFilter:eO,onAccountChange:e=>{eO!==e&&e0(1),eR(e)},showCodexSort:"codex"===eP,quotaSortMode:eF,onQuotaSortChange:e_,expiringFirst:eJ,onToggleExpiringFirst:()=>eW(e=>!e),onDisableDepleted:()=>{tq(tS.filter(e=>(e.isActive??!0)&&tT(e)).map(e=>e.id),!1)},onEnableAvailable:()=>{tq(tS.filter(e=>!(e.isActive??!0)&&!tT(e)).map(e=>e.id),!0)},bulkToggling:eV,autoRefresh:T,onToggleAutoRefresh:()=>q(e=>!e),countdown:L,refreshingAll:I,onRefreshAll:()=>"windows"===eI?eH(e=>e+1):ty(!0),accountCount:e4.total}),"windows"===eI?(0,a.jsx)(Q,{providerFilter:eP,accountFilter:eO,refreshKey:eL,showTrackerLink:!1}):(0,a.jsxs)(a.Fragment,{children:[tI&&(0,a.jsx)("div",{className:"pt-2",children:tI}),!tI&&(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:tA.map(r=>{let n,l,d,u=o[r.id],x=!!b[r.id],p=S[r.id],h=!u&&!p,g=!1===r.isActive,y="codex"===r.provider,w="claude"===r.provider?u?.raw?.resetCredits:null,v=y?"Codex reset credit":"Claude limit reset",k=Number.isFinite(l="number"==typeof(n=u?.raw?.resetCredits?.availableCount)?n:Number(n))?Math.max(0,l):0,j=G===r.id,A=J===r.id||K===r.id||j,T=u?.quotas||[],q=function(e,t=[],r={},a){if(!Array.isArray(t)||0===t.length)return[];let n=C(e,r,a,t);return 0===n.size?t:t.filter(e=>!n.has(N(e)))}(r.id,T,eU,r.provider),P=function(e,t=[],r={},a){if(!Array.isArray(t)||0===t.length)return[];let n=C(e,r,a,t);return 0===n.size?[]:t.filter(e=>n.has(N(e)))}(r.id,T,eU,r.provider),D=(0,m.PZ)(q),M=(0,m.qz)(q);return(0,a.jsxs)(R.default,{ref:td,"data-conn-id":r.id,padding:"none",className:`min-w-0 ${g?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(s.A,{src:`/providers/${r.provider}.png`,alt:r.provider,size:32,className:"object-contain",fallbackText:r.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text truncate",children:ej[r.provider]||(0,a.jsx)("span",{className:"capitalize",children:r.provider})}),f(r)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:f(r)}):null,eg(r)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:eg(r)}):null,"kiro"===r.provider&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,a.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(d=r.providerSpecificData?.authMethod)&&ep[d]?ep[d]:"api_key"===r.authType?"API Key":"OAuth"}),ef(r)&&(0,a.jsx)("span",{className:"rounded-full bg-blue-500/10 px-2 py-0.5 text-[10px] font-semibold text-blue-600 dark:text-blue-400",children:ef(r)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${g?"bg-surface-2 text-text-muted":"active"===r.testStatus||"success"===r.testStatus?"bg-green-500/10 text-green-600 dark:text-green-400":"error"===r.testStatus||"expired"===r.testStatus||"unavailable"===r.testStatus?"bg-red-500/10 text-red-600 dark:text-red-400":"bg-surface-2 text-text-muted"}`,children:g?"disabled":r.testStatus||"unknown"}),r.providerSpecificData?.profileArn&&(0,a.jsxs)("button",{type:"button",onClick:()=>t(r.providerSpecificData.profileArn,r.id),title:r.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:e===r.id?"check":"content_copy"}),(0,a.jsx)("code",{className:"truncate font-mono",children:r.providerSpecificData.profileArn})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(y||w)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ed.default,{text:k>0?w?`Use your reset now (${k} left, use by ${ev(w.expiresAt)}) \xb7 refills ${ew(w.clears)}`:`Use one ${v}. Available: ${k}`:`No ${v}s available`,children:(0,a.jsxs)("button",{type:"button",onClick:()=>el({connection:r,resetCreditCount:k}),disabled:k<=0||h||x||A,"aria-label":k>0?`Use one ${v}. ${k} available.`:`No ${v}s available`,className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${k>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-black/10 bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${j?"animate-spin":""}`,children:j?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:k})]})}),(0,a.jsx)(ed.default,{text:y?"View Codex reset credit expiry":"View Claude Code reset expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>y?th(r):tp(r,w),disabled:h||A,"aria-label":y?"View Codex reset credit expiry":"View Claude Code reset expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-muted transition-colors hover:bg-black/5 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})})]}),eh[r.provider]&&"oauth"===r.authType&&(0,a.jsx)(ed.default,{text:eb[r.provider],children:(0,a.jsx)("button",{type:"button",onClick:()=>tw(r.id,r.provider,$[r.provider]?.[r.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${$[r.provider]?.[r.id]===!0?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)(ed.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>tm(r.id,r.provider),disabled:x||A,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${x||h?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(ed.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>{eT(r),eS(!0)},disabled:A,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(ed.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>tb(r.id),disabled:A,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${J===r.id?"animate-pulse":""}`,children:"delete"})})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:r.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(ec.default,{size:"sm",checked:r.isActive??!0,disabled:A,onChange:e=>tg(r.id,e)})})]})]})}),u&&q.length>0&&(0,a.jsx)("div",{className:"px-3 pt-2.5",children:(0,a.jsx)(i.default,{packs:q})}),(0,a.jsxs)("div",{className:"px-2 py-1.5",children:[p&&u&&(0,a.jsxs)("p",{className:"px-1 pb-1 text-[11px] text-red-500/80",children:[(0,c.Tl)("Update failed, showing last known")," \xb7 ",p]}),h?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):p&&!u?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:p})]}):u?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:u.message})}):(0,a.jsxs)(a.Fragment,{children:[0===q.length&&T.length>0&&(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-text-muted opacity-40",children:"visibility_off"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:(0,c.Tl)("All quota rows are hidden — use the chips below to show them")})]}),M&&(0,a.jsxs)("button",{type:"button",onClick:()=>eZ(r.id),className:"flex w-full items-center gap-1 rounded-lg py-1.5 text-[11px] text-text-muted transition-colors hover:bg-black/5 hover:text-text dark:hover:bg-white/5","aria-expanded":eQ.has(r.id),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eQ.has(r.id)?"expand_less":"expand_more"}),(0,c.Tl)("Per-pack details"),(0,a.jsxs)("span",{className:"tabular-nums opacity-60",children:["(",D.length,")"]})]}),M&&eQ.has(r.id)&&(0,a.jsx)(eo,{quotas:D,sortMode:"default",showSortLabel:"codex"===r.provider&&"default"!==eF,onHideQuota:e=>tj(r.id,e,r.provider)})]}),P.length>0&&(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 border-t border-black/5 pt-1.5 text-[11px] text-text-muted dark:border-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px]",children:"visibility_off"}),(0,a.jsxs)("span",{className:"shrink-0",children:[(0,c.Tl)("Hidden"),(0,a.jsxs)("span",{className:"tabular-nums opacity-60",children:[" (",P.length,")"]})]}),(0,a.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap",children:P.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>tC(r.id,e,r.provider),className:"shrink-0 rounded-[3px] bg-black/5 px-1.5 py-px transition-colors hover:bg-black/10 hover:text-text dark:bg-white/5 dark:hover:bg-white/10",title:(0,c.Tl)("Show this quota row"),children:(0,_.M)(e.name)},N(e)))}),P.length>1&&(0,a.jsx)("button",{type:"button",onClick:()=>tN(r.id),className:"shrink-0 rounded-md px-1.5 py-px transition-colors hover:bg-black/5 hover:text-text dark:hover:bg-white/5",children:(0,c.Tl)("Show all")})]})]})]},r.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:tR?tF:tO}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:t_?"custom":String(e1),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(e0(1),e5(r),e3(String(r)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[h.map(e=>(0,a.jsx)("option",{value:String(e),children:(0,c.Tl)("{count} / page").replace("{count}",String(e))},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:e2,onChange:e=>e3(e.target.value),onBlur:()=>{let e=Number.parseInt(e2,10);if(!Number.isFinite(e))return void e3(String(e1));let t=Math.min(500,Math.max(1,e));e0(1),e5(t),e3(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(e2,10);if(!Number.isFinite(t))return void e3(String(e1));let r=Math.min(500,Math.max(1,t));e0(1),e5(r),e3(String(r))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsx)("span",{className:"text-xs text-text-muted",children:(0,c.Tl)("Page {page} / {total}").replace("{page}",String(e4.page)).replace("{total}",String(e4.totalPages))})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>e0(1),disabled:e4.page<=1||U||I,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>e0(e=>Math.max(1,e-1)),disabled:e4.page<=1||U||I,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>e0(e=>Math.min(e4.totalPages,e+1)),disabled:e4.page>=e4.totalPages||U||I,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>e0(e4.totalPages),disabled:e4.page>=e4.totalPages||U||I,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})})]}),(0,a.jsx)(eu.uo,{isOpen:!!ei,onClose:()=>{G||el(null)},onConfirm:async()=>{let e=ei?.connection;e&&(await tx(e.id,e.provider),el(null))},title:ei?.connection?.provider==="claude"?"Reset Claude limits?":"Reset Codex limit?",message:ei?.connection?.provider==="claude"?`Refills your ${ew(o[ei.connection.id]?.raw?.resetCredits?.clears)} now for ${f(ei.connection)||"this account"} \xb7 your weekly reset day stays ${ev(o[ei.connection.id]?.raw?.resetCredits?.weeklyResetsAt)}. This cannot be undone. Resets left: ${ei.resetCreditCount??0}.`:`Use 1 Codex reset credit for ${f(ei?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${ei?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!G}),ey&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-4 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"w-full max-w-2xl overflow-hidden rounded-2xl border border-black/15 bg-white shadow-2xl ring-1 ring-black/10 dark:border-white/15 dark:bg-neutral-950 dark:ring-white/10",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-black/10 bg-black/[0.03] px-4 py-3 dark:border-white/10 dark:bg-white/[0.04]",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-text",children:ey.data?.kind==="claude"?"Claude Code Limit Resets":"Codex Reset Credit Expiry"}),(0,a.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:f(ey.connection)||(ey.data?.kind==="claude"?"Claude account":"Codex account")})]}),(0,a.jsx)("button",{type:"button",onClick:()=>eN(null),className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-black/5 hover:text-text dark:hover:bg-white/5","aria-label":"Close reset credit expiry modal",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,a.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-white p-4 dark:bg-neutral-950",children:ey.loading?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading reset credits..."]}):ey.error?(0,a.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300",children:ey.error}):ey.data?.kind==="claude"&&ey.data.grants?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("span",{children:[ey.data.availableCount??0," reset",1===ey.data.availableCount?"":"s"," left"]}),(0,a.jsxs)("span",{children:["Weekly reset day: ",ev(ey.data.weeklyResetsAt)]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Reset"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Left"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Refills"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Use By"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:(ey.data.grants||[]).map(e=>(0,a.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,a.jsxs)("td",{className:"px-3 py-2",children:[(0,a.jsx)("div",{className:"text-text",children:e.label||e.id}),(0,a.jsx)("span",{className:"mt-1 inline-block rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.resetsLeft<=0?"used":e.paused?"paused":e.endsAt&&new Date(e.endsAt).getTime()<=Date.now()?"expired":e.usableNow?"usable now":e.startsAt&&new Date(e.startsAt).getTime()>Date.now()?"not started":e.useRequiresLimit?"at limit only":"unavailable"})]}),(0,a.jsxs)("td",{className:"whitespace-nowrap px-3 py-2 font-medium tabular-nums text-text",children:[e.resetsLeft," / ",e.resetsTotal]}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:ew(e.clears)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text",children:ev(e.endsAt)}),(0,a.jsx)("td",{className:"whitespace-nowrap px-3 py-2 font-medium text-text",children:ek(e.endsAt)})]},e.id))})]})})]}):ey.data?.credits?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("span",{children:[ey.data.credits.length," reset credit",1===ey.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[ey.data.availableCount??0," available"]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Granted At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:ey.data.credits.map((e,t)=>(0,a.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.status||"unknown"})}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:ev(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text",children:ev(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text",children:ek(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-8 text-center text-sm text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:ey.data?.kind==="claude"?"No limit resets available for this account.":"No reset credit details returned for this account."})})]})}),(0,a.jsx)(eu.wI,{isOpen:eC,connection:eA,proxyPools:eq,onSave:tf,onClose:()=>{eS(!1),eT(null)}})]})}}},e=>{e.O(0,[3170,305,1321,5497,8441,3794,7358],()=>e(e.s=26048)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{63339:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))},64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>g});var r=i(95155),s=i(35497),n=i(11059),a=i(73006);let o="techysy/10router",l="main",d="skills",c=`https://raw.githubusercontent.com/${o}/refs/heads/${l}/${d}`,m=`https://github.com/${o}/blob/${l}/${d}`,p=`https://github.com/${o}/tree/${l}/${d}`,x=[{id:"10router",name:"10Router (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"10router-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"10router-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"10router-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"10router-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"10router-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"10router-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"10router-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"},{id:"10router-add-provider",name:"Add Custom Provider",description:"Self-serve register a custom OpenAI/Anthropic-compatible upstream (baseUrl + key + models) — no source change, live immediately.",endpoint:null,icon:"add_circle"}];function h(e){return"zh-CN"===e?"SKILL.zh-CN.md":"SKILL.md"}function u(e,t){return`${c}/${e}/${h(t)}`}function b({value:e,label:t="Copy link"}){let{copied:i,copy:s}=(0,n.C)(2e3);return(0,r.jsxs)("button",{onClick:()=>s(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?(0,a.Tl)("Copied!"):(0,a.Tl)(t)]})}function v({skill:e}){var t;let i=(0,a.kk)(),n=u(e.id,i);return(0,r.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,r.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:(0,a.Tl)(e.name)}),e.isEntry&&(0,r.jsx)(s.Ex,{variant:"primary",size:"sm",children:(0,a.Tl)("START HERE")}),e.endpoint&&(0,r.jsx)(s.Ex,{variant:"default",size:"sm",children:(0,r.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:(0,a.Tl)(e.description)}),(0,r.jsxs)("a",{href:(t=e.id,`${m}/${t}/${h(i)}`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[n,(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,r.jsx)(b,{value:n})]})}function g(){let e=(0,a.kk)();return(0,r.jsxs)("div",{className:"max-w-4xl mx-auto space-y-6",children:[(0,r.jsxs)(s.Zp,{padding:"md",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted mb-2",children:(0,a.Tl)("Paste this to your AI:")}),(0,r.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",u("10router",e)]})]}),(0,r.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,r.jsx)(v,{skill:e},e.id))}),(0,r.jsx)(s.Zp,{padding:"md",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:(0,a.Tl)("More on GitHub")}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:(0,a.Tl)("Browse source, README, and examples.")})]}),(0,r.jsxs)("a",{href:p,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),(0,a.Tl)("View on GitHub")]})]})})]})}}},e=>{e.O(0,[3170,1728,1321,5497,8441,3794,7358],()=>e(e.s=63339)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{63339:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))},64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>g});var r=i(95155),s=i(35497),n=i(11059),a=i(73006);let o="techysy/10router",l="main",d="skills",c=`https://raw.githubusercontent.com/${o}/refs/heads/${l}/${d}`,m=`https://github.com/${o}/blob/${l}/${d}`,p=`https://github.com/${o}/tree/${l}/${d}`,x=[{id:"10router",name:"10Router (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"10router-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"10router-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"10router-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"10router-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"10router-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"10router-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"10router-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"},{id:"10router-add-provider",name:"Add Custom Provider",description:"Self-serve register a custom OpenAI/Anthropic-compatible upstream (baseUrl + key + models) — no source change, live immediately.",endpoint:null,icon:"add_circle"}];function h(e){return"zh-CN"===e?"SKILL.zh-CN.md":"SKILL.md"}function u(e,t){return`${c}/${e}/${h(t)}`}function b({value:e,label:t="Copy link"}){let{copied:i,copy:s}=(0,n.C)(2e3);return(0,r.jsxs)("button",{onClick:()=>s(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?(0,a.Tl)("Copied!"):(0,a.Tl)(t)]})}function v({skill:e}){var t;let i=(0,a.kk)(),n=u(e.id,i);return(0,r.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,r.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:(0,a.Tl)(e.name)}),e.isEntry&&(0,r.jsx)(s.Ex,{variant:"primary",size:"sm",children:(0,a.Tl)("START HERE")}),e.endpoint&&(0,r.jsx)(s.Ex,{variant:"default",size:"sm",children:(0,r.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:(0,a.Tl)(e.description)}),(0,r.jsxs)("a",{href:(t=e.id,`${m}/${t}/${h(i)}`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[n,(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,r.jsx)(b,{value:n})]})}function g(){let e=(0,a.kk)();return(0,r.jsxs)("div",{className:"max-w-4xl mx-auto space-y-6",children:[(0,r.jsxs)(s.Zp,{padding:"md",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted mb-2",children:(0,a.Tl)("Paste this to your AI:")}),(0,r.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",u("10router",e)]})]}),(0,r.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,r.jsx)(v,{skill:e},e.id))}),(0,r.jsx)(s.Zp,{padding:"md",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:(0,a.Tl)("More on GitHub")}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:(0,a.Tl)("Browse source, README, and examples.")})]}),(0,r.jsxs)("a",{href:p,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),(0,a.Tl)("View on GitHub")]})]})})]})}}},e=>{e.O(0,[3170,305,1321,5497,8441,3794,7358],()=>e(e.s=63339)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{15536:(e,t,a)=>{"use strict";a.d(t,{Cp:()=>n,Hx:()=>r,Iv:()=>d,Nv:()=>x,RL:()=>c,ev:()=>m,fl:()=>i,hT:()=>s,oX:()=>l,t6:()=>o});let s=["zh-CN","zh-TW"],l=[{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"}],r=2e3,n=3e5,i=5e3,o=5,c=1e4,d=5e3,m=[{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}],x=[{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"}]},46855:(e,t,a)=>{Promise.resolve().then(a.bind(a,61203))},61203:(e,t,a)=>{"use strict";a.d(t,{default:()=>c});var s=a(95155),l=a(12115),r=a(35497),n=a(11059),i=a(73006),o=a(15536);function c(){let[e,t]=(0,l.useState)(!0),[a,c]=(0,l.useState)(!1),[d,m]=(0,l.useState)("http://localhost:8787"),[x,h]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[p,u]=(0,l.useState)(!1),[f,g]=(0,l.useState)(!1),[b,j]=(0,l.useState)(""),[v,y]=(0,l.useState)({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),[N,w]=(0,l.useState)([]),[C,k]=(0,l.useState)(!1),[S,E]=(0,l.useState)(""),[P,T]=(0,l.useState)(null),[R,I]=(0,l.useState)(""),[$,L]=(0,l.useState)(null),[O,U]=(0,l.useState)(!1),[A,H]=(0,l.useState)(!0),[M,_]=(0,l.useState)(!1),F=(0,l.useRef)(null),[z,D]=(0,l.useState)(!1),[B,J]=(0,l.useState)("full"),[W,G]=(0,l.useState)(!1),[K,X]=(0,l.useState)("full"),[q,Y]=(0,l.useState)(!1),[Q,Z]=(0,l.useState)(25e3),[V,ee]=(0,l.useState)({installed:!1,installing:!1,running:!1,version:null,loading:!0}),[et,ea]=(0,l.useState)(null),[es,el]=(0,l.useState)(!1),[er,en]=(0,l.useState)(!1),[ei,eo]=(0,l.useState)(""),[ec,ed]=(0,l.useState)(!0),[em,ex]=(0,l.useState)(.9),[eh,ep]=(0,l.useState)("en"),{copied:eu,copy:ef}=(0,n.C)();(0,l.useEffect)(()=>(ep((0,i.kk)()),(0,i.oQ)(()=>ep((0,i.kk)()))),[]);let eg=o.hT.includes(eh),eb=eg?o.ev:o.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=o.ev.find(e=>e.id===B);e?.wenyan&&!eg&&(J("ultra"),ej({cavemanLevel:"ultra"}))},[eg,B]);let ej=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)}},ev=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},ey=async()=>{let e=d.trim()||"http://localhost:8787";m(e),await ej({headroomUrl:e}),eN()},eN=(0,l.useCallback)(async()=>{h(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();if(h({...t,loading:!1}),!t?.installed){y({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),w([]);return}try{let e=await fetch("/api/headroom/extras",{headers:{"Cache-Control":"no-store"}});if(!e.ok)throw Error("extras status failed");let t=await e.json();y(e=>({...e,version:t.version??null,extras:t.extras||{code:!1,ml:!1},available:t.available||["code","ml"],loading:!1})),w([])}catch{y({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),w([])}}catch{h({installed:!1,running:!1,python:null,loading:!1}),y({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),w([])}},[]),ew=(0,l.useCallback)(async()=>{j(""),g(!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 eN()}catch(e){j(e.message)}finally{g(!1)}},[eN]),eC=(0,l.useCallback)(async()=>{g(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await eN()}finally{g(!1)}},[eN]),ek=(0,l.useCallback)(()=>{I(""),F.current&&clearInterval(F.current);let e=async()=>{try{let e=await fetch("/api/headroom/extras?log=1",{headers:{"Cache-Control":"no-store"}}),t=await e.json().catch(()=>({}));"string"==typeof t.log&&I(t.log)}catch{}};e(),F.current=setInterval(e,1500)},[]),eS=(0,l.useCallback)(()=>{F.current&&(clearInterval(F.current),F.current=null)},[]);(0,l.useEffect)(()=>()=>eS(),[eS]);let eE=(0,l.useCallback)(async()=>{if(0!==N.length){k(!0),E(""),ek();try{let e=await fetch("/api/headroom/extras",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:N})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Install failed");y(e=>({...e,version:t.version??e.version,extras:t.extras||e.extras})),w([])}catch(e){E(e.message)}finally{eS(),k(!1)}}},[N,ek,eS]),eP=(0,l.useCallback)(async e=>{T(e),E(""),ek();try{let t=await fetch("/api/headroom/extras",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:[e]})}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||"Remove failed");y(e=>({...e,version:a.version??e.version,extras:a.extras||e.extras}))}catch(e){E(e.message)}finally{eS(),T(null)}},[ek,eS]),eT=(0,l.useCallback)(()=>{if(0!==N.length){if(N.includes("ml"))return void L({title:"Install [ml]",message:"[ml] downloads ~1 GB (torch + huggingface-hub). Continue?",confirmText:"Install",variant:"primary",onConfirm:eE});eE()}},[N,eE]),eR=(0,l.useCallback)(e=>{L({title:`Remove [${e}]`,message:`Remove [${e}] and its packages?`,confirmText:"Remove",variant:"danger",onConfirm:()=>eP(e)})},[eP]),eI=(0,l.useCallback)(async(e,t)=>{if(E(""),"code"===e&&U(t),"ml"===e&&H(t),await ej({["code"===e?"headroomCodeAware":"headroomKompress"]:t}),x.running){_(!0);try{let e=await fetch("/api/headroom/restart",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Restart failed");await eN()}catch(e){E(e.message)}finally{_(!1)}}},[x.running,eN]),e$=(0,l.useCallback)(async()=>{ee(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();ee({...t,loading:!1}),"number"==typeof t.minChars&&Z(t.minChars)}catch{ee({installed:!1,installing:!1,running:!1,version:null,loading:!1})}},[]),eL=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/pxpipe/health",{method:"POST"});ea(await e.json())}catch(e){ea({healthy:!1,checks:[],error:e.message})}},[]),eO=(0,l.useCallback)(async e=>{eo(""),en(!0);try{let t=await fetch(`/api/pxpipe/${e}`,{method:"POST"}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||`PXPIPE ${e} failed`);await e$(),await eL()}catch(e){eo(e.message)}finally{en(!1)}},[e$,eL]);(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let a=await e.json();t(!1!==a.rtkEnabled),ed(!1!==a.autoCompactEnabled),"number"==typeof a.autoCompactRatio&&ex(a.autoCompactRatio),c(!!a.headroomEnabled),m(a.headroomUrl||"http://localhost:8787"),U(!0===a.headroomCodeAware),H(!1!==a.headroomKompress),D(!!a.cavemanEnabled),J(a.cavemanLevel||"full"),G(!!a.ponytailEnabled),X(a.ponytailLevel||"full"),Y(!!a.pxpipeEnabled),"number"==typeof a.pxpipeMinChars&&Z(a.pxpipeMinChars),eN(),e$().then(eL)}}catch{}})()},[eN,e$,eL]);let eU=!!x.running,eA=x.loading?"Checking…":eU?"Running":!1===x.localUrl||x.installed?!1!==x.localUrl?"Stopped":"External":"Not installed",eH=!1!==x.localUrl,eM=!!x.canStart,e_=eH&&!!x.managedPid,eF=et?.healthy===!0,ez=V.loading?"Checking…":V.installing?"Installing…":V.installed?eF?"Healthy":V.running?"Running":"Stopped":"Not installed";return eF||V.running,(0,s.jsxs)("div",{className:"space-y-6 p-6",children:[(0,s.jsxs)(r.Zp,{id:"rtk",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,s.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,s.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,s.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,s.jsx)(r.lM,{checked:e,onChange:()=>ev(!e)})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-4 gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,s.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,s.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${eU?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:eA}),(0,s.jsx)("button",{type:"button",onClick:()=>u(!0),className:"text-xs text-primary underline hover:opacity-80",children:eU?"Manage":"Setup"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,s.jsx)(r.lM,{checked:a,onChange:()=>{var e;let t;return e=!a,void(m(t=d.trim()||"http://localhost:8787"),c(e),ej({headroomEnabled:e,headroomUrl:t}))}})]}),x.installed&&(0,s.jsxs)("div",{className:"mb-3 ml-1 pl-3 pb-4 border-l-2 border-border",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Compression extras",v.version?` \xb7 v${v.version}`:"",":"]}),v.available.map(e=>{let t=!!v.extras[e],a=N.includes(e),l="code"===e?"tree-sitter AST compression for code responses":"Kompress-v2 HF model for prose/agentic traces (~+1GB)";if(t){let t="code"===e?O:A;return(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs px-2 py-1 rounded border border-success/40 bg-success/5 text-text",title:l,children:[(0,s.jsx)(r.lM,{size:"sm",checked:t,disabled:M,onChange:()=>eI(e,!t)}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("button",{type:"button",onClick:()=>eR(e),disabled:P===e,className:"ml-1 text-danger underline hover:opacity-80 disabled:opacity-50",title:`Uninstall [${e}]`,children:P===e?"Uninstalling…":"Uninstall"})]},e)}return(0,s.jsxs)("label",{className:`flex items-center gap-1.5 text-xs px-2 py-1 rounded border cursor-pointer transition-colors ${a?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:bg-surface-2"}`,title:l,children:[(0,s.jsx)("input",{type:"checkbox",className:"w-3 h-3",checked:a,onChange:()=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("span",{className:"opacity-70",children:"not installed"})]},e)}),N.length>0&&(0,s.jsx)("button",{onClick:eT,disabled:C,className:"text-xs px-2.5 py-1 rounded bg-primary text-white hover:opacity-90 disabled:opacity-50",children:C?"Installing…":`Install [proxy,${N.join(",")}]`})]}),S&&(0,s.jsx)("p",{className:"text-xs text-danger mt-1",children:S}),M&&(0,s.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Restarting proxy…"}),(C||P)&&R&&(0,s.jsx)("pre",{className:"mt-2 max-h-32 overflow-auto rounded bg-surface-2 p-2 text-[10px] leading-tight text-text-muted whitespace-pre-wrap",children:R}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Installing adds the package; use ",(0,s.jsx)("code",{children:"on"}),"/",(0,s.jsx)("code",{children:"off"})," ","to activate it (restarts the proxy). Default install is"," ",(0,s.jsx)("code",{children:"[proxy]"})," only (SmartCrusher for JSON). Adding"," ",(0,s.jsx)("code",{children:"[code]"})," enables AST compression (Python/JS/TS/Go/Rust/Java/C/C++/Perl). Adding ",(0,s.jsx)("code",{children:"[ml]"})," ","enables the Kompress-v2 HF model for prose/agentic traces but adds ~1 GB (torch + huggingface-hub)."]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-4 border-t border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,s.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,s.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[z&&(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:eb.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;J(t=e.id),ej({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${B===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,s.jsx)("p",{className:"text-xs text-primary",children:o.ev.find(e=>e.id===B)?.desc})]}),(0,s.jsx)(r.lM,{checked:z,onChange:()=>{var e;D(e=!z),ej({cavemanEnabled:e})}})]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,s.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,s.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[W&&(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:o.Nv.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;X(t=e.id),ej({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${K===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,s.jsx)("p",{className:"text-xs text-primary",children:o.Nv.find(e=>e.id===K)?.desc})]}),(0,s.jsx)(r.lM,{checked:W,onChange:()=>{var e;G(e=!W),ej({ponytailEnabled:e})}})]})]}),(0,s.jsxs)("div",{className:"flex items-start justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"font-medium",children:(0,i.Tl)("Auto-compact oversized context")}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:(0,i.Tl)("Summarize older turns before dispatch when a request nears the model's context limit")}),ec&&(0,s.jsxs)("label",{className:"mt-2 flex items-center gap-2 text-xs text-text-muted",children:[(0,i.Tl)("Trigger threshold"),(0,s.jsxs)("select",{value:String(em),onChange:e=>{let t;Number.isFinite(t=Number(e.target.value))&&(ex(t),ej({autoCompactRatio:t}))},className:"rounded border border-border bg-surface px-2 py-1 text-xs text-text",children:[(0,s.jsx)("option",{value:"0.8",children:"80%"}),(0,s.jsx)("option",{value:"0.9",children:"90%"}),(0,s.jsx)("option",{value:"0.95",children:"95%"})]})]})]}),(0,s.jsx)(r.lM,{checked:ec,onChange:()=>{var e;ed(e=!ec),ej({autoCompactEnabled:e})}})]}),!1]}),(0,s.jsx)(r.aF,{isOpen:p,title:eU?"Headroom":"Setup Headroom",onClose:()=>u(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{children:"Status"}),(0,s.jsx)("span",{className:eU?"text-success":"text-warning",children:eA})]}),eU&&(0,s.jsx)("a",{href:"/api/headroom/proxy/dashboard",target:"_blank",rel:"noreferrer",className:"w-full rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Headroom Dashboard"}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,s.jsx)(r.pd,{value:d,onChange:e=>m(e.target.value),onBlur:ey,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,s.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."})]}),e_?(0,s.jsx)(r.$n,{onClick:eC,variant:"ghost",fullWidth:!0,disabled:f,children:f?"Stopping…":"Stop Headroom"}):eU?(0,s.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):eM?(0,s.jsx)(r.$n,{onClick:ew,fullWidth:!0,disabled:f,children:f?"Starting…":"Start Headroom"}):eH?x.python?(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.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,s.jsx)(r.$n,{size:"sm",variant:"ghost",onClick:()=>ef('pip install "headroom-ai[proxy]"'),children:eu?"Copied":"Copy"})]})]}):(0,s.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,s.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),b&&(0,s.jsx)("p",{className:"text-sm text-warning",children:b}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>eN(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>u(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(r.aF,{isOpen:!1,title:V.installed?"PXPIPE":"Setup PXPIPE",onClose:()=>el(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Compress prompts using multimodal encoding. Runs in-process — no extra server or environment variables required."}),(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{children:"Status"}),(0,s.jsxs)("span",{className:eF||V.running?"text-success":"text-warning",children:[ez,V.version?` \xb7 v${V.version}`:""]})]}),et?.checks?.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 rounded border border-border p-3",children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-1",children:"Health check"}),et.checks.map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,s.jsxs)("span",{className:e.ok?"text-success":"text-warning",children:[e.ok?"●":"○"," ",e.label]}),e.detail&&(0,s.jsx)("span",{className:"text-text-muted font-mono truncate max-w-[50%]",children:e.detail})]},e.id)),et.error&&(0,s.jsx)("p",{className:"text-xs text-warning mt-1",children:et.error})]}),V.installed?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[V.running?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.$n,{onClick:()=>eO("restart"),variant:"ghost",disabled:er,children:"Restart"}),(0,s.jsx)(r.$n,{onClick:()=>eO("stop"),variant:"ghost",disabled:er,children:"Stop"})]}):(0,s.jsx)(r.$n,{onClick:()=>eO("start"),disabled:er,children:er?"Starting…":"Start"}),(0,s.jsx)(r.$n,{onClick:()=>eO("install"),variant:"ghost",disabled:er,children:"Repair"}),(0,s.jsx)("a",{href:"/dashboard/pxpipe#logs",className:"col-span-2 rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Logs"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("p",{className:"text-sm text-warning",children:"PXPIPE is not installed."}),(0,s.jsx)(r.$n,{onClick:()=>eO("install"),fullWidth:!0,disabled:er||V.installing,children:er||V.installing?"Installing…":"Install"}),(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Installs the npm package ",(0,s.jsx)("code",{className:"font-mono",children:"pxpipe-proxy"})," into the 10Router data directory. May take a few minutes."]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Minimum prompt size (chars)"}),(0,s.jsx)(r.pd,{value:String(Q),onChange:e=>Z(e.target.value),onBlur:()=>{let e=Math.max(0,Number(Q)||25e3);Z(e),ej({pxpipeMinChars:e})},placeholder:"25000",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Requests smaller than this bypass PXPIPE and are sent as-is."})]}),ei&&(0,s.jsx)("p",{className:"text-sm text-warning",children:ei}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>e$().then(eL),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>el(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(r.uo,{isOpen:!!$,onClose:()=>L(null),onConfirm:()=>{let e=$?.onConfirm;L(null),e?.()},title:$?.title,message:$?.message,confirmText:$?.confirmText,variant:$?.variant})]})}}},e=>{e.O(0,[3170,1728,1321,5497,8441,3794,7358],()=>e(e.s=46855)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{15536:(e,t,a)=>{"use strict";a.d(t,{Cp:()=>n,Hx:()=>r,Iv:()=>d,Nv:()=>x,RL:()=>c,ev:()=>m,fl:()=>i,hT:()=>s,oX:()=>l,t6:()=>o});let s=["zh-CN","zh-TW"],l=[{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"}],r=2e3,n=3e5,i=5e3,o=5,c=1e4,d=5e3,m=[{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}],x=[{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"}]},46855:(e,t,a)=>{Promise.resolve().then(a.bind(a,61203))},61203:(e,t,a)=>{"use strict";a.d(t,{default:()=>c});var s=a(95155),l=a(12115),r=a(35497),n=a(11059),i=a(73006),o=a(15536);function c(){let[e,t]=(0,l.useState)(!0),[a,c]=(0,l.useState)(!1),[d,m]=(0,l.useState)("http://localhost:8787"),[x,h]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[p,u]=(0,l.useState)(!1),[f,g]=(0,l.useState)(!1),[b,j]=(0,l.useState)(""),[v,y]=(0,l.useState)({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),[N,w]=(0,l.useState)([]),[C,k]=(0,l.useState)(!1),[S,E]=(0,l.useState)(""),[P,T]=(0,l.useState)(null),[R,I]=(0,l.useState)(""),[$,L]=(0,l.useState)(null),[O,U]=(0,l.useState)(!1),[A,H]=(0,l.useState)(!0),[M,_]=(0,l.useState)(!1),F=(0,l.useRef)(null),[z,D]=(0,l.useState)(!1),[B,J]=(0,l.useState)("full"),[W,G]=(0,l.useState)(!1),[K,X]=(0,l.useState)("full"),[q,Y]=(0,l.useState)(!1),[Q,Z]=(0,l.useState)(25e3),[V,ee]=(0,l.useState)({installed:!1,installing:!1,running:!1,version:null,loading:!0}),[et,ea]=(0,l.useState)(null),[es,el]=(0,l.useState)(!1),[er,en]=(0,l.useState)(!1),[ei,eo]=(0,l.useState)(""),[ec,ed]=(0,l.useState)(!0),[em,ex]=(0,l.useState)(.9),[eh,ep]=(0,l.useState)("en"),{copied:eu,copy:ef}=(0,n.C)();(0,l.useEffect)(()=>(ep((0,i.kk)()),(0,i.oQ)(()=>ep((0,i.kk)()))),[]);let eg=o.hT.includes(eh),eb=eg?o.ev:o.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=o.ev.find(e=>e.id===B);e?.wenyan&&!eg&&(J("ultra"),ej({cavemanLevel:"ultra"}))},[eg,B]);let ej=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)}},ev=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},ey=async()=>{let e=d.trim()||"http://localhost:8787";m(e),await ej({headroomUrl:e}),eN()},eN=(0,l.useCallback)(async()=>{h(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();if(h({...t,loading:!1}),!t?.installed){y({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),w([]);return}try{let e=await fetch("/api/headroom/extras",{headers:{"Cache-Control":"no-store"}});if(!e.ok)throw Error("extras status failed");let t=await e.json();y(e=>({...e,version:t.version??null,extras:t.extras||{code:!1,ml:!1},available:t.available||["code","ml"],loading:!1})),w([])}catch{y({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),w([])}}catch{h({installed:!1,running:!1,python:null,loading:!1}),y({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),w([])}},[]),ew=(0,l.useCallback)(async()=>{j(""),g(!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 eN()}catch(e){j(e.message)}finally{g(!1)}},[eN]),eC=(0,l.useCallback)(async()=>{g(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await eN()}finally{g(!1)}},[eN]),ek=(0,l.useCallback)(()=>{I(""),F.current&&clearInterval(F.current);let e=async()=>{try{let e=await fetch("/api/headroom/extras?log=1",{headers:{"Cache-Control":"no-store"}}),t=await e.json().catch(()=>({}));"string"==typeof t.log&&I(t.log)}catch{}};e(),F.current=setInterval(e,1500)},[]),eS=(0,l.useCallback)(()=>{F.current&&(clearInterval(F.current),F.current=null)},[]);(0,l.useEffect)(()=>()=>eS(),[eS]);let eE=(0,l.useCallback)(async()=>{if(0!==N.length){k(!0),E(""),ek();try{let e=await fetch("/api/headroom/extras",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:N})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Install failed");y(e=>({...e,version:t.version??e.version,extras:t.extras||e.extras})),w([])}catch(e){E(e.message)}finally{eS(),k(!1)}}},[N,ek,eS]),eP=(0,l.useCallback)(async e=>{T(e),E(""),ek();try{let t=await fetch("/api/headroom/extras",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:[e]})}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||"Remove failed");y(e=>({...e,version:a.version??e.version,extras:a.extras||e.extras}))}catch(e){E(e.message)}finally{eS(),T(null)}},[ek,eS]),eT=(0,l.useCallback)(()=>{if(0!==N.length){if(N.includes("ml"))return void L({title:"Install [ml]",message:"[ml] downloads ~1 GB (torch + huggingface-hub). Continue?",confirmText:"Install",variant:"primary",onConfirm:eE});eE()}},[N,eE]),eR=(0,l.useCallback)(e=>{L({title:`Remove [${e}]`,message:`Remove [${e}] and its packages?`,confirmText:"Remove",variant:"danger",onConfirm:()=>eP(e)})},[eP]),eI=(0,l.useCallback)(async(e,t)=>{if(E(""),"code"===e&&U(t),"ml"===e&&H(t),await ej({["code"===e?"headroomCodeAware":"headroomKompress"]:t}),x.running){_(!0);try{let e=await fetch("/api/headroom/restart",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Restart failed");await eN()}catch(e){E(e.message)}finally{_(!1)}}},[x.running,eN]),e$=(0,l.useCallback)(async()=>{ee(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();ee({...t,loading:!1}),"number"==typeof t.minChars&&Z(t.minChars)}catch{ee({installed:!1,installing:!1,running:!1,version:null,loading:!1})}},[]),eL=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/pxpipe/health",{method:"POST"});ea(await e.json())}catch(e){ea({healthy:!1,checks:[],error:e.message})}},[]),eO=(0,l.useCallback)(async e=>{eo(""),en(!0);try{let t=await fetch(`/api/pxpipe/${e}`,{method:"POST"}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||`PXPIPE ${e} failed`);await e$(),await eL()}catch(e){eo(e.message)}finally{en(!1)}},[e$,eL]);(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let a=await e.json();t(!1!==a.rtkEnabled),ed(!1!==a.autoCompactEnabled),"number"==typeof a.autoCompactRatio&&ex(a.autoCompactRatio),c(!!a.headroomEnabled),m(a.headroomUrl||"http://localhost:8787"),U(!0===a.headroomCodeAware),H(!1!==a.headroomKompress),D(!!a.cavemanEnabled),J(a.cavemanLevel||"full"),G(!!a.ponytailEnabled),X(a.ponytailLevel||"full"),Y(!!a.pxpipeEnabled),"number"==typeof a.pxpipeMinChars&&Z(a.pxpipeMinChars),eN(),e$().then(eL)}}catch{}})()},[eN,e$,eL]);let eU=!!x.running,eA=x.loading?"Checking…":eU?"Running":!1===x.localUrl||x.installed?!1!==x.localUrl?"Stopped":"External":"Not installed",eH=!1!==x.localUrl,eM=!!x.canStart,e_=eH&&!!x.managedPid,eF=et?.healthy===!0,ez=V.loading?"Checking…":V.installing?"Installing…":V.installed?eF?"Healthy":V.running?"Running":"Stopped":"Not installed";return eF||V.running,(0,s.jsxs)("div",{className:"space-y-6 p-6",children:[(0,s.jsxs)(r.Zp,{id:"rtk",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,s.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,s.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,s.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,s.jsx)(r.lM,{checked:e,onChange:()=>ev(!e)})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-4 gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,s.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,s.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${eU?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:eA}),(0,s.jsx)("button",{type:"button",onClick:()=>u(!0),className:"text-xs text-primary underline hover:opacity-80",children:eU?"Manage":"Setup"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,s.jsx)(r.lM,{checked:a,onChange:()=>{var e;let t;return e=!a,void(m(t=d.trim()||"http://localhost:8787"),c(e),ej({headroomEnabled:e,headroomUrl:t}))}})]}),x.installed&&(0,s.jsxs)("div",{className:"mb-3 ml-1 pl-3 pb-4 border-l-2 border-border",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Compression extras",v.version?` \xb7 v${v.version}`:"",":"]}),v.available.map(e=>{let t=!!v.extras[e],a=N.includes(e),l="code"===e?"tree-sitter AST compression for code responses":"Kompress-v2 HF model for prose/agentic traces (~+1GB)";if(t){let t="code"===e?O:A;return(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs px-2 py-1 rounded border border-success/40 bg-success/5 text-text",title:l,children:[(0,s.jsx)(r.lM,{size:"sm",checked:t,disabled:M,onChange:()=>eI(e,!t)}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("button",{type:"button",onClick:()=>eR(e),disabled:P===e,className:"ml-1 text-danger underline hover:opacity-80 disabled:opacity-50",title:`Uninstall [${e}]`,children:P===e?"Uninstalling…":"Uninstall"})]},e)}return(0,s.jsxs)("label",{className:`flex items-center gap-1.5 text-xs px-2 py-1 rounded border cursor-pointer transition-colors ${a?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:bg-surface-2"}`,title:l,children:[(0,s.jsx)("input",{type:"checkbox",className:"w-3 h-3",checked:a,onChange:()=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("span",{className:"opacity-70",children:"not installed"})]},e)}),N.length>0&&(0,s.jsx)("button",{onClick:eT,disabled:C,className:"text-xs px-2.5 py-1 rounded bg-primary text-white hover:opacity-90 disabled:opacity-50",children:C?"Installing…":`Install [proxy,${N.join(",")}]`})]}),S&&(0,s.jsx)("p",{className:"text-xs text-danger mt-1",children:S}),M&&(0,s.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Restarting proxy…"}),(C||P)&&R&&(0,s.jsx)("pre",{className:"mt-2 max-h-32 overflow-auto rounded bg-surface-2 p-2 text-[10px] leading-tight text-text-muted whitespace-pre-wrap",children:R}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Installing adds the package; use ",(0,s.jsx)("code",{children:"on"}),"/",(0,s.jsx)("code",{children:"off"})," ","to activate it (restarts the proxy). Default install is"," ",(0,s.jsx)("code",{children:"[proxy]"})," only (SmartCrusher for JSON). Adding"," ",(0,s.jsx)("code",{children:"[code]"})," enables AST compression (Python/JS/TS/Go/Rust/Java/C/C++/Perl). Adding ",(0,s.jsx)("code",{children:"[ml]"})," ","enables the Kompress-v2 HF model for prose/agentic traces but adds ~1 GB (torch + huggingface-hub)."]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-4 border-t border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,s.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,s.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[z&&(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:eb.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;J(t=e.id),ej({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${B===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,s.jsx)("p",{className:"text-xs text-primary",children:o.ev.find(e=>e.id===B)?.desc})]}),(0,s.jsx)(r.lM,{checked:z,onChange:()=>{var e;D(e=!z),ej({cavemanEnabled:e})}})]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,s.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,s.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[W&&(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:o.Nv.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;X(t=e.id),ej({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${K===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,s.jsx)("p",{className:"text-xs text-primary",children:o.Nv.find(e=>e.id===K)?.desc})]}),(0,s.jsx)(r.lM,{checked:W,onChange:()=>{var e;G(e=!W),ej({ponytailEnabled:e})}})]})]}),(0,s.jsxs)("div",{className:"flex items-start justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"font-medium",children:(0,i.Tl)("Auto-compact oversized context")}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:(0,i.Tl)("Summarize older turns before dispatch when a request nears the model's context limit")}),ec&&(0,s.jsxs)("label",{className:"mt-2 flex items-center gap-2 text-xs text-text-muted",children:[(0,i.Tl)("Trigger threshold"),(0,s.jsxs)("select",{value:String(em),onChange:e=>{let t;Number.isFinite(t=Number(e.target.value))&&(ex(t),ej({autoCompactRatio:t}))},className:"rounded border border-border bg-surface px-2 py-1 text-xs text-text",children:[(0,s.jsx)("option",{value:"0.8",children:"80%"}),(0,s.jsx)("option",{value:"0.9",children:"90%"}),(0,s.jsx)("option",{value:"0.95",children:"95%"})]})]})]}),(0,s.jsx)(r.lM,{checked:ec,onChange:()=>{var e;ed(e=!ec),ej({autoCompactEnabled:e})}})]}),!1]}),(0,s.jsx)(r.aF,{isOpen:p,title:eU?"Headroom":"Setup Headroom",onClose:()=>u(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{children:"Status"}),(0,s.jsx)("span",{className:eU?"text-success":"text-warning",children:eA})]}),eU&&(0,s.jsx)("a",{href:"/api/headroom/proxy/dashboard",target:"_blank",rel:"noreferrer",className:"w-full rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Headroom Dashboard"}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,s.jsx)(r.pd,{value:d,onChange:e=>m(e.target.value),onBlur:ey,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,s.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."})]}),e_?(0,s.jsx)(r.$n,{onClick:eC,variant:"ghost",fullWidth:!0,disabled:f,children:f?"Stopping…":"Stop Headroom"}):eU?(0,s.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):eM?(0,s.jsx)(r.$n,{onClick:ew,fullWidth:!0,disabled:f,children:f?"Starting…":"Start Headroom"}):eH?x.python?(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.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,s.jsx)(r.$n,{size:"sm",variant:"ghost",onClick:()=>ef('pip install "headroom-ai[proxy]"'),children:eu?"Copied":"Copy"})]})]}):(0,s.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,s.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),b&&(0,s.jsx)("p",{className:"text-sm text-warning",children:b}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>eN(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>u(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(r.aF,{isOpen:!1,title:V.installed?"PXPIPE":"Setup PXPIPE",onClose:()=>el(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Compress prompts using multimodal encoding. Runs in-process — no extra server or environment variables required."}),(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{children:"Status"}),(0,s.jsxs)("span",{className:eF||V.running?"text-success":"text-warning",children:[ez,V.version?` \xb7 v${V.version}`:""]})]}),et?.checks?.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 rounded border border-border p-3",children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-1",children:"Health check"}),et.checks.map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,s.jsxs)("span",{className:e.ok?"text-success":"text-warning",children:[e.ok?"●":"○"," ",e.label]}),e.detail&&(0,s.jsx)("span",{className:"text-text-muted font-mono truncate max-w-[50%]",children:e.detail})]},e.id)),et.error&&(0,s.jsx)("p",{className:"text-xs text-warning mt-1",children:et.error})]}),V.installed?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[V.running?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.$n,{onClick:()=>eO("restart"),variant:"ghost",disabled:er,children:"Restart"}),(0,s.jsx)(r.$n,{onClick:()=>eO("stop"),variant:"ghost",disabled:er,children:"Stop"})]}):(0,s.jsx)(r.$n,{onClick:()=>eO("start"),disabled:er,children:er?"Starting…":"Start"}),(0,s.jsx)(r.$n,{onClick:()=>eO("install"),variant:"ghost",disabled:er,children:"Repair"}),(0,s.jsx)("a",{href:"/dashboard/pxpipe#logs",className:"col-span-2 rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Logs"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("p",{className:"text-sm text-warning",children:"PXPIPE is not installed."}),(0,s.jsx)(r.$n,{onClick:()=>eO("install"),fullWidth:!0,disabled:er||V.installing,children:er||V.installing?"Installing…":"Install"}),(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Installs the npm package ",(0,s.jsx)("code",{className:"font-mono",children:"pxpipe-proxy"})," into the 10Router data directory. May take a few minutes."]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Minimum prompt size (chars)"}),(0,s.jsx)(r.pd,{value:String(Q),onChange:e=>Z(e.target.value),onBlur:()=>{let e=Math.max(0,Number(Q)||25e3);Z(e),ej({pxpipeMinChars:e})},placeholder:"25000",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Requests smaller than this bypass PXPIPE and are sent as-is."})]}),ei&&(0,s.jsx)("p",{className:"text-sm text-warning",children:ei}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>e$().then(eL),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>el(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(r.uo,{isOpen:!!$,onClose:()=>L(null),onConfirm:()=>{let e=$?.onConfirm;L(null),e?.()},title:$?.title,message:$?.message,confirmText:$?.confirmText,variant:$?.variant})]})}}},e=>{e.O(0,[3170,305,1321,5497,8441,3794,7358],()=>e(e.s=46855)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3528],{5214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=n(17828)},17828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,n(64054).createAsyncLocalStorage)()},21957:(e,t,n)=>{"use strict";function r({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),n(95155),n(47650),n(5214),n(2451),n(53887)},25599:(e,t,n)=>{Promise.resolve().then(n.bind(n,76084))},37206:(e,t,n)=>{"use strict";n.d(t,{default:()=>a.a});var r=n(75707),a=n.n(r)},41112:(e,t,n)=>{"use strict";function r({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return r}}),n(1980)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={bindSnapshot:function(){return i},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return d}};for(var r in n)Object.defineProperty(t,r,{enumerable:!0,get:n[r]});let a=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class s{disable(){throw a}getStore(){}run(){throw a}exit(){throw a}enterWith(){throw a}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new s}function i(e){return l?l.bind(e):s.bind(e)}function d(){return l?l.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(95155),a=n(12115),s=n(41112);function l(e){return{default:e&&"default"in e?e.default:e}}n(21957);let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},i=function(e){let t={...o,...e},n=(0,a.lazy)(()=>t.loader().then(l)),i=t.loading;function d(e){let l=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?a.Suspense:a.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...o?{fallback:l}:{},children:c})}return d.displayName="LoadableComponent",d}},75707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(73623)._(n(68635));function a(e,t){let n={};"function"==typeof e&&(n.loader=e);let a={...n,...t};return(0,r.default)({...a,modules:a.loadableGenerated?.modules})}("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)},76084:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(95155),a=n(12115),s=n(35497),l=n(11059);let o=(0,n(37206).default)(()=>n.e(8202).then(n.bind(n,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1}),i=[{id:1,label:"Client Request",file:"1_req_client.json",lang:"json",desc:"Raw request from client"},{id:2,label:"Source Body",file:"2_req_source.json",lang:"json",desc:"After initial conversion"},{id:3,label:"OpenAI Intermediate",file:"3_req_openai.json",lang:"json",desc:"source → openai"},{id:4,label:"Target Request",file:"4_req_target.json",lang:"json",desc:"openai → target + URL + headers"},{id:5,label:"Provider Response",file:"5_res_provider.txt",lang:"text",desc:"Raw SSE from provider"},{id:6,label:"OpenAI Response",file:"6_res_openai.txt",lang:"text",desc:"target → openai (response)"},{id:7,label:"Client Response",file:"7_res_client.txt",lang:"text",desc:"Final response to client"}],d={minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0};function c(){let[e,t]=(0,a.useState)({}),[n,c]=(0,a.useState)({1:!0}),[p,f]=(0,a.useState)({}),[m,x]=(0,a.useState)(null),g=(e,t)=>f(n=>({...n,[e]:t})),h=(e,n)=>t(t=>({...t,[e]:n})),b=e=>c(t=>{let n={};return i.forEach(e=>{n[e.id]=!1}),n[e]=!0,n}),y=async e=>{let t=i.find(t=>t.id===e);g(`load-${e}`,!0);try{let n=await fetch(`/api/translator/load?file=${t.file}`),r=await n.json();r.success?(h(e,r.content),1===e&&await j(r.content)):alert(r.error||"File not found")}catch(e){alert(e.message)}g(`load-${e}`,!1)},j=async e=>{try{let t="string"==typeof e?JSON.parse(e):e,n=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:1,body:t})}),r=await n.json();r.success&&x(r.result)}catch{}},_=(e,t)=>fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:e,content:t})}).catch(()=>{}),v=async()=>{g("toOpenAI",!0);try{let t=e[1],n=JSON.parse(t);_("1_req_client.json",t),_("2_req_source.json",JSON.stringify({timestamp:new Date().toISOString(),headers:{},body:n.body||n},null,2));let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:2,body:n})}),a=await r.json();if(!a.success)return void alert(a.error);let s=JSON.stringify(a.result.body,null,2);h(3,s),b(3)}catch(e){alert(e.message)}g("toOpenAI",!1)},O=async()=>{g("toTarget",!0);try{let t=e[3],n=JSON.parse(t);_("3_req_openai.json",t);let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:3,body:{...n,provider:m?.provider,model:m?.model}})}),a=await r.json();if(!a.success)return void alert(a.error);let s={...a.result,provider:m?.provider,model:m?.model};h(4,JSON.stringify(s,null,2)),b(4)}catch(e){alert(e.message)}g("toTarget",!1)},S=async()=>{g("send",!0);try{let t=e[4],n=JSON.parse(t);_("4_req_target.json",t);let r=n.provider||m?.provider,a=n.model||m?.model;if(!r||!a)return void alert("Missing provider or model. Please run step 1 first to detect them.");let s=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:a,body:n.body||n})});if(!s.ok){let e=await s.json().catch(()=>({error:s.statusText}));alert(e.error||"Send failed");return}let l=s.body.getReader(),o=new TextDecoder,i="";for(;;){let{done:e,value:t}=await l.read();if(e)break;i+=o.decode(t,{stream:!0})}h(5,i),b(5),await fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:"5_res_provider.txt",content:i})})}catch(e){alert(e.message)}finally{g("send",!1)}},{copy:w}=(0,l.C)(),N=async t=>{e[t]&&w(e[t],`translator-step-${t}`)};return(0,r.jsxs)("div",{className:"p-8 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Translator Debug"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Replay request flow — matches log files"})]}),m&&(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap justify-end",children:[(0,r.jsx)(u,{label:"src",value:m.sourceFormat,color:"blue"}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,r.jsx)(u,{label:"dst",value:m.targetFormat,color:"orange"}),(0,r.jsx)(u,{label:"provider",value:m.provider,color:"green"}),(0,r.jsx)(u,{label:"model",value:m.model,color:"purple"})]})]}),i.map(t=>{var a;let l=1===(a=t.id)?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:p.toOpenAI,onClick:v,children:"→ OpenAI"}):3===a?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:p.toTarget,onClick:O,children:"→ Target"}):4===a?(0,r.jsx)(s.$n,{size:"sm",icon:"send",loading:p.send,onClick:S,children:"Send"}):null,i=!!n[t.id],u=e[t.id]||"";return(0,r.jsx)(s.Zp,{children:(0,r.jsxs)("div",{className:"p-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("button",{onClick:()=>{let e;return e=t.id,c(t=>({...t,[e]:!t[e]}))},className:"flex items-center gap-2 flex-1 text-left group",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted group-hover:text-primary transition-colors",children:i?"expand_more":"chevron_right"}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-muted/60 w-4",children:t.id}),(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:t.label}),(0,r.jsx)("span",{className:"text-xs text-text-muted/60 font-mono",children:t.file}),u&&(0,r.jsxs)("span",{className:"text-xs text-green-500",children:["(",u.length," chars)"]})]}),!i&&(0,r.jsxs)("div",{className:"flex gap-1 shrink-0",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"ghost",icon:"folder_open",loading:p[`load-${t.id}`],onClick:()=>y(t.id)}),l]})]}),i&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,r.jsx)(o,{height:"400px",defaultLanguage:"text"===t.lang?"plaintext":"json",value:u,onChange:e=>{h(t.id,e||""),1===t.id&&j(e||"")},theme:"vs-dark",options:d})}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"folder_open",loading:p[`load-${t.id}`],onClick:()=>y(t.id),children:"Load"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"data_object",onClick:()=>(t=>{try{let n=JSON.parse(e[t]);h(t,JSON.stringify(n,null,2))}catch{}})(t.id),children:"Format"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"content_copy",onClick:()=>N(t.id),children:"Copy"}),l]})]})]})},t.id)})]})}function u({label:e,value:t,color:n}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-mono ${{blue:"bg-blue-500/10 text-blue-500",orange:"bg-orange-500/10 text-orange-500",green:"bg-green-500/10 text-green-500",purple:"bg-purple-500/10 text-purple-500"}[n]}`,children:[(0,r.jsxs)("span",{className:"text-text-muted/70 font-sans text-[10px]",children:[e,":"]}),t]})}}},e=>{e.O(0,[3170,305,1321,5497,8441,3794,7358],()=>e(e.s=25599)),_N_E=e.O()}]);