zevairouter 1.1.60 → 1.1.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (855) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +9 -9
  4. package/cli/app/.next-cli-build/build-manifest.json +3 -3
  5. package/cli/app/.next-cli-build/prerender-manifest.json +5 -5
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  62. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  63. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  64. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  65. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  66. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  67. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  68. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  69. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  70. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  71. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  72. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
  73. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  74. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  75. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  76. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  77. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  78. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +2 -2
  79. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  80. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  81. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  82. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  83. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  84. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  85. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  86. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  87. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  88. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  90. package/cli/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  91. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  92. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  93. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  94. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  95. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  96. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  97. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  98. package/cli/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  99. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  100. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  101. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  102. package/cli/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  103. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  104. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  105. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  106. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +2 -2
  121. package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/changelog/route.js +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  133. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  135. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  139. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +2 -2
  143. package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  151. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  153. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  155. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
  159. package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  161. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
  163. package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  165. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -2
  167. package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  169. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  173. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  175. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  177. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
  179. package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js +2 -2
  181. package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js.nft.json +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  183. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  185. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
  187. package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/context/test/route.js +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/context/test/route.js.nft.json +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/health/route.js +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +2 -2
  247. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +2 -2
  253. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/metrics/route.js +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +2 -2
  271. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js +1 -1
  299. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js +1 -1
  317. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js +1 -1
  319. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
  338. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  339. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  340. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js +1 -1
  341. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
  342. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/json-import/route.js +1 -1
  343. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/json-import/route.js.nft.json +1 -1
  344. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  345. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  346. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  347. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  348. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  349. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  350. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +1 -1
  351. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  352. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  353. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  354. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js +1 -1
  355. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  356. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js +1 -1
  357. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  358. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js +1 -1
  359. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  360. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  361. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  362. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  363. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  364. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  365. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  366. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  367. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  368. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +1 -1
  369. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  370. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  371. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  372. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js +1 -1
  373. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  374. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js +1 -1
  375. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  376. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js +1 -1
  377. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  378. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  379. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  380. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
  381. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  382. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js +1 -1
  383. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  384. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js +1 -1
  385. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  386. package/cli/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  387. package/cli/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  388. package/cli/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  389. package/cli/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  390. package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  391. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  392. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  393. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  394. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  395. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  396. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  397. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  398. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  399. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  400. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  401. package/cli/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  402. package/cli/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  403. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  404. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  405. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  406. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  407. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  408. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  409. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
  410. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  411. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  412. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  413. package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js +1 -1
  414. package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js.nft.json +1 -1
  415. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js +1 -1
  416. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js.nft.json +1 -1
  417. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-cn/discover-models/route.js +1 -1
  418. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-cn/discover-models/route.js.nft.json +1 -1
  419. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-intl/discover-models/route.js +1 -1
  420. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-intl/discover-models/route.js.nft.json +1 -1
  421. package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js +1 -1
  422. package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js.nft.json +1 -1
  423. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js +1 -1
  424. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js.nft.json +1 -1
  425. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js +1 -1
  426. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js.nft.json +1 -1
  427. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  428. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  429. package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js +1 -1
  430. package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js.nft.json +1 -1
  431. package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js +1 -1
  432. package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js.nft.json +1 -1
  433. package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js +1 -1
  434. package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js.nft.json +1 -1
  435. package/cli/app/.next-cli-build/server/app/api/providers/openrouter/discover-models/route.js +1 -1
  436. package/cli/app/.next-cli-build/server/app/api/providers/openrouter/discover-models/route.js.nft.json +1 -1
  437. package/cli/app/.next-cli-build/server/app/api/providers/route.js +2 -2
  438. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  439. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  440. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  441. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  442. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  443. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  444. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  445. package/cli/app/.next-cli-build/server/app/api/providers/web-login/route.js +1 -1
  446. package/cli/app/.next-cli-build/server/app/api/providers/web-login/route.js.nft.json +1 -1
  447. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  448. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  449. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  450. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  451. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  452. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  453. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  454. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  455. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  456. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  457. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  458. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  459. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  460. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  461. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  462. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  463. package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  464. package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  465. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  466. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  467. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  468. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  469. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  470. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  471. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  472. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  473. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  474. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  475. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  476. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  477. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  478. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  479. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  480. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  481. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  482. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  483. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  484. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  485. package/cli/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  486. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  487. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js +1 -1
  488. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  489. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js +1 -1
  490. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  491. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js +1 -1
  492. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  493. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js +1 -1
  494. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  495. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js +1 -1
  496. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  497. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js +1 -1
  498. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  499. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js +2 -2
  500. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  501. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js +1 -1
  502. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  503. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  504. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  505. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  506. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  507. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  508. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  509. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  510. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  511. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  512. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  513. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  514. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  515. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  516. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  517. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  518. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  519. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  520. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  521. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  522. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  523. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  524. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  525. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  526. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  527. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  528. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  529. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  530. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  531. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  532. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  533. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  534. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  535. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  536. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  537. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  538. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  539. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  540. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  541. package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  542. package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  543. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  544. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  545. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js +2 -2
  546. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js.nft.json +1 -1
  547. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  548. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  549. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  550. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  551. package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js +2 -2
  552. package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js.nft.json +1 -1
  553. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  554. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  555. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  556. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  557. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  558. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  559. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  560. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  561. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  562. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  563. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  564. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  565. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  566. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  567. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  568. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  569. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  570. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  571. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  572. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  573. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  574. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  575. package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  576. package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  577. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  578. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  579. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  580. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  581. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  582. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  583. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  584. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  585. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  586. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  587. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +2 -2
  588. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  589. package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  590. package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  591. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js +1 -1
  592. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js.nft.json +1 -1
  593. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  594. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  595. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  596. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  597. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  598. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  599. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  600. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  601. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +2 -2
  602. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  603. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  604. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  605. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  606. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  607. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  608. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  609. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  610. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  611. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  612. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  613. package/cli/app/.next-cli-build/server/app/callback/page.js +1 -1
  614. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  615. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  616. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  617. package/cli/app/.next-cli-build/server/app/callback.rsc +5 -5
  618. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  619. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  620. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  621. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  622. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
  623. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +5 -5
  624. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
  625. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  626. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  627. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  628. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  629. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  630. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  631. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  632. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  633. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +5 -5
  634. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  635. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  636. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  637. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  638. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +5 -5
  639. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  640. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  641. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  642. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
  643. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +5 -5
  644. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
  645. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  646. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  647. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  648. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  649. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  650. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  651. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  652. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  653. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +5 -5
  654. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  655. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  656. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  657. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  658. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +5 -5
  659. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  660. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  661. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  662. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +7 -7
  663. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +7 -7
  664. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +7 -7
  665. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  666. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  667. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  668. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +5 -5
  669. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  670. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  671. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  672. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  673. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +5 -5
  674. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  675. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  676. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  677. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  678. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +5 -5
  679. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  680. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  681. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  682. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  683. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +5 -5
  684. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  685. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  686. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  687. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  688. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +5 -5
  689. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  690. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  691. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  692. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +5 -5
  693. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +5 -5
  694. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +5 -5
  695. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  696. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  697. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  698. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  699. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  700. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  701. package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  702. package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  703. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +5 -5
  704. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  705. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  706. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  707. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  708. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +5 -5
  709. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  710. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  711. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  712. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  713. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +5 -5
  714. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  715. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  716. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  717. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  718. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +5 -5
  719. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  720. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  721. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  722. package/cli/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  723. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  724. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  725. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  726. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  727. package/cli/app/.next-cli-build/server/app/index.rsc +4 -4
  728. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  729. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  730. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  731. package/cli/app/.next-cli-build/server/app/landing/page.js +1 -1
  732. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  733. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  734. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  735. package/cli/app/.next-cli-build/server/app/landing.rsc +5 -5
  736. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  737. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  738. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
  739. package/cli/app/.next-cli-build/server/app/login/page.js +1 -1
  740. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  741. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  742. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  743. package/cli/app/.next-cli-build/server/app/login.rsc +5 -5
  744. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  745. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  746. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
  747. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  748. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  749. package/cli/app/.next-cli-build/server/app/page.js +1 -1
  750. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  751. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  752. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js +2 -2
  753. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -1
  754. package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js +1 -1
  755. package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js.nft.json +1 -1
  756. package/cli/app/.next-cli-build/server/app-paths-manifest.json +9 -9
  757. package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
  758. package/cli/app/.next-cli-build/server/chunks/1757.js +1 -1
  759. package/cli/app/.next-cli-build/server/chunks/1809.js +1 -0
  760. package/cli/app/.next-cli-build/server/chunks/3190.js +1 -1
  761. package/cli/app/.next-cli-build/server/chunks/3711.js +1 -0
  762. package/cli/app/.next-cli-build/server/chunks/412.js +1 -1
  763. package/cli/app/.next-cli-build/server/chunks/4780.js +1 -1
  764. package/cli/app/.next-cli-build/server/chunks/5019.js +1 -1
  765. package/cli/app/.next-cli-build/server/chunks/5626.js +1 -1
  766. package/cli/app/.next-cli-build/server/chunks/5728.js +1 -1
  767. package/cli/app/.next-cli-build/server/chunks/5905.js +3 -3
  768. package/cli/app/.next-cli-build/server/chunks/{4721.js → 6133.js} +2 -2
  769. package/cli/app/.next-cli-build/server/chunks/7135.js +1 -1
  770. package/cli/app/.next-cli-build/server/chunks/7319.js +9 -9
  771. package/cli/app/.next-cli-build/server/chunks/7401.js +1 -1
  772. package/cli/app/.next-cli-build/server/chunks/7726.js +1 -1
  773. package/cli/app/.next-cli-build/server/chunks/7793.js +1 -1
  774. package/cli/app/.next-cli-build/server/chunks/8238.js +1 -1
  775. package/cli/app/.next-cli-build/server/chunks/8852.js +1 -0
  776. package/cli/app/.next-cli-build/server/chunks/8895.js +4 -4
  777. package/cli/app/.next-cli-build/server/chunks/9679.js +1 -1
  778. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  779. package/cli/app/.next-cli-build/server/middleware.js +8 -8
  780. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  781. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  782. package/cli/app/.next-cli-build/server/preview-props.json +3 -3
  783. package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  784. package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  785. package/cli/app/.next-cli-build/static/chunks/{620-2dbbacd7e6de3def.js → 620-8b24dc33f653e657.js} +1 -1
  786. package/cli/app/.next-cli-build/static/chunks/6202-e364f4d5fefadd3f.js +3 -0
  787. package/cli/app/.next-cli-build/static/chunks/{9126-449f231ec89e0c8b.js → 9041-70659da305d33949.js} +1 -1
  788. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/automation/{page-71a382ed81559482.js → page-bd1157fec388ec95.js} +1 -1
  789. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-59b4e1d04b034922.js +1 -0
  790. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-25b44f613f1ad6ab.js +1 -0
  791. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-2b90c3377dc1b803.js +1 -0
  792. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b73e02cc2f278a1c.js +1 -0
  793. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-4d578c66f4f83c4b.js +1 -0
  794. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/context/{page-b80f4b05920eb3eb.js → page-e0feb2dcf297b1d3.js} +1 -1
  795. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-14ff4e34b3569e7d.js +1 -0
  796. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-f6d7c9ab2bbcaa0c.js → page-6822935d3352c990.js} +2 -2
  797. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-83103184cbba481f.js → page-6ebcd05a89f2c192.js} +1 -1
  798. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-739bdc9961949f1b.js → page-a4cb0e8fb5edb847.js} +1 -1
  799. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-ce6dece0a314f25b.js +1 -0
  800. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-291c6ac2c795f8c8.js → page-f2473ffe65aa2418.js} +1 -1
  801. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-fc2385100618cb11.js +1 -0
  802. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-8345390557a29481.js +1 -0
  803. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-52350091b31c2ec1.js +1 -0
  804. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-7f6579c9e603c1c7.js → page-d9769ad72eaab7ff.js} +2 -2
  805. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-40562bf4cd105f0a.js → page-663d97e32ff4abb9.js} +1 -1
  806. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-542de72fb45553c1.js → page-9eddc754a0ed05c4.js} +1 -1
  807. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-6a803728f5920906.js → page-834c9924ad1adfea.js} +2 -2
  808. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-27b424c2fe11112c.js → page-3e98755c0114d653.js} +1 -1
  809. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-29126aa56241d330.js +1 -0
  810. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/settings/pricing/{page-3ed909159e70307f.js → page-aedd94cfeaef7612.js} +1 -1
  811. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-d401da171aaa05ac.js +1 -0
  812. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/terminal/{page-99f08859cae41572.js → page-f20641b18fe31018.js} +1 -1
  813. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-c70ac5f25262fb6f.js +1 -0
  814. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-a855862272bd37db.js +1 -0
  815. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-a205615e648f47a1.js → page-7ed7a9155f0550b3.js} +1 -1
  816. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-baca0356b5cacc31.js → layout-4cc7b6fd22e7992c.js} +1 -1
  817. package/cli/app/.next-cli-build/static/chunks/app/_not-found/page-2b9bf697de64adcf.js +1 -0
  818. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-de0023d65aebf11f.js +1 -0
  819. package/cli/app/.next-cli-build/static/chunks/app/callback/{page-b1ca389e20348cce.js → page-ba0d852b637994d3.js} +1 -1
  820. package/cli/app/.next-cli-build/static/chunks/app/landing/{page-4e2e956db07b7959.js → page-0a01ecaa2116b10b.js} +1 -1
  821. package/cli/app/.next-cli-build/static/chunks/app/layout-8a7a8baa77f1b488.js +1 -0
  822. package/cli/app/.next-cli-build/static/chunks/app/login/page-dda88ecbdba79a80.js +1 -0
  823. package/cli/app/.next-cli-build/static/chunks/{main-app-88e09177034d71e7.js → main-app-e20479f3b5d674b0.js} +1 -1
  824. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-db43f3befc51b654.js +1 -0
  825. package/cli/app/CHANGELOG.md +16 -0
  826. package/cli/app/package.json +1 -1
  827. package/cli/app/standalone_modules/next/dist/compiled/@next/font/dist/google/find-font-files-in-css.js +23 -0
  828. package/cli/app/standalone_modules/next/dist/compiled/@next/font/dist/google/loader.js +2 -2
  829. package/cli/package.json +1 -1
  830. package/package.json +1 -1
  831. package/cli/app/.next-cli-build/server/chunks/1384.js +0 -1
  832. package/cli/app/.next-cli-build/server/chunks/4039.js +0 -1
  833. package/cli/app/.next-cli-build/server/chunks/5469.js +0 -1
  834. package/cli/app/.next-cli-build/static/chunks/523-3899a7f5cde3f3e8.js +0 -3
  835. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-f7c8c91f9fb6de93.js +0 -1
  836. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-f5fc4b8a8801e804.js +0 -1
  837. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-bccb233dc48b2cf1.js +0 -1
  838. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a2bfbf57ba4e0369.js +0 -1
  839. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-58c9f8c35b7eaed8.js +0 -1
  840. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-a1e30adbdbf2cafd.js +0 -1
  841. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-39062565f11d2c60.js +0 -1
  842. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-92cf3c5c13a0ea25.js +0 -1
  843. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-27ec8458a4c8bcb2.js +0 -1
  844. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-e629adca114de10a.js +0 -1
  845. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-a0e271ee32723312.js +0 -1
  846. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-608c603e6ece959c.js +0 -1
  847. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-b523fbffb64dcdae.js +0 -1
  848. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-511564f8398ceb23.js +0 -1
  849. package/cli/app/.next-cli-build/static/chunks/app/_not-found/page-499de2bdd91e139f.js +0 -1
  850. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-847859b983aaa314.js +0 -1
  851. package/cli/app/.next-cli-build/static/chunks/app/layout-f31fedc5a6f6c6a1.js +0 -1
  852. package/cli/app/.next-cli-build/static/chunks/app/login/page-764e655e11326b92.js +0 -1
  853. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-06f8cd887d9b83e5.js +0 -1
  854. /package/cli/app/.next-cli-build/static/{3-eQhzZSwRODZv8TdZa2x → p5nLDGqmrEZKLp2847bs8}/_buildManifest.js +0 -0
  855. /package/cli/app/.next-cli-build/static/{3-eQhzZSwRODZv8TdZa2x → p5nLDGqmrEZKLp2847bs8}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{43924:(e,t,r)=>{"use strict";r.d(t,{default:()=>J});var a=r(95155),s=r(12115),n=r(73321),i=r(57250),l=r(54997);function o(e){let t="string"==typeof e?.emptyMessage&&e.emptyMessage?e.emptyMessage:"",r=e?.neverExpires===!0,a="string"==typeof e?.detailUrl&&e.detailUrl.startsWith("https://")?e.detailUrl:"",s=!t&&!r&&!e?.resetAt&&!!a;return{emptyMessage:t,neverExpires:r,seeDetails:s,detailUrl:a,suppressCountdown:!!t||r,label:t||(r?"Never expires":s?"See details":"")}}function c(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0)return"-";let s=Math.ceil(a/6e4);if(s<60)return`${s}m`;let n=Math.floor(s/60),i=s%60;if(n<24)return`${n}h ${i}m`;let l=Math.floor(n/24);return`${l}d ${n%24}h ${i}m`}catch(e){return"-"}}function d(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function u(e){if(e?.unlimited===!0)return e?.remainingPercentage!==void 0&&Number.isFinite(Number(e.remainingPercentage))?Math.max(0,Math.min(100,Math.round(Number(e.remainingPercentage)))):100;if(e?.colorPercentage!=null&&Number.isFinite(Number(e.colorPercentage)))return Math.max(0,Math.min(100,Math.round(Number(e.colorPercentage))));if(e?.percentage!=null&&Number.isFinite(Number(e.percentage))){let t=Number(e.percentage);return Math.max(0,Math.min(100,Math.round(!0===e.percentageIsUsed?100-t:t)))}if(e?.remainingPercentage!==void 0&&Number.isFinite(Number(e.remainingPercentage)))return Math.max(0,Math.min(100,Math.round(Number(e.remainingPercentage))));if(e?.remaining!==void 0&&Number.isFinite(Number(e.remaining))){let t=Number(e.remaining);if(t>=0&&t<=100&&!(e.total>100&&t<=100&&null!=e.used))return e.total>0?d(e.used,e.total):Math.round(t)}return d(e?.used,e?.total)}function m(e){return e&&"object"==typeof e?String(e.modelKey||e.name||"").trim():""}function h(e,t,r=[]){let a=t?.[e]?.hidden;return Array.isArray(a)&&0!==a.length?new Set((r.length>0?function(e=[],t=[]){if(!Array.isArray(e)||0===e.length)return[];let r=new Set(t.map(m).filter(Boolean));return[...new Set(e.map(e=>String(e).trim()).filter(e=>r.has(e)))]}(a,r):a).map(String)):new Set}function p(e,t,r,a=r?.displayName||t){e.push({name:a,modelKey:t,used:r?.used||0,total:r?.total||0,resetAt:r?.resetAt||null,remainingPercentage:r?.remainingPercentage})}function x(e){return e.reduce((e,t)=>(t[1]?.remainingPercentage??100)<(e[1]?.remainingPercentage??100)?t:e)[1]}function g(e,t,r){return e&&r?.resetAt===t&&(r?.remainingPercentage??0)===0}function b(e){return e?.recurring!==!1}function f(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&function(e,t){let r=Object.entries(t.quotas),a=new Set([...new Set(["gemini_weekly","claude_gpt_weekly"]),...new Set(["gemini_session","claude_gpt_session"])]),s=r.filter(([e])=>e.startsWith("gemini-")&&!e.includes("image")),n=r.filter(([e])=>e.startsWith("claude-")),i=r.filter(([e])=>e.includes("image")),l=r.filter(([e])=>a.has(e)),o=r.filter(([e])=>!e.startsWith("gemini-")&&!e.startsWith("claude-")&&!e.includes("image")&&!a.has(e)),c=!!t.quotas.gemini_weekly,d=!!t.quotas.gemini_session,u=!!t.quotas.claude_gpt_weekly,m=!!t.quotas.claude_gpt_session;if(d)l.filter(([e])=>"gemini_session"===e).forEach(([t,r])=>{p(e,t,r)});else if(s.length>0){let r=x(s);g(c,t.quotas.gemini_weekly?.resetAt,r)||p(e,"gemini",r,"Gemini (Flash / Pro)")}if(c&&l.filter(([e])=>"gemini_weekly"===e).forEach(([t,r])=>{p(e,t,r)}),m)l.filter(([e])=>"claude_gpt_session"===e).forEach(([t,r])=>{p(e,t,r)});else if(n.length>0){let r=x(n);g(u,t.quotas.claude_gpt_weekly?.resetAt,r)||p(e,"claude",r,"Claude (Sonnet / Opus)")}u&&l.filter(([e])=>"claude_gpt_weekly"===e).forEach(([t,r])=>{p(e,t,r)}),i.forEach(([t,r])=>p(e,t,r)),u||m||o.forEach(([t,r])=>p(e,t,r))}(r,t);break;case"codex":if(t.quotas){let e={session:"5h",weekly:"Weekly",review_session:"Review (5h)",review_weekly:"Review (Weekly)",spark_session:"Spark (5h)",spark_weekly:"Spark (Weekly)"};Object.entries(t.quotas).forEach(([t,a])=>{r.push({name:e[t]||t,modelKey:t,used:a.used||0,total:a.total||0,remaining:a.remaining,resetAt:a.resetAt||null})})}break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{let a=e.endsWith("_freetrial"),s=(a?e.slice(0,-10):e).split(/[_\s]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");r.push({name:a?`${s} (Free Trial)`:s,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])=>{t&&0!==(Number(t.total)||0)&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":"addOn"===e?"Add-on":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null,neverExpires:!0===t.neverExpires,..."string"==typeof t.detailUrl&&t.detailUrl.startsWith("https://")?{detailUrl:t.detailUrl}:{}})});break;case"autoclaw":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:"points"===e?"Points":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message&&!t.quotas?r.push({name:"error",isError:!0,used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"grok-cli":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{let a=!0===t.unlimited||!(t.total>0)&&t.remainingPercentage>0;r.push({name:e,used:t.used||0,total:a?0:t.total||0,resetAt:t.resetAt||null,remainingPercentage:null!=t.remainingPercentage?t.remainingPercentage:a?100:void 0,unlimited:a})});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,isCreditBalance:t.isCreditBalance,currency:t.currency,unit:t.unit,unlimited:t.unlimited})});break;case"cloudflare-ai":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{let a=!0===t.unlimited||!(t.total>0);r.push({name:e,used:t.used||0,total:a?0:t.total||0,resetAt:t.resetAt||null,remainingPercentage:null!=t.remainingPercentage?t.remainingPercentage:100*!!a,unlimited:a})});break;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,...null!=t.percentage?{percentage:t.percentage}:{},...null!=t.colorPercentage?{colorPercentage:t.colorPercentage}:{},...!0===t.percentageIsUsed?{percentageIsUsed:!0}:{},...t.emptyMessage?{emptyMessage:t.emptyMessage}:{},...null!=t.remainingPercentage?{remainingPercentage:t.remainingPercentage}:{},...!0===t.unlimited?{unlimited:!0}:{},...!1===t.recurring?{recurring:!1}:{}})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,l.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,s=r.modelKey||r.name;return(e.get(a)??999)-(e.get(s)??999)})}return r}var y=r(58041);function v(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(s.getDate()+1);let n="";n=t>=a&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let i=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${n}, ${i}`}catch{return null}}function w(e){return e>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:e>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"}}let k=["name","used","total","resetAt","remaining","remainingPercentage","unlimited","message","isError","unit","modelKey","isCreditBalance","currency","colorPercentage","percentage","percentageIsUsed","emptyMessage","neverExpires","detailUrl"];function j(e,t=!1){if(e.isCreditBalance){let t=Number(e.total),r=Number.isFinite(t)?t.toFixed(2):String(e.total??"");return`Credit balance: ${e.currency||""}${r}`}if(!0===e.unlimited||!(e.total>0))return!0===e.unlimited?t?"Included / ∞":"Included / unlimited":`${e.used.toLocaleString()} / ${t?"∞":"unlimited"}`;let r=e.unit?` ${e.unit}`:"";return`${e.used.toLocaleString()} / ${e.total.toLocaleString()}${r}`}function N({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:n=!1,paginate:i=!0,totalCount:l,onHideQuota:d=null}){let[m,h]=(0,s.useState)(1),[p,x]=(0,s.useState)(e);p===e||Array.isArray(p)&&Array.isArray(e)&&p.length===e.length&&p.every((t,r)=>{let a=e[r];return t&&a?k.every(e=>String(t[e]??null)===String(a[e]??null)):t===a})||x(e);let g=(0,s.useMemo)(()=>p.map((e,t)=>({...e,index:t,remaining:u(e)})),[p]),f=(0,s.useMemo)(()=>"remaining-asc"===r?[...g].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...g].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):g,[g,r]),C=i?Math.max(1,Math.ceil(f.length/10)):1;if((0,s.useEffect)(()=>{h(1)},[r,p]),(0,s.useEffect)(()=>{h(e=>Math.min(e,C))},[C]),!e||0===e.length)return null;let S=i?f.slice((m-1)*10,10*m):f,$=0===f.length?0:(m-1)*10+1,A=i?Math.min(10*m,f.length):f.length,q=Number.isFinite(l)?l:f.length,E=t?"py-1 px-1.5":"py-2 px-3",P=t?"text-[11px]":"text-sm",_=t?"text-[11px]":"text-sm",M=t?"text-[10px] leading-tight":"text-xs",T="function"==typeof d,F=e=>T?(0,a.jsx)("button",{type:"button",onClick:()=>d(e),className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5",title:"Hide this quota row","aria-label":`Hide quota ${e.name}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"visibility_off"})}):null;return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[q," quota",q>1?"s":""]}),n&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)(y.DataList,{"aria-label":"Quota details",className:"sm:hidden",children:S.map(e=>{if(e.isError)return(0,a.jsx)(y.DataRow,{label:"Quota error",value:(0,a.jsx)("span",{className:"text-red-600 dark:text-red-400",children:e.message||"Failed to load quota"})},`mobile-error-${e.index}`);let t=w(e.colorPercentage??e.remaining),r=o(e),s=r.suppressCountdown?"-":c(e.resetAt),n=r.label||v(e.resetAt),i=j(e),l=r.neverExpires?"Never expires":r.seeDetails?"See details":"-"!==s?`${b(e)?"Resets":"Expires"} in ${s}${n?` \xb7 ${n}`:""}`:n?`${b(e)?"Resets":"Expires"} ${n}`:"No reset window";return(0,a.jsx)(y.DataRow,{label:e.name,value:(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("div",{className:`h-1.5 overflow-hidden rounded-full ${t.bgLight}`,children:(0,a.jsx)("div",{className:`h-full ${t.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 text-xs",children:[(0,a.jsx)("span",{className:"text-text-muted",children:i}),(0,a.jsx)("span",{className:`font-semibold ${e.isCreditBalance?"text-blue-600 dark:text-blue-400":t.text}`,children:e.isCreditBalance?"Credit":Number.isFinite(e.remaining)?`${e.remaining}% remaining`:"Unknown"})]})]}),detail:l,action:F(e)},`mobile-${e.name}-${e.index}`)})}),(0,a.jsx)("div",{className:"hidden overflow-x-auto sm:block",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:S.map(e=>{if(e.isError)return(0,a.jsx)("tr",{className:"border-b border-black/5 dark:border-white/5",children:(0,a.jsx)("td",{colSpan:3,className:`${E}`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px] text-red-500",children:"error"}),(0,a.jsx)("span",{className:`${P} text-red-600 dark:text-red-400 truncate`,children:e.message||"Failed to load quota"})]})})},`error-${e.index}`);let r=w(e.colorPercentage??e.remaining),s=o(e),n=b(e),i=s.suppressCountdown?"-":c(e.resetAt),l=s.label||v(e.resetAt),d=s.seeDetails?(0,a.jsxs)("a",{href:s.detailUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-0.5 hover:text-text-primary hover:underline",title:`Open usage details: ${s.detailUrl}`,children:[l,(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]}):l;return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${E} w-[30%]`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:r.emoji}),(0,a.jsx)("span",{className:`${P} font-medium text-text-primary truncate`,children:e.name}),F(e)]})}),(0,a.jsx)("td",{className:`${E} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${r.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${r.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsx)("span",{className:"text-text-muted",children:j(e,!0)}),(0,a.jsx)("span",{className:`font-medium ${e.isCreditBalance?"text-blue-600 dark:text-blue-400":r.text}`,children:e.isCreditBalance?"Credit":Number.isFinite(e.remaining)?`${e.remaining}%`:"—"})]})]})}),(0,a.jsx)("td",{className:`${E} w-[25%]`,children:"-"!==i||l?t?(0,a.jsx)("div",{className:`${_} text-text-primary font-medium truncate`,title:s.seeDetails?s.detailUrl:l||"",children:"-"!==i?`${n?"in":"expires in"} ${i}`:d}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==i&&(0,a.jsxs)("div",{className:`${_} text-text-primary font-medium`,children:[n?"in":"expires in"," ",i]}),l&&(0,a.jsx)("div",{className:`${M} text-text-muted`,children:d})]}):(0,a.jsx)("div",{className:`${_} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),C>1&&(0,a.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Showing ",$,"-",A," of ",f.length]}),(0,a.jsxs)("span",{children:["Page ",m," / ",C]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>h(e=>Math.max(1,e-1)),disabled:1===m,className:"flex h-11 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5 sm:h-7 sm:rounded-md sm:px-2 sm:text-[10px]",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>h(e=>Math.min(C,e+1)),disabled:m===C,className:"flex h-11 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5 sm:h-7 sm:rounded-md sm:px-2 sm:text-[10px]",children:"Next"})]})]})]})}var C=r(98542);let S=/^[a-z0-9][a-z0-9._-]{0,63}$/i;function $(e){let t="string"==typeof e?e.trim():"";return t&&"all"!==t&&S.test(t)?t:"all"}var A=r(84588),q=r(35497),E=r(1791);function P(e,t){return{quotas:e,plan:t.plan||null,message:t.message||null,cached:!0===t.cached,stale:!0===t.stale,fetchedAt:t.fetchedAt||null,refreshError:t.refreshError||null,raw:t}}function _(e,t){if(!t)return e;let r=new Date(t);return!Number.isFinite(r.getTime())||e&&r.getTime()<=e.getTime()?e:r}let M={credentials:"same-origin"};function T(e){return 401===Number(e)}function F(e){return`${e} Dashboard session expired or was rejected — reload and sign in again.`}async function O(){try{let e=await fetch("/api/auth/status",M);if(!e.ok)return!1;let t=await e.json().catch(()=>({}));return t?.authenticated===!0||t?.requireLogin===!1}catch{return!1}}async function z(e,t={},{retryOnUnauthorized:r=!0}={}){let a=await fetch(e,{...M,...t});return T(a.status)&&r&&await O()?fetch(e,{...M,...t}):a}function U(e){let t=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return t(e.email)?e.email:(t(e.name),e.name)}function I(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function D(e){return E.Q2[e]?.name||e}function L(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function R(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function W(e,t){return await e(t)}let B="quotaAutoRefresh",H=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],Q=[{value:"single",label:"Satuan",icon:"account_circle"},{value:"bulk",label:"Bulk",icon:"stacks"}],G=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}],K=[10,20,50,100];function J(){let e=(0,n.useRouter)(),t=(0,n.useSearchParams)(),[r,l]=(0,s.useState)([]),[o,c]=(0,s.useState)({}),[p,x]=(0,s.useState)({}),[g,b]=(0,s.useState)({}),[y,v]=(0,s.useState)(!0),[w,k]=(0,s.useState)(null),[j,S]=(0,s.useState)(!1),[M,J]=(0,s.useState)(!1),[V,Y]=(0,s.useState)(60),[X,Z]=(0,s.useState)(!0),[ee,et]=(0,s.useState)(null),[er,ea]=(0,s.useState)(null),[es,en]=(0,s.useState)(null),[ei,el]=(0,s.useState)(null),[eo,ec]=(0,s.useState)(!1),[ed,eu]=(0,s.useState)(null),[em,eh]=(0,s.useState)(null),[ep,ex]=(0,s.useState)(null),[eg,eb]=(0,s.useState)([]),[ef,ey]=(0,s.useState)(()=>$(t.get("provider"))),[ev,ew]=(0,s.useState)([]),[ek,ej]=(0,s.useState)("single"),[eN,eC]=(0,s.useState)("all"),[eS,e$]=(0,s.useState)("default"),[eA,eq]=(0,s.useState)(!1),[eE,eP]=(0,s.useState)(!1),e_=r=>{var a;let s,n,i,l=$(r);ef!==l&&eK(1),ey(l),eP(!1);let o=(a=t.toString(),s=new URLSearchParams(a),"all"===(n=$(l))?s.delete("provider"):s.set("provider",n),(i=s.toString())?`?${i}`:"");e.replace(`/dashboard/quota${o}`,{scroll:!1})};(0,s.useEffect)(()=>{let e=$(t.get("provider"));ey(t=>t===e?t:e)},[t]);let[eM,eT]=(0,s.useState)(!1),[eF,eO]=(0,s.useState)({}),[ez,eU]=(0,s.useState)(!1),[eI,eD]=(0,s.useState)({}),[eL,eR]=(0,s.useState)({}),[eW,eB]=(0,s.useState)({}),[eH,eQ]=(0,s.useState)({}),[eG,eK]=(0,s.useState)(1),[eJ,eV]=(0,s.useState)(20),[eY,eX]=(0,s.useState)(String(20)),[eZ,e0]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[e1,e5]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),e2=(0,s.useRef)(null),e3=(0,s.useRef)(null),e4=(0,s.useRef)(null),e8=(0,s.useRef)(0),e6=(0,s.useRef)(null),e9=(0,s.useRef)(!1),e7=(0,s.useCallback)(e=>{if(e&&"object"==typeof e){if("snapshot"===e.type){let t=Object.values(e.accounts||{}).flatMap(e=>{if(!e?.connectionId||!e?.provider)return[];let t=e.usage||{};return[[e.connectionId,P(f(e.provider,t),{...t,...e.provenance})]]});t.length>0&&(c(Object.fromEntries(t)),x(e=>({...e,...Object.fromEntries(t.map(([e])=>[e,!1]))})));return}if("update"===e.type){let t=e.usage||{};c(r=>({...r,[e.connectionId]:P(f(e.provider,t),{...t,...e.provenance})})),x(t=>({...t,[e.connectionId]:!1})),b(t=>({...t,[e.connectionId]:null})),k(t=>_(t,e.provenance?.fetchedAt));return}if("error"===e.type){let t=e.previous;t?.usage&&e.connectionId&&e.provider&&c(r=>({...r,[e.connectionId]:P(f(e.provider,t.usage),{...t.usage,...t.provenance,stale:!0})})),x(t=>({...t,[e.connectionId]:!1})),b(t=>({...t,[e.connectionId]:e.error?.message||"Quota refresh failed"}));return}"complete"===e.type&&(e9.current=!1,J(!1),x(e=>Object.fromEntries(Object.keys(e).map(e=>[e,!1]))))}},[]),te=(0,s.useCallback)(async()=>{e9.current=!0,J(!0);try{let e=new URLSearchParams({refresh:"1"});ef&&"all"!==ef&&e.set("provider",ef);let t=await z(`/api/usage/quota-stream?${e.toString()}`,{method:"POST"});if(T(t.status))throw Error(F("Could not start quota refresh."));if(!t.ok)throw Error(`HTTP ${t.status}`)}catch(e){e9.current=!1,J(!1),x(e=>Object.fromEntries(Object.keys(e).map(e=>[e,!1]))),ea({type:"error",message:e.message?.startsWith("Could not start quota refresh")?e.message:`Could not start quota refresh: ${e.message}`})}},[ef]),tt=(0,s.useCallback)(()=>{if(e6.current)return e6.current;let e=new EventSource("/api/usage/quota-stream");return e6.current=e,e.onmessage=({data:e})=>{try{e7(JSON.parse(e))}catch{}},e.onerror=()=>{ea(e=>e||{type:"warning",message:"Quota stream interrupted; reconnecting automatically."})},e},[e7]),tr=async()=>{let e=em?.connection;if(e){ex(e.id);try{let t="claude"===em.kind?await fetch(`/api/usage/${e.id}/claude-reset`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grantId:em.grantId})}):await fetch(`/api/usage/${e.id}/codex-reset-credits`,{method:"POST"}),r=await t.json();if(!t.ok)throw Error(r.error||r.message||"Failed to use reset credit");eh(null),await tn(e.id,e.provider)}catch(e){ea({message:e.message||"Failed to use Codex reset credit"})}finally{ex(null)}}},ta=(0,s.useCallback)(async(e=eG)=>{let t=++e8.current;try{var r,a;let s=new URLSearchParams({page:String(e),pageSize:String(eJ),accountStatus:eN,sort:"priority"});"all"!==ef&&s.set("provider",ef);let n=await z(`/api/providers/client?${s.toString()}`);if(!n.ok){let e=await n.json().catch(()=>({}));if(T(n.status))throw Error(F("Provider list refresh interrupted."));throw Error(e.error||`Failed to fetch connections (HTTP ${n.status})`)}let i=await n.json();if(t!==e8.current)return[];let o=i.connections||[],c=(r=i.pagination,r||{page:1,pageSize:eJ,total:0,totalPages:1}),d=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(i.totals,o.length);return l(o),ew(i.providerOptions||[]),e0(c),e5(d),eK((a=i.pagination,a?.page||e)),et(null),o}catch(e){if(console.error("Error fetching connections:",e),t!==e8.current)return[];return et(e.message||"Failed to fetch connections"),[]}},[eN,eG,eJ,ef]),ts=(0,s.useCallback)(async(e,t,r=!1)=>{x(t=>({...t,[e]:!0})),b(t=>({...t,[e]:null}));try{let a=await z(`/api/usage/${e}${r?"?refresh=1":""}`);if(!a.ok){let r=(await a.json().catch(()=>({}))).error||a.statusText;if(404===a.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(T(a.status)){let a=F("Quota refresh interrupted.");return console.warn(`[ProviderLimits] Auth error for ${t}:`,r),b(t=>({...t,[e]:a})),null}throw Error(`HTTP ${a.status}: ${r}`)}let s=await a.json(),n=f(t,s),i=P(n,s);return c(t=>({...t,[e]:i})),{fetchedAt:s.fetchedAt||null}}catch(r){return console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),b(t=>({...t,[e]:r.message||"Failed to fetch quota"})),null}finally{x(t=>({...t,[e]:!1}))}},[]),tn=(0,s.useCallback)(async(e,t)=>{let r=await ts(e,t,!0);k(e=>_(e,r?.fetchedAt))},[ts]),ti=(0,s.useCallback)(async(e,t=!1)=>{if(e&&"all"!==e){eR(t=>({...t,[e]:!0})),eB(t=>({...t,[e]:!1}));try{let r=`/api/usage/aggregate?provider=${encodeURIComponent(e)}${t?"&refresh=1":""}`,a=await z(r);if(T(a.status))throw Error(F("Aggregate refresh interrupted."));if(!a.ok)throw Error("Failed to fetch aggregate");let s=await a.json(),n=f(e,s);return eD(t=>({...t,[e]:{quotas:n,plan:s.plan||null,accountCount:s.accountCount||0,accountsWithQuota:s.accountsWithQuota||0,deadCount:s.deadCount||0,cached:!0===s.cached,fetchedAt:s.fetchedAt||null}})),{fetchedAt:s.fetchedAt||null}}catch(t){return console.error(`[ProviderLimits] Aggregate fetch error for ${e}:`,t),eB(t=>({...t,[e]:!0})),null}finally{eR(t=>({...t,[e]:!1}))}}},[]),tl=(0,s.useCallback)(async(e,t)=>{if("bulk"===ek&&t){let e=await ti(t,!0);k(t=>_(t,e?.fetchedAt));return}e?.length&&(x(t=>({...t,...Object.fromEntries(e.map(e=>[e,!0]))})),await te())},[ek,ti,te]),to=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){en(e),ea(null);try{let t=await fetch(`/api/providers/${e}`,{method:"DELETE"});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||`HTTP ${t.status}`)}c(t=>{let r={...t};return delete r[e],r}),x(t=>{let r={...t};return delete r[e],r}),b(t=>{let r={...t};return delete r[e],r}),await W(ta,eG)}catch(e){console.error("Error deleting connection:",e),ea({type:"error",message:e.message||"Failed to delete connection"})}finally{en(null)}}},[ta,eG]),tc=(0,s.useCallback)(async(e,t)=>{el(e),ea(null);try{let r=await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error||`HTTP ${r.status}`)}await W(ta,eG)}catch(e){console.error("Error updating connection status:",e),await W(ta,eG),ea({type:"error",message:e.message||"Failed to update connection status"})}finally{el(null)}},[ta,eG]),td=(0,s.useCallback)(async e=>{if(!ed?.id)return;let t=ed.id,r=ed.provider;ea(null);try{let a=await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(e.error||`HTTP ${a.status}`)}await ta(),ec(!1),eu(null),E.wb.includes(r)&&await ts(t,r)}catch(e){console.error("Error saving connection:",e),ea({type:"error",message:e.message||"Failed to save connection"})}},[ed,ta,ts]);(0,s.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&eb(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let tu=(0,s.useCallback)(async()=>{if(!M){J(!0),Y(60);try{let e=await ta(eG);x(L(e)),b(t=>R(t,e)),c(t=>R(t,e)),await te()}catch(e){console.error("Error refreshing all providers:",e),J(!1)}}},[M,ta,eG,te]);(0,s.useEffect)(()=>{(async()=>{Z(!0);let e=await ta(eG);Z(!1),x(Object.fromEntries(e.map(({id:e,isActive:t})=>[e,(t??!0)&&e9.current]))),b(t=>R(t,e)),c(t=>R(t,e))})()},[ta,eG]),(0,s.useEffect)(()=>(O(),tt(),te(),()=>{e6.current?.close(),e6.current=null,e9.current=!1}),[tt,te]),(0,s.useEffect)(()=>{"bulk"!==ek||("all"!==ef?[ef]:ev.map(e=>e.value||e).filter(e=>"all"!==e)).forEach(e=>ti(e))},[ek,ef,ev,ti]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(B);v(null===e||"true"===e),S(!0)},[]),(0,s.useEffect)(()=>{j&&window.localStorage.setItem(B,String(y))},[y,j]),(0,s.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>{eQ(e?.quotaVisibility&&"object"==typeof e.quotaVisibility?e.quotaVisibility:{})}).catch(()=>{})},[]);let tm=(0,s.useCallback)(async(e,t)=>{eQ(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),eQ(t)}},[]),th=(0,s.useCallback)((e,t,r)=>{let a=m(t);e&&a&&tm(function(e,t,r,a){let s=e&&"object"==typeof e&&!Array.isArray(e)?e:{};if(!t||!r)return s;let n=s[t]&&"object"==typeof s[t]?s[t]:{},i=new Set(Array.isArray(n.hidden)?n.hidden.map(String):[]);return a?i.add(r):i.delete(r),"antigravity"===t&&function(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-")&&e.delete(t)}(i,r),{...s,[t]:{...n,hidden:[...i]}}}(eH,e,a,r),eH)},[eH,tm]);(0,s.useEffect)(()=>{e4.current=tu},[tu]);let tp=(0,s.useCallback)(()=>{e2.current&&(clearInterval(e2.current),e2.current=null),e3.current&&(clearInterval(e3.current),e3.current=null)},[]),tx=(0,s.useCallback)(()=>{e2.current||e3.current||(e2.current=setInterval(()=>{e4.current?.()},6e4),e3.current=setInterval(()=>{Y(e=>e<=1?60:e-1)},1e3))},[]);(0,s.useEffect)(()=>j&&y?(document.hidden||tx(),tp):void tp(),[y,j,tx,tp]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?tp():y&&j&&tx()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[y,j,tx,tp]);let tg=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=I(e,t),n=I(r,t),i="remaining-asc"===s?a-n:n-a;return 0!==i?i:(U(e)||"").localeCompare(U(r)||"")});if(!r)return e;let n=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=n(e)-n(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(U(e)||"").localeCompare(U(t)||"")})})(r,o,eA,ef,eS),[r,o,eA,ef,eS]),tb=(0,s.useMemo)(()=>{let e;return e=new Map,tg.forEach(t=>{t.provider&&(e.has(t.provider)||e.set(t.provider,[]),e.get(t.provider).push(t))}),[...e.entries()].map(([e,t])=>(function(e,t,r,a,s){if(!t.length)return null;let n=[],i=[],l=null,o=!1;return t.forEach(e=>{let t=r[e.id];Array.isArray(t?.quotas)&&n.push(...t.quotas),t?.message&&!l&&(l=t.message),s[e.id]&&i.push(s[e.id]),a[e.id]&&(o=!0)}),{id:`${e}-aggregate`,provider:e,name:D(e),email:`${t.length} accounts`,isActive:t.some(e=>e.isActive??!0),isAggregate:!0,quota:{quotas:function(e=[]){let t=new Map;return e.forEach(e=>{if(!e?.name)return;let r=t.get(e.name)||{name:e.name,used:0,total:0,resetAt:e.resetAt||null,remainingPercentage:null,unlimited:!1,_pctSum:0,_pctCount:0};r.used+=Number(e.used)||0,r.total+=Number(e.total)||0,!0===e.unlimited&&(r.unlimited=!0),null!=e.remainingPercentage&&Number.isFinite(Number(e.remainingPercentage))&&(r._pctSum+=Number(e.remainingPercentage),r._pctCount+=1),e.resetAt&&(!r.resetAt||new Date(e.resetAt).getTime()<new Date(r.resetAt).getTime())&&(r.resetAt=e.resetAt),t.set(e.name,r)}),[...t.values()].map(e=>{let{_pctSum:t,_pctCount:r,...a}=e;return a.unlimited?(a.remainingPercentage=100,a.total=0):a.total>0?a.remainingPercentage=(a.total-a.used)/a.total*100:r>0?a.remainingPercentage=t/r:a.remainingPercentage=0,a})}(n),message:0===n.length&&l||null},isLoading:o,error:!n.length&&i.length>0?i[0]:null,connectionIds:t.map(e=>e.id)}})(e,t,o,p,g)).filter(Boolean)},[tg,o,p,g]),tf=(0,s.useMemo)(()=>Object.keys(eI).length?tb.map(e=>{let t=eI[e.provider];return t&&t.quotas?.length?{...e,email:`${t.accountCount||e.connectionIds?.length||0} accounts`,quota:{...e.quota,quotas:t.quotas,message:null},isLoading:eL[e.provider]||!1}:e}):tb,[tb,eI,eL]),ty=(0,s.useMemo)(()=>"bulk"===ek?tf:tg,[ek,tf,tg]),tv=e=>{let t=o[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=d(e.used,e.total))},tw=(0,s.useCallback)(async(e,t)=>{if(e.length&&!ez){eU(!0),ea(null);try{let r=(await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})))).filter(e=>!e.ok).length;await W(ta,eG),r>0&&ea({type:"error",message:`Failed to update ${r} of ${e.length} connections`})}catch(e){console.error("Error bulk toggling connections:",e),await W(ta,eG),ea({type:"error",message:e.message||"Failed to update connections"})}finally{eU(!1)}}},[ez,ta,eG]),tk="all"===ef?"All providers":ef,tj=e1.eligibleConnections>0,tN=(0,s.useCallback)(async()=>{Z(!0);let e=await ta(eG);Z(!1),e.length&&(x(L(e)),c(t=>R(t,e)),await te())},[ta,eG,te]),tC=ty.length>0,tS=e1.eligibleConnections?e1.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"===ef?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===eN?"turned off":"active"===eN?"active":"matching"} accounts found for ${ef}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},t$=function(e){var t;let{start:r,end:a}=(t=e).total?{start:(t.page-1)*t.pageSize+1,end:Math.min(t.page*t.pageSize,t.total)}:{start:0,end:0};return`Showing ${r}-${a} of ${e.total}`}(eZ),tA=!K.includes(eJ);return X&&!r.length?(0,a.jsx)("div",{role:"status","aria-label":"Loading quota accounts",className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:Array.from({length:4},(e,t)=>(0,a.jsx)(q.Qv,{},t))}):X||tj?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(q.i5,{label:"Quota filters and actions",className:eE?"relative z-50":"relative",children:(0,a.jsxs)("div",{className:"grid w-full grid-cols-[minmax(0,1fr)_minmax(0,1fr)_2.75rem] gap-2 sm:flex sm:w-auto sm:flex-wrap sm:items-center sm:gap-1.5",children:[(0,a.jsxs)("div",{className:"relative min-w-0",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eP(e=>!e),className:"flex h-11 w-full min-w-0 items-center justify-between gap-1 rounded-xl border border-black/10 bg-black/[0.02] px-3 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10 sm:h-8 sm:w-auto sm:rounded-lg sm:px-2","aria-haspopup":"menu","aria-expanded":eE,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===ef?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(i.A,{src:`/providers/${ef}.png`,alt:ef,size:18,className:"size-[18px] rounded object-contain",fallbackText:ef.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize",children:tk})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),eE&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>eP(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-black/10 bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>e_("all"),className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===ef?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===ef&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:ev.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>e_(e),className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${ef===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)(i.A,{src:`/providers/${e}.png`,alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e}),ef===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:eN,onChange:e=>{let t=e.target.value;eN!==t&&eK(1),eC(t)},className:"h-11 min-w-0 rounded-xl border border-black/10 bg-black/[0.02] px-3 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10 sm:h-8 sm:rounded-lg sm:px-2","aria-label":"Filter accounts by status",children:H.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsx)("button",{type:"button",onClick:tu,disabled:M,className:"flex size-11 shrink-0 items-center justify-center rounded-xl border border-black/10 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg",title:"Refresh all","aria-label":"Refresh all quotas",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] sm:text-[14px] ${M?"animate-spin":""}`,children:"refresh"})}),(0,a.jsx)("div",{className:"col-span-2 inline-flex min-h-11 min-w-0 overflow-hidden rounded-xl border border-black/10 bg-black/[0.02] dark:border-white/10 dark:bg-white/[0.03] sm:h-8 sm:min-h-0 sm:rounded-lg",children:Q.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>ej(e.value),"aria-pressed":ek===e.value,className:`flex min-h-11 flex-1 items-center justify-center gap-1.5 px-3 text-xs font-medium transition-colors sm:min-h-0 sm:flex-none sm:justify-start sm:px-2 sm:font-normal ${ek===e.value?"bg-primary text-white":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,title:`Show quota in ${e.label} mode`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px] sm:text-[14px]",children:e.icon}),(0,a.jsx)("span",{children:e.label})]},e.value))}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(e=>!e),"aria-expanded":eM,className:`flex size-11 items-center justify-center rounded-xl border text-text-primary transition-colors sm:hidden ${eM?"border-primary/30 bg-primary/10 text-primary":"border-black/10 hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,"aria-label":eM?"Hide more actions":"Show more actions",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"tune"})}),(0,a.jsxs)("div",{className:`${eM?"flex":"hidden"} col-span-3 flex-col gap-2 rounded-2xl border border-black/10 bg-black/[0.02] p-3 dark:border-white/10 dark:bg-white/[0.03] sm:contents`,children:["codex"===ef&&(0,a.jsx)("select",{value:eS,onChange:e=>e$(e.target.value),className:"h-11 w-full rounded-xl border border-black/10 bg-surface px-3 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/10 sm:h-8 sm:w-auto sm:rounded-lg sm:bg-black/[0.02] sm:px-2 dark:sm:bg-white/[0.03]","aria-label":"Sort Codex quotas by remaining",children:G.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>eq(e=>!e),"aria-pressed":eA,className:`flex h-11 w-full shrink-0 items-center justify-between gap-2 rounded-xl border px-3 text-xs transition-colors sm:h-8 sm:w-auto sm:justify-start sm:rounded-lg sm:px-2 ${eA?"border-amber-500/40 bg-amber-500/10 text-amber-600 dark:text-amber-400":"border-black/10 bg-surface text-text-primary hover:bg-black/5 dark:border-white/10 dark:bg-transparent dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] sm:text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{children:"Expiring first"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] sm:hidden",children:eA?"check_circle":"circle"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{tw(tg.filter(e=>(e.isActive??!0)&&tv(e)).map(e=>e.id),!1)},disabled:ez,className:"flex h-11 w-full shrink-0 items-center gap-2 rounded-xl border border-red-500/30 bg-surface px-3 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50 dark:bg-transparent sm:h-8 sm:w-auto sm:rounded-lg sm:px-2",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] sm:text-[14px]",children:"block"}),(0,a.jsx)("span",{children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{tw(tg.filter(e=>!(e.isActive??!0)&&!tv(e)).map(e=>e.id),!0)},disabled:ez,className:"flex h-11 w-full shrink-0 items-center gap-2 rounded-xl border border-emerald-500/30 bg-surface px-3 text-xs text-emerald-600 transition-colors hover:bg-emerald-500/10 disabled:opacity-50 dark:bg-transparent dark:text-emerald-400 sm:h-8 sm:w-auto sm:rounded-lg sm:px-2",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] sm:text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{children:"Turn on Available"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>v(e=>!e),className:"flex h-11 w-full shrink-0 items-center justify-between gap-2 rounded-xl border border-black/10 bg-surface px-3 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-transparent dark:hover:bg-white/5 sm:h-8 sm:w-auto sm:justify-start sm:rounded-lg sm:px-2",title:y?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 text-text-primary",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] sm:text-[14px] ${y?"text-primary":"text-text-muted"}`,children:y?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{children:"Auto-refresh"})]}),y&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",V,"s)"]})]})]})]})}),er&&(0,a.jsx)(q.Gi,{tone:er.type||"error",action:(0,a.jsx)("button",{type:"button",onClick:()=>ea(null),"aria-label":"Dismiss",className:"grid size-9 place-items-center rounded-lg hover:bg-current/10",children:(0,a.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[16px]",children:"close"})}),children:er.message}),!X&&ee&&(0,a.jsxs)(q.Gi,{tone:"warning",title:"Provider refresh interrupted",action:(0,a.jsx)(q.$n,{variant:"secondary",size:"sm",onClick:tN,children:"Retry"}),children:["Existing account and quota data remain visible. ",ee]}),"bulk"===ek&&Object.values(eW).some(Boolean)&&(0,a.jsx)(q.Gi,{tone:"warning",children:"Couldn't load server-side totals for some providers — bulk cards show data for the current page only."}),tC?(0,a.jsxs)(a.Fragment,{children:[eA&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:ty.map(e=>{let t,r,s,n,l,c,d,x=!0===e.isAggregate,b=x?e.quota:o[e.id],f=x?e.isLoading:p[e.id],y=x?e.error:g[e.id],v=b?.quotas||[],w=function(e,t=[],r={}){if(!Array.isArray(t)||0===t.length)return[];let a=h(e,r,t);return 0===a.size?t:t.filter(e=>!a.has(m(e)))}(e.provider,v,eH),k=function(e,t=[],r={}){if(!Array.isArray(t)||0===t.length)return[];let a=h(e,r,t);return 0===a.size?[]:t.filter(e=>a.has(m(e)))}(e.provider,v,eH),j=!0===eF[e.id],S=j?w:function(e,t=3){return e.map((e,t)=>({quota:e,index:t})).sort((e,t)=>{let r=u(e.quota)-u(t.quota);if(0!==r)return r;let a=e.quota.resetAt?new Date(e.quota.resetAt).getTime():1/0,s=t.quota.resetAt?new Date(t.quota.resetAt).getTime():1/0;return a!==s?a-s:e.index-t.index}).slice(0,t).map(({quota:e})=>e)}(w),$=!1===e.isActive,E=!x&&(es===e.id||ei===e.id),P=x||"codex"!==e.provider?0:Number.isFinite(t=Number(b?.raw?.resetCredits?.availableCount))?Math.max(0,t):0,_=x||"claude"!==e.provider?null:(r=b?.raw?.resetCredits,s=Number(r?.availableCount),n="string"==typeof r?.nextGrantId?r.nextGrantId:"",Number.isFinite(s)&&!(s<=0)&&/^[a-z0-9_-]{1,40}$/.test(n)?{count:s,grantId:n}:null);return(0,a.jsxs)(A.default,{padding:"none",className:`min-w-0 ${$?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"border-b border-black/10 px-3 py-2 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)(i.A,{src:`/providers/${e.provider}.png`,alt:e.provider,size:32,className:"object-contain",fallbackText:e.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:e.name||D(e.provider)}),U(e)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:U(e)}):null,!x&&(l=String(e.authType||"").toLowerCase(),c=e.providerSpecificData?.region||e.providerSpecificData?.aiRegion||null,d=[],"apikey"===l||"api_key"===l?d.push({t:"API Key",c:"bg-blue-500/10 text-blue-500"}):("oauth"===l||"access_token"===l)&&d.push({t:"OAuth",c:"bg-violet-500/10 text-violet-500"}),c&&d.push({t:c,c:"bg-slate-500/10 text-text-muted"}),d.push(!1===e.isActive?{t:"paused",c:"bg-amber-500/10 text-amber-500"}:{t:"active",c:"bg-emerald-500/10 text-emerald-500"}),(0,a.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:d.map((e,t)=>(0,a.jsx)("span",{className:`rounded px-1.5 py-0.5 text-[10px] font-medium ${e.c}`,children:e.t},t))}))]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:[!x&&"claude"===e.provider&&_&&(0,a.jsxs)("button",{type:"button",onClick:()=>eh({kind:"claude",connection:e,count:_.count,grantId:_.grantId}),disabled:E||ep===e.id,"aria-label":"Use one Claude limit reset",className:"flex h-11 items-center gap-1 rounded-xl px-2 text-amber-600 transition-colors hover:bg-amber-500/10 disabled:cursor-not-allowed disabled:opacity-40 dark:text-amber-400 sm:h-8 sm:rounded-lg",title:"Use one Claude limit reset",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"restart_alt"}),(0,a.jsx)("span",{className:"text-[10px] tabular-nums",children:_.count})]}),!x&&"codex"===e.provider&&(0,a.jsxs)("button",{type:"button",onClick:()=>eh({connection:e,count:P}),disabled:P<=0||E||ep===e.id,"aria-label":"Use one Codex reset credit",className:"flex h-11 items-center gap-1 rounded-xl px-2 text-amber-600 transition-colors hover:bg-amber-500/10 disabled:cursor-not-allowed disabled:opacity-40 dark:text-amber-400 sm:h-8 sm:rounded-lg",title:P>0?"Use one reset credit":"No reset credits available",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"restart_alt"}),(0,a.jsx)("span",{className:"text-[10px] tabular-nums",children:P})]}),(0,a.jsx)("button",{type:"button",onClick:()=>x?tl(e.connectionIds,e.provider):tn(e.id,e.provider),disabled:f||E,"aria-label":"Refresh quota",className:"flex size-11 items-center justify-center rounded-xl transition-colors hover:bg-black/5 disabled:opacity-50 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg",title:"Refresh quota",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${f?"animate-spin":""}`,children:"refresh"})}),!x&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",onClick:()=>{eu(e),ec(!0)},disabled:E,"aria-label":"Edit connection",className:"flex size-11 items-center justify-center rounded-xl text-text-muted transition-colors hover:bg-black/5 hover:text-primary disabled:opacity-50 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg",title:"Edit connection",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,a.jsx)("button",{type:"button",onClick:()=>to(e.id),disabled:E,"aria-label":"Delete connection",className:"flex size-11 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50 sm:size-8 sm:rounded-lg",title:"Delete connection",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${es===e.id?"animate-pulse":""}`,children:"delete"})}),(0,a.jsx)("div",{className:"inline-flex size-11 items-center justify-center sm:h-8 sm:w-auto sm:pl-0.5",title:e.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(C.default,{size:"sm",touchTarget:!0,checked:e.isActive??!0,disabled:E,onChange:t=>tc(e.id,t)})})]})]})]})}),(0,a.jsxs)("div",{className:"px-2 py-1.5",children:[f?(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"})}):y?(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:y})]}):w.length>0?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"sm:hidden",children:[(0,a.jsx)(N,{quotas:S,totalCount:w.length,paginate:!1,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==eS,onHideQuota:t=>th(e.provider,t,!0)}),w.length>3&&(0,a.jsxs)("button",{type:"button",onClick:()=>eO(t=>({...t,[e.id]:!j})),className:"mt-2 flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border border-black/10 bg-black/[0.02] text-xs font-medium text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/5","aria-expanded":j,children:[(0,a.jsx)("span",{children:j?"Show less":`Show ${w.length-S.length} more`}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:j?"expand_less":"expand_more"})]})]}),(0,a.jsx)("div",{className:"hidden sm:block",children:(0,a.jsx)(N,{quotas:w,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==eS,onHideQuota:t=>th(e.provider,t,!0)})}),b?.message?(0,a.jsx)("p",{className:"px-1 text-[10px] text-text-muted",children:b.message}):null,b?.refreshError?(0,a.jsxs)(q.Gi,{tone:"warning",className:"px-2 py-1.5 text-[10px]",children:["Showing last successful quota; refresh failed: ",b.refreshError]}):null]}):b?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:b.message})}):k.length>0?null:(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("p",{className:"text-xs",children:"No quota data available"})}),!f&&!y&&k.length>0&&(0,a.jsxs)("div",{className:"mt-2 flex min-w-0 items-center gap-1 border-t border-black/5 pt-2 text-[10px] 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.jsx)("span",{className:"shrink-0",children:"Hidden:"}),(0,a.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap pb-1",children:k.map(t=>(0,a.jsx)("button",{type:"button",onClick:()=>th(e.provider,t,!1),className:"shrink-0 rounded-md border border-black/10 px-1.5 py-0.5 transition-colors hover:bg-black/5 hover:text-text-primary dark:border-white/10 dark:hover:bg-white/5",title:"Show this quota row",children:t.name},m(t)))})]})]})]},e.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:t$}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:tA?"custom":String(eJ),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(eK(1),eV(r),eX(String(r)))},className:"h-11 rounded-xl border border-black/10 bg-black/[0.02] px-3 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10 sm:h-8 sm:rounded-lg sm:px-2","aria-label":"Accounts per page",children:[K.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:eY,onChange:e=>eX(e.target.value),onBlur:()=>{let e=Number.parseInt(eY,10);if(!Number.isFinite(e))return void eX(String(eJ));let t=Math.min(500,Math.max(1,e));eK(1),eV(t),eX(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eY,10);if(!Number.isFinite(t))return void eX(String(eJ));let r=Math.min(500,Math.max(1,t));eK(1),eV(r),eX(String(r))},className:"h-11 w-24 rounded-xl border border-black/10 bg-black/[0.02] px-3 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10 sm:h-8 sm:w-20 sm:rounded-lg sm:px-2","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eZ.page," / ",eZ.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eK(1),disabled:eZ.page<=1||X||M,className:"flex h-11 items-center rounded-xl border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5 sm:h-8 sm:rounded-lg",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>eK(e=>Math.max(1,e-1)),disabled:eZ.page<=1||X||M,className:"flex size-11 items-center justify-center rounded-xl border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg","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:()=>eK(e=>Math.min(eZ.totalPages,e+1)),disabled:eZ.page>=eZ.totalPages||X||M,className:"flex size-11 items-center justify-center rounded-xl border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg","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:()=>eK(eZ.totalPages),disabled:eZ.page>=eZ.totalPages||X||M,className:"flex h-11 items-center rounded-xl border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5 sm:h-8 sm:rounded-lg",children:"Last Page"})]})]})})]}):(0,a.jsx)(q.pp,{icon:tS.icon,title:tS.title,description:tS.description}),(0,a.jsx)(q.wI,{isOpen:eo,connection:ed,proxyPools:eg,onSave:td,onClose:()=>{ec(!1),eu(null)}}),(0,a.jsx)(q.uo,{isOpen:!!em,onClose:()=>eh(null),onConfirm:tr,title:em?.kind==="claude"?"Use Claude Limit Reset":"Use Codex Reset Credit",message:em?.kind==="claude"?`Use 1 Claude limit reset for ${U(em?.connection||{})||"this Claude account"}? This permanently spends one grant and cannot be undone. Available: ${em?.count??0}.`:`Use 1 reset credit for ${U(em?.connection||{})||"this Codex account"}? This permanently spends one credit and cannot be undone. Available: ${em?.count??0}.`,confirmText:em?.kind==="claude"?"Use 1 Reset":"Use 1 Credit",variant:"danger",loading:!!(em?.connection?.id&&ep===em.connection.id)})]}):ee?(0,a.jsx)(q.Gi,{tone:"error",title:"Failed to load providers",action:(0,a.jsx)(q.$n,{variant:"secondary",size:"sm",icon:"refresh",onClick:tN,children:"Retry"}),children:ee}):(0,a.jsx)(q.pp,{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."})}},81564:(e,t,r)=>{Promise.resolve().then(r.bind(r,43924)),Promise.resolve().then(r.bind(r,25086))}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=81564)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[410],{13092:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var a=n(95155),i=n(12115),o=n(73321),s=n(84588);n(8208),n(8374);let r={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},xai:{"grok-4.7":{input:2,output:6,cached:.5,reasoning:6,cache_creation:0},"grok-4.6":{input:2,output:6,cached:.5,reasoning:6,cache_creation:0},"grok-4.5":{input:2,output:6,cached:.3,reasoning:6,cache_creation:0},"grok-4.3":{input:1.25,output:2.5,cached:.2,reasoning:2.5,cache_creation:0},"grok-4.20-0309-reasoning":{input:1.25,output:2.5,cached:.2,reasoning:2.5,cache_creation:0},"grok-4.20-0309-non-reasoning":{input:1.25,output:2.5,cached:.2,reasoning:2.5,cache_creation:0},"grok-4.20-multi-agent-0309":{input:1.25,output:2.5,cached:.2,reasoning:2.5,cache_creation:0},"grok-build-0.1":{input:1,output:2,cached:.2,reasoning:2,cache_creation:0}},mistral:{"mistral-large-4":{input:.7,output:2.1,cached:.07,reasoning:2.1},"mistral-large-4-0":{input:.7,output:2.1,cached:.07,reasoning:2.1},"mistral-small-2603":{input:.15,output:.6,reasoning:.6},"zai-glm-5-3":{input:1.4,output:4.4,cached:.14,reasoning:4.4},"zai-glm-5-3-flash":{input:.15,output:.5,cached:.03,reasoning:.5},"deepseek-v4-1-flash-1017":{input:.3,output:1.2,cached:.007,reasoning:1.2},"ministral-14b-2512":{input:.2,output:.2,reasoning:.2},"ministral-8b-2512":{input:.15,output:.15,reasoning:.15},"ministral-3b-2512":{input:.1,output:.1,reasoning:.1},"codestral-2508":{input:.3,output:.9,reasoning:.9},"codestral-latest":{input:.3,output:.9,reasoning:.9}},"voyage-ai":{"voyage-4-large":{input:.12,output:0},"voyage-4":{input:.06,output:0},"voyage-4-lite":{input:.02,output:0},"voyage-code-4":{input:.12,output:0},"voyage-3-large":{input:.18,output:0},"voyage-3.5":{input:.06,output:0},"voyage-3.5-lite":{input:.02,output:0},"voyage-code-3":{input:.18,output:0},"voyage-finance-2":{input:.12,output:0},"voyage-law-2":{input:.12,output:0},"voyage-multilingual-2":{input:.12,output:0}},fireworks:{"accounts/fireworks/models/ember-1":{input:3,output:15,cached:.3,reasoning:15},"accounts/fireworks/models/muse-spark-open":{input:1.25,output:4.25,cached:.15,reasoning:4.25},"accounts/fireworks/models/kimi-k3p1-pro":{input:2,output:10,cached:.2,reasoning:10},"accounts/fireworks/models/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"accounts/fireworks/models/deepseek-v4p1-flash":{input:.3,output:1.2,cached:.006,reasoning:1.2},"accounts/fireworks/models/deepseek-v4p1-flash-1017":{input:.3,output:1.2,cached:.006,reasoning:1.2},"accounts/fireworks/models/glm-5p3-flash":{input:.15,output:.5,cached:.03,reasoning:.5},"accounts/fireworks/models/ultramarine-1-flash-us":{input:.15,output:.5,cached:.03,reasoning:.5},"accounts/fireworks/models/glm-5p3":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"accounts/fireworks/models/qwen3p8-max":{input:2,output:6,cached:.25,reasoning:6},"accounts/fireworks/models/minimax-m3":{input:.3,output:1.2,cached:.06,reasoning:1.2},"accounts/fireworks/models/gpt-oss-120b":{input:.15,output:.6,cached:.015,reasoning:.6},"accounts/fireworks/models/nemotron-lightning-3p5-30b-a3b":{input:.05,output:.2,cached:.01,reasoning:.2},"accounts/fireworks/models/nemotron-3-ultra-nvfp4":{input:.6,output:2.4,cached:.12,reasoning:2.4},"fireworks/qwen3-embedding-8b":{input:.1,output:0},"nomic-ai/nomic-embed-text-v1.5":{input:.008,output:0},"nomic-ai/nomic-embed-text-v1":{input:.008,output:0},"thenlper/gte-base":{input:.008,output:0},"BAAI/bge-base-en-v1.5":{input:.008,output:0},"BAAI/bge-small-en-v1.5":{input:.008,output:0},"thenlper/gte-large":{input:.016,output:0},"WhereIsAI/UAE-Large-V1":{input:.016,output:0},"mixedbread-ai/mxbai-embed-large-v1":{input:.016,output:0}},together:{"deepseek-ai/DeepSeek-V4-Pro-0813":{input:1.32,output:3.96,cached:.13,reasoning:3.96},"deepseek-ai/DeepSeek-V4.1-Flash":{input:.3,output:1.2,cached:.006,reasoning:1.2},"deepseek-ai/DeepSeek-V4.1-Flash-1017":{input:.3,output:1.2,cached:.006,reasoning:1.2},"meta-models/Muse-Glimmer-30B":{input:.35,output:1.5,cached:.04,reasoning:1.5},"meta-models/Muse-Spark-Open-816B-A42B":{input:1.25,output:4.25,cached:.15,reasoning:4.25},"MiniMaxAI/MiniMax-M3.1-Flash":{input:.15,output:.6,cached:.015,reasoning:.6},"moonshotai/Kimi-K3":{input:3,output:15,cached:.3,reasoning:15},"moonshotai/Kimi-K3.1-Pro":{input:2,output:10,cached:.2,reasoning:10},"nvidia/NVIDIA-Nemotron-3.5-Super-VL":{input:.15,output:.5,cached:.02,reasoning:.5},"openai/gpt-oss-120b":{input:.15,output:.6,reasoning:.6},"Prism-ML/Ternary-Bonsai-27B":{input:0,output:0,reasoning:0},"Qwen/Qwen3.5-9B":{input:.17,output:.25,reasoning:.25},"Qwen/Qwen3.6-Plus":{input:.5,output:3,reasoning:3},"Qwen/Qwen3.7-Max":{input:2.5,output:7.5,cached:.5,reasoning:7.5},"Qwen/Qwen3.7-Plus":{input:.32,output:1.28,reasoning:1.28},"Qwen/Qwen3.8-Flash":{input:.15,output:.47,reasoning:.47},"reflection/Beam-1.0-501B-A23B":{input:.4,output:1.2,cached:.04,reasoning:1.2},"together/Tev1-4B-experimental":{input:.042,output:0,reasoning:0},"zai-org/GLM-5.2":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"zai-org/GLM-5.3":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"zai-org/GLM-5.3-Flash":{input:.15,output:.5,cached:.03,reasoning:.5}},sambanova:{"Meta-Llama-3.3-70B-Instruct":{input:.6,output:1.2,reasoning:1.2},"MiniMax-M3.1-Flash":{input:.3,output:1.2,cached:.03,reasoning:1.2,cache_creation:0},"gemma-4-31B-it":{input:.38,output:1.15,reasoning:1.15},"gpt-oss-120b":{input:.22,output:.59,reasoning:.59}},"perplexity-agent":{"anthropic/claude-fable-5":{input:10,output:50,cached:1,reasoning:50},"anthropic/claude-fable-5-1":{input:10,output:50,cached:.25,reasoning:50},"anthropic/claude-opus-5-5":{input:4,output:20,cached:.2,reasoning:20},"anthropic/claude-opus-5":{input:5,output:25,cached:.5,reasoning:25},"anthropic/claude-sonnet-5-5":{input:2,output:10,cached:.1,reasoning:10},"anthropic/claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10},"anthropic/claude-haiku-5-5":{input:.1,output:.5,cached:.01,reasoning:.5},"openai/gpt-6.1-sol":{input:2,output:10,reasoning:10},"openai/gpt-6-astra":{input:10,output:50,reasoning:50},"openai/gpt-6-sol":{input:2,output:10,reasoning:10},"openai/gpt-6-luna":{input:.1,output:.5,reasoning:.5},"openai/gpt-5.6-sol":{input:4,output:20,reasoning:20},"openai/gpt-5.6-terra":{input:2,output:12,reasoning:12},"openai/gpt-5.6-luna":{input:.2,output:1.2,reasoning:1.2},"openai/gpt-5.5":{input:5,output:30,reasoning:30},"google/gemini-4-argon":{input:2,output:10,cached:.1,reasoning:10},"google/gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,reasoning:7.5},"google/gemini-3.7-flash":{input:.75,output:3.75,cached:.075,reasoning:3.75},"google/gemini-3.8-flash":{input:.75,output:3.75,cached:.075,reasoning:3.75},"xai/grok-4.7":{input:2,output:6,cached:.5,reasoning:6},"xai/grok-4.6":{input:2,output:6,cached:.5,reasoning:6},"xai/grok-4.5":{input:2,output:6,cached:.3,reasoning:6},"perplexity/glm-5.3":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"perplexity/glm-5.3-flash":{input:.15,output:.5,cached:.03,reasoning:.5},"perplexity/deepseek-v4-pro-0813":{input:1.32,output:3.96,cached:.044,reasoning:3.96},"perplexity/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"perplexity/nemotron-3.5-super-120b-a12b":{input:.2,output:.5,cached:.04,reasoning:.5},"perplexity/sonar":{input:.25,output:2.5,cached:.0625,reasoning:2.5}},cerebras:{"gpt-oss-120b":{input:.35,output:.75,reasoning:.75},"qwen-3.8-27b":{input:.99,output:1.49,reasoning:1.49}},groq:{"openai/gpt-oss-120b":{input:.15,output:.6,reasoning:.6},"openai/gpt-oss-20b":{input:.075,output:.3,reasoning:.3},"openai/gpt-oss-safeguard-20b":{input:.075,output:.3,reasoning:.3},"qwen/qwen3.8-27b":{input:.8,output:4,reasoning:4},"meta-llama/llama-prompt-guard-2-22m":{input:.03,output:.03,reasoning:.03},"meta-llama/llama-prompt-guard-2-86m":{input:.04,output:.04,reasoning:.04}},opencode:{"pulse-alpha-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"crouton-alpha-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},oc:{"pulse-alpha-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"crouton-alpha-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},"opencode-go":{"kimi-k3.1-pro":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"deepseek-v4.1-flash":{input:.15,output:.6,cached:.003,reasoning:.6,cache_creation:0},"grok-4.7":{input:2,output:6,cached:.5,reasoning:6,cache_creation:0},"gpt-6-luna":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},"mimo-v2.6-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:0},"mimo-v2.6-pro":{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:0},"minimax-m3.1-flash":{input:.15,output:.6,cached:.015,reasoning:.6,cache_creation:0},"step-5-preview":{input:1,output:2.7,cached:.1,reasoning:2.7,cache_creation:0},hy4:{input:.834,output:2.501,cached:.042,reasoning:2.501,cache_creation:0},"gemini-4-argon":{input:2,output:10,cached:.1,reasoning:10,cache_creation:0},"beam-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"iceman-contributor-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},"opencode-zen":{"claude-haiku-5-5":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},"claude-opus-5-5":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-sonnet-5-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-6-sol":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-6.1-sol":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"gpt-6-luna":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},"grok-4.7":{input:2,output:6,cached:.5,reasoning:6,cache_creation:0},"muse-wonder-1.0":{input:4,output:20,cached:.2,reasoning:20,cache_creation:0},"qwen3.8-flash":{input:.15,output:.47,cached:.016,reasoning:.47,cache_creation:.2},"qwen3.8-max":{input:2,output:6,cached:.25,reasoning:6,cache_creation:2.5},"deepseek-v4.1-flash":{input:.3,output:1.2,cached:.006,reasoning:1.2,cache_creation:0},"mistral-large-4":{input:.68,output:2.09,cached:.07,reasoning:2.09,cache_creation:0},"beam-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"flint-40b-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"nemotron-3.5-super-vl-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-v4.1-flash-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"glm-5.3-flash-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"pulse-alpha-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"crouton-alpha-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}}};function c({isOpen:e,onClose:t,onSave:n}){let[o,s]=(0,i.useState)({}),[u,p]=(0,i.useState)(!0),[l,d]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&h()},[e]);let h=async()=>{p(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();s(t)}else s(r)}catch(e){console.error("Failed to load pricing:",e),s(r)}finally{p(!1)}},g=async()=>{d(!0);try{let e=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(e.ok)n?.(),t();else{let t=await e.json().catch(()=>({}));alert(`Failed to save pricing: ${t?.error||`Server error (${e.status})`}`)}}catch(e){console.error("Failed to save pricing:",e),alert("Failed to save pricing")}finally{d(!1)}},m=async()=>{if(confirm("Reset all pricing to defaults? This cannot be undone."))try{(await fetch("/api/pricing",{method:"DELETE"})).ok&&s(r)}catch(e){console.error("Failed to reset pricing:",e),alert("Failed to reset pricing")}};if(!e)return null;let x=Object.keys(o).sort(),b=["input","output","cached","reasoning","cache_creation"];return(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,a.jsxs)("div",{className:"bg-bg-base border border-border rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden flex flex-col",children:[(0,a.jsxs)("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Pricing Configuration"}),(0,a.jsx)("button",{onClick:t,className:"text-text-muted hover:text-text text-2xl leading-none",children:"\xd7"})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto p-4",children:u?(0,a.jsx)("div",{className:"text-center py-8 text-text-muted",children:"Loading pricing data..."}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"bg-bg-subtle border border-border rounded-lg p-3 text-sm",children:[(0,a.jsx)("p",{className:"font-medium mb-1",children:"Pricing Rates Format"}),(0,a.jsxs)("p",{className:"text-text-muted",children:["All rates are in ",(0,a.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: Input rate of 2.50 means $2.50 per 1,000,000 input tokens."]})]}),x.map(e=>{let t=Object.keys(o[e]).sort();return(0,a.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,a.jsx)("div",{className:"bg-bg-subtle px-4 py-2 font-semibold text-sm",children:e.toUpperCase()}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-bg-hover text-text-muted uppercase text-xs",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 text-left",children:"Model"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Input"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Output"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Cached"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Reasoning"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Cache Creation"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border",children:t.map(t=>(0,a.jsxs)("tr",{className:"hover:bg-bg-subtle/50",children:[(0,a.jsx)("td",{className:"px-3 py-2 font-medium",children:t}),b.map(n=>(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("input",{type:"number",step:"0.01",min:"0",value:o[e][t][n]||0,onChange:a=>{let i;!isNaN(i=parseFloat(a.target.value))&&!(i<0)&&s(a=>{let o={...a};return o[e]||(o[e]={}),o[e][t]||(o[e][t]={}),o[e][t][n]=i,o})},className:"w-20 px-2 py-1 text-right bg-bg-base border border-border rounded focus:outline-none focus:border-primary"})},n))]},t))})]})})]},e)}),0===x.length&&(0,a.jsx)("div",{className:"text-center py-8 text-text-muted",children:"No pricing data available"})]})}),(0,a.jsxs)("div",{className:"p-4 border-t border-border flex items-center justify-between gap-2",children:[(0,a.jsx)("button",{onClick:m,className:"px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",disabled:l,children:"Reset to Defaults"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:t,className:"px-4 py-2 text-sm text-text-muted hover:text-text border border-border rounded transition-colors",disabled:l,children:"Cancel"}),(0,a.jsx)("button",{onClick:g,className:"px-4 py-2 text-sm bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-50",disabled:l,children:l?"Saving...":"Save Changes"})]})]})]})})}function u(){(0,o.useRouter)();let[e,t]=(0,i.useState)(!1),[n,r]=(0,i.useState)(null),[u,p]=(0,i.useState)(!0);(0,i.useEffect)(()=>{l()},[]);let l=async()=>{p(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();r(t)}}catch(e){console.error("Failed to load pricing:",e)}finally{p(!1)}};return(0,a.jsxs)("div",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-3xl font-bold",children:"Pricing Settings"}),(0,a.jsx)("p",{className:"text-text-muted mt-1",children:"Configure pricing rates for cost tracking and calculations"})]}),(0,a.jsx)("button",{onClick:()=>t(!0),className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary/90 transition-colors",children:"Edit Pricing"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)(s.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Models"}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1",children:u?"...":(()=>{if(!n)return 0;let e=0;for(let t in n)e+=Object.keys(n[t]).length;return e})()})]}),(0,a.jsxs)(s.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Providers"}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1",children:u?"...":(!n?[]:Object.keys(n).sort()).length})]}),(0,a.jsxs)(s.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Status"}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1 text-success",children:u?"...":"Active"})]})]}),(0,a.jsxs)(s.default,{className:"p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"How Pricing Works"}),(0,a.jsxs)("div",{className:"space-y-3 text-sm text-text-muted",children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Cost Calculation:"})," Costs are calculated based on token usage and pricing rates. Each request's cost is determined by: (input_tokens \xd7 input_rate) + (output_tokens \xd7 output_rate) + (cached_tokens \xd7 cached_rate)"]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Pricing Format:"})," All rates are in ",(0,a.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: An input rate of 2.50 means $2.50 per 1,000,000 input tokens."]}),(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"Token Types:"})}),(0,a.jsxs)("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Input:"})," Standard prompt tokens"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Output:"})," Completion/response tokens"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Cached:"})," Cached input tokens (typically 50% of input rate)"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Reasoning:"})," Special reasoning/thinking tokens (fallback to output rate)"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Cache Creation:"})," Tokens used to create cache entries (fallback to input rate)"]})]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Custom Pricing:"})," You can override default pricing for specific models. Reset to defaults anytime to restore standard rates."]})]})]}),(0,a.jsxs)(s.default,{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Current Pricing Overview"}),(0,a.jsx)("button",{onClick:()=>t(!0),className:"text-primary hover:underline text-sm",children:"View Full Details"})]}),u?(0,a.jsx)("div",{className:"text-center py-4 text-text-muted",children:"Loading pricing data..."}):n?(0,a.jsxs)("div",{className:"space-y-3",children:[Object.keys(n).slice(0,5).map(e=>(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsxs)("span",{className:"font-semibold",children:[e.toUpperCase(),":"]})," ",(0,a.jsxs)("span",{className:"text-text-muted",children:[Object.keys(n[e]).length," models"]})]},e)),Object.keys(n).length>5&&(0,a.jsxs)("div",{className:"text-sm text-text-muted",children:["+ ",Object.keys(n).length-5," more providers"]})]}):(0,a.jsx)("div",{className:"text-text-muted",children:"No pricing data available"})]}),e&&(0,a.jsx)(c,{isOpen:e,onClose:()=>t(!1),onSave:()=>{l()}})]})}},31474:(e,t,n)=>{"use strict";function a(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}n.d(t,{cn:()=>a})},73321:(e,t,n)=>{"use strict";var a=n(74645);n.o(a,"notFound")&&n.d(t,{notFound:function(){return a.notFound}}),n.o(a,"useParams")&&n.d(t,{useParams:function(){return a.useParams}}),n.o(a,"usePathname")&&n.d(t,{usePathname:function(){return a.usePathname}}),n.o(a,"useRouter")&&n.d(t,{useRouter:function(){return a.useRouter}}),n.o(a,"useSearchParams")&&n.d(t,{useSearchParams:function(){return a.useSearchParams}})},80477:(e,t,n)=>{Promise.resolve().then(n.bind(n,13092))},84588:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var a=n(95155),i=n(31474);function o({children:e,title:t,subtitle:n,icon:s,action:r,padding:c="md",hover:u=!1,elev:p=!1,className:l,...d}){return(0,a.jsxs)("div",{className:(0,i.cn)("card-3d border border-border-subtle rounded-[14px] transition-[border-color,box-shadow,transform] duration-200 motion-reduce:transition-none",p&&"card-3d-elev",u&&"hover:-translate-y-0.5 hover:border-brand-500/30 hover:shadow-[var(--shadow-warm)] cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[c],l),...d,children:[(t||r)&&(0,a.jsxs)("div",{className:"mb-4 flex min-w-0 items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[s&&(0,a.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:s})}),(0,a.jsxs)("div",{className:"min-w-0",children:[t&&(0,a.jsx)("h3",{className:"text-text-main font-semibold",children:t}),n&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:n})]})]}),r&&(0,a.jsx)("div",{className:"shrink-0",children:r})]}),e]})}o.Section=function({children:e,className:t,...n}){return(0,a.jsx)("div",{className:(0,i.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",t),...n,children:e})},o.Row=function({children:e,className:t,...n}){return(0,a.jsx)("div",{className:(0,i.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",t),...n,children:e})},o.ListItem=function({children:e,actions:t,className:n,...o}){return(0,a.jsxs)("div",{className:(0,i.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",n),...o,children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,a.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}}},e=>{e.O(0,[9501,8441,3794,7358],()=>e(e.s=80477)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[410],{13092:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var a=n(95155),i=n(12115),o=n(73321),s=n(84588);n(8208),n(8374);let r={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},xai:{"grok-4.7":{input:2,output:6,cached:.5,reasoning:6,cache_creation:0},"grok-4.6":{input:2,output:6,cached:.5,reasoning:6,cache_creation:0},"grok-4.5":{input:2,output:6,cached:.3,reasoning:6,cache_creation:0},"grok-4.3":{input:1.25,output:2.5,cached:.2,reasoning:2.5,cache_creation:0},"grok-4.20-0309-reasoning":{input:1.25,output:2.5,cached:.2,reasoning:2.5,cache_creation:0},"grok-4.20-0309-non-reasoning":{input:1.25,output:2.5,cached:.2,reasoning:2.5,cache_creation:0},"grok-4.20-multi-agent-0309":{input:1.25,output:2.5,cached:.2,reasoning:2.5,cache_creation:0},"grok-build-0.1":{input:1,output:2,cached:.2,reasoning:2,cache_creation:0}},mistral:{"mistral-large-4":{input:.7,output:2.1,cached:.07,reasoning:2.1},"mistral-large-4-0":{input:.7,output:2.1,cached:.07,reasoning:2.1},"mistral-small-2603":{input:.15,output:.6,reasoning:.6},"zai-glm-5-3":{input:1.4,output:4.4,cached:.14,reasoning:4.4},"zai-glm-5-3-flash":{input:.15,output:.5,cached:.03,reasoning:.5},"deepseek-v4-1-flash-1017":{input:.3,output:1.2,cached:.007,reasoning:1.2},"ministral-14b-2512":{input:.2,output:.2,reasoning:.2},"ministral-8b-2512":{input:.15,output:.15,reasoning:.15},"ministral-3b-2512":{input:.1,output:.1,reasoning:.1},"codestral-2508":{input:.3,output:.9,reasoning:.9},"codestral-latest":{input:.3,output:.9,reasoning:.9}},"voyage-ai":{"voyage-4-large":{input:.12,output:0},"voyage-4":{input:.06,output:0},"voyage-4-lite":{input:.02,output:0},"voyage-code-4":{input:.12,output:0},"voyage-3-large":{input:.18,output:0},"voyage-3.5":{input:.06,output:0},"voyage-3.5-lite":{input:.02,output:0},"voyage-code-3":{input:.18,output:0},"voyage-finance-2":{input:.12,output:0},"voyage-law-2":{input:.12,output:0},"voyage-multilingual-2":{input:.12,output:0}},fireworks:{"accounts/fireworks/models/ember-1":{input:3,output:15,cached:.3,reasoning:15},"accounts/fireworks/models/muse-spark-open":{input:1.25,output:4.25,cached:.15,reasoning:4.25},"accounts/fireworks/models/kimi-k3p1-pro":{input:2,output:10,cached:.2,reasoning:10},"accounts/fireworks/models/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"accounts/fireworks/models/deepseek-v4p1-flash":{input:.3,output:1.2,cached:.006,reasoning:1.2},"accounts/fireworks/models/deepseek-v4p1-flash-1017":{input:.3,output:1.2,cached:.006,reasoning:1.2},"accounts/fireworks/models/glm-5p3-flash":{input:.15,output:.5,cached:.03,reasoning:.5},"accounts/fireworks/models/ultramarine-1-flash-us":{input:.15,output:.5,cached:.03,reasoning:.5},"accounts/fireworks/models/glm-5p3":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"accounts/fireworks/models/qwen3p8-max":{input:2,output:6,cached:.25,reasoning:6},"accounts/fireworks/models/minimax-m3":{input:.3,output:1.2,cached:.06,reasoning:1.2},"accounts/fireworks/models/gpt-oss-120b":{input:.15,output:.6,cached:.015,reasoning:.6},"accounts/fireworks/models/nemotron-lightning-3p5-30b-a3b":{input:.05,output:.2,cached:.01,reasoning:.2},"accounts/fireworks/models/nemotron-3-ultra-nvfp4":{input:.6,output:2.4,cached:.12,reasoning:2.4},"fireworks/qwen3-embedding-8b":{input:.1,output:0},"nomic-ai/nomic-embed-text-v1.5":{input:.008,output:0},"nomic-ai/nomic-embed-text-v1":{input:.008,output:0},"thenlper/gte-base":{input:.008,output:0},"BAAI/bge-base-en-v1.5":{input:.008,output:0},"BAAI/bge-small-en-v1.5":{input:.008,output:0},"thenlper/gte-large":{input:.016,output:0},"WhereIsAI/UAE-Large-V1":{input:.016,output:0},"mixedbread-ai/mxbai-embed-large-v1":{input:.016,output:0}},together:{"deepseek-ai/DeepSeek-V4-Pro-0813":{input:1.32,output:3.96,cached:.13,reasoning:3.96},"deepseek-ai/DeepSeek-V4.1-Flash":{input:.3,output:1.2,cached:.006,reasoning:1.2},"deepseek-ai/DeepSeek-V4.1-Flash-1017":{input:.3,output:1.2,cached:.006,reasoning:1.2},"meta-models/Muse-Glimmer-30B":{input:.35,output:1.5,cached:.04,reasoning:1.5},"meta-models/Muse-Spark-Open-816B-A42B":{input:1.25,output:4.25,cached:.15,reasoning:4.25},"MiniMaxAI/MiniMax-M3.1-Flash":{input:.15,output:.6,cached:.015,reasoning:.6},"moonshotai/Kimi-K3":{input:3,output:15,cached:.3,reasoning:15},"moonshotai/Kimi-K3.1-Pro":{input:2,output:10,cached:.2,reasoning:10},"nvidia/NVIDIA-Nemotron-3.5-Super-VL":{input:.15,output:.5,cached:.02,reasoning:.5},"openai/gpt-oss-120b":{input:.15,output:.6,reasoning:.6},"Prism-ML/Ternary-Bonsai-27B":{input:0,output:0,reasoning:0},"Qwen/Qwen3.5-9B":{input:.17,output:.25,reasoning:.25},"Qwen/Qwen3.6-Plus":{input:.5,output:3,reasoning:3},"Qwen/Qwen3.7-Max":{input:2.5,output:7.5,cached:.5,reasoning:7.5},"Qwen/Qwen3.7-Plus":{input:.32,output:1.28,reasoning:1.28},"Qwen/Qwen3.8-Flash":{input:.15,output:.47,reasoning:.47},"reflection/Beam-1.0-501B-A23B":{input:.4,output:1.2,cached:.04,reasoning:1.2},"together/Tev1-4B-experimental":{input:.042,output:0,reasoning:0},"zai-org/GLM-5.2":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"zai-org/GLM-5.3":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"zai-org/GLM-5.3-Flash":{input:.15,output:.5,cached:.03,reasoning:.5}},sambanova:{"Meta-Llama-3.3-70B-Instruct":{input:.6,output:1.2,reasoning:1.2},"MiniMax-M3.1-Flash":{input:.3,output:1.2,cached:.03,reasoning:1.2,cache_creation:0},"gemma-4-31B-it":{input:.38,output:1.15,reasoning:1.15},"gpt-oss-120b":{input:.22,output:.59,reasoning:.59}},"perplexity-agent":{"anthropic/claude-fable-5":{input:10,output:50,cached:1,reasoning:50},"anthropic/claude-fable-5-1":{input:10,output:50,cached:.25,reasoning:50},"anthropic/claude-opus-5-5":{input:4,output:20,cached:.2,reasoning:20},"anthropic/claude-opus-5":{input:5,output:25,cached:.5,reasoning:25},"anthropic/claude-sonnet-5-5":{input:2,output:10,cached:.1,reasoning:10},"anthropic/claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10},"anthropic/claude-haiku-5-5":{input:.1,output:.5,cached:.01,reasoning:.5},"openai/gpt-6.1-sol":{input:2,output:10,reasoning:10},"openai/gpt-6-astra":{input:10,output:50,reasoning:50},"openai/gpt-6-sol":{input:2,output:10,reasoning:10},"openai/gpt-6-luna":{input:.1,output:.5,reasoning:.5},"openai/gpt-5.6-sol":{input:4,output:20,reasoning:20},"openai/gpt-5.6-terra":{input:2,output:12,reasoning:12},"openai/gpt-5.6-luna":{input:.2,output:1.2,reasoning:1.2},"openai/gpt-5.5":{input:5,output:30,reasoning:30},"google/gemini-4-argon":{input:2,output:10,cached:.1,reasoning:10},"google/gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,reasoning:7.5},"google/gemini-3.7-flash":{input:.75,output:3.75,cached:.075,reasoning:3.75},"google/gemini-3.8-flash":{input:.75,output:3.75,cached:.075,reasoning:3.75},"xai/grok-4.7":{input:2,output:6,cached:.5,reasoning:6},"xai/grok-4.6":{input:2,output:6,cached:.5,reasoning:6},"xai/grok-4.5":{input:2,output:6,cached:.3,reasoning:6},"perplexity/glm-5.3":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"perplexity/glm-5.3-flash":{input:.15,output:.5,cached:.03,reasoning:.5},"perplexity/deepseek-v4-pro-0813":{input:1.32,output:3.96,cached:.044,reasoning:3.96},"perplexity/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"perplexity/nemotron-3.5-super-120b-a12b":{input:.2,output:.5,cached:.04,reasoning:.5},"perplexity/sonar":{input:.25,output:2.5,cached:.0625,reasoning:2.5}},cerebras:{"gpt-oss-120b":{input:.35,output:.75,reasoning:.75},"qwen-3.8-27b":{input:.99,output:1.49,reasoning:1.49}},groq:{"openai/gpt-oss-120b":{input:.15,output:.6,reasoning:.6},"openai/gpt-oss-20b":{input:.075,output:.3,reasoning:.3},"openai/gpt-oss-safeguard-20b":{input:.075,output:.3,reasoning:.3},"qwen/qwen3.8-27b":{input:.8,output:4,reasoning:4},"meta-llama/llama-prompt-guard-2-22m":{input:.03,output:.03,reasoning:.03},"meta-llama/llama-prompt-guard-2-86m":{input:.04,output:.04,reasoning:.04}},opencode:{"pulse-alpha-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"crouton-alpha-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},oc:{"pulse-alpha-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"crouton-alpha-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},"opencode-go":{"kimi-k3.1-pro":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"deepseek-v4.1-flash":{input:.15,output:.6,cached:.003,reasoning:.6,cache_creation:0},"grok-4.7":{input:2,output:6,cached:.5,reasoning:6,cache_creation:0},"gpt-6-luna":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},"mimo-v2.6-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:0},"mimo-v2.6-pro":{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:0},"minimax-m3.1-flash":{input:.15,output:.6,cached:.015,reasoning:.6,cache_creation:0},"step-5-preview":{input:1,output:2.7,cached:.1,reasoning:2.7,cache_creation:0},hy4:{input:.834,output:2.501,cached:.042,reasoning:2.501,cache_creation:0},"gemini-4-argon":{input:2,output:10,cached:.1,reasoning:10,cache_creation:0},"beam-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"iceman-contributor-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},"opencode-zen":{"claude-haiku-5-5":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},"claude-opus-5-5":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-sonnet-5-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-6-sol":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-6.1-sol":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"gpt-6-luna":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},"grok-4.7":{input:2,output:6,cached:.5,reasoning:6,cache_creation:0},"muse-wonder-1.0":{input:4,output:20,cached:.2,reasoning:20,cache_creation:0},"qwen3.8-flash":{input:.15,output:.47,cached:.016,reasoning:.47,cache_creation:.2},"qwen3.8-max":{input:2,output:6,cached:.25,reasoning:6,cache_creation:2.5},"deepseek-v4.1-flash":{input:.3,output:1.2,cached:.006,reasoning:1.2,cache_creation:0},"mistral-large-4":{input:.68,output:2.09,cached:.07,reasoning:2.09,cache_creation:0},"beam-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"flint-40b-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"nemotron-3.5-super-vl-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-v4.1-flash-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"glm-5.3-flash-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"pulse-alpha-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"crouton-alpha-free":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}}};function c({isOpen:e,onClose:t,onSave:n}){let[o,s]=(0,i.useState)({}),[u,p]=(0,i.useState)(!0),[l,d]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&h()},[e]);let h=async()=>{p(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();s(t)}else s(r)}catch(e){console.error("Failed to load pricing:",e),s(r)}finally{p(!1)}},g=async()=>{d(!0);try{let e=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(e.ok)n?.(),t();else{let t=await e.json().catch(()=>({}));alert(`Failed to save pricing: ${t?.error||`Server error (${e.status})`}`)}}catch(e){console.error("Failed to save pricing:",e),alert("Failed to save pricing")}finally{d(!1)}},m=async()=>{if(confirm("Reset all pricing to defaults? This cannot be undone."))try{(await fetch("/api/pricing",{method:"DELETE"})).ok&&s(r)}catch(e){console.error("Failed to reset pricing:",e),alert("Failed to reset pricing")}};if(!e)return null;let x=Object.keys(o).sort(),b=["input","output","cached","reasoning","cache_creation"];return(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,a.jsxs)("div",{className:"bg-bg-base border border-border rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden flex flex-col",children:[(0,a.jsxs)("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Pricing Configuration"}),(0,a.jsx)("button",{onClick:t,className:"text-text-muted hover:text-text text-2xl leading-none",children:"\xd7"})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto p-4",children:u?(0,a.jsx)("div",{className:"text-center py-8 text-text-muted",children:"Loading pricing data..."}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"bg-bg-subtle border border-border rounded-lg p-3 text-sm",children:[(0,a.jsx)("p",{className:"font-medium mb-1",children:"Pricing Rates Format"}),(0,a.jsxs)("p",{className:"text-text-muted",children:["All rates are in ",(0,a.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: Input rate of 2.50 means $2.50 per 1,000,000 input tokens."]})]}),x.map(e=>{let t=Object.keys(o[e]).sort();return(0,a.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,a.jsx)("div",{className:"bg-bg-subtle px-4 py-2 font-semibold text-sm",children:e.toUpperCase()}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-bg-hover text-text-muted uppercase text-xs",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 text-left",children:"Model"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Input"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Output"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Cached"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Reasoning"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Cache Creation"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border",children:t.map(t=>(0,a.jsxs)("tr",{className:"hover:bg-bg-subtle/50",children:[(0,a.jsx)("td",{className:"px-3 py-2 font-medium",children:t}),b.map(n=>(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("input",{type:"number",step:"0.01",min:"0",value:o[e][t][n]||0,onChange:a=>{let i;!isNaN(i=parseFloat(a.target.value))&&!(i<0)&&s(a=>{let o={...a};return o[e]||(o[e]={}),o[e][t]||(o[e][t]={}),o[e][t][n]=i,o})},className:"w-20 px-2 py-1 text-right bg-bg-base border border-border rounded focus:outline-none focus:border-primary"})},n))]},t))})]})})]},e)}),0===x.length&&(0,a.jsx)("div",{className:"text-center py-8 text-text-muted",children:"No pricing data available"})]})}),(0,a.jsxs)("div",{className:"p-4 border-t border-border flex items-center justify-between gap-2",children:[(0,a.jsx)("button",{onClick:m,className:"px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",disabled:l,children:"Reset to Defaults"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:t,className:"px-4 py-2 text-sm text-text-muted hover:text-text border border-border rounded transition-colors",disabled:l,children:"Cancel"}),(0,a.jsx)("button",{onClick:g,className:"px-4 py-2 text-sm bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-50",disabled:l,children:l?"Saving...":"Save Changes"})]})]})]})})}function u(){(0,o.useRouter)();let[e,t]=(0,i.useState)(!1),[n,r]=(0,i.useState)(null),[u,p]=(0,i.useState)(!0);(0,i.useEffect)(()=>{l()},[]);let l=async()=>{p(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();r(t)}}catch(e){console.error("Failed to load pricing:",e)}finally{p(!1)}};return(0,a.jsxs)("div",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-3xl font-bold",children:"Pricing Settings"}),(0,a.jsx)("p",{className:"text-text-muted mt-1",children:"Configure pricing rates for cost tracking and calculations"})]}),(0,a.jsx)("button",{onClick:()=>t(!0),className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary/90 transition-colors",children:"Edit Pricing"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)(s.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Models"}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1",children:u?"...":(()=>{if(!n)return 0;let e=0;for(let t in n)e+=Object.keys(n[t]).length;return e})()})]}),(0,a.jsxs)(s.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Providers"}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1",children:u?"...":(!n?[]:Object.keys(n).sort()).length})]}),(0,a.jsxs)(s.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Status"}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1 text-success",children:u?"...":"Active"})]})]}),(0,a.jsxs)(s.default,{className:"p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"How Pricing Works"}),(0,a.jsxs)("div",{className:"space-y-3 text-sm text-text-muted",children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Cost Calculation:"})," Costs are calculated based on token usage and pricing rates. Each request's cost is determined by: (input_tokens \xd7 input_rate) + (output_tokens \xd7 output_rate) + (cached_tokens \xd7 cached_rate)"]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Pricing Format:"})," All rates are in ",(0,a.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: An input rate of 2.50 means $2.50 per 1,000,000 input tokens."]}),(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"Token Types:"})}),(0,a.jsxs)("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Input:"})," Standard prompt tokens"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Output:"})," Completion/response tokens"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Cached:"})," Cached input tokens (typically 50% of input rate)"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Reasoning:"})," Special reasoning/thinking tokens (fallback to output rate)"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Cache Creation:"})," Tokens used to create cache entries (fallback to input rate)"]})]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Custom Pricing:"})," You can override default pricing for specific models. Reset to defaults anytime to restore standard rates."]})]})]}),(0,a.jsxs)(s.default,{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Current Pricing Overview"}),(0,a.jsx)("button",{onClick:()=>t(!0),className:"text-primary hover:underline text-sm",children:"View Full Details"})]}),u?(0,a.jsx)("div",{className:"text-center py-4 text-text-muted",children:"Loading pricing data..."}):n?(0,a.jsxs)("div",{className:"space-y-3",children:[Object.keys(n).slice(0,5).map(e=>(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsxs)("span",{className:"font-semibold",children:[e.toUpperCase(),":"]})," ",(0,a.jsxs)("span",{className:"text-text-muted",children:[Object.keys(n[e]).length," models"]})]},e)),Object.keys(n).length>5&&(0,a.jsxs)("div",{className:"text-sm text-text-muted",children:["+ ",Object.keys(n).length-5," more providers"]})]}):(0,a.jsx)("div",{className:"text-text-muted",children:"No pricing data available"})]}),e&&(0,a.jsx)(c,{isOpen:e,onClose:()=>t(!1),onSave:()=>{l()}})]})}},28302:(e,t,n)=>{Promise.resolve().then(n.bind(n,13092))},31474:(e,t,n)=>{"use strict";function a(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}n.d(t,{cn:()=>a})},73321:(e,t,n)=>{"use strict";var a=n(74645);n.o(a,"notFound")&&n.d(t,{notFound:function(){return a.notFound}}),n.o(a,"useParams")&&n.d(t,{useParams:function(){return a.useParams}}),n.o(a,"usePathname")&&n.d(t,{usePathname:function(){return a.usePathname}}),n.o(a,"useRouter")&&n.d(t,{useRouter:function(){return a.useRouter}}),n.o(a,"useSearchParams")&&n.d(t,{useSearchParams:function(){return a.useSearchParams}})},84588:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var a=n(95155),i=n(31474);function o({children:e,title:t,subtitle:n,icon:s,action:r,padding:c="md",hover:u=!1,elev:p=!1,className:l,...d}){return(0,a.jsxs)("div",{className:(0,i.cn)("card-3d border border-border-subtle rounded-[14px] transition-[border-color,box-shadow,transform] duration-200 motion-reduce:transition-none",p&&"card-3d-elev",u&&"hover:-translate-y-0.5 hover:border-brand-500/30 hover:shadow-[var(--shadow-warm)] cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[c],l),...d,children:[(t||r)&&(0,a.jsxs)("div",{className:"mb-4 flex min-w-0 items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[s&&(0,a.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:s})}),(0,a.jsxs)("div",{className:"min-w-0",children:[t&&(0,a.jsx)("h3",{className:"text-text-main font-semibold",children:t}),n&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:n})]})]}),r&&(0,a.jsx)("div",{className:"shrink-0",children:r})]}),e]})}o.Section=function({children:e,className:t,...n}){return(0,a.jsx)("div",{className:(0,i.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",t),...n,children:e})},o.Row=function({children:e,className:t,...n}){return(0,a.jsx)("div",{className:(0,i.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",t),...n,children:e})},o.ListItem=function({children:e,actions:t,className:n,...o}){return(0,a.jsxs)("div",{className:(0,i.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",n),...o,children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,a.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}}},e=>{e.O(0,[9501,8441,3794,7358],()=>e(e.s=28302)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{64082:(e,i,t)=>{"use strict";t.r(i),t.d(i,{default:()=>x});var s=t(95155),n=t(12115),a=t(35497),r=t(11059);let o=[{id:"zevai",name:"ZevaiRouter",description:"Setup, model discovery, authentication, and capability index.",icon:"route",isEntry:!0},{id:"zevai-chat",name:"Chat & Code",description:"OpenAI-compatible chat, streaming, tools, reasoning, combos, and routing.",icon:"forum",endpoint:"/v1/chat/completions"},{id:"zevai-image",name:"Image Generation",description:"Generate images through supported image providers.",icon:"image",endpoint:"/v1/images/generations"},{id:"zevai-video",name:"Video Generation",description:"Create and poll async video jobs: Google Flow Omni / Veo (up to 60 s) and xAI Grok Imagine.",icon:"movie",endpoint:"/v1/videos"},{id:"zevai-tts",name:"Text to Speech",description:"Generate spoken audio from text.",icon:"record_voice_over",endpoint:"/v1/audio/speech"},{id:"zevai-stt",name:"Speech to Text",description:"Transcribe uploaded audio files.",icon:"graphic_eq",endpoint:"/v1/audio/transcriptions"},{id:"zevai-embeddings",name:"Embeddings",description:"Create vector embeddings for search and retrieval.",icon:"dataset",endpoint:"/v1/embeddings"},{id:"zevai-web-search",name:"Web Search",description:"Search the web and public X posts through configured search providers (Tavily, Exa, Brave, Serper, SearXNG, Xquik…).",icon:"travel_explore",endpoint:"/v1/search"},{id:"zevai-web-fetch",name:"Web Fetch",description:"Fetch a URL and extract clean content or markdown.",icon:"language",endpoint:"/v1/fetch"}],d=(e,i)=>`${String(e||"").replace(/\/+$/,"")}/skills/${i}/SKILL.md`,l=()=>()=>{};function c({value:e,label:i="Copy link"}){let{copied:t,copy:n}=(0,r.C)(2e3);return(0,s.jsxs)("button",{type:"button",onClick:()=>n(e),className:"inline-flex min-h-9 shrink-0 items-center gap-1 rounded-md bg-primary px-2.5 py-1 text-[11px] font-medium text-white transition-colors hover:bg-primary/90",title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:t?"check":"content_copy"}),t?"Copied!":i]})}function m({skill:e,origin:i}){let t=d(i,e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 rounded-[14px] border p-4 shadow-[var(--shadow-soft)] ${e.isEntry?"border-primary/40 bg-primary/5":"border-border-subtle bg-surface"}`,children:[(0,s.jsx)("div",{className:`flex size-9 shrink-0 items-center justify-center rounded-lg ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e.name}),e.isEntry&&(0,s.jsx)(a.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,s.jsx)(a.Ex,{variant:"default",size:"sm",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:e.description}),(0,s.jsxs)("a",{href:t,target:"_blank",rel:"noreferrer",className:"mt-1 inline-flex max-w-full items-center gap-1 break-all text-[11px] text-text-muted hover:text-primary",children:[t,(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[12px]",children:"open_in_new"})]})]}),(0,s.jsx)(c,{value:t})]})}function x(){let e=(0,n.useSyncExternalStore)(l,()=>window.location.origin,()=>""),i=`Read this skill and use it: ${d(e,"zevai")}`;return(0,s.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[(0,s.jsxs)(a.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"mb-2 text-xs text-text-muted",children:"Paste this instruction into your AI agent:"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("code",{className:"min-w-0 flex-1 break-all rounded bg-surface-2 px-3 py-2 text-[12px] text-text-main",children:i}),(0,s.jsx)(c,{value:i,label:"Copy prompt"})]})]}),(0,s.jsx)("div",{className:"space-y-2",children:o.map(i=>(0,s.jsx)(m,{skill:i,origin:e},i.id))}),(0,s.jsx)(a.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Skill source"}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:"These links are served by this router and match its installed version. Agents need network access to this address; no API key is required to read a skill."})]}),(0,s.jsxs)("a",{href:"https://github.com/Verifiedlabs/zevairouter/tree/main/skills",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-sm text-primary hover:underline",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}},83954:(e,i,t)=>{Promise.resolve().then(t.bind(t,64082))}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=83954)),_N_E=e.O()}]);
@@ -1,4 +1,4 @@
1
1
  (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3570],{1620:(e,t,r)=>{"use strict";r.d(t,{D:()=>c});var n=r(12115),a=r(90085);function s(e){let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function l(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function i(){return!1}function c(){let{theme:e,setTheme:t,toggleTheme:r,initTheme:c}=(0,a.A)(),o=(0,n.useSyncExternalStore)(s,l,i);(0,n.useEffect)(()=>{c()},[c]),(0,n.useEffect)(()=>{if("system"!==e)return;let t=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>c();return t.addEventListener("change",r),()=>t.removeEventListener("change",r)},[e,c]);let d="dark"===e||"system"===e&&o;return{theme:e,setTheme:t,toggleTheme:r,isDark:d}}},35765:(e,t,r)=>{"use strict";r.d(t,{default:()=>d});var n=r(95155),a=r(12115),s=r(8422),l=r(63606),i=r(52414),c=r(1620);r(82407);let o={light:{background:"#f5f6fb",foreground:"#262626",cursor:"#7c52f0",cursorAccent:"#f5f6fb",selectionBackground:"rgba(124, 82, 240, 0.25)",black:"#262626",red:"#b91c1c",green:"#15803d",yellow:"#a16207",blue:"#1d4ed8",magenta:"#7e22ce",cyan:"#0e7490",white:"#e5e5e5",brightBlack:"#737373",brightRed:"#dc2626",brightGreen:"#16a34a",brightYellow:"#ca8a04",brightBlue:"#2563eb",brightMagenta:"#9333ea",brightCyan:"#0891b2",brightWhite:"#fafafa"},dark:{background:"#0d0d0d",foreground:"#e8e8e8",cursor:"#a78bfa",cursorAccent:"#0d0d0d",selectionBackground:"rgba(167, 139, 250, 0.35)",black:"#1a1a1a",red:"#f87171",green:"#4ade80",yellow:"#fbbf24",blue:"#60a5fa",magenta:"#c084fc",cyan:"#22d3ee",white:"#e5e5e5",brightBlack:"#737373",brightRed:"#fca5a5",brightGreen:"#86efac",brightYellow:"#fde68a",brightBlue:"#93c5fd",brightMagenta:"#d8b4fe",brightCyan:"#67e8f9",brightWhite:"#fafafa"}};function d(){let{isDark:e}=(0,c.D)(),t=(0,a.useRef)(e),r=(0,a.useRef)(null),d=(0,a.useRef)(null),u=(0,a.useRef)(null),m=(0,a.useRef)(""),h=(0,a.useRef)(""),b=(0,a.useRef)(null),f=(0,a.useRef)([]),p=(0,a.useRef)(null),x=(0,a.useRef)(!1),g=(0,a.useRef)(""),[y,w]=(0,a.useState)("checking"),[k,v]=(0,a.useState)(""),[j,N]=(0,a.useState)(!1),[C,S]=(0,a.useState)(""),[E,L]=(0,a.useState)(""),[T,R]=(0,a.useState)("connecting"),[O,F]=(0,a.useState)("Starting shell…"),[M,$]=(0,a.useState)({shell:"",mode:""}),A=(0,a.useCallback)(async()=>{v("");try{let e=await fetch("/api/terminal/auth/status",{cache:"no-store",credentials:"same-origin"}),t=await e.json().catch(()=>({}));if(403===e.status){v(t?.error||"Access forbidden."),w("unlock");return}if(401===e.status){v("Log in to the dashboard first."),w("unlock");return}if(!t.configured)return void w("setup");if(t.unlocked)return void w("open");w("unlock")}catch(e){v(e?.message||"Failed to check terminal lock"),w("unlock")}},[]);(0,a.useEffect)(()=>{A()},[A]);let D=async e=>{e.preventDefault(),N(!0),v("");try{let e=await fetch("/api/terminal/auth/setup",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({password:C,confirm:E})}),t=await e.json().catch(()=>({}));if(!e.ok)return void v(t.error||"Setup failed");S(""),L(""),w("open")}catch(e){v(e?.message||"Setup failed")}finally{N(!1)}},z=async e=>{e.preventDefault(),N(!0),v("");try{let e=await fetch("/api/terminal/auth/unlock",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({password:C})}),t=await e.json().catch(()=>({}));if(!e.ok)return void v(t.error||"Unlock failed");S(""),w("open")}catch(e){v(e?.message||"Unlock failed")}finally{N(!1)}},B=async()=>{try{await fetch("/api/terminal/auth/unlock",{method:"DELETE",credentials:"same-origin"})}catch{}let e=m.current;if(m.current="",e&&fetch(`/api/terminal/session/${e}`,{method:"DELETE",credentials:"same-origin",keepalive:!0}).catch(()=>{}),b.current){try{b.current.close()}catch{}b.current=null}S(""),w("unlock")},P=(0,a.useCallback)(async()=>{let e=m.current;if(!e||0===f.current.length)return;let t=f.current.join("");f.current=[];try{let r=await fetch(`/api/terminal/session/${e}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:t}),cache:"no-store",credentials:"same-origin"});!r.ok&&d.current&&(423===r.status?(d.current.write("\r\n\x1b[31m[terminal locked]\x1b[0m\r\n"),w("unlock")):(403===r.status||401===r.status)&&d.current.write(`\r
2
2
  \x1b[31m[input blocked: ${r.status}]\x1b[0m\r
3
3
  `))}catch{}},[]),U=(0,a.useCallback)(e=>{e&&m.current&&(f.current.push(e),p.current||(p.current=setTimeout(()=>{p.current=null,P()},8)))},[P]),q=(0,a.useCallback)(e=>{let t=d.current;if(!t)return;let r=h.current;if(!("pipe"===r||!r))return void U(e);if("\x03"===e){g.current="",t.write("^C\r\n"),U("\x03\n");return}if("\r"===e||"\n"===e||"\r\n"===e){let e=g.current;g.current="",t.write("\r\n"),U(`${e}
4
- `);return}if(""===e||"\b"===e){g.current.length>0&&(g.current=g.current.slice(0,-1),t.write("\b \b"));return}32>e.charCodeAt(0)||e.startsWith("\x1b")||(g.current+=e,t.write(e))},[U]),J=(0,a.useCallback)(async()=>{let e=m.current,t=d.current;if(e&&t)try{await fetch(`/api/terminal/session/${e}/resize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cols:t.cols,rows:t.rows}),cache:"no-store",credentials:"same-origin"})}catch{}},[]),_=(0,a.useCallback)(()=>{try{d.current?.focus()}catch{}},[]),I=(0,a.useCallback)((e,t)=>{if(b.current)try{b.current.close()}catch{}let r=new EventSource(`/api/terminal/session/${e}/stream`,{withCredentials:!0});b.current=r,r.onopen=()=>{x.current||(R("ready"),F("Connected — click terminal & type"),_())},r.onmessage=e=>{let r;if(!x.current){try{r=JSON.parse(e.data)}catch{return}"data"===r.type&&"string"==typeof r.data?t.write(r.data):"ready"===r.type?(h.current=r.mode||h.current,$({shell:r.shell||"",mode:r.mode||""}),R(!1===r.alive?"closed":"ready"),F(!1===r.alive?"Shell exited":"Connected — click terminal & type"),_()):"exit"===r.type&&(R("closed"),F("Shell exited"),t.write("\r\n\x1b[90m[session ended]\x1b[0m\r\n"))}},r.onerror=()=>{x.current||(R(e=>"ready"===e?"connecting":e),F("Reconnecting…"))}},[_]),W=(0,a.useCallback)(async(e,t)=>{let r;R("connecting"),F("Starting shell…"),g.current="";try{t.fit()}catch{}let n=e.cols||120,a=e.rows||40;try{r=await fetch("/api/terminal/session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cols:n,rows:a}),cache:"no-store",credentials:"same-origin"})}catch(t){R("error"),F(t?.message||"Failed to reach server"),e.writeln(`\x1b[31mFailed to create session: ${t?.message||"network error"}\x1b[0m`);return}if(403===r.status){R("forbidden"),F("Forbidden"),e.writeln("\x1b[33mTerminal access forbidden.\x1b[0m");return}if(401===r.status){R("error"),F("Unauthorized"),e.writeln("\x1b[31mUnauthorized — log in to the dashboard first.\x1b[0m");return}if(423===r.status){R("error"),F("Locked"),w("unlock");return}let s=await r.json().catch(()=>({}));if(!r.ok||!s?.session?.id){R("error"),F(s?.error||"Create failed"),e.writeln(`\x1b[31m${s?.error||"Failed to create terminal session"}\x1b[0m`);return}m.current=s.session.id,h.current=s.session.mode||"pipe",$({shell:s.session.shell||"",mode:s.session.mode||""}),I(s.session.id,e),_()},[I,_]),Y=(0,a.useCallback)(async()=>{let e=m.current;if(m.current="",h.current="",g.current="",f.current=[],b.current){try{b.current.close()}catch{}b.current=null}e&&fetch(`/api/terminal/session/${e}`,{method:"DELETE",credentials:"same-origin"}).catch(()=>{});let t=d.current,r=u.current;t&&r&&(t.reset(),t.clear(),await W(t,r))},[W]);if((0,a.useEffect)(()=>{if("open"!==y)return;x.current=!1;let e=r.current;if(!e)return;let n=new s.B({cursorBlink:!0,cursorStyle:"bar",fontSize:13,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',lineHeight:1.25,scrollback:5e3,allowProposedApi:!0,disableStdin:!1,theme:o[t.current?"dark":"light"]}),a=new l.Y,c=new i.c;n.loadAddon(a),n.loadAddon(c),n.open(e);try{e.tabIndex=0;let t=e.querySelector("textarea");t&&(t.tabIndex=0,t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false"))}catch{}d.current=n,u.current=a;try{a.fit()}catch{}let h=n.onData(e=>q(e)),f=()=>{try{a.fit(),J()}catch{}},g=()=>_();e.addEventListener("mousedown",g),e.addEventListener("click",g),e.addEventListener("focus",_);let w="u">typeof ResizeObserver?new ResizeObserver(f):null;return w?.observe(e),window.addEventListener("resize",f),requestAnimationFrame(()=>{try{a.fit()}catch{}_()}),W(n,a),()=>{x.current=!0,w?.disconnect(),window.removeEventListener("resize",f),e.removeEventListener("mousedown",g),e.removeEventListener("click",g),e.removeEventListener("focus",_);try{h.dispose()}catch{}if(p.current&&(clearTimeout(p.current),p.current=null),b.current){try{b.current.close()}catch{}b.current=null}let t=m.current;m.current="",t&&fetch(`/api/terminal/session/${t}`,{method:"DELETE",keepalive:!0,credentials:"same-origin"}).catch(()=>{});try{n.dispose()}catch{}d.current=null,u.current=null}},[y,q,J,W,_]),(0,a.useEffect)(()=>{t.current=e,d.current&&(d.current.options.theme=o[e?"dark":"light"])},[e]),"checking"===y)return(0,n.jsx)("div",{className:"flex h-full min-h-0 w-full items-center justify-center bg-bg text-sm text-text-muted",children:"Checking terminal lock…"});if("setup"===y||"unlock"===y){let e="setup"===y;return(0,n.jsx)("div",{className:"flex h-full min-h-0 w-full flex-col items-center justify-center bg-bg px-4",children:(0,n.jsxs)("div",{className:"w-full max-w-md rounded-2xl border border-border-subtle bg-surface p-6 shadow-xl",children:[(0,n.jsxs)("div",{className:"mb-4 flex items-center gap-3",children:[(0,n.jsx)("div",{className:"flex size-10 items-center justify-center rounded-xl bg-[color:var(--color-primary)]/15 text-[color:var(--color-primary)]",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:e?"key":"lock"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-base font-semibold text-text-main",children:e?"Set terminal password":"Unlock terminal"}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:e?"First time — pick a password different from dashboard login.":"Dashboard login is not enough. Enter your terminal password."})]})]}),(0,n.jsxs)("form",{onSubmit:e?D:z,className:"space-y-3",children:[e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"block space-y-1",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"New terminal password"}),(0,n.jsx)("input",{type:"password",autoFocus:!0,autoComplete:"new-password",value:C,onChange:e=>S(e.target.value),className:"w-full rounded-lg border border-border-subtle bg-bg-alt px-3 py-2.5 text-sm text-text-main outline-none focus:border-[color:var(--color-primary)]/60",placeholder:"Min 6 characters",required:!0,minLength:6})]}),(0,n.jsxs)("label",{className:"block space-y-1",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"Confirm"}),(0,n.jsx)("input",{type:"password",autoComplete:"new-password",value:E,onChange:e=>L(e.target.value),className:"w-full rounded-lg border border-border-subtle bg-bg-alt px-3 py-2.5 text-sm text-text-main outline-none focus:border-[color:var(--color-primary)]/60",placeholder:"Repeat password",required:!0,minLength:6})]}),(0,n.jsxs)("p",{className:"text-[11px] leading-relaxed text-text-muted",children:["Must ",(0,n.jsx)("strong",{className:"text-text-main",children:"not"})," match the dashboard password. Unlock lasts ~4 hours on this browser."]})]}):(0,n.jsxs)("label",{className:"block space-y-1",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"Terminal password"}),(0,n.jsx)("input",{type:"password",autoFocus:!0,autoComplete:"current-password",value:C,onChange:e=>S(e.target.value),className:"w-full rounded-lg border border-border-subtle bg-bg-alt px-3 py-2.5 text-sm text-text-main outline-none focus:border-[color:var(--color-primary)]/60",placeholder:"••••••••",required:!0})]}),k?(0,n.jsx)("p",{role:"alert",className:"rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-700 dark:text-red-300",children:k}):null,(0,n.jsx)("button",{type:"submit",disabled:j,className:"w-full rounded-lg bg-[color:var(--color-primary)] px-3 py-2.5 text-sm font-semibold text-white transition hover:brightness-110 disabled:opacity-50",children:j?"Please wait…":e?"Save & open terminal":"Unlock"})]}),"unlock"===y?(0,n.jsxs)("p",{className:"mt-3 text-center text-[11px] leading-relaxed text-text-muted",children:["Forgot terminal password? On the host run CLI →"," ",(0,n.jsx)("code",{className:"text-text-main",children:"Settings → Clear Terminal Password"})," ","then set a new one here. Reset is not available in the browser."]}):null,(0,n.jsx)("p",{className:"mt-4 text-center text-[11px] text-text-muted",children:"Protected by dashboard login + terminal password"})]})})}return(0,n.jsxs)("div",{className:"flex h-full min-h-0 w-full flex-col bg-bg",children:[(0,n.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 border-b border-border-subtle px-4 py-2.5",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:`inline-block size-2 rounded-full ${"ready"===T?"bg-emerald-500":"connecting"===T?"bg-amber-400 animate-pulse":"forbidden"===T?"bg-amber-500":"bg-red-500"}`}),(0,n.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Terminal"})]}),(0,n.jsxs)("span",{role:"status","aria-live":"polite",className:"truncate text-xs text-text-muted",children:[O,M.shell?` \xb7 ${M.shell}`:"",M.mode?` \xb7 ${M.mode}`:""]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:B,className:"rounded-lg border border-border-subtle bg-surface px-3 py-1.5 text-xs font-medium text-text-muted transition hover:border-border hover:text-text-main",title:"Lock terminal (require password again)",children:"Lock"}),(0,n.jsx)("button",{type:"button",onClick:Y,className:"rounded-lg border border-border-subtle bg-surface px-3 py-1.5 text-xs font-medium text-text-main transition hover:border-[color:var(--color-primary)]/50 hover:bg-bg-alt",children:"New session"})]})]}),(0,n.jsx)("div",{className:"relative min-h-0 flex-1",onMouseDown:_,children:(0,n.jsx)("div",{ref:r,className:"absolute inset-0 px-2 py-2 outline-none"})}),(0,n.jsx)("div",{className:"shrink-0 border-t border-border-subtle px-4 py-1.5 text-[11px] text-text-muted",children:"Dashboard login + terminal password \xb7 click the black area then type \xb7 idle sessions close after 30m"})]})}},63133:(e,t,r)=>{Promise.resolve().then(r.bind(r,35765))},90085:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(1934),a=r(31692),s=r(90620);function l(e){let t=document.documentElement,r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"dark"===("system"===e?r:e)?t.classList.add("dark"):t.classList.remove("dark")}let i=(0,n.v)((0,a.Zr)((e,t)=>({theme:s.B2.defaultTheme,setTheme:t=>{e({theme:t}),l(t)},toggleTheme:()=>{let r="dark"===t().theme?"light":"dark";e({theme:r}),l(r)},initTheme:()=>{l(t().theme)}}),{name:s.B2.storageKey}))}},e=>{e.O(0,[1838,1507,5472,9501,620,8441,3794,7358],()=>e(e.s=63133)),_N_E=e.O()}]);
4
+ `);return}if(""===e||"\b"===e){g.current.length>0&&(g.current=g.current.slice(0,-1),t.write("\b \b"));return}32>e.charCodeAt(0)||e.startsWith("\x1b")||(g.current+=e,t.write(e))},[U]),J=(0,a.useCallback)(async()=>{let e=m.current,t=d.current;if(e&&t)try{await fetch(`/api/terminal/session/${e}/resize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cols:t.cols,rows:t.rows}),cache:"no-store",credentials:"same-origin"})}catch{}},[]),_=(0,a.useCallback)(()=>{try{d.current?.focus()}catch{}},[]),I=(0,a.useCallback)((e,t)=>{if(b.current)try{b.current.close()}catch{}let r=new EventSource(`/api/terminal/session/${e}/stream`,{withCredentials:!0});b.current=r,r.onopen=()=>{x.current||(R("ready"),F("Connected — click terminal & type"),_())},r.onmessage=e=>{let r;if(!x.current){try{r=JSON.parse(e.data)}catch{return}"data"===r.type&&"string"==typeof r.data?t.write(r.data):"ready"===r.type?(h.current=r.mode||h.current,$({shell:r.shell||"",mode:r.mode||""}),R(!1===r.alive?"closed":"ready"),F(!1===r.alive?"Shell exited":"Connected — click terminal & type"),_()):"exit"===r.type&&(R("closed"),F("Shell exited"),t.write("\r\n\x1b[90m[session ended]\x1b[0m\r\n"))}},r.onerror=()=>{x.current||(R(e=>"ready"===e?"connecting":e),F("Reconnecting…"))}},[_]),W=(0,a.useCallback)(async(e,t)=>{let r;R("connecting"),F("Starting shell…"),g.current="";try{t.fit()}catch{}let n=e.cols||120,a=e.rows||40;try{r=await fetch("/api/terminal/session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cols:n,rows:a}),cache:"no-store",credentials:"same-origin"})}catch(t){R("error"),F(t?.message||"Failed to reach server"),e.writeln(`\x1b[31mFailed to create session: ${t?.message||"network error"}\x1b[0m`);return}if(403===r.status){R("forbidden"),F("Forbidden"),e.writeln("\x1b[33mTerminal access forbidden.\x1b[0m");return}if(401===r.status){R("error"),F("Unauthorized"),e.writeln("\x1b[31mUnauthorized — log in to the dashboard first.\x1b[0m");return}if(423===r.status){R("error"),F("Locked"),w("unlock");return}let s=await r.json().catch(()=>({}));if(!r.ok||!s?.session?.id){R("error"),F(s?.error||"Create failed"),e.writeln(`\x1b[31m${s?.error||"Failed to create terminal session"}\x1b[0m`);return}m.current=s.session.id,h.current=s.session.mode||"pipe",$({shell:s.session.shell||"",mode:s.session.mode||""}),I(s.session.id,e),_()},[I,_]),Y=(0,a.useCallback)(async()=>{let e=m.current;if(m.current="",h.current="",g.current="",f.current=[],b.current){try{b.current.close()}catch{}b.current=null}e&&fetch(`/api/terminal/session/${e}`,{method:"DELETE",credentials:"same-origin"}).catch(()=>{});let t=d.current,r=u.current;t&&r&&(t.reset(),t.clear(),await W(t,r))},[W]);if((0,a.useEffect)(()=>{if("open"!==y)return;x.current=!1;let e=r.current;if(!e)return;let n=new s.B({cursorBlink:!0,cursorStyle:"bar",fontSize:13,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',lineHeight:1.25,scrollback:5e3,allowProposedApi:!0,disableStdin:!1,theme:o[t.current?"dark":"light"]}),a=new l.Y,c=new i.c;n.loadAddon(a),n.loadAddon(c),n.open(e);try{e.tabIndex=0;let t=e.querySelector("textarea");t&&(t.tabIndex=0,t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false"))}catch{}d.current=n,u.current=a;try{a.fit()}catch{}let h=n.onData(e=>q(e)),f=()=>{try{a.fit(),J()}catch{}},g=()=>_();e.addEventListener("mousedown",g),e.addEventListener("click",g),e.addEventListener("focus",_);let w="u">typeof ResizeObserver?new ResizeObserver(f):null;return w?.observe(e),window.addEventListener("resize",f),requestAnimationFrame(()=>{try{a.fit()}catch{}_()}),W(n,a),()=>{x.current=!0,w?.disconnect(),window.removeEventListener("resize",f),e.removeEventListener("mousedown",g),e.removeEventListener("click",g),e.removeEventListener("focus",_);try{h.dispose()}catch{}if(p.current&&(clearTimeout(p.current),p.current=null),b.current){try{b.current.close()}catch{}b.current=null}let t=m.current;m.current="",t&&fetch(`/api/terminal/session/${t}`,{method:"DELETE",keepalive:!0,credentials:"same-origin"}).catch(()=>{});try{n.dispose()}catch{}d.current=null,u.current=null}},[y,q,J,W,_]),(0,a.useEffect)(()=>{t.current=e,d.current&&(d.current.options.theme=o[e?"dark":"light"])},[e]),"checking"===y)return(0,n.jsx)("div",{className:"flex h-full min-h-0 w-full items-center justify-center bg-bg text-sm text-text-muted",children:"Checking terminal lock…"});if("setup"===y||"unlock"===y){let e="setup"===y;return(0,n.jsx)("div",{className:"flex h-full min-h-0 w-full flex-col items-center justify-center bg-bg px-4",children:(0,n.jsxs)("div",{className:"w-full max-w-md rounded-2xl border border-border-subtle bg-surface p-6 shadow-xl",children:[(0,n.jsxs)("div",{className:"mb-4 flex items-center gap-3",children:[(0,n.jsx)("div",{className:"flex size-10 items-center justify-center rounded-xl bg-[color:var(--color-primary)]/15 text-[color:var(--color-primary)]",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:e?"key":"lock"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-base font-semibold text-text-main",children:e?"Set terminal password":"Unlock terminal"}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:e?"First time — pick a password different from dashboard login.":"Dashboard login is not enough. Enter your terminal password."})]})]}),(0,n.jsxs)("form",{onSubmit:e?D:z,className:"space-y-3",children:[e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"block space-y-1",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"New terminal password"}),(0,n.jsx)("input",{type:"password",autoFocus:!0,autoComplete:"new-password",value:C,onChange:e=>S(e.target.value),className:"w-full rounded-lg border border-border-subtle bg-bg-alt px-3 py-2.5 text-sm text-text-main outline-none focus:border-[color:var(--color-primary)]/60",placeholder:"Min 6 characters",required:!0,minLength:6})]}),(0,n.jsxs)("label",{className:"block space-y-1",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"Confirm"}),(0,n.jsx)("input",{type:"password",autoComplete:"new-password",value:E,onChange:e=>L(e.target.value),className:"w-full rounded-lg border border-border-subtle bg-bg-alt px-3 py-2.5 text-sm text-text-main outline-none focus:border-[color:var(--color-primary)]/60",placeholder:"Repeat password",required:!0,minLength:6})]}),(0,n.jsxs)("p",{className:"text-[11px] leading-relaxed text-text-muted",children:["Must ",(0,n.jsx)("strong",{className:"text-text-main",children:"not"})," match the dashboard password. Unlock lasts ~4 hours on this browser."]})]}):(0,n.jsxs)("label",{className:"block space-y-1",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"Terminal password"}),(0,n.jsx)("input",{type:"password",autoFocus:!0,autoComplete:"current-password",value:C,onChange:e=>S(e.target.value),className:"w-full rounded-lg border border-border-subtle bg-bg-alt px-3 py-2.5 text-sm text-text-main outline-none focus:border-[color:var(--color-primary)]/60",placeholder:"••••••••",required:!0})]}),k?(0,n.jsx)("p",{role:"alert",className:"rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-700 dark:text-red-300",children:k}):null,(0,n.jsx)("button",{type:"submit",disabled:j,className:"w-full rounded-lg bg-[color:var(--color-primary)] px-3 py-2.5 text-sm font-semibold text-white transition hover:brightness-110 disabled:opacity-50",children:j?"Please wait…":e?"Save & open terminal":"Unlock"})]}),"unlock"===y?(0,n.jsxs)("p",{className:"mt-3 text-center text-[11px] leading-relaxed text-text-muted",children:["Forgot terminal password? On the host run CLI →"," ",(0,n.jsx)("code",{className:"text-text-main",children:"Settings → Clear Terminal Password"})," ","then set a new one here. Reset is not available in the browser."]}):null,(0,n.jsx)("p",{className:"mt-4 text-center text-[11px] text-text-muted",children:"Protected by dashboard login + terminal password"})]})})}return(0,n.jsxs)("div",{className:"flex h-full min-h-0 w-full flex-col bg-bg",children:[(0,n.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 border-b border-border-subtle px-4 py-2.5",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:`inline-block size-2 rounded-full ${"ready"===T?"bg-emerald-500":"connecting"===T?"bg-amber-400 animate-pulse":"forbidden"===T?"bg-amber-500":"bg-red-500"}`}),(0,n.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Terminal"})]}),(0,n.jsxs)("span",{role:"status","aria-live":"polite",className:"truncate text-xs text-text-muted",children:[O,M.shell?` \xb7 ${M.shell}`:"",M.mode?` \xb7 ${M.mode}`:""]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:B,className:"rounded-lg border border-border-subtle bg-surface px-3 py-1.5 text-xs font-medium text-text-muted transition hover:border-border hover:text-text-main",title:"Lock terminal (require password again)",children:"Lock"}),(0,n.jsx)("button",{type:"button",onClick:Y,className:"rounded-lg border border-border-subtle bg-surface px-3 py-1.5 text-xs font-medium text-text-main transition hover:border-[color:var(--color-primary)]/50 hover:bg-bg-alt",children:"New session"})]})]}),(0,n.jsx)("div",{className:"relative min-h-0 flex-1",onMouseDown:_,children:(0,n.jsx)("div",{ref:r,className:"absolute inset-0 px-2 py-2 outline-none"})}),(0,n.jsx)("div",{className:"shrink-0 border-t border-border-subtle px-4 py-1.5 text-[11px] text-text-muted",children:"Dashboard login + terminal password \xb7 click the black area then type \xb7 idle sessions close after 30m"})]})}},85228:(e,t,r)=>{Promise.resolve().then(r.bind(r,35765))},90085:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(1934),a=r(31692),s=r(90620);function l(e){let t=document.documentElement,r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"dark"===("system"===e?r:e)?t.classList.add("dark"):t.classList.remove("dark")}let i=(0,n.v)((0,a.Zr)((e,t)=>({theme:s.B2.defaultTheme,setTheme:t=>{e({theme:t}),l(t)},toggleTheme:()=>{let r="dark"===t().theme?"light":"dark";e({theme:r}),l(r)},initTheme:()=>{l(t().theme)}}),{name:s.B2.storageKey}))}},e=>{e.O(0,[1838,1507,5472,9501,620,8441,3794,7358],()=>e(e.s=85228)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{70323:(e,t,a)=>{"use strict";a.d(t,{default:()=>m});var s=a(95155),r=a(12115),l=a(35497),n=a(11059),i=a(73006);let o=["zh-CN","zh-TW"],d=[{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}],c=[{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"}];function m(){let[e,t]=(0,r.useState)(!0),[a,m]=(0,r.useState)(!1),[x,h]=(0,r.useState)("http://localhost:8787"),[p,u]=(0,r.useState)(3e3),[f,g]=(0,r.useState)({installed:!1,running:!1,python:null,loading:!0}),[b,j]=(0,r.useState)(!1),[y,v]=(0,r.useState)(!1),[N,w]=(0,r.useState)(""),[k,C]=(0,r.useState)(!1),[S,E]=(0,r.useState)(""),[P,T]=(0,r.useState)({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),[I,$]=(0,r.useState)([]),[M,O]=(0,r.useState)(!1),[R,L]=(0,r.useState)(""),[H,U]=(0,r.useState)(null),[D,F]=(0,r.useState)(""),[_,A]=(0,r.useState)(null),[B,J]=(0,r.useState)(!1),[z,W]=(0,r.useState)(!0),[G,K]=(0,r.useState)(!1),X=(0,r.useRef)(null),[q,Y]=(0,r.useState)(!1),[Z,Q]=(0,r.useState)("full"),[V,ee]=(0,r.useState)(!1),[et,ea]=(0,r.useState)(!1),[es,er]=(0,r.useState)(""),[el,en]=(0,r.useState)("full"),[ei,eo]=(0,r.useState)(!1),[ed,ec]=(0,r.useState)(25e3),[em,ex]=(0,r.useState)({installed:!1,installing:!1,running:!1,version:null,loading:!0}),[eh,ep]=(0,r.useState)(null),[eu,ef]=(0,r.useState)(!1),[eg,eb]=(0,r.useState)(!1),[ej,ey]=(0,r.useState)(""),[ev,eN]=(0,r.useState)("en"),{copied:ew,copy:ek}=(0,n.C)();(0,r.useEffect)(()=>(eN((0,i.kk)()),(0,i.oQ)(()=>eN((0,i.kk)()))),[]);let eC=o.includes(ev),eS=eC?d:d.filter(e=>!e.wenyan);(0,r.useEffect)(()=>{let e=d.find(e=>e.id===Z);e?.wenyan&&!eC&&(Q("ultra"),eE({cavemanLevel:"ultra"}))},[eC,Z]);let eE=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)}},eP=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)}},eT=async(e,t)=>{let a=t.trim()||"http://localhost:8787";C(!0),E("");try{let t=await fetch("/api/headroom/enable",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e,headroomUrl:a})}),s=await t.json();if(!t.ok)throw Error(s.error||`Failed to update Headroom (${t.status})`);return h(s.headroomUrl||a),m(!0===s.headroomEnabled),await eM(),!0}catch(e){return E(e.message||"Failed to update Headroom"),!1}finally{C(!1)}},eI=async e=>{await eT(e,x)},e$=async()=>{let e=x.trim()||"http://localhost:8787";h(e),a?await eT(!0,e):(await eE({headroomUrl:e}),eM())},eM=(0,r.useCallback)(async()=>{g(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();if(g({...t,loading:!1}),!t?.installed){T({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),$([]);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();T(e=>({...e,version:t.version??null,extras:t.extras||{code:!1,ml:!1},available:t.available||["code","ml"],loading:!1})),$([])}catch{T({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),$([])}}catch{g({installed:!1,running:!1,python:null,loading:!1}),T({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),$([])}},[]),eO=(0,r.useCallback)(async()=>{w(""),v(!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 eM()}catch(e){w(e.message)}finally{v(!1)}},[eM]),eR=(0,r.useCallback)(async()=>{v(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await eM()}finally{v(!1)}},[eM]),eL=(0,r.useCallback)(()=>{F(""),X.current&&clearInterval(X.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&&F(t.log)}catch{}};e(),X.current=setInterval(e,1500)},[]),eH=(0,r.useCallback)(()=>{X.current&&(clearInterval(X.current),X.current=null)},[]);(0,r.useEffect)(()=>()=>eH(),[eH]);let eU=(0,r.useCallback)(async()=>{if(0!==I.length){O(!0),L(""),eL();try{let e=await fetch("/api/headroom/extras",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:I})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Install failed");T(e=>({...e,version:t.version??e.version,extras:t.extras||e.extras})),$([])}catch(e){L(e.message)}finally{eH(),O(!1)}}},[I,eL,eH]),eD=(0,r.useCallback)(async e=>{U(e),L(""),eL();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");T(e=>({...e,version:a.version??e.version,extras:a.extras||e.extras}))}catch(e){L(e.message)}finally{eH(),U(null)}},[eL,eH]),eF=(0,r.useCallback)(()=>{if(0!==I.length){if(I.includes("ml"))return void A({title:"Install [ml]",message:"[ml] downloads ~1 GB (torch + huggingface-hub). Continue?",confirmText:"Install",variant:"primary",onConfirm:eU});eU()}},[I,eU]),e_=(0,r.useCallback)(e=>{A({title:`Remove [${e}]`,message:`Remove [${e}] and its packages?`,confirmText:"Remove",variant:"danger",onConfirm:()=>eD(e)})},[eD]),eA=(0,r.useCallback)(async(e,t)=>{if(L(""),"code"===e&&J(t),"ml"===e&&W(t),await eE({["code"===e?"headroomCodeAware":"headroomKompress"]:t}),f.running){K(!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 eM()}catch(e){L(e.message)}finally{K(!1)}}},[f.running,eM]),eB=(0,r.useCallback)(async()=>{ex(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();ex({...t,loading:!1}),"number"==typeof t.minChars&&ec(t.minChars)}catch{ex({installed:!1,installing:!1,running:!1,version:null,loading:!1})}},[]),eJ=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/pxpipe/health",{method:"POST"});ep(await e.json())}catch(e){ep({healthy:!1,checks:[],error:e.message})}},[]),ez=(0,r.useCallback)(async e=>{ey(""),eb(!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 eB(),await eJ()}catch(e){ey(e.message)}finally{eb(!1)}},[eB,eJ]);(0,r.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let a=await e.json();t(!1!==a.rtkEnabled),m(!!a.headroomEnabled),h(a.headroomUrl||"http://localhost:8787"),"number"==typeof a.headroomTimeoutMs&&u(a.headroomTimeoutMs),J(!0===a.headroomCodeAware),W(!1!==a.headroomKompress),Y(!!a.cavemanEnabled),Q(a.cavemanLevel||"full"),ee(!!a.ponytailEnabled),en(a.ponytailLevel||"full"),ea(!!a.customPromptEnabled),er(a.customPrompt||""),eo(!!a.pxpipeEnabled),"number"==typeof a.pxpipeMinChars&&ec(a.pxpipeMinChars),eM(),eB().then(eJ)}}catch{}})()},[eM,eB,eJ]);let eW=!!f.running,eG=a&&eW,eK=k?a?"Disabling…":f.managedInstalled?"Starting…":"Installing…":f.loading?"Checking…":a?eW?"Enabled":"Unavailable":eW?"Disabled \xb7 Proxy ready":"Disabled",eX=k||f.loading?"bg-warning/15 text-warning":eG?"bg-success/15 text-success":a?"bg-warning/15 text-warning":"bg-surface-2 text-text-muted",eq=!1!==f.localUrl,eY=!!f.canStart,eZ=eq&&!!f.managedPid,eQ=eh?.healthy===!0,eV=em.loading?"Checking…":em.installing?"Installing…":em.installed?eQ?"Healthy":em.running?"Running":"Stopped":"Not installed",e0=eQ||em.running?"bg-success/15 text-success":"bg-warning/15 text-warning";return(0,s.jsxs)("div",{className:"space-y-6 p-6",children:[(0,s.jsxs)(l.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)(l.lM,{checked:e,onChange:()=>eP(!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 ${eX}`,title:`Headroom proxy: ${eW?"running":"stopped"}`,children:eK}),(0,s.jsx)("button",{type:"button",onClick:()=>j(!0),className:"text-xs text-primary underline hover:opacity-80",children:eW?"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)(l.lM,{checked:a,disabled:!a&&!eq&&!eW,busy:k,onChange:eI})]}),S&&(0,s.jsx)("p",{className:"pb-4 text-xs text-error",children:S}),f.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",P.version?` \xb7 v${P.version}`:"",":"]}),P.available.map(e=>{let t=!!P.extras[e],a=I.includes(e),r="code"===e?"tree-sitter AST compression for code responses":"Kompress-v2 HF model for prose/agentic traces (~+1GB)";if(t){let t="code"===e?B:z;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:r,children:[(0,s.jsx)(l.lM,{size:"sm",checked:t,disabled:G,onChange:()=>eA(e,!t)}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("button",{type:"button",onClick:()=>e_(e),disabled:H===e,className:"ml-1 text-error underline hover:opacity-80 disabled:opacity-50",title:`Uninstall [${e}]`,children:H===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:r,children:[(0,s.jsx)("input",{type:"checkbox",className:"w-3 h-3",checked:a,onChange:()=>{$(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)}),I.length>0&&(0,s.jsx)("button",{onClick:eF,disabled:M,className:"text-xs px-2.5 py-1 rounded bg-primary text-white hover:opacity-90 disabled:opacity-50",children:M?"Installing…":`Install [proxy,${I.join(",")}]`})]}),R&&(0,s.jsx)("p",{className:"text-xs text-error mt-1",children:R}),G&&(0,s.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Restarting proxy…"}),(M||H)&&D&&(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:D}),(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:[q&&(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:eS.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;Q(t=e.id),eE({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${Z===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:d.find(e=>e.id===Z)?.desc})]}),(0,s.jsx)(l.lM,{checked:q,onChange:()=>{var e;Y(e=!q),eE({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:[V&&(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:c.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;en(t=e.id),eE({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${el===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:c.find(e=>e.id===el)?.desc})]}),(0,s.jsx)(l.lM,{checked:V,onChange:()=>{var e;ee(e=!V),eE({ponytailEnabled: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.jsx)("p",{className:"font-medium",children:"Custom system prompt"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Appends your own instruction to every request, independently of the savers above"})]}),(0,s.jsx)(l.lM,{checked:et,onChange:()=>{var e;ea(e=!et),eE({customPromptEnabled:e})}})]}),et&&(0,s.jsx)("div",{className:"pt-3",children:(0,s.jsx)("textarea",{"aria-label":"Custom system prompt",value:es,onChange:e=>er(e.target.value),onBlur:()=>eE({customPrompt:es}),rows:4,placeholder:"e.g. Prefer editing existing files over creating new ones.",className:"w-full rounded border border-border bg-transparent p-2 text-xs"})}),(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)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress prompts as images"," ",(0,s.jsx)("a",{href:"https://github.com/teamchong/pxpipe",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(PXPIPE)"})]}),(0,s.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${e0}`,children:eV}),(0,s.jsx)("button",{type:"button",onClick:()=>ef(!0),className:"text-xs text-primary underline hover:opacity-80",children:em.installed?"Manage":"Setup"}),(0,s.jsx)("a",{href:"/dashboard/pxpipe",className:"text-xs text-primary underline hover:opacity-80",children:"Dashboard"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Transforms large textual context into optimized images before sending to the LLM. Ideal for huge prompts, tool outputs and long conversations."})]}),(0,s.jsx)(l.lM,{checked:ei,disabled:!em.installed,onChange:()=>{var e;eo(e=!ei),eE({pxpipeEnabled:e})}})]})]}),(0,s.jsx)(l.aF,{isOpen:b,title:eW?"Headroom":"Setup Headroom",onClose:()=>j(!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:eW?"text-success":"text-warning",children:eK})]}),eW&&(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)(l.pd,{value:x,onChange:e=>h(e.target.value),onBlur:e$,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."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Timeout (ms)"}),(0,s.jsx)(l.pd,{value:String(p),onChange:e=>u(e.target.value),onBlur:()=>{let e=Math.round(Number(p)),t=Number.isFinite(e)&&e>0?e:3e3;u(t),eE({headroomTimeoutMs:t})},placeholder:"3000",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Request timeout in milliseconds. Defaults to 3000 ms."})]}),eZ?(0,s.jsx)(l.$n,{onClick:eR,variant:"ghost",fullWidth:!0,disabled:y,children:y?"Stopping…":"Stop Headroom"}):eW?(0,s.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):eY?(0,s.jsx)(l.$n,{onClick:eO,fullWidth:!0,disabled:y,children:y?f.managedInstalled?"Starting…":"Installing…":f.managedInstalled?"Start Headroom":"Install & Start Headroom"}):eq?f.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)(l.$n,{size:"sm",variant:"ghost",onClick:()=>ek('pip install "headroom-ai[proxy]"'),children:ew?"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."}),N&&(0,s.jsx)("p",{className:"text-sm text-warning",children:N}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:()=>eM(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(l.$n,{onClick:()=>j(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(l.aF,{isOpen:eu,title:em.installed?"PXPIPE":"Setup PXPIPE",onClose:()=>ef(!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:eQ||em.running?"text-success":"text-warning",children:[eV,em.version?` \xb7 v${em.version}`:""]})]}),eh?.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"}),eh.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)),eh.error&&(0,s.jsx)("p",{className:"text-xs text-warning mt-1",children:eh.error})]}),em.installed?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[em.running?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.$n,{onClick:()=>ez("restart"),variant:"ghost",disabled:eg,children:"Restart"}),(0,s.jsx)(l.$n,{onClick:()=>ez("stop"),variant:"ghost",disabled:eg,children:"Stop"})]}):(0,s.jsx)(l.$n,{onClick:()=>ez("start"),disabled:eg,children:eg?"Starting…":"Start"}),(0,s.jsx)(l.$n,{onClick:()=>ez("install"),variant:"ghost",disabled:eg,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)(l.$n,{onClick:()=>ez("install"),fullWidth:!0,disabled:eg||em.installing,children:eg||em.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 ZevaiRouter 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)(l.pd,{value:String(ed),onChange:e=>ec(e.target.value),onBlur:()=>{let e=Math.max(0,Number(ed)||25e3);ec(e),eE({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."})]}),ej&&(0,s.jsx)("p",{className:"text-sm text-warning",children:ej}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{onClick:()=>eB().then(eJ),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(l.$n,{onClick:()=>ef(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(l.uo,{isOpen:!!_,onClose:()=>A(null),onConfirm:()=>{let e=_?.onConfirm;A(null),e?.()},title:_?.title,message:_?.message,confirmText:_?.confirmText,variant:_?.variant})]})}},88994:(e,t,a)=>{Promise.resolve().then(a.bind(a,70323))}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=88994)),_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).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},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)},41112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return s}});let r=n(12115),a=n(47650);n(1980);let o=n(60614).createReactBrowserBailoutReason.bind(null,"next/dynamic");function s({children:e}){return(0,r.use)((0,a.browser)(o)),e}},60614:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={createReactBrowserBailoutReason:function(){return o},getReactBrowserBailoutReason:function(){return s},isNextBrowserBailoutError:function(){return l}};for(var r in n)Object.defineProperty(t,r,{enumerable:!0,get:n[r]});let a=Symbol.for("next.browser-bailout-reason");function o(e){return{$$typeof:a,reason:e}}function s(e){let t=e?.cause;return t?.$$typeof===a?t.reason:void 0}function l(e){return void 0!==s(e)}},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return c},getOrCreateGlobalAsyncLocalStorage:function(){return i}};for(var r in n)Object.defineProperty(t,r,{enumerable:!0,get:n[r]});let a=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class o{disable(){throw a}getStore(){}run(){throw a}exit(){throw a}enterWith(){throw a}static bind(e){return e}}let s="u">typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return s?new s:new o}function i(e){let t=Symbol.for(`@next/${e}@16.4.2`),n=globalThis;return n[t]??=l()}function d(e){return s?s.bind(e):o.bind(e)}function c(){return s?s.snapshot():function(e,...t){return e(...t)}}},66222:(e,t,n)=>{Promise.resolve().then(n.bind(n,69472))},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),o=n(41112);function s(e){return{default:e&&"default"in e?e.default:e}}n(21957);let l={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},i=function(e){let t={...l,...e},n=(0,a.lazy)(()=>t.loader().then(s)),i=t.loading;function d(e){let s=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,d=l?a.Suspense:a.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(o.BailoutToCSRForNextDynamic,{children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...l?{fallback:s}:{},children:c})}return d.displayName="LoadableComponent",d}},69472:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(95155),a=n(12115),o=n(35497),s=n(11059),l=n(75707);let i=(n.n(l))()(()=>n.e(8202).then(n.bind(n,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1}),d=[{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"}],c={minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0};function u(){let[e,t]=(0,a.useState)({}),[n,l]=(0,a.useState)({1:!0}),[u,p]=(0,a.useState)({}),[x,m]=(0,a.useState)(null),g=(e,t)=>p(n=>({...n,[e]:t})),b=(e,n)=>t(t=>({...t,[e]:n})),y=e=>l(t=>{let n={};return d.forEach(e=>{n[e.id]=!1}),n[e]=!0,n}),h=async e=>{let t=d.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?(b(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&&m(r.result)}catch{}},v=(e,t)=>fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:e,content:t})}).catch(()=>{}),_=async()=>{g("toOpenAI",!0);try{let t=e[1],n=JSON.parse(t);v("1_req_client.json",t),v("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 o=JSON.stringify(a.result.body,null,2);b(3,o),y(3)}catch(e){alert(e.message)}g("toOpenAI",!1)},w=async()=>{g("toTarget",!0);try{let t=e[3],n=JSON.parse(t);v("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:x?.provider,model:x?.model}})}),a=await r.json();if(!a.success)return void alert(a.error);let o={...a.result,provider:x?.provider,model:x?.model};b(4,JSON.stringify(o,null,2)),y(4)}catch(e){alert(e.message)}g("toTarget",!1)},O=async()=>{g("send",!0);try{let t=e[4],n=JSON.parse(t);v("4_req_target.json",t);let r=n.provider||x?.provider,a=n.model||x?.model;if(!r||!a)return void alert("Missing provider or model. Please run step 1 first to detect them.");let o=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:a,body:n.body||n})});if(!o.ok){let e=await o.json().catch(()=>({error:o.statusText}));alert(e.error||"Send failed");return}let s=o.body.getReader(),l=new TextDecoder,i="";for(;;){let{done:e,value:t}=await s.read();if(e)break;i+=l.decode(t,{stream:!0})}b(5,i),y(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:S}=(0,s.C)(),N=async t=>{e[t]&&S(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"})]}),x&&(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap justify-end",children:[(0,r.jsx)(f,{label:"src",value:x.sourceFormat,color:"blue"}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,r.jsx)(f,{label:"dst",value:x.targetFormat,color:"orange"}),(0,r.jsx)(f,{label:"provider",value:x.provider,color:"green"}),(0,r.jsx)(f,{label:"model",value:x.model,color:"purple"})]})]}),d.map(t=>{var a;let s=1===(a=t.id)?(0,r.jsx)(o.$n,{size:"sm",icon:"arrow_forward",loading:u.toOpenAI,onClick:_,children:"→ OpenAI"}):3===a?(0,r.jsx)(o.$n,{size:"sm",icon:"arrow_forward",loading:u.toTarget,onClick:w,children:"→ Target"}):4===a?(0,r.jsx)(o.$n,{size:"sm",icon:"send",loading:u.send,onClick:O,children:"Send"}):null,d=!!n[t.id],f=e[t.id]||"";return(0,r.jsx)(o.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,l(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:d?"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}),f&&(0,r.jsxs)("span",{className:"text-xs text-green-500",children:["(",f.length," chars)"]})]}),!d&&(0,r.jsxs)("div",{className:"flex gap-1 shrink-0",children:[(0,r.jsx)(o.$n,{size:"sm",variant:"ghost",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>h(t.id)}),s]})]}),d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,r.jsx)(i,{height:"400px",defaultLanguage:"text"===t.lang?"plaintext":"json",value:f,onChange:e=>{b(t.id,e||""),1===t.id&&j(e||"")},theme:"vs-dark",options:c})}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,r.jsx)(o.$n,{size:"sm",variant:"outline",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>h(t.id),children:"Load"}),(0,r.jsx)(o.$n,{size:"sm",variant:"outline",icon:"data_object",onClick:()=>(t=>{try{let n=JSON.parse(e[t]);b(t,JSON.stringify(n,null,2))}catch{}})(t.id),children:"Format"}),(0,r.jsx)(o.$n,{size:"sm",variant:"outline",icon:"content_copy",onClick:()=>N(t.id),children:"Copy"}),s]})]})]})},t.id)})]})}function f({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]})}},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)}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=66222)),_N_E=e.O()}]);