@sifxprime/krouter 0.5.107 → 0.5.110

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 (536) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +6 -6
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/environment/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/environment/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/environment/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  76. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  86. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  88. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  89. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  91. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/import/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/mitm/cert/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/models/live/route.js +10 -1
  140. package/app/.next-cli-build/server/app/api/models/live/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/models/live-by-connection/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/models/live-by-connection/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/models/preview/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/models/preview/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +10 -1
  170. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/providers/health/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/providers/zenith/log/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/providers/zenith/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/settings/environment/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  263. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  265. package/app/.next-cli-build/server/app/callback.html +1 -1
  266. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  267. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  268. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  269. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  270. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  271. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  272. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  273. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  274. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  275. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  276. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  277. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  278. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  279. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  280. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  281. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  282. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  283. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  284. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  285. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  286. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  287. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  288. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  289. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  290. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  291. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  292. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  293. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  294. package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  295. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  296. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  297. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  298. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  299. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  300. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  301. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  302. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  303. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  304. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  305. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  306. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  307. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  308. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  309. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  310. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  311. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  312. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  313. package/app/.next-cli-build/server/app/dashboard/environment.html +1 -1
  314. package/app/.next-cli-build/server/app/dashboard/environment.rsc +5 -5
  315. package/app/.next-cli-build/server/app/dashboard/environment.segments/!KGRhc2hib2FyZCk/dashboard/environment/__PAGE__.segment.rsc +2 -2
  316. package/app/.next-cli-build/server/app/dashboard/environment.segments/!KGRhc2hib2FyZCk/dashboard/environment.segment.rsc +1 -1
  317. package/app/.next-cli-build/server/app/dashboard/environment.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  318. package/app/.next-cli-build/server/app/dashboard/environment.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  319. package/app/.next-cli-build/server/app/dashboard/environment.segments/_full.segment.rsc +5 -5
  320. package/app/.next-cli-build/server/app/dashboard/environment.segments/_head.segment.rsc +1 -1
  321. package/app/.next-cli-build/server/app/dashboard/environment.segments/_index.segment.rsc +3 -3
  322. package/app/.next-cli-build/server/app/dashboard/environment.segments/_tree.segment.rsc +1 -1
  323. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  324. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  325. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  326. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  327. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  328. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  329. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  330. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  331. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  332. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  333. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  334. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  335. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  336. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  337. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  338. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  339. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  340. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  341. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  342. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  343. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  344. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  345. package/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  346. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  347. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  348. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  349. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  350. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  351. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  352. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  353. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  354. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  355. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  356. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  357. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  358. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  359. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  360. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  361. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  362. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  363. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  364. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  365. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  366. package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  367. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  368. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  369. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  370. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  371. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  372. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  373. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  374. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  375. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  376. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  377. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  378. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  379. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  380. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  381. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  382. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  383. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  384. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  385. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  386. package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  387. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  388. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  389. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  390. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  391. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  392. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  394. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  395. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  396. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  398. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  399. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  400. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  401. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  403. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  405. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  406. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  410. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  411. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  412. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  414. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  415. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  416. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  417. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  420. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  421. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  422. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  424. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  425. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  427. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  429. package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  430. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  431. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  432. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  434. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  435. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  436. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  437. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  440. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  441. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  444. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  445. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  447. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  449. package/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  450. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  451. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  452. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  453. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  454. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  456. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  457. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/index.html +1 -1
  459. package/app/.next-cli-build/server/app/index.rsc +3 -3
  460. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  461. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  462. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  463. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  464. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  466. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  467. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  468. package/app/.next-cli-build/server/app/landing.html +1 -1
  469. package/app/.next-cli-build/server/app/landing.rsc +3 -3
  470. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  471. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  472. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  473. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  474. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/login/page.js +1 -1
  477. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  478. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  479. package/app/.next-cli-build/server/app/login.html +1 -1
  480. package/app/.next-cli-build/server/app/login.rsc +4 -4
  481. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  482. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  484. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  486. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  488. package/app/.next-cli-build/server/app/page.js +1 -1
  489. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  490. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  491. package/app/.next-cli-build/server/app-paths-manifest.json +6 -6
  492. package/app/.next-cli-build/server/chunks/2365.js +1 -1
  493. package/app/.next-cli-build/server/chunks/2966.js +1 -1
  494. package/app/.next-cli-build/server/chunks/3405.js +1 -0
  495. package/app/.next-cli-build/server/chunks/412.js +1 -1
  496. package/app/.next-cli-build/server/chunks/4177.js +1 -1
  497. package/app/.next-cli-build/server/chunks/4404.js +1 -1
  498. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  499. package/app/.next-cli-build/server/chunks/5024.js +1 -1
  500. package/app/.next-cli-build/server/chunks/5330.js +7 -14
  501. package/app/.next-cli-build/server/chunks/5470.js +43 -0
  502. package/app/.next-cli-build/server/chunks/5681.js +1 -1
  503. package/app/.next-cli-build/server/chunks/5718.js +1 -0
  504. package/app/.next-cli-build/server/chunks/706.js +2 -2
  505. package/app/.next-cli-build/server/chunks/7153.js +1 -1
  506. package/app/.next-cli-build/server/chunks/7276.js +10 -0
  507. package/app/.next-cli-build/server/chunks/8172.js +2 -2
  508. package/app/.next-cli-build/server/chunks/8361.js +3 -3
  509. package/app/.next-cli-build/server/chunks/8590.js +1 -1
  510. package/app/.next-cli-build/server/chunks/8895.js +2 -2
  511. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  512. package/app/.next-cli-build/server/pages/404.html +1 -1
  513. package/app/.next-cli-build/server/pages/500.html +1 -1
  514. package/app/.next-cli-build/static/chunks/1321-9b700486b47e7024.js +1 -0
  515. package/app/.next-cli-build/static/chunks/{5497-53a3fc9d347e10c5.js → 5497-730880dac15d5025.js} +3 -3
  516. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-409fa206f9ed68a6.js → page-06b0126c482683df.js} +1 -1
  517. package/app/.next-cli-build/static/chunks/app/callback/page-50756e58d21b2c2a.js +1 -0
  518. package/app/cli/.build-home/.krouter/db/backups/{upgrade-0.5.104-to-0.5.105-0.5.105-20260717-040329 → upgrade-0.5.107-to-0.5.108-0.5.108-20260717-154441}/data.sqlite +0 -0
  519. package/app/cli/.build-home/.krouter/db/backups/{upgrade-0.5.102-to-0.5.103-0.5.103-20260715-003815 → upgrade-0.5.108-to-0.5.109-0.5.109-20260717-162158}/data.sqlite +0 -0
  520. package/app/cli/.build-home/.krouter/db/backups/{upgrade-0.5.103-to-0.5.104-0.5.104-20260717-035059 → upgrade-0.5.109-to-0.5.110-0.5.110-20260717-163735}/data.sqlite +0 -0
  521. package/app/cli/.build-home/.krouter/db/data.sqlite +0 -0
  522. package/app/cli/package.json +1 -1
  523. package/app/package.json +1 -1
  524. package/app/public/providers/clinepass.png +0 -0
  525. package/app/public/providers/codebuddy-cn.png +0 -0
  526. package/app/public/providers/grok-cli.png +0 -0
  527. package/app/public/providers/kimchi.png +0 -0
  528. package/package.json +1 -1
  529. package/app/.next-cli-build/server/chunks/3104.js +0 -43
  530. package/app/.next-cli-build/server/chunks/3535.js +0 -1
  531. package/app/.next-cli-build/server/chunks/7879.js +0 -10
  532. package/app/.next-cli-build/server/chunks/8255.js +0 -1
  533. package/app/.next-cli-build/static/chunks/1321-f6b8915d900e0469.js +0 -1
  534. package/app/.next-cli-build/static/chunks/app/callback/page-d507deb8943cae18.js +0 -1
  535. /package/app/.next-cli-build/static/{fugd6YzYziaMq8kahEgvS → jhwddq9Ievb17kkPFw450}/_buildManifest.js +0 -0
  536. /package/app/.next-cli-build/static/{fugd6YzYziaMq8kahEgvS → jhwddq9Ievb17kkPFw450}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{50574:(e,t,r)=>{Promise.resolve().then(r.bind(r,75095)),Promise.resolve().then(r.bind(r,25086))},75095:(e,t,r)=>{"use strict";r.d(t,{default:()=>$});var a=r(95155),s=r(12115),i=r(57250),n=r(45564);function l(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function o(e){return e&&"object"==typeof e?String(e.modelKey||e.name||"").trim():""}function c(e,t){let r=t?.[e]?.hidden;return new Set(Array.isArray(r)?r.map(String):[])}function d({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:i=!1,onHideQuota:n=null}){let[o,c]=(0,s.useState)(1),u=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):l(e?.used,e?.total)})),[e]),m=(0,s.useMemo)(()=>"remaining-asc"===r?[...u].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...u].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):u,[u,r]),x=Math.max(1,Math.ceil(m.length/10));if((0,s.useEffect)(()=>{c(1)},[r,e]),(0,s.useEffect)(()=>{c(e=>Math.min(e,x))},[x]),!e||0===e.length)return null;let h=m.slice((o-1)*10,10*o),p=0===m.length?0:(o-1)*10+1,b=Math.min(10*o,m.length),g=t?"py-1 px-1.5":"py-2 px-3",f=t?"text-[11px]":"text-sm",y=t?"text-[11px]":"text-sm",v=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[m.length," quota",m.length>1?"s":""]}),i&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:h.map(e=>{var r;let s=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},i=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0)return"-";let s=Math.ceil(a/6e4);if(s<60)return`${s}m`;let i=Math.floor(s/60),n=s%60;if(i<24)return`${i}h ${n}m`;let l=Math.floor(i/24);return`${l}d ${i%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),l=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(s.getDate()+1);let i="";i=t>=a&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${i}, ${n}`}catch{return null}}(e.resetAt);return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${g} w-[30%]`,children:(0,a.jsxs)("div",{className:"group/qrow flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:s.emoji}),(0,a.jsx)("span",{className:`${f} font-medium text-text-primary truncate`,children:e.name}),n&&(0,a.jsx)("button",{type:"button",onClick:()=>n(e),className:"shrink-0 opacity-0 group-hover/qrow:opacity-100 text-text-muted hover:text-red-500 transition-opacity",title:`Hide "${e.name}"`,"aria-label":`Hide ${e.name}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px] align-middle",children:"visibility_off"})})]})}),(0,a.jsx)("td",{className:`${g} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${s.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${s.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsx)("span",{className:"text-text-muted",children:100===e.total?`${e.used}% used`:`${e.used.toLocaleString()} / ${e.total>0?e.total.toLocaleString():"∞"}`}),(0,a.jsxs)("span",{className:`font-medium ${s.text}`,children:[e.remaining,"%"]})]})]})}),(0,a.jsx)("td",{className:`${g} w-[25%]`,children:"-"!==i||l?t?(0,a.jsx)("div",{className:`${y} text-text-primary font-medium truncate`,title:l||"",children:"-"!==i?`in ${i}`:l}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==i&&(0,a.jsxs)("div",{className:`${y} text-text-primary font-medium`,children:["in ",i]}),l&&(0,a.jsx)("div",{className:`${v} text-text-muted`,children:l})]}):(0,a.jsx)("div",{className:`${y} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),x>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 ",p,"-",b," of ",m.length]}),(0,a.jsxs)("span",{children:["Page ",o," / ",x]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>Math.max(1,e-1)),disabled:1===o,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>Math.min(x,e+1)),disabled:o===x,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var u=r(98542),m=r(84588),x=r(35497),h=r(52679);function p(e){let t=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return t(e.email)?e.email:(t(e.name),e.name)}function b(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function g(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function f(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function y(e,t){return await e(t)}let v="quotaCacheData";function w(){try{let e=window.localStorage.getItem(v);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function j(e,t){try{let r=w();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(v,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}let k="quotaAutoRefresh",N=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],S=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}],C=[10,20,50,100];function $(){let[e,t]=(0,s.useState)([]),[r,$]=(0,s.useState)({}),[A,q]=(0,s.useState)({}),[P,E]=(0,s.useState)({}),[M,T]=(0,s.useState)(!0),[D,O]=(0,s.useState)({}),[I,_]=(0,s.useState)({}),[z,L]=(0,s.useState)(null),[F,U]=(0,s.useState)(!1),[J,R]=(0,s.useState)(!1),[H,K]=(0,s.useState)(60),[V,B]=(0,s.useState)(!0),[G,Q]=(0,s.useState)(null),[W,Y]=(0,s.useState)(null),[X,Z]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(null),[er,ea]=(0,s.useState)([]),[es,ei]=(0,s.useState)("all"),[en,el]=(0,s.useState)([]),[eo,ec]=(0,s.useState)("all"),[ed,eu]=(0,s.useState)("default"),[em,ex]=(0,s.useState)(!1),[eh,ep]=(0,s.useState)(!1),[eb,eg]=(0,s.useState)(!1),[ef,ey]=(0,s.useState)(1),[ev,ew]=(0,s.useState)(20),[ej,ek]=(0,s.useState)(String(20)),[eN,eS]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[eC,e$]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),eA=(0,s.useRef)(null),eq=(0,s.useRef)(null),eP=(0,s.useCallback)(async(e=ef)=>{try{var r,a;let s=new URLSearchParams({page:String(e),pageSize:String(ev),accountStatus:eo,sort:"priority"});"all"!==es&&s.set("provider",es);let i=await fetch(`/api/providers/client?${s.toString()}`);if(!i.ok)throw Error("Failed to fetch connections");let n=await i.json(),l=n.connections||[],o=(r=n.pagination,r||{page:1,pageSize:ev,total:0,totalPages:1}),c=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(n.totals,l.length);return t(l),el(n.providerOptions||[]),eS(o),e$(c),ey((a=n.pagination,a?.page||e)),l}catch(e){return console.error("Error fetching connections:",e),t([]),el([]),eS({page:1,pageSize:ev,total:0,totalPages:1}),e$({eligibleConnections:0,providerFilteredConnections:0}),[]}},[eo,em,ef,ev,es]),eE=(0,s.useCallback)(async(e,t)=>{q(t=>({...t,[e]:!0})),E(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=await fetch(`/api/usage/${e}`);if(!r.ok){let a=(await r.json().catch(()=>({}))).error||r.statusText;if(404===r.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===r.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,a);let r={quotas:[],message:a};$(t=>({...t,[e]:r})),j(e,r);return}throw Error(`HTTP ${r.status}: ${a}`)}let a=await r.json();console.log(`[ProviderLimits] Got quota for ${t}:`,a);let s={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,n.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,s=r.modelKey||r.name;return(e.get(a)??999)-(e.get(s)??999)})}return r}(t,a),plan:a.plan||null,message:a.message||null,raw:a};$(t=>({...t,[e]:s})),j(e,s)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),E(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{q(t=>({...t,[e]:!1}))}},[]),eM=(0,s.useCallback)(async(e,t)=>{await eE(e,t),L(new Date)},[eE]),eT=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){Q(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){$(t=>{let r={...t};return delete r[e],r}),q(t=>{let r={...t};return delete r[e],r}),E(t=>{let r={...t};return delete r[e],r});try{let t=w();t[e]&&(delete t[e],window.localStorage.setItem(v,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await y(eP,ef)}}catch(e){console.error("Error deleting connection:",e)}finally{Q(null)}}},[eP,ef]),eD=(0,s.useCallback)(async(e,t)=>{Y(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&($(e=>({...e})),await y(eP,ef))}catch(e){console.error("Error updating connection status:",e)}finally{Y(null)}},[eP,ef]),eO=(0,s.useCallback)(async e=>{if(!ee?.id)return;let t=ee.id,r=ee.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eP(),Z(!1),et(null),h.wb.includes(r)&&await eE(t,r))}catch(e){console.error("Error saving connection:",e)}},[ee,eP,eE]);(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&&ea(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eI=(0,s.useCallback)(async()=>{if(!J){R(!0),K(60);try{let e=await eP(ef);q(g(e)),E(t=>f(t,e)),$(t=>f(t,e)),await Promise.all(e.map(e=>eE(e.id,e.provider))),L(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{R(!1)}}},[J,eP,eE,ef]);(0,s.useEffect)(()=>{(async()=>{B(!0);let e=await eP(ef);B(!1),q(g(e)),E(t=>f(t,e)),$(t=>f(t,e)),await Promise.all(e.map(e=>eE(e.id,e.provider))),L(new Date)})()},[eP,eE,ef]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(k);T(null===e||"true"===e),U(!0)},[]),(0,s.useEffect)(()=>{F&&window.localStorage.setItem(k,String(M))},[M,F]),(0,s.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>{O(e?.claudeAutoPing?.connections||{}),_(e?.quotaVisibility||{})}).catch(()=>{})},[]);let e_=(0,s.useCallback)(async(e,t,r)=>{let a=new Set((I?.[e]?.hidden||[]).map(String));r?a.add(String(t)):a.delete(String(t));let s={...I,[e]:{...I?.[e]||{},hidden:[...a]}};_(s);try{let t=await fetch("/api/settings",{cache:"no-store"}),r={...(t.ok?await t.json():{}).quotaVisibility||{},[e]:s[e]};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:r})}),_(r)}catch{_(I)}},[I]),ez=(0,s.useCallback)(async(e,t)=>{let r={...D,[e]:t};O(r);try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{}).claudeAutoPing||{},connections:r};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({claudeAutoPing:t})})}catch{O(D)}},[D]);(0,s.useEffect)(()=>{if(!F||!M){eA.current&&(clearInterval(eA.current),eA.current=null),eq.current&&(clearInterval(eq.current),eq.current=null);return}return eA.current=setInterval(()=>{eI()},6e4),eq.current=setInterval(()=>{K(e=>e<=1?60:e-1)},1e3),()=>{eA.current&&clearInterval(eA.current),eq.current&&clearInterval(eq.current)}},[M,eI,F]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(eA.current&&(clearInterval(eA.current),eA.current=null),eq.current&&(clearInterval(eq.current),eq.current=null)):M&&F&&(eA.current=setInterval(eI,6e4),eq.current=setInterval(()=>{K(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[M,eI,F]);let eL=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=b(e,t),i=b(r,t),n="remaining-asc"===s?a-i:i-a;return 0!==n?n:(p(e)||"").localeCompare(p(r)||"")});if(!r)return e;let i=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=i(e)-i(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(p(e)||"").localeCompare(p(t)||"")})})(e,r,em,es,ed),[e,r,em,es,ed]),eF=e=>{let t=r[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=l(e.used,e.total))},eU=(0,s.useCallback)(async(e,t)=>{if(e.length&&!eb){eg(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await y(eP,ef)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eg(!1)}}},[eb,eP,ef]),eJ="all"===es?"All providers":es,eR=eC.eligibleConnections>0,eH=eL.length>0,eK=eC.eligibleConnections?eC.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"===es?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===eo?"turned off":"active"===eo?"active":"matching"} accounts found for ${es}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},eV=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}`}(eN),eB=!C.includes(ev);return V||eR?V||eH?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>ep(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":eh,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===es?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(i.A,{src:`/providers/${es}.png`,alt:es,size:18,className:"size-[18px] rounded object-contain",fallbackText:es.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:eJ})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),eh&&(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:()=>{"all"!==es&&ey(1),ei("all"),ep(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===es?"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"===es&&(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:en.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{es!==e&&ey(1),ei(e),ep(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${es===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}),es===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:eo,onChange:e=>{let t=e.target.value;eo!==t&&ey(1),ec(t)},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:N.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===es&&(0,a.jsx)("select",{value:ed,onChange:e=>eu(e.target.value),className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:S.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>ex(e=>!e),"aria-pressed":em,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${em?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{eU(eL.filter(e=>(e.isActive??!0)&&eF(e)).map(e=>e.id),!1)},disabled:eb,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{eU(eL.filter(e=>!(e.isActive??!0)&&!eF(e)).map(e=>e.id),!0)},disabled:eb,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:()=>T(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:M?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${M?"text-primary":"text-text-muted"}`,children:M?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),M&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",H,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:eI,disabled:J,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${J?"animate-spin":""}`,children:"refresh"})})]})}),em&&(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:eL.map(e=>{let t,s,n,l=r[e.id],h=A[e.id],b=P[e.id],g=!1===e.isActive,f=G===e.id||W===e.id;return(0,a.jsxs)(m.default,{padding:"none",className:`min-w-0 ${g?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(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.provider}),p(e)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:p(e)}):null]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:["claude"===e.provider&&"oauth"===e.authType&&(0,a.jsx)(x.m_,{text:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",children:(0,a.jsx)("button",{type:"button",onClick:()=>ez(e.id,!0!==D[e.id]),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${!0===D[e.id]?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)("button",{type:"button",onClick:()=>eM(e.id,e.provider),disabled:h||f,"aria-label":"Refresh quota",className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",title:"Refresh quota",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${h?"animate-spin":""}`,children:"refresh"})}),(0,a.jsx)("button",{type:"button",onClick:()=>{et(e),Z(!0)},disabled:f,"aria-label":"Edit connection",className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",title:"Edit connection",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(e.id),disabled:f,"aria-label":"Delete connection",className:"p-1.5 rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",title:"Delete connection",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${G===e.id?"animate-pulse":""}`,children:"delete"})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:e.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(u.default,{size:"sm",checked:e.isActive??!0,disabled:f,onChange:t=>eD(e.id,t)})})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:h?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):b?(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:b})]}):l?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:l.message})}):(t=l?.quotas||[],s=function(e,t=[],r={}){if(!Array.isArray(t)||0===t.length)return[];let a=c(e,r);return 0===a.size?t:t.filter(e=>!a.has(o(e)))}(e.provider,t,I),n=function(e,t=[],r={}){if(!Array.isArray(t)||0===t.length)return[];let a=c(e,r);return 0===a.size?[]:t.filter(e=>a.has(o(e)))}(e.provider,t,I),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d,{quotas:s,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==ed,onHideQuota:t=>e_(e.provider,o(t),!0)}),n.length>0&&(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5 text-[11px] text-text-muted",children:[(0,a.jsxs)("span",{children:[n.length," hidden:"]}),n.map(t=>{let r=o(t);return(0,a.jsxs)("button",{type:"button",onClick:()=>e_(e.provider,r,!1),className:"inline-flex items-center gap-1 rounded border border-border px-1.5 py-0.5 hover:border-primary hover:text-primary transition-colors",title:`Show "${t.name}" again`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"visibility"}),t.name]},r)})]})]}))})]},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:eV}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:eB?"custom":String(ev),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(ey(1),ew(r),ek(String(r)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[C.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:ej,onChange:e=>ek(e.target.value),onBlur:()=>{let e=Number.parseInt(ej,10);if(!Number.isFinite(e))return void ek(String(ev));let t=Math.min(500,Math.max(1,e));ey(1),ew(t),ek(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(ej,10);if(!Number.isFinite(t))return void ek(String(ev));let r=Math.min(500,Math.max(1,t));ey(1),ew(r),ek(String(r))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eN.page," / ",eN.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>ey(1),disabled:eN.page<=1||V||J,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>ey(e=>Math.max(1,e-1)),disabled:eN.page<=1||V||J,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>ey(e=>Math.min(eN.totalPages,e+1)),disabled:eN.page>=eN.totalPages||V||J,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>ey(eN.totalPages),disabled:eN.page>=eN.totalPages||V||J,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,a.jsx)(x.wI,{isOpen:X,connection:ee,proxyPools:er,onSave:eO,onClose:()=>{Z(!1),et(null)}})]}):(0,a.jsx)(m.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:eK.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:eK.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:eK.description})]})}):(0,a.jsx)(m.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}}},e=>{e.O(0,[7504,1321,5497,8441,3794,7358],()=>e(e.s=50574)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{50574:(e,t,r)=>{Promise.resolve().then(r.bind(r,75095)),Promise.resolve().then(r.bind(r,25086))},75095:(e,t,r)=>{"use strict";r.d(t,{default:()=>$});var a=r(95155),s=r(12115),i=r(57250),n=r(72107);function l(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function o(e){return e&&"object"==typeof e?String(e.modelKey||e.name||"").trim():""}function c(e,t){let r=t?.[e]?.hidden;return new Set(Array.isArray(r)?r.map(String):[])}function d({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:i=!1,onHideQuota:n=null}){let[o,c]=(0,s.useState)(1),u=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):l(e?.used,e?.total)})),[e]),m=(0,s.useMemo)(()=>"remaining-asc"===r?[...u].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...u].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):u,[u,r]),x=Math.max(1,Math.ceil(m.length/10));if((0,s.useEffect)(()=>{c(1)},[r,e]),(0,s.useEffect)(()=>{c(e=>Math.min(e,x))},[x]),!e||0===e.length)return null;let h=m.slice((o-1)*10,10*o),p=0===m.length?0:(o-1)*10+1,b=Math.min(10*o,m.length),g=t?"py-1 px-1.5":"py-2 px-3",f=t?"text-[11px]":"text-sm",y=t?"text-[11px]":"text-sm",v=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[m.length," quota",m.length>1?"s":""]}),i&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:h.map(e=>{var r;let s=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},i=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0)return"-";let s=Math.ceil(a/6e4);if(s<60)return`${s}m`;let i=Math.floor(s/60),n=s%60;if(i<24)return`${i}h ${n}m`;let l=Math.floor(i/24);return`${l}d ${i%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),l=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(s.getDate()+1);let i="";i=t>=a&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${i}, ${n}`}catch{return null}}(e.resetAt);return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${g} w-[30%]`,children:(0,a.jsxs)("div",{className:"group/qrow flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:s.emoji}),(0,a.jsx)("span",{className:`${f} font-medium text-text-primary truncate`,children:e.name}),n&&(0,a.jsx)("button",{type:"button",onClick:()=>n(e),className:"shrink-0 opacity-0 group-hover/qrow:opacity-100 text-text-muted hover:text-red-500 transition-opacity",title:`Hide "${e.name}"`,"aria-label":`Hide ${e.name}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px] align-middle",children:"visibility_off"})})]})}),(0,a.jsx)("td",{className:`${g} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${s.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${s.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsx)("span",{className:"text-text-muted",children:100===e.total?`${e.used}% used`:`${e.used.toLocaleString()} / ${e.total>0?e.total.toLocaleString():"∞"}`}),(0,a.jsxs)("span",{className:`font-medium ${s.text}`,children:[e.remaining,"%"]})]})]})}),(0,a.jsx)("td",{className:`${g} w-[25%]`,children:"-"!==i||l?t?(0,a.jsx)("div",{className:`${y} text-text-primary font-medium truncate`,title:l||"",children:"-"!==i?`in ${i}`:l}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==i&&(0,a.jsxs)("div",{className:`${y} text-text-primary font-medium`,children:["in ",i]}),l&&(0,a.jsx)("div",{className:`${v} text-text-muted`,children:l})]}):(0,a.jsx)("div",{className:`${y} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),x>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 ",p,"-",b," of ",m.length]}),(0,a.jsxs)("span",{children:["Page ",o," / ",x]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>Math.max(1,e-1)),disabled:1===o,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>Math.min(x,e+1)),disabled:o===x,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var u=r(98542),m=r(84588),x=r(35497),h=r(52679);function p(e){let t=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return t(e.email)?e.email:(t(e.name),e.name)}function b(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function g(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function f(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function y(e,t){return await e(t)}let v="quotaCacheData";function w(){try{let e=window.localStorage.getItem(v);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function j(e,t){try{let r=w();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(v,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}let k="quotaAutoRefresh",N=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],S=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}],C=[10,20,50,100];function $(){let[e,t]=(0,s.useState)([]),[r,$]=(0,s.useState)({}),[A,q]=(0,s.useState)({}),[P,E]=(0,s.useState)({}),[M,T]=(0,s.useState)(!0),[D,O]=(0,s.useState)({}),[I,_]=(0,s.useState)({}),[z,L]=(0,s.useState)(null),[F,U]=(0,s.useState)(!1),[J,R]=(0,s.useState)(!1),[H,K]=(0,s.useState)(60),[V,B]=(0,s.useState)(!0),[G,Q]=(0,s.useState)(null),[W,Y]=(0,s.useState)(null),[X,Z]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(null),[er,ea]=(0,s.useState)([]),[es,ei]=(0,s.useState)("all"),[en,el]=(0,s.useState)([]),[eo,ec]=(0,s.useState)("all"),[ed,eu]=(0,s.useState)("default"),[em,ex]=(0,s.useState)(!1),[eh,ep]=(0,s.useState)(!1),[eb,eg]=(0,s.useState)(!1),[ef,ey]=(0,s.useState)(1),[ev,ew]=(0,s.useState)(20),[ej,ek]=(0,s.useState)(String(20)),[eN,eS]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[eC,e$]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),eA=(0,s.useRef)(null),eq=(0,s.useRef)(null),eP=(0,s.useCallback)(async(e=ef)=>{try{var r,a;let s=new URLSearchParams({page:String(e),pageSize:String(ev),accountStatus:eo,sort:"priority"});"all"!==es&&s.set("provider",es);let i=await fetch(`/api/providers/client?${s.toString()}`);if(!i.ok)throw Error("Failed to fetch connections");let n=await i.json(),l=n.connections||[],o=(r=n.pagination,r||{page:1,pageSize:ev,total:0,totalPages:1}),c=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(n.totals,l.length);return t(l),el(n.providerOptions||[]),eS(o),e$(c),ey((a=n.pagination,a?.page||e)),l}catch(e){return console.error("Error fetching connections:",e),t([]),el([]),eS({page:1,pageSize:ev,total:0,totalPages:1}),e$({eligibleConnections:0,providerFilteredConnections:0}),[]}},[eo,em,ef,ev,es]),eE=(0,s.useCallback)(async(e,t)=>{q(t=>({...t,[e]:!0})),E(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=await fetch(`/api/usage/${e}`);if(!r.ok){let a=(await r.json().catch(()=>({}))).error||r.statusText;if(404===r.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===r.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,a);let r={quotas:[],message:a};$(t=>({...t,[e]:r})),j(e,r);return}throw Error(`HTTP ${r.status}: ${a}`)}let a=await r.json();console.log(`[ProviderLimits] Got quota for ${t}:`,a);let s={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,n.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,s=r.modelKey||r.name;return(e.get(a)??999)-(e.get(s)??999)})}return r}(t,a),plan:a.plan||null,message:a.message||null,raw:a};$(t=>({...t,[e]:s})),j(e,s)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),E(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{q(t=>({...t,[e]:!1}))}},[]),eM=(0,s.useCallback)(async(e,t)=>{await eE(e,t),L(new Date)},[eE]),eT=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){Q(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){$(t=>{let r={...t};return delete r[e],r}),q(t=>{let r={...t};return delete r[e],r}),E(t=>{let r={...t};return delete r[e],r});try{let t=w();t[e]&&(delete t[e],window.localStorage.setItem(v,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await y(eP,ef)}}catch(e){console.error("Error deleting connection:",e)}finally{Q(null)}}},[eP,ef]),eD=(0,s.useCallback)(async(e,t)=>{Y(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&($(e=>({...e})),await y(eP,ef))}catch(e){console.error("Error updating connection status:",e)}finally{Y(null)}},[eP,ef]),eO=(0,s.useCallback)(async e=>{if(!ee?.id)return;let t=ee.id,r=ee.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eP(),Z(!1),et(null),h.wb.includes(r)&&await eE(t,r))}catch(e){console.error("Error saving connection:",e)}},[ee,eP,eE]);(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&&ea(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eI=(0,s.useCallback)(async()=>{if(!J){R(!0),K(60);try{let e=await eP(ef);q(g(e)),E(t=>f(t,e)),$(t=>f(t,e)),await Promise.all(e.map(e=>eE(e.id,e.provider))),L(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{R(!1)}}},[J,eP,eE,ef]);(0,s.useEffect)(()=>{(async()=>{B(!0);let e=await eP(ef);B(!1),q(g(e)),E(t=>f(t,e)),$(t=>f(t,e)),await Promise.all(e.map(e=>eE(e.id,e.provider))),L(new Date)})()},[eP,eE,ef]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(k);T(null===e||"true"===e),U(!0)},[]),(0,s.useEffect)(()=>{F&&window.localStorage.setItem(k,String(M))},[M,F]),(0,s.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>{O(e?.claudeAutoPing?.connections||{}),_(e?.quotaVisibility||{})}).catch(()=>{})},[]);let e_=(0,s.useCallback)(async(e,t,r)=>{let a=new Set((I?.[e]?.hidden||[]).map(String));r?a.add(String(t)):a.delete(String(t));let s={...I,[e]:{...I?.[e]||{},hidden:[...a]}};_(s);try{let t=await fetch("/api/settings",{cache:"no-store"}),r={...(t.ok?await t.json():{}).quotaVisibility||{},[e]:s[e]};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:r})}),_(r)}catch{_(I)}},[I]),ez=(0,s.useCallback)(async(e,t)=>{let r={...D,[e]:t};O(r);try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{}).claudeAutoPing||{},connections:r};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({claudeAutoPing:t})})}catch{O(D)}},[D]);(0,s.useEffect)(()=>{if(!F||!M){eA.current&&(clearInterval(eA.current),eA.current=null),eq.current&&(clearInterval(eq.current),eq.current=null);return}return eA.current=setInterval(()=>{eI()},6e4),eq.current=setInterval(()=>{K(e=>e<=1?60:e-1)},1e3),()=>{eA.current&&clearInterval(eA.current),eq.current&&clearInterval(eq.current)}},[M,eI,F]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(eA.current&&(clearInterval(eA.current),eA.current=null),eq.current&&(clearInterval(eq.current),eq.current=null)):M&&F&&(eA.current=setInterval(eI,6e4),eq.current=setInterval(()=>{K(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[M,eI,F]);let eL=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=b(e,t),i=b(r,t),n="remaining-asc"===s?a-i:i-a;return 0!==n?n:(p(e)||"").localeCompare(p(r)||"")});if(!r)return e;let i=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=i(e)-i(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(p(e)||"").localeCompare(p(t)||"")})})(e,r,em,es,ed),[e,r,em,es,ed]),eF=e=>{let t=r[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=l(e.used,e.total))},eU=(0,s.useCallback)(async(e,t)=>{if(e.length&&!eb){eg(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await y(eP,ef)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eg(!1)}}},[eb,eP,ef]),eJ="all"===es?"All providers":es,eR=eC.eligibleConnections>0,eH=eL.length>0,eK=eC.eligibleConnections?eC.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"===es?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===eo?"turned off":"active"===eo?"active":"matching"} accounts found for ${es}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},eV=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}`}(eN),eB=!C.includes(ev);return V||eR?V||eH?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>ep(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":eh,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===es?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(i.A,{src:`/providers/${es}.png`,alt:es,size:18,className:"size-[18px] rounded object-contain",fallbackText:es.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:eJ})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),eh&&(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:()=>{"all"!==es&&ey(1),ei("all"),ep(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===es?"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"===es&&(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:en.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{es!==e&&ey(1),ei(e),ep(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${es===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}),es===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:eo,onChange:e=>{let t=e.target.value;eo!==t&&ey(1),ec(t)},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:N.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===es&&(0,a.jsx)("select",{value:ed,onChange:e=>eu(e.target.value),className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:S.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>ex(e=>!e),"aria-pressed":em,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${em?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{eU(eL.filter(e=>(e.isActive??!0)&&eF(e)).map(e=>e.id),!1)},disabled:eb,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{eU(eL.filter(e=>!(e.isActive??!0)&&!eF(e)).map(e=>e.id),!0)},disabled:eb,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:()=>T(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:M?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${M?"text-primary":"text-text-muted"}`,children:M?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),M&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",H,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:eI,disabled:J,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${J?"animate-spin":""}`,children:"refresh"})})]})}),em&&(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:eL.map(e=>{let t,s,n,l=r[e.id],h=A[e.id],b=P[e.id],g=!1===e.isActive,f=G===e.id||W===e.id;return(0,a.jsxs)(m.default,{padding:"none",className:`min-w-0 ${g?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(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.provider}),p(e)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:p(e)}):null]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:["claude"===e.provider&&"oauth"===e.authType&&(0,a.jsx)(x.m_,{text:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",children:(0,a.jsx)("button",{type:"button",onClick:()=>ez(e.id,!0!==D[e.id]),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${!0===D[e.id]?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)("button",{type:"button",onClick:()=>eM(e.id,e.provider),disabled:h||f,"aria-label":"Refresh quota",className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",title:"Refresh quota",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${h?"animate-spin":""}`,children:"refresh"})}),(0,a.jsx)("button",{type:"button",onClick:()=>{et(e),Z(!0)},disabled:f,"aria-label":"Edit connection",className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",title:"Edit connection",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(e.id),disabled:f,"aria-label":"Delete connection",className:"p-1.5 rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",title:"Delete connection",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${G===e.id?"animate-pulse":""}`,children:"delete"})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:e.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(u.default,{size:"sm",checked:e.isActive??!0,disabled:f,onChange:t=>eD(e.id,t)})})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:h?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):b?(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:b})]}):l?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:l.message})}):(t=l?.quotas||[],s=function(e,t=[],r={}){if(!Array.isArray(t)||0===t.length)return[];let a=c(e,r);return 0===a.size?t:t.filter(e=>!a.has(o(e)))}(e.provider,t,I),n=function(e,t=[],r={}){if(!Array.isArray(t)||0===t.length)return[];let a=c(e,r);return 0===a.size?[]:t.filter(e=>a.has(o(e)))}(e.provider,t,I),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d,{quotas:s,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==ed,onHideQuota:t=>e_(e.provider,o(t),!0)}),n.length>0&&(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5 text-[11px] text-text-muted",children:[(0,a.jsxs)("span",{children:[n.length," hidden:"]}),n.map(t=>{let r=o(t);return(0,a.jsxs)("button",{type:"button",onClick:()=>e_(e.provider,r,!1),className:"inline-flex items-center gap-1 rounded border border-border px-1.5 py-0.5 hover:border-primary hover:text-primary transition-colors",title:`Show "${t.name}" again`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"visibility"}),t.name]},r)})]})]}))})]},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:eV}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:eB?"custom":String(ev),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(ey(1),ew(r),ek(String(r)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[C.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:ej,onChange:e=>ek(e.target.value),onBlur:()=>{let e=Number.parseInt(ej,10);if(!Number.isFinite(e))return void ek(String(ev));let t=Math.min(500,Math.max(1,e));ey(1),ew(t),ek(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(ej,10);if(!Number.isFinite(t))return void ek(String(ev));let r=Math.min(500,Math.max(1,t));ey(1),ew(r),ek(String(r))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eN.page," / ",eN.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>ey(1),disabled:eN.page<=1||V||J,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>ey(e=>Math.max(1,e-1)),disabled:eN.page<=1||V||J,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>ey(e=>Math.min(eN.totalPages,e+1)),disabled:eN.page>=eN.totalPages||V||J,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>ey(eN.totalPages),disabled:eN.page>=eN.totalPages||V||J,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,a.jsx)(x.wI,{isOpen:X,connection:ee,proxyPools:er,onSave:eO,onClose:()=>{Z(!1),et(null)}})]}):(0,a.jsx)(m.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:eK.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:eK.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:eK.description})]})}):(0,a.jsx)(m.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}}},e=>{e.O(0,[7504,1321,5497,8441,3794,7358],()=>e(e.s=50574)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7852],{59884:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>c});var a=t(95155),l=t(12115),r=t(73321);function n(){let e=(0,r.useSearchParams)(),[s,t]=(0,l.useState)("processing");return(0,l.useEffect)(()=>{let s=e.get("code"),a=e.get("token"),l=e.get("state"),r=e.get("error"),n={code:s,token:a,state:l,error:r,errorDescription:e.get("error_description"),fullUrl:window.location.href},c=[window.location.origin,"http://localhost:1455"];if(window.opener)for(let e of c)try{window.opener.postMessage({type:"oauth_callback",data:n},e)}catch(e){console.log("postMessage failed:",e)}try{let e=new BroadcastChannel("oauth_callback");e.postMessage(n),e.close()}catch(e){console.log("BroadcastChannel failed:",e)}try{localStorage.setItem("oauth_callback",JSON.stringify({...n,timestamp:Date.now()}))}catch(e){console.log("localStorage failed:",e)}s||a||r?(t("success"),setTimeout(()=>{window.close(),setTimeout(()=>t("done"),500)},1500)):setTimeout(()=>t("manual"),0)},[e]),(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg",children:(0,a.jsxs)("div",{className:"text-center p-8 max-w-md",children:["processing"===s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,a.jsx)("h1",{className:"text-xl font-semibold mb-2",children:"Processing..."}),(0,a.jsx)("p",{className:"text-text-muted",children:"Please wait while we complete the authorization."})]}),("success"===s||"done"===s)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,a.jsx)("h1",{className:"text-xl font-semibold mb-2",children:"Authorization Successful!"}),(0,a.jsx)("p",{className:"text-text-muted",children:"success"===s?"This window will close automatically...":"You can close this tab now."})]}),"manual"===s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-yellow-100 dark:bg-yellow-900/30 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-yellow-600",children:"info"})}),(0,a.jsx)("h1",{className:"text-xl font-semibold mb-2",children:"Copy This URL"}),(0,a.jsx)("p",{className:"text-text-muted mb-4",children:"Please copy the URL from the address bar and paste it in the application."}),(0,a.jsx)("div",{className:"bg-surface border border-border rounded-lg p-3 text-left",children:(0,a.jsx)("code",{className:"text-xs break-all",children:window.location.href})})]})]})})}function c(){return(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg",children:(0,a.jsxs)("div",{className:"text-center p-8",children:[(0,a.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,a.jsx)("p",{className:"text-text-muted",children:"Loading..."})]})}),children:(0,a.jsx)(n,{})})}},73321:(e,s,t)=>{"use strict";var a=t(74645);t.o(a,"notFound")&&t.d(s,{notFound:function(){return a.notFound}}),t.o(a,"useParams")&&t.d(s,{useParams:function(){return a.useParams}}),t.o(a,"usePathname")&&t.d(s,{usePathname:function(){return a.usePathname}}),t.o(a,"useRouter")&&t.d(s,{useRouter:function(){return a.useRouter}}),t.o(a,"useSearchParams")&&t.d(s,{useSearchParams:function(){return a.useSearchParams}})},97697:(e,s,t)=>{Promise.resolve().then(t.bind(t,59884))}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=97697)),_N_E=e.O()}]);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sifxprime/krouter",
3
- "version": "0.5.107",
3
+ "version": "0.5.110",
4
4
  "description": "kRouter (Kodelyth Router) CLI — Kodelyth AI Infrastructure",
5
5
  "homepage": "https://github.com/sifxprime/krouter",
6
6
  "repository": {
package/app/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "krouter-app",
3
- "version": "0.5.107",
3
+ "version": "0.5.110",
4
4
  "description": "kRouter (Kodelyth Router) web dashboard — Kodelyth AI Infrastructure",
5
5
  "private": true,
6
6
  "scripts": {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sifxprime/krouter",
3
- "version": "0.5.107",
3
+ "version": "0.5.110",
4
4
  "description": "kRouter (Kodelyth Router) CLI — Kodelyth AI Infrastructure",
5
5
  "homepage": "https://github.com/sifxprime/krouter",
6
6
  "repository": {
@@ -1,43 +0,0 @@
1
- "use strict";exports.id=3104,exports.ids=[3104,3535],exports.modules={13808:(a,b,c)=>{c.d(b,{$N:()=>f,OK:()=>g,Zl:()=>h,lz:()=>i});var d=c(55511),e=c.n(d);function f(a=32){return e().randomBytes(a).toString("base64url")}function g(a){return e().createHash("sha256").update(a).digest("base64url")}function h(){return e().randomBytes(32).toString("base64url")}function i(a=32){let b=f(a),c=g(b);return{codeVerifier:b,codeChallenge:c,state:h()}}},22898:(a,b,c)=>{c.d(b,{Hd:()=>k,IF:()=>p,Pd:()=>g,Y0:()=>o,ZP:()=>u,_V:()=>t,cn:()=>l,dR:()=>m,jl:()=>w,nu:()=>x,uw:()=>v});var d=c(81630),e=c.n(d),f=c(1932);function g(a,b=null){return new Promise((c,d)=>{let g=e().createServer((b,c)=>{let d=new f.URL(b.url,"http://localhost");if("/callback"===d.pathname||"/auth/callback"===d.pathname){let b=Object.fromEntries(d.searchParams);c.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),c.end(`<!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Authentication Successful</title>
6
- <style>
7
- body { font-family: system-ui; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background: #f5f5f5; }
8
- .container { text-align: center; padding: 2rem; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
9
- .success { color: #22c55e; font-size: 3rem; }
10
- h1 { margin: 1rem 0; }
11
- p { color: #666; }
12
- #countdown { font-weight: bold; }
13
- </style>
14
- </head>
15
- <body>
16
- <div class="container">
17
- <div class="success">&#10003;</div>
18
- <h1>Authentication Successful</h1>
19
- <p id="message">Closing in <span id="countdown">3</span> seconds...</p>
20
- </div>
21
- <script>
22
- let count = 3;
23
- const countdown = document.getElementById("countdown");
24
- const message = document.getElementById("message");
25
- const timer = setInterval(() => {
26
- count--;
27
- countdown.textContent = count;
28
- if (count <= 0) {
29
- clearInterval(timer);
30
- window.close();
31
- setTimeout(() => {
32
- message.textContent = "Please close this tab manually.";
33
- }, 500);
34
- }
35
- }, 1000);
36
- </script>
37
- </body>
38
- </html>`),a(b)}else c.writeHead(404),c.end("Not found")});g.listen(b||0,"127.0.0.1",()=>{let{port:a}=g.address();c({server:g,port:a,close:()=>g.close()})}),g.on("error",a=>{"EADDRINUSE"===a.code&&b?d(Error(`Port ${b} is already in use. Please close other applications using this port.`)):d(a)})})}let h=null,i=null,j=new Map;function k({state:a,codeVerifier:b,redirectUri:c}){return!!a&&!!b&&!!c&&(j.set(a,{codeVerifier:b,redirectUri:c,status:"pending",createdAt:Date.now()}),!0)}function l(a){return j.get(a)||null}function m(a){j.delete(a)}function n(a,b){let c=a?"Authentication Successful":"Authentication Failed",d=String(b).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");return`<!DOCTYPE html>
39
- <html><head><meta charset="utf-8"><title>${c}</title>
40
- <style>body{font-family:system-ui;display:flex;justify-content:center;align-items:center;height:100vh;margin:0;background:#f5f5f5}.c{text-align:center;padding:2rem;background:#fff;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.1)}.i{color:${a?"#22c55e":"#ef4444"};font-size:3rem}h1{margin:1rem 0}p{color:#666}</style>
41
- </head><body><div class="c"><div class="i">${a?"&#10003;":"&#10007;"}</div><h1>${c}</h1><p>${d}</p><p>Closing in <span id="cd">3</span>s...</p>
42
- <script>let n=3;const c=document.getElementById("cd");const t=setInterval(()=>{n--;c.textContent=n;if(n<=0){clearInterval(t);window.close();}},1000);</script>
43
- </div></body></html>`}function o(a){return new Promise(b=>{if(h)return void b({success:!0});let d=e().createServer(async(b,d)=>{let e=new f.URL(b.url,"http://localhost");if("/callback"!==e.pathname&&"/auth/callback"!==e.pathname){d.writeHead(404),d.end("Not found");return}let g=e.searchParams.get("code"),h=e.searchParams.get("state"),i=e.searchParams.get("error"),k=h?j.get(h):null;if(k){try{if(i)throw Error(e.searchParams.get("error_description")||i);if(!g)throw Error("No authorization code received");let{exchangeTokens:a}=await Promise.all([c.e(7774),c.e(5433),c.e(4404),c.e(4746),c.e(8361),c.e(5330),c.e(8895),c.e(4177)]).then(c.bind(c,74177)),{createProviderConnection:b}=await c.e(1998).then(c.bind(c,71998)),f=await a("codex",g,k.redirectUri,k.codeVerifier,h),j=await b({provider:"codex",authType:"oauth",...f,expiresAt:f.expiresIn?new Date(Date.now()+1e3*f.expiresIn).toISOString():null,testStatus:"active"});k.status="done",k.connectionId=j.id,k.email=j.email,d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),d.end(n(!0,"You can close this window."))}catch(a){k.status="error",k.error=a.message,d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),d.end(n(!1,a.message))}finally{p()}return}let l=`http://localhost:${a}/callback${e.search}`;d.writeHead(302,{Location:l}),d.end(),p()});d.listen(1455,"127.0.0.1",()=>{h=d,i=setTimeout(()=>p(),3e5),b({success:!0})}),d.on("error",a=>{"EADDRINUSE"===a.code?b({success:!1,reason:"port_busy"}):b({success:!1,reason:a.message})})})}function p(){i&&(clearTimeout(i),i=null),h&&(h.close(),h=null)}let q=null,r=null,s=new Map;function t({state:a,codeVerifier:b,redirectUri:c}){return!!a&&!!b&&!!c&&(s.set(a,{codeVerifier:b,redirectUri:c,status:"pending",createdAt:Date.now()}),!0)}function u(a){return s.get(a)||null}function v(a){s.delete(a)}function w(a){return new Promise(b=>{if(q)return void b({success:!0});let d=e().createServer(async(b,d)=>{let e=new f.URL(b.url,"http://localhost");if("/callback"!==e.pathname&&"/auth/callback"!==e.pathname){d.writeHead(404),d.end("Not found");return}let g=e.searchParams.get("code"),h=e.searchParams.get("state"),i=e.searchParams.get("error"),j=h?s.get(h):null;if(j){try{if(i)throw Error(e.searchParams.get("error_description")||i);if(!g)throw Error("No authorization code received");let{exchangeTokens:a}=await Promise.all([c.e(7774),c.e(5433),c.e(4404),c.e(4746),c.e(8361),c.e(5330),c.e(8895),c.e(4177)]).then(c.bind(c,74177)),{createProviderConnection:b}=await c.e(1998).then(c.bind(c,71998)),f=await a("xai",g,j.redirectUri,j.codeVerifier,h),k=await b({provider:"xai",authType:"oauth",...f,expiresAt:f.expiresIn?new Date(Date.now()+1e3*f.expiresIn).toISOString():null,testStatus:"active"});j.status="done",j.connectionId=k.id,j.email=k.email,d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),d.end(n(!0,"You can close this window."))}catch(a){j.status="error",j.error=a.message,d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),d.end(n(!1,a.message))}finally{x()}return}let k=`http://localhost:${a}/callback${e.search}`;d.writeHead(302,{Location:k}),d.end(),x()});d.listen(56121,"127.0.0.1",()=>{q=d,r=setTimeout(()=>x(),3e5),b({success:!0})}),d.on("error",a=>{"EADDRINUSE"===a.code?b({success:!1,reason:"port_busy"}):b({success:!1,reason:a.message})})})}function x(){r&&(clearTimeout(r),r=null),q&&(q.close(),q=null)}},73159:(a,b,c)=>{c.d(b,{Ue:()=>i,oT:()=>j});let d="https://auth.x.ai",e="/oauth2/authorize",f="/oauth2/token",g="/.well-known/openid-configuration",h="/callback",i=96,j={clientId:"b1a00492-073a-47ea-816f-4c329264a828",issuer:d,authEndpointPath:e,tokenEndpointPath:f,discoveryPath:g,authorizeUrl:`${d}${e}`,tokenUrl:`${d}${f}`,discoveryUrl:`${d}${g}`,scope:"openid profile email offline_access grok-cli:access api:access",apiBaseUrl:"https://api.x.ai/v1",redirectUri:`http://127.0.0.1:56121${h}`,loopbackPort:56121,callbackPath:h,pkceVerifierBytes:96,refreshLeadSeconds:300,userAgent:"grok-cli/9router",codeChallengeMethod:"S256"}},92990:(a,b,c)=>{c.d(b,{DI:()=>g,Hp:()=>i,LT:()=>h,MZ:()=>t,Nl:()=>w,Nu:()=>n,OV:()=>f,S6:()=>p,Tx:()=>q,WN:()=>r,Ww:()=>x,YT:()=>l,ZL:()=>k,cD:()=>m,f7:()=>v,hF:()=>j,lB:()=>u,t:()=>s});var d=c(21820);function e(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let f={clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",authorizeUrl:"https://claude.ai/oauth/authorize",tokenUrl:"https://api.anthropic.com/v1/oauth/token",scopes:["org:create_api_key","user:profile","user:inference"],codeChallengeMethod:"S256"},g={clientId:"app_EMoamEEZ73f0CkXaXp7hrann",authorizeUrl:"https://auth.openai.com/oauth/authorize",tokenUrl:"https://auth.openai.com/oauth/token",scope:"openid profile email offline_access",codeChallengeMethod:"S256",extraParams:{id_token_add_organizations:"true",codex_cli_simplified_flow:"true",originator:"codex_cli_rs"}},h={clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile"]},i={clientId:"f0304373b74a44d2b584a3fb70ca9e56",deviceCodeUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",scope:"openid profile email model.completion",codeChallengeMethod:"S256"},j={openApiBaseUrl:"https://openapi.qoder.sh",centerBaseUrl:"https://center.qoder.sh",chatBaseUrl:"https://api3.qoder.sh",deviceTokenUrl:"https://openapi.qoder.sh/api/v1/deviceToken/poll",refreshUrl:"https://center.qoder.sh/algo/api/v3/user/refresh_token",userInfoUrl:"https://openapi.qoder.sh/api/v1/userinfo",quotaUsageUrl:"https://openapi.qoder.sh/api/v2/quota/usage",loginUrl:"https://qoder.com/device/selectAccounts"},k={clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",authorizeUrl:"https://iflow.cn/oauth",tokenUrl:"https://iflow.cn/oauth/token",userInfoUrl:"https://iflow.cn/api/oauth/getUserInfo",extraParams:{loginMethod:"phone",type:"phone"}},l={clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/cclog","https://www.googleapis.com/auth/experimentsandconfigs"],apiEndpoint:"https://cloudcode-pa.googleapis.com",apiVersion:"v1internal",loadCodeAssistEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUserEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser",loadCodeAssistUserAgent:"google-api-nodejs-client/9.15.1",loadCodeAssistApiClient:"google-cloud-sdk vscode_cloudshelleditor/0.1",loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:e(),pluginType:2})};function m(){return{ideType:9,platform:e(),pluginType:2}}let n={clientId:"Iv1.b507a08c87ecfe98",deviceCodeUrl:"https://github.com/login/device/code",tokenUrl:"https://github.com/login/oauth/access_token",userInfoUrl:"https://api.github.com/user",scopes:"read:user",apiVersion:"2022-11-28",copilotTokenUrl:"https://api.github.com/copilot_internal/v2/token",userAgent:"GitHubCopilotChat/0.26.7",editorVersion:"vscode/1.85.0",editorPluginVersion:"copilot-chat/0.26.7"},o=/^[a-z]{2}-[a-z]+-\d{1,2}$/;function p(a){if("string"!=typeof a||!o.test(a))throw Error("Invalid region");return a}let q={ssoOidcEndpoint:"https://oidc.us-east-1.amazonaws.com",registerClientUrl:"https://oidc.us-east-1.amazonaws.com/client/register",deviceAuthUrl:"https://oidc.us-east-1.amazonaws.com/device_authorization",tokenUrl:"https://oidc.us-east-1.amazonaws.com/token",startUrl:"https://view.awsapps.com/start",clientName:"kiro-oauth-client",clientType:"public",scopes:["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations"],grantTypes:["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],issuerUrl:"https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6",socialAuthEndpoint:"https://prod.us-east-1.auth.desktop.kiro.dev",socialLoginUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/login",socialTokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token",socialRefreshUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",socialClientId:process.env.KIRO_OAUTH_CLIENT_ID||"kiro-cli",socialDeviceAuthorizeUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/device/authorization",socialDevicePollUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/device/poll",authMethods:["builder-id","idc","google","github","import"]},r={apiEndpoint:"https://api2.cursor.sh",chatEndpoint:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",modelsEndpoint:"/aiserver.v1.AiService/GetDefaultModelNudgeData",api3Endpoint:"https://api3.cursor.sh",agentEndpoint:"https://agent.api5.cursor.sh",agentNonPrivacyEndpoint:"https://agentn.api5.cursor.sh",clientVersion:"3.1.0",clientType:"ide",tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"},dbKeys:{accessToken:"cursorAuth/accessToken",machineId:"storage.serviceMachineId"}},s={clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||"17e5f671-d194-4dfb-9706-5516cb48c098",deviceCodeUrl:"https://auth.kimi.com/api/oauth/device_authorization",tokenUrl:"https://auth.kimi.com/api/oauth/token"},t={apiBaseUrl:"https://api.kilo.ai",initiateUrl:"https://api.kilo.ai/api/device-auth/codes",pollUrlBase:"https://api.kilo.ai/api/device-auth/codes"},u={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},v={defaultBaseUrl:"https://gitlab.com",authorizeUrlPath:"/oauth/authorize",tokenUrlPath:"/oauth/token",userInfoUrlPath:"/api/v4/user",scope:"api read_user",codeChallengeMethod:"S256"},w={baseUrl:"https://copilot.tencent.com",stateUrl:"https://copilot.tencent.com/v2/plugin/auth/state",tokenUrl:"https://copilot.tencent.com/v2/plugin/auth/token",refreshUrl:"https://copilot.tencent.com/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",platform:"CLI",pollInterval:5e3},x=3e5}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=3535,exports.ids=[3535],exports.modules={13808:(a,b,c)=>{c.d(b,{$N:()=>f,OK:()=>g,Zl:()=>h,lz:()=>i});var d=c(55511),e=c.n(d);function f(a=32){return e().randomBytes(a).toString("base64url")}function g(a){return e().createHash("sha256").update(a).digest("base64url")}function h(){return e().randomBytes(32).toString("base64url")}function i(a=32){let b=f(a),c=g(b);return{codeVerifier:b,codeChallenge:c,state:h()}}},73159:(a,b,c)=>{c.d(b,{Ue:()=>i,oT:()=>j});let d="https://auth.x.ai",e="/oauth2/authorize",f="/oauth2/token",g="/.well-known/openid-configuration",h="/callback",i=96,j={clientId:"b1a00492-073a-47ea-816f-4c329264a828",issuer:d,authEndpointPath:e,tokenEndpointPath:f,discoveryPath:g,authorizeUrl:`${d}${e}`,tokenUrl:`${d}${f}`,discoveryUrl:`${d}${g}`,scope:"openid profile email offline_access grok-cli:access api:access",apiBaseUrl:"https://api.x.ai/v1",redirectUri:`http://127.0.0.1:56121${h}`,loopbackPort:56121,callbackPath:h,pkceVerifierBytes:96,refreshLeadSeconds:300,userAgent:"grok-cli/9router",codeChallengeMethod:"S256"}},92990:(a,b,c)=>{c.d(b,{DI:()=>g,Hp:()=>i,LT:()=>h,MZ:()=>t,Nl:()=>w,Nu:()=>n,OV:()=>f,S6:()=>p,Tx:()=>q,WN:()=>r,Ww:()=>x,YT:()=>l,ZL:()=>k,cD:()=>m,f7:()=>v,hF:()=>j,lB:()=>u,t:()=>s});var d=c(21820);function e(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let f={clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",authorizeUrl:"https://claude.ai/oauth/authorize",tokenUrl:"https://api.anthropic.com/v1/oauth/token",scopes:["org:create_api_key","user:profile","user:inference"],codeChallengeMethod:"S256"},g={clientId:"app_EMoamEEZ73f0CkXaXp7hrann",authorizeUrl:"https://auth.openai.com/oauth/authorize",tokenUrl:"https://auth.openai.com/oauth/token",scope:"openid profile email offline_access",codeChallengeMethod:"S256",extraParams:{id_token_add_organizations:"true",codex_cli_simplified_flow:"true",originator:"codex_cli_rs"}},h={clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile"]},i={clientId:"f0304373b74a44d2b584a3fb70ca9e56",deviceCodeUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",scope:"openid profile email model.completion",codeChallengeMethod:"S256"},j={openApiBaseUrl:"https://openapi.qoder.sh",centerBaseUrl:"https://center.qoder.sh",chatBaseUrl:"https://api3.qoder.sh",deviceTokenUrl:"https://openapi.qoder.sh/api/v1/deviceToken/poll",refreshUrl:"https://center.qoder.sh/algo/api/v3/user/refresh_token",userInfoUrl:"https://openapi.qoder.sh/api/v1/userinfo",quotaUsageUrl:"https://openapi.qoder.sh/api/v2/quota/usage",loginUrl:"https://qoder.com/device/selectAccounts"},k={clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",authorizeUrl:"https://iflow.cn/oauth",tokenUrl:"https://iflow.cn/oauth/token",userInfoUrl:"https://iflow.cn/api/oauth/getUserInfo",extraParams:{loginMethod:"phone",type:"phone"}},l={clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/cclog","https://www.googleapis.com/auth/experimentsandconfigs"],apiEndpoint:"https://cloudcode-pa.googleapis.com",apiVersion:"v1internal",loadCodeAssistEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUserEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser",loadCodeAssistUserAgent:"google-api-nodejs-client/9.15.1",loadCodeAssistApiClient:"google-cloud-sdk vscode_cloudshelleditor/0.1",loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:e(),pluginType:2})};function m(){return{ideType:9,platform:e(),pluginType:2}}let n={clientId:"Iv1.b507a08c87ecfe98",deviceCodeUrl:"https://github.com/login/device/code",tokenUrl:"https://github.com/login/oauth/access_token",userInfoUrl:"https://api.github.com/user",scopes:"read:user",apiVersion:"2022-11-28",copilotTokenUrl:"https://api.github.com/copilot_internal/v2/token",userAgent:"GitHubCopilotChat/0.26.7",editorVersion:"vscode/1.85.0",editorPluginVersion:"copilot-chat/0.26.7"},o=/^[a-z]{2}-[a-z]+-\d{1,2}$/;function p(a){if("string"!=typeof a||!o.test(a))throw Error("Invalid region");return a}let q={ssoOidcEndpoint:"https://oidc.us-east-1.amazonaws.com",registerClientUrl:"https://oidc.us-east-1.amazonaws.com/client/register",deviceAuthUrl:"https://oidc.us-east-1.amazonaws.com/device_authorization",tokenUrl:"https://oidc.us-east-1.amazonaws.com/token",startUrl:"https://view.awsapps.com/start",clientName:"kiro-oauth-client",clientType:"public",scopes:["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations"],grantTypes:["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],issuerUrl:"https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6",socialAuthEndpoint:"https://prod.us-east-1.auth.desktop.kiro.dev",socialLoginUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/login",socialTokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token",socialRefreshUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",socialClientId:process.env.KIRO_OAUTH_CLIENT_ID||"kiro-cli",socialDeviceAuthorizeUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/device/authorization",socialDevicePollUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/device/poll",authMethods:["builder-id","idc","google","github","import"]},r={apiEndpoint:"https://api2.cursor.sh",chatEndpoint:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",modelsEndpoint:"/aiserver.v1.AiService/GetDefaultModelNudgeData",api3Endpoint:"https://api3.cursor.sh",agentEndpoint:"https://agent.api5.cursor.sh",agentNonPrivacyEndpoint:"https://agentn.api5.cursor.sh",clientVersion:"3.1.0",clientType:"ide",tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"},dbKeys:{accessToken:"cursorAuth/accessToken",machineId:"storage.serviceMachineId"}},s={clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||"17e5f671-d194-4dfb-9706-5516cb48c098",deviceCodeUrl:"https://auth.kimi.com/api/oauth/device_authorization",tokenUrl:"https://auth.kimi.com/api/oauth/token"},t={apiBaseUrl:"https://api.kilo.ai",initiateUrl:"https://api.kilo.ai/api/device-auth/codes",pollUrlBase:"https://api.kilo.ai/api/device-auth/codes"},u={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},v={defaultBaseUrl:"https://gitlab.com",authorizeUrlPath:"/oauth/authorize",tokenUrlPath:"/oauth/token",userInfoUrlPath:"/api/v4/user",scope:"api read_user",codeChallengeMethod:"S256"},w={baseUrl:"https://copilot.tencent.com",stateUrl:"https://copilot.tencent.com/v2/plugin/auth/state",tokenUrl:"https://copilot.tencent.com/v2/plugin/auth/token",refreshUrl:"https://copilot.tencent.com/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",platform:"CLI",pollInterval:5e3},x=3e5}};
@@ -1,10 +0,0 @@
1
- "use strict";exports.id=7879,exports.ids=[7879],exports.modules={29679:(a,b,c)=>{c.d(b,{cW:()=>l});var d=c(94755),e=c(55511),f=c(8590);let g="1.0.0",h="0.10.32",i="us-east-1",j=new Map;async function k(a,b){let c,f,j,k=a?.providerSpecificData?.profileArn||"",l=function(a){if(!a||"string"!=typeof a)return i;let b=a.split(":");return b.length>=4&&b[3]?b[3]:i}(k),m=new URLSearchParams;m.set("origin","AI_EDITOR"),k&&m.set("profileArn",k);let n=`https://q.${l}.amazonaws.com/ListAvailableModels?${m.toString()}`,o={...(f=a?.providerSpecificData?.clientId||a?.refreshToken||a?.providerSpecificData?.profileArn||a?.accessToken||"kiro-anonymous",j=(0,e.createHash)("sha256").update(String(f)).digest("hex"),{"User-Agent":`aws-sdk-js/${g} ua/2.1 os/windows#10.0.26200 lang/js md/nodejs#22.21.1 api/codewhispererruntime#${g} m/N,E KiroIDE-${h}-${j}`,"x-amz-user-agent":`aws-sdk-js/${g} KiroIDE-${h}-${j}`,"x-amzn-kiro-agent-mode":"vibe","x-amzn-codewhisperer-optout":"true","amz-sdk-request":"attempt=1; max=1","amz-sdk-invocation-id":(0,d.A)(),Accept:"application/json"}),Authorization:`Bearer ${a?.accessToken||""}`},p=new AbortController,q=setTimeout(()=>p.abort("timeout"),3e4);b&&"function"==typeof b.addEventListener&&b.addEventListener("abort",()=>p.abort(b.reason));try{c=await fetch(n,{method:"GET",headers:o,signal:p.signal})}finally{clearTimeout(q)}if(!c.ok){let a=await c.text().catch(()=>""),b=Error(`Kiro ListAvailableModels ${c.status}: ${a||c.statusText}`);throw b.status=c.status,b.body=a,b}let r=await c.json();return Array.isArray(r?.models)?r.models:[]}async function l(a,b={}){let c,d,g;if(!a||!a.accessToken)return b.log?.debug?.("KIRO_MODELS","No accessToken; skipping live fetch"),null;let h=(g=(d=a?.providerSpecificData||{}).profileArn||d.clientId||a?.refreshToken||a?.accessToken||"anonymous",(0,e.createHash)("sha256").update(`kiro:${g}`).digest("hex")),i=Date.now();if(!b.forceRefresh){let a=j.get(h);if(a&&a.expiresAt>i)return{models:a.models,rawModels:a.rawModels}}try{c=await k(a,b.signal)}catch(d){if(!d||401!==d.status||!a.refreshToken)return b.log?.warn?.("KIRO_MODELS",`ListAvailableModels failed: ${d?.message||d}`),null;{b.log?.info?.("KIRO_MODELS","Got 401 from Kiro; refreshing token");let d=await (0,f.Ql)(a.refreshToken,a.providerSpecificData,b.log);if(!d?.accessToken)return b.log?.warn?.("KIRO_MODELS","Token refresh did not return accessToken"),null;{let e={...a,...d};if("function"==typeof b.onCredentialsRefreshed)try{await b.onCredentialsRefreshed(d)}catch(a){b.log?.warn?.("KIRO_MODELS",`onCredentialsRefreshed failed: ${a?.message||a}`)}try{c=await k(e,b.signal),a.accessToken=e.accessToken,e.refreshToken&&(a.refreshToken=e.refreshToken)}catch(a){return b.log?.warn?.("KIRO_MODELS",`Retry after refresh failed: ${a?.message||a}`),null}}}}let m=[];for(let a of c){if(!a||"object"!=typeof a)continue;let b=a.modelId||a.id;if(!b)continue;let c=function(a,b,c){let d=(a||b||"Kiro").trim(),e=Number(c);if(!Number.isFinite(e)||1e-9>Math.abs(e-1)||e<=0)return`Kiro ${d}`;let f=e.toFixed(1).replace(",",".");return`Kiro ${d} (${f}x credit)`}(a.modelName,b,a.rateMultiplier),d=Number(a?.tokenLimits?.maxInputTokens)||2e5;for(let e of function(a,b){let c,d=((c=a).endsWith("-agentic")&&(c=c.slice(0,-8)),c.endsWith("-thinking")&&(c=c.slice(0,-9)),c),e=b||`Kiro ${d}`,f=[{id:d,name:e,capabilities:{thinking:!1,agentic:!1}},{id:`${d}-thinking`,name:`${e} (Thinking)`,capabilities:{thinking:!0,agentic:!1}}];return"auto"!==d&&(f.push({id:`${d}-agentic`,name:`${e} (Agentic)`,capabilities:{thinking:!1,agentic:!0}}),f.push({id:`${d}-thinking-agentic`,name:`${e} (Thinking + Agentic)`,capabilities:{thinking:!0,agentic:!0}})),f}(b,c))m.push({...e,contextLength:d,rateMultiplier:Number.isFinite(Number(a.rateMultiplier))?Number(a.rateMultiplier):1,upstreamModelId:b,description:a.description||""})}return j.set(h,{expiresAt:i+3e5,models:m,rawModels:c}),{models:m,rawModels:c}}},30022:(a,b,c)=>{c.d(b,{KC:()=>j,RB:()=>q,Ty:()=>m,_G:()=>h,bg:()=>g,cT:()=>l,pM:()=>p,pr:()=>r,qk:()=>n,rf:()=>f,t6:()=>k,xG:()=>o});let d="https://openapi.qoder.sh",e="https://api3.qoder.sh",f="https://qoder.com/device/selectAccounts",g=`${d}/api/v1/deviceToken/poll`,h=`${d}/api/v1/userinfo`,i=`${e}/algo/api/v2/service/pro/sse/agent_chat_generation?FetchKeys=llm_model_result&AgentId=agent_common`,j=`${i}&Encode=1`,k=`${e}/algo/api/v2/model/list`,l="1.0.0",m="5",n="disagree",o="v2",p="x86_64_windows",q="5",r=`-----BEGIN PUBLIC KEY-----
2
- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA8iMH5c02LilrsERw9t6Pv5Nc
3
- 4k6Pz1EaDicBMpdpxKduSZu5OANqUq8er4GM95omAGIOPOh+Nx0spthYA2BqGz+l
4
- 6HRkPJ7S236FZz73In/KVuLnwI8JJ2CbuJap8kvheCCZpmAWpb/cPx/3Vr/J6I17
5
- XcW+ML9FoCI6AOvOzwIDAQAB
6
- -----END PUBLIC KEY-----`},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},53225:(a,b,c)=>{c.d(b,{EV:()=>l,X5:()=>k});var d=c(55511),e=c(39609),f=c(78085),g=c(30022);let h=new Map,i=new Map;async function j(a,b,c=null){let d,h,i={userId:(h=a?.providerSpecificData||{}).userId,authToken:a.accessToken,name:a.displayName||"",email:a.email||"",machineId:h.machineId||""};if(!i.userId||!i.authToken)return null;let k={Accept:"application/json","Accept-Encoding":"identity",...(0,f.d)(Buffer.alloc(0),g.t6,i)},l=new AbortController,m=null,n=null;try{m=setTimeout(()=>l.abort("timeout"),15e3),b&&"function"==typeof b.addEventListener&&(b.aborted?l.abort(b.reason):(n=()=>l.abort(b.reason),b.addEventListener("abort",n))),d=await (0,e.proxyAwareFetch)(g.t6,{method:"GET",headers:k,signal:l.signal},c)}finally{m&&clearTimeout(m),b&&n&&b.removeEventListener("abort",n)}if(!d.ok)return null;let o=await d.json().catch(()=>null);if(!o||!Array.isArray(o.chat))return null;let p=[],q=new Map;for(let a of o.chat){if(!a||"object"!=typeof a)continue;let b=a.key;if(!b||(q.set(b,a),!1===a.enable))continue;let c=a.display_name||b,d=Number(a.max_input_tokens)||131072;p.push({id:b,name:`${c}`,contextLength:d,isVL:!!a.is_vl,isReasoning:!!a.is_reasoning,maxOutputTokens:Number(a.max_output_tokens)||0,description:a.description||""})}return{models:p,rawConfigs:q}}async function k(a,b,c={}){let d=await l(a,c);if(!d)return null;let e=d.rawConfigs.get(b);return e?{...e,key:b}:null}async function l(a,b={}){let c;if(!a?.accessToken||!(a.providerSpecificData||{}).userId)return null;let e=(c=(a?.providerSpecificData||{}).userId||a?.refreshToken||a?.accessToken||"anonymous",(0,d.createHash)("sha256").update(`qoder:${c}`).digest("hex")),f=Date.now();if(!b.forceRefresh){let a=h.get(e);if(a&&a.expiresAt>f)return a}let g=i.get(e);if(g&&!b.forceRefresh)return g;let k=(async()=>{let c=await j(a,b.signal,b.proxyOptions);if(!c)return null;let d={expiresAt:Date.now()+36e5,models:c.models,rawConfigs:c.rawConfigs,fetched:!0};return h.set(e,d),d})();i.set(e,k);try{return await k}finally{i.get(e)===k&&i.delete(e)}}},78085:(a,b,c)=>{c.d(b,{d:()=>i});var d=c(55511),e=c.n(d),f=c(94755),g=c(30022);function h(a){return e().createHash("md5").update(a).digest("hex")}function i(a,b,c){var d;let i,j;if(!c?.userId)throw Error("cosy: user id is empty");if(!c?.authToken)throw Error("cosy: auth token is empty");let k=Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"latin1"):Buffer.from(a||[]),{cosyKey:l,info:m}=(d={uid:c.userId,security_oauth_token:c.authToken,name:c.name||"",aid:"",email:c.email||""},i=(0,f.A)().slice(0,16),j=function(a,b){var c;let d,f,g=Buffer.from(b,"utf8");if(16!==g.length)throw Error(`aes key must be 16 bytes, got ${g.length}`);let h=g.subarray(0,16),i=e().createCipheriv("aes-128-cbc",g,h);i.setAutoPadding(!1);let j=(d=16-(c=Buffer.from(a,"utf8")).length%16,f=Buffer.alloc(c.length+d,d),c.copy(f,0),f);return Buffer.concat([i.update(j),i.final()]).toString("base64")}(JSON.stringify(d),i),{cosyKey:e().publicEncrypt({key:g.pr,padding:e().constants.RSA_PKCS1_PADDING},Buffer.from(i,"utf8")).toString("base64"),info:j}),n=String(Math.floor(Date.now()/1e3)),o=JSON.stringify({version:"v1",requestId:(0,f.A)(),info:m,cosyVersion:g.cT,ideVersion:""}),p=Buffer.from(o,"utf8").toString("base64"),q=function(a){let b;try{b=new URL(a).pathname||""}catch{return""}return b.startsWith("/algo")?b.slice(5):b}(b),r=`${p}
7
- ${l}
8
- ${n}
9
- ${k.toString("latin1")}
10
- ${q}`,s=h(Buffer.from(r,"latin1")),t=c.machineId||(0,f.A)(),u=h(k),v=String(k.length);return{Authorization:`Bearer COSY.${p}.${s}`,"Cosy-Key":l,"Cosy-User":c.userId,"Cosy-Date":n,"Cosy-Version":g.cT,"Cosy-Machineid":t,"Cosy-Machinetoken":t,"Cosy-Machinetype":g.RB,"Cosy-Machineos":g.pM,"Cosy-Clienttype":g.Ty,"Cosy-Clientip":"127.0.0.1","Cosy-Bodyhash":u,"Cosy-Bodylength":v,"Cosy-Sigpath":q,"Cosy-Data-Policy":g.qk,"Cosy-Organization-Id":"","Cosy-Organization-Tags":"","Login-Version":g.xG,"X-Request-Id":(0,f.A)()}}},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=8255,exports.ids=[8255],exports.modules={2574:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>w,OPTIONS:()=>v,buildModelsList:()=>u,invalidateModelsCache:()=>n});var d=c(81329),e=c(75681),f=c(89718),g=c(16655),h=c(29679),i=c(53225),j=c(66306),k=c(77598),l=c.n(k);let m=new Map;function n(){m.clear()}let o={kiro:async a=>{let b=await (0,h.cW)({accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData||{}},{log:console});return b?.models?.length?{models:b.models}:null},qoder:async a=>{let b=await (0,i.EV)({accessToken:a.accessToken,refreshToken:a.refreshToken,email:a.email,displayName:a.displayName,providerSpecificData:a.providerSpecificData||{}});return b?.models?.length?{models:b.models.map(a=>({id:a.id,name:a.name}))}:null}},p=/[-_][0-9a-f]{8,}$/i,q={image:"image",tts:"tts",embedding:"embedding",stt:"stt",imageToText:"imageToText"};function r(a){return a?.type&&q[a.type]||"llm"}async function s(a){if(!a?.apiKey)return[];let b="string"==typeof a?.providerSpecificData?.baseUrl?a.providerSpecificData.baseUrl.trim().replace(/\/$/,""):"";if(!b)return[];let c=`${b}/models`,d={"Content-Type":"application/json"};if((0,e.mq)(a.provider))d.Authorization=`Bearer ${a.apiKey}`;else{if(!(0,e.gb)(a.provider))return[];c.endsWith("/messages/models")?c=c.slice(0,-9):c.endsWith("/messages")&&(c=`${c.slice(0,-9)}/models`),d["x-api-key"]=a.apiKey,d["anthropic-version"]="2023-06-01",d.Authorization=`Bearer ${a.apiKey}`}try{var f;let a=new AbortController,b=setTimeout(()=>a.abort(),5e3),e=await fetch(c,{method:"GET",headers:d,cache:"no-store",signal:a.signal});if(clearTimeout(b),!e.ok)return[];let g=(f=await e.json(),Array.isArray(f)?f:f?.data||f?.models||f?.results||[]);return Array.from(new Set(g.map(a=>a?.id||a?.name||a?.model).filter(a=>"string"==typeof a&&""!==a.trim())))}catch{return[]}}function t(a,b){let c=e.AI_PROVIDERS[a],d=Array.isArray(c?.serviceKinds)&&c.serviceKinds.length>0?c.serviceKinds:["llm"];return b.some(a=>d.includes(a))}async function u(a){let b=[];try{b=(b=await (0,f.getProviderConnections)()).filter(a=>!1!==a.isActive)}catch(a){console.log("Could not fetch providers, returning all models")}let c=[];try{c=await (0,f.Uv)()}catch(a){console.log("Could not fetch combos")}let h=[];try{h=await (0,f.uv)()}catch(a){console.log("Could not fetch custom models")}let i={};try{i=await (0,f.OM)()}catch(a){console.log("Could not fetch model aliases")}let k={};try{k=await (0,g.vF)()}catch(a){console.log("Could not fetch disabled models")}let l=(a,b)=>Array.isArray(k[a])&&k[a].includes(b),m=new Map;for(let a of b)m.has(a.provider)||m.set(a.provider,a);let n=[];for(let b of c){if(!function(a,b){let c=a?.kind||"llm";return b.includes(c)}(b,a))continue;let c={id:b.name,object:"model",owned_by:"combo"};("webSearch"===b.kind||"webFetch"===b.kind)&&(c.kind=b.kind),n.push(c)}if(0===b.length){let b=Object.fromEntries(Object.entries(d.Xg).map(([a,b])=>[b,a]));for(let[c,e]of Object.entries(d.vq))if(t(b[c]||c,a))for(let b of e)a.includes(r(b))&&(l(c,b.id)||n.push({id:`${c}/${b.id}`,object:"model",owned_by:c}));for(let b of h){if(!b?.id||b.type&&"llm"!==b.type||!a.includes("llm"))continue;let c=b.providerAlias;if(!c)continue;let d=String(b.id).trim();d&&n.push({id:`${c}/${d}`,object:"model",owned_by:c})}}else for(let[b,c]of m.entries()){if(!t(b,a))continue;let f=d.Xg[b]||b,g=(c?.providerSpecificData?.prefix||(0,e.wG)(b)||f).trim(),k=d.vq[f]||[],m=c?.providerSpecificData?.enabledModels,q=Array.isArray(m)&&m.length>0,u=(0,e.mq)(b)||(0,e.gb)(b),v=new Map(k.map(a=>[a.id,r(a)])),w=q?Array.from(new Set(m.filter(a=>"string"==typeof a&&""!==a.trim()))):k.map(a=>a.id);u&&0===w.length&&!p.test(b)&&(w=await s(c));let x=o[b];if(x&&!q)try{let a=await x(c);a?.models?.length&&(w=a.models.map(a=>a.id))}catch(a){console.log(`Live model fetch failed for ${b}: ${a?.message||a}`)}let y=w.map(a=>a.startsWith(`${g}/`)?a.slice(g.length+1):a.startsWith(`${f}/`)?a.slice(f.length+1):a.startsWith(`${b}/`)?a.slice(b.length+1):a).filter(a=>"string"==typeof a&&""!==a.trim()),z=new Map;for(let c of Array.from(new Set([...y,...h.filter(c=>{if(!c?.id)return!1;let d=r(c)||"llm";if(!a.includes(d)&&!("imageToText"===d&&a.includes("llm")))return!1;let e=c.providerAlias;return e===f||e===g||e===b}).map(a=>{let b=String(a.id).trim();return b&&z.set(b,r(a)||"llm"),b}).filter(a=>""!==a),...Object.values(i||{}).filter(a=>"string"==typeof a&&!!a.includes("/")&&(a.startsWith(`${g}/`)||a.startsWith(`${f}/`)||a.startsWith(`${b}/`))).map(a=>a.startsWith(`${g}/`)?a.slice(g.length+1):a.startsWith(`${f}/`)?a.slice(f.length+1):a.startsWith(`${b}/`)?a.slice(b.length+1):a).filter(a=>"string"==typeof a&&""!==a.trim())]))){let b=z.get(c),d=v.get(c)||b||function(a){let b=String(a).toLowerCase();return/embed/.test(b)?"embedding":/tts|speech|audio|voice/.test(b)?"tts":/image|imagen|dall-?e|flux|sdxl|sd-|stable-diffusion/.test(b)?"image":"llm"}(c),e="imageToText"===d&&a.includes("llm");if(!a.includes(d)&&!e||l(g,c)||l(f,c))continue;let h={id:`${g}/${c}`,object:"model",owned_by:g},i=(0,j.a0)(b);i&&(h.capabilities=i),n.push(h)}let A=e.AI_PROVIDERS[b],B=[];if(a.includes("tts")&&Array.isArray(A?.ttsConfig?.models))for(let a of A.ttsConfig.models)a?.id&&B.push(a.id);if(a.includes("embedding")&&Array.isArray(A?.embeddingConfig?.models))for(let a of A.embeddingConfig.models)a?.id&&B.push(a.id);for(let a of B)l(g,a)||l(f,a)||n.push({id:`${g}/${a}`,object:"model",owned_by:g});a.includes("webSearch")&&A?.searchConfig&&n.push({id:`${g}/search`,object:"model",kind:"webSearch",owned_by:g}),a.includes("webFetch")&&A?.fetchConfig&&n.push({id:`${g}/fetch`,object:"model",kind:"webFetch",owned_by:g})}let q=[],u=new Set;for(let a of n)!a?.id||u.has(a.id)||(u.add(a.id),q.push(a));return q}async function v(){return new Response(null,{headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"*"}})}async function w(a){try{var b;let c=(a?.headers?.get("user-agent")||"").toLowerCase(),d=new URL(a.url),e=c.includes("codex")||"codex"===d.searchParams.get("format"),f=["llm"],g=(b=e?"codex":"openai",`${[...f].sort().join(",")}|${b}`),h=Date.now(),i=m.get(g);if(!i||i.expiresAt<=h){let a,b=await u(f),c=e?JSON.stringify({models:b.map(a=>({id:a.id,name:a.id,...a.capabilities?{capabilities:a.capabilities}:{}}))}):JSON.stringify({object:"list",data:b});i={body:c,etag:(a=l().createHash("sha1").update(c).digest("hex").slice(0,16),`W/"${a}"`),expiresAt:h+3e4},m.set(g,i)}let j=a?.headers?.get("if-none-match");if(j&&j===i.etag)return new Response(null,{status:304,headers:{"Access-Control-Allow-Origin":"*","Cache-Control":"public, max-age=30",ETag:i.etag}});return new Response(i.body,{status:200,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*","Cache-Control":"public, max-age=30",ETag:i.etag}})}catch(a){return console.log("Error fetching models:",a),Response.json({error:{message:a.message,type:"server_error"}},{status:500})}}},16655:(a,b,c)=>{c.d(b,{oF:()=>d.oF,tm:()=>d.tm,vF:()=>d.vF});var d=c(9248)},19225:(a,b,c)=>{a.exports=c(44870)},81329:(a,b,c)=>{c.d(b,{Xg:()=>d.Xg,eh:()=>e,vq:()=>d.vq});var d=c(44404);Object.entries(c(75681).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.vq).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name})))},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}}};