@techysy/10router 1.5.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (662) 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/prerender-manifest.json +18 -18
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  85. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.html +2 -2
  88. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  89. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  90. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -6
  91. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  92. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/external-quota/[source]/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/external-quota/[source]/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/gateway-probe/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/models/caps/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/network/egress-region/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/claim-compensation/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/security/status/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/security/status/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/settings/route.js +2 -2
  299. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  305. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/quotas/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/quotas/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  365. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/rerank/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/rerank/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/version/shell-update/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  409. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  411. package/app/.next-cli-build/server/app/callback.html +2 -2
  412. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  413. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  414. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +6 -6
  416. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +2 -2
  417. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -8
  418. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +8 -8
  419. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
  420. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  421. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +2 -2
  422. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +8 -8
  423. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +8 -8
  424. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
  425. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  426. package/app/.next-cli-build/server/app/dashboard/combos.html +2 -2
  427. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
  428. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +8 -8
  429. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
  430. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  431. package/app/.next-cli-build/server/app/dashboard/endpoint.html +2 -2
  432. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +8 -8
  433. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +8 -8
  434. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
  435. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  436. package/app/.next-cli-build/server/app/dashboard/experimental.html +2 -2
  437. package/app/.next-cli-build/server/app/dashboard/experimental.rsc +8 -8
  438. package/app/.next-cli-build/server/app/dashboard/experimental.segments/!KGRhc2hib2FyZCk/dashboard/experimental/__PAGE__.segment.rsc +8 -8
  439. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_full.segment.rsc +8 -8
  440. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_tree.segment.rsc +2 -2
  441. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +2 -2
  442. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -8
  443. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +8 -8
  444. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -8
  445. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  446. package/app/.next-cli-build/server/app/dashboard/mitm.html +2 -2
  447. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
  448. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +8 -8
  449. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
  450. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  451. package/app/.next-cli-build/server/app/dashboard/profile.html +2 -2
  452. package/app/.next-cli-build/server/app/dashboard/profile.rsc +8 -8
  453. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +8 -8
  454. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +8 -8
  455. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  456. package/app/.next-cli-build/server/app/dashboard/providers/new.html +2 -2
  457. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -8
  458. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +8 -8
  459. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
  460. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  461. package/app/.next-cli-build/server/app/dashboard/providers.html +2 -2
  462. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
  463. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +8 -8
  464. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
  465. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  466. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +2 -2
  467. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -8
  468. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +8 -8
  469. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
  470. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  471. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +2 -2
  472. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +8 -8
  473. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +8 -8
  474. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +8 -8
  475. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  476. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
  478. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +9 -9
  479. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
  480. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +2 -2
  485. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  486. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  487. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  488. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
  489. package/app/.next-cli-build/server/app/dashboard/skills.html +2 -2
  490. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
  491. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +8 -8
  492. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
  493. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  494. package/app/.next-cli-build/server/app/dashboard/token-saver.html +2 -2
  495. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +8 -8
  496. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +8 -8
  497. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +8 -8
  498. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/translator.html +2 -2
  500. package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -8
  501. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +8 -8
  502. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -8
  503. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  504. package/app/.next-cli-build/server/app/dashboard/usage.html +2 -2
  505. package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -8
  506. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +8 -8
  507. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
  508. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard.html +2 -2
  510. package/app/.next-cli-build/server/app/dashboard.rsc +8 -8
  511. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +8 -8
  512. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -8
  513. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  514. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  515. package/app/.next-cli-build/server/app/index.html +1 -1
  516. package/app/.next-cli-build/server/app/index.rsc +6 -6
  517. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +6 -6
  518. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  519. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  520. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  521. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  522. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  523. package/app/.next-cli-build/server/app/landing.html +2 -2
  524. package/app/.next-cli-build/server/app/landing.rsc +7 -7
  525. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +7 -7
  526. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  527. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +7 -7
  528. package/app/.next-cli-build/server/app/login/page.js +1 -1
  529. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  530. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  531. package/app/.next-cli-build/server/app/login.html +2 -2
  532. package/app/.next-cli-build/server/app/login.rsc +7 -7
  533. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  534. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  535. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +7 -7
  536. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  537. package/app/.next-cli-build/server/app/page.js +1 -1
  538. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  539. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  540. package/app/.next-cli-build/server/app-paths-manifest.json +6 -6
  541. package/app/.next-cli-build/server/chunks/1329.js +1 -1
  542. package/app/.next-cli-build/server/chunks/1806.js +1 -1
  543. package/app/.next-cli-build/server/chunks/{9417.js → 1819.js} +2 -2
  544. package/app/.next-cli-build/server/chunks/1884.js +1 -1
  545. package/app/.next-cli-build/server/chunks/2132.js +1 -1
  546. package/app/.next-cli-build/server/chunks/2154.js +1 -0
  547. package/app/.next-cli-build/server/chunks/2557.js +4 -4
  548. package/app/.next-cli-build/server/chunks/2812.js +1 -1
  549. package/app/.next-cli-build/server/chunks/318.js +10 -8
  550. package/app/.next-cli-build/server/chunks/3217.js +1 -0
  551. package/app/.next-cli-build/server/chunks/3267.js +1 -0
  552. package/app/.next-cli-build/server/chunks/3500.js +2 -2
  553. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  554. package/app/.next-cli-build/server/chunks/3792.js +1 -1
  555. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  556. package/app/.next-cli-build/server/chunks/3962.js +1 -1
  557. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  558. package/app/.next-cli-build/server/chunks/4386.js +1 -0
  559. package/app/.next-cli-build/server/chunks/447.js +1 -0
  560. package/app/.next-cli-build/server/chunks/4575.js +1 -1
  561. package/app/.next-cli-build/server/chunks/4692.js +1 -1
  562. package/app/.next-cli-build/server/chunks/4775.js +1 -1
  563. package/app/.next-cli-build/server/chunks/{2112.js → 4906.js} +1 -1
  564. package/app/.next-cli-build/server/chunks/4927.js +4 -4
  565. package/app/.next-cli-build/server/chunks/5210.js +15 -13
  566. package/app/.next-cli-build/server/chunks/539.js +1 -1
  567. package/app/.next-cli-build/server/chunks/5598.js +1 -0
  568. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  569. package/app/.next-cli-build/server/chunks/5625.js +1 -0
  570. package/app/.next-cli-build/server/chunks/5663.js +1 -0
  571. package/app/.next-cli-build/server/chunks/5757.js +1 -1
  572. package/app/.next-cli-build/server/chunks/5781.js +1 -1
  573. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  574. package/app/.next-cli-build/server/chunks/615.js +1 -1
  575. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  576. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  577. package/app/.next-cli-build/server/chunks/6492.js +1 -1
  578. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  579. package/app/.next-cli-build/server/chunks/6790.js +1 -1
  580. package/app/.next-cli-build/server/chunks/6877.js +1 -1
  581. package/app/.next-cli-build/server/chunks/6922.js +1 -1
  582. package/app/.next-cli-build/server/chunks/6956.js +1 -1
  583. package/app/.next-cli-build/server/chunks/6960.js +2 -2
  584. package/app/.next-cli-build/server/chunks/7067.js +1 -1
  585. package/app/.next-cli-build/server/chunks/7122.js +1 -1
  586. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  587. package/app/.next-cli-build/server/chunks/7274.js +4 -4
  588. package/app/.next-cli-build/server/chunks/7322.js +2 -2
  589. package/app/.next-cli-build/server/chunks/7729.js +1 -0
  590. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  591. package/app/.next-cli-build/server/chunks/8172.js +2 -2
  592. package/app/.next-cli-build/server/chunks/8318.js +1 -1
  593. package/app/.next-cli-build/server/chunks/8370.js +2 -2
  594. package/app/.next-cli-build/server/chunks/8499.js +3 -3
  595. package/app/.next-cli-build/server/chunks/8595.js +1 -1
  596. package/app/.next-cli-build/server/chunks/8689.js +1 -1
  597. package/app/.next-cli-build/server/chunks/8749.js +1 -1
  598. package/app/.next-cli-build/server/chunks/8775.js +1 -1
  599. package/app/.next-cli-build/server/chunks/8895.js +8 -8
  600. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  601. package/app/.next-cli-build/server/chunks/9046.js +1 -1
  602. package/app/.next-cli-build/server/chunks/9154.js +1 -1
  603. package/app/.next-cli-build/server/chunks/9489.js +3 -2
  604. package/app/.next-cli-build/server/chunks/9601.js +1 -1
  605. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  606. package/app/.next-cli-build/server/chunks/9628.js +1 -1
  607. package/app/.next-cli-build/server/chunks/976.js +1 -1
  608. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  609. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  610. package/app/.next-cli-build/server/middleware.js +5 -5
  611. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  612. package/app/.next-cli-build/server/pages/404.html +2 -2
  613. package/app/.next-cli-build/server/pages/500.html +1 -1
  614. package/app/.next-cli-build/static/chunks/1243-72ef45af27dc7a4a.js +3 -0
  615. package/app/.next-cli-build/static/chunks/1321-77ba328dd4d69fdb.js +1 -0
  616. package/app/.next-cli-build/static/chunks/5497-ec8a6308121a2b70.js +7 -0
  617. package/app/.next-cli-build/static/chunks/{9749-80768075d38162d1.js → 9749-1f31c98804847f2a.js} +8 -8
  618. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-8f6aadfc8bf2eb7b.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/experimental/{page-7ee730e7a1ddb6e5.js → page-01bf0e3f4117f6c1.js} +1 -1
  620. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-bce04d7851a6bf65.js → page-6db03f8140121a40.js} +10 -10
  621. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-7c9d46f8c09d480e.js → page-73d4979c8eec774c.js} +1 -1
  622. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-a6b07fa9d0712cee.js +14 -0
  623. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-ceb259d31ded818a.js → page-1e4e3f6f20152da1.js} +1 -1
  624. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c77260f73f62aa0e.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-db46cbc3bf22d61a.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/landing/page-c6c3a32dd06bc907.js +1 -0
  627. package/app/.next-cli-build/static/css/17275fac82e1641e.css +1 -0
  628. package/app/package.json +71 -71
  629. package/app/public/donate/alipay.svg +1 -0
  630. package/app/public/donate/ifdian.svg +1 -0
  631. package/app/public/donate/wechat.svg +1 -0
  632. package/app/public/i18n/changelog/en.md +513 -477
  633. package/app/public/i18n/changelog/zh-CN.md +511 -475
  634. package/app/public/i18n/changelog/zh-TW.md +513 -477
  635. package/app/public/i18n/literals/zh-CN.json +2107 -2063
  636. package/app/public/i18n/literals/zh-TW.json +951 -907
  637. package/app/public/providers/alitp-intl.png +0 -0
  638. package/app/public/providers/alitp.png +0 -0
  639. package/app/public/providers/inception.png +0 -0
  640. package/app/src/mitm/server.js +12 -12
  641. package/app/src/shared/services/quotaAutoPing.js +345 -313
  642. package/app/src/sse/services/codebuddyCheckin.js +687 -890
  643. package/app/src/sse/services/minimaxCheckin.js +340 -0
  644. package/package.json +61 -61
  645. package/app/.next-cli-build/server/chunks/3599.js +0 -1
  646. package/app/.next-cli-build/server/chunks/6593.js +0 -1
  647. package/app/.next-cli-build/server/chunks/7070.js +0 -1
  648. package/app/.next-cli-build/server/chunks/7252.js +0 -1
  649. package/app/.next-cli-build/server/chunks/8672.js +0 -1
  650. package/app/.next-cli-build/server/chunks/8972.js +0 -1
  651. package/app/.next-cli-build/server/chunks/939.js +0 -1
  652. package/app/.next-cli-build/static/chunks/1243-acdc1dcbfcd9336d.js +0 -3
  653. package/app/.next-cli-build/static/chunks/1321-f4736e33b06bb9d6.js +0 -1
  654. package/app/.next-cli-build/static/chunks/5497-f54b1274c2141bf0.js +0 -7
  655. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-14745e08d1edafb2.js +0 -1
  656. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-244e20b305c911c6.js +0 -14
  657. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c70550b49f94cbc4.js +0 -1
  658. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-cefb3cbfe469dd51.js +0 -1
  659. package/app/.next-cli-build/static/chunks/app/landing/page-38924391f8649361.js +0 -1
  660. package/app/.next-cli-build/static/css/cd8cdc4426ba0a3b.css +0 -1
  661. /package/app/.next-cli-build/static/{4BxfiRlz5UJXZcUl6uinS → 1q0xTGDYtD52dGw4uiY4-}/_buildManifest.js +0 -0
  662. /package/app/.next-cli-build/static/{4BxfiRlz5UJXZcUl6uinS → 1q0xTGDYtD52dGw4uiY4-}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=539,exports.ids=[539],exports.modules={40539:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>g,calculateCostFromTokens:()=>k,gH:()=>i,getPricingForModel:()=>j});let d=["cline-free/"],e={input:0,output:0,cached:0,reasoning:0,cache_creation:0},f={"claude-opus-4-6":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-opus-4-5-20251101":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25},"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:25,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"claude-opus-4.1":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.5":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-5-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-fable-5":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"gpt-3.5-turbo":{input:.5,output:1.5,cached:.25,reasoning:2.25,cache_creation:.5},"gpt-4":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-5":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5-mini":{input:.25,output:2,cached:.125,reasoning:2,cache_creation:.25},"gpt-5-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1-codex-mini-high":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.2-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},"gpt-5.6":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5},"gpt-5.6-luna":{input:1,output:6,cached:.1,reasoning:6,cache_creation:1},"gpt-5.6-terra":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5},"gpt-5.6-sol":{input:5,output:30,cached:.5,reasoning:30,cache_creation:5},"gpt-6-astra":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"gpt-6.1-sol":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"gpt-6-sol":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-6-luna":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gemini-4-argon":{input:2,output:10},"gemini-3.8-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.375},"gemini-3.5-flash-high":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-pro-agent":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash-agent":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-extra-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15},"qwen3.8-max":{input:2,output:6,cached:.2,reasoning:6,cache_creation:2.5},"qwen3.8-max-0902":{input:2,output:6,cached:.2,reasoning:6,cache_creation:2.5},"qwen3.7-max":{input:2.5,output:7.5,cached:.25,reasoning:7.5,cache_creation:3.13},"qwen3.7-max-2026-05-20":{input:2.5,output:7.5,cached:.25,reasoning:7.5,cache_creation:3.13},"qwen3.7-plus":{input:.4,output:1.6,cached:.04,reasoning:1.6,cache_creation:.5},"qwen3.6-plus":{input:.5,output:3,cached:.05,reasoning:3,cache_creation:.63},"qwen3.5-plus":{input:.4,output:2.4,cached:.04,reasoning:2.4,cache_creation:.5},"qwen-plus":{input:.4,output:1.2,cached:.04,reasoning:4,cache_creation:.5},"qwen3.8-flash":{input:.15,output:.47,cached:.015,reasoning:.47,cache_creation:.19},"qwen3.6-flash":{input:.25,output:1.5,cached:.025,reasoning:1.5,cache_creation:.31},"qwen3.5-flash":{input:.1,output:.4,cached:.01,reasoning:.4,cache_creation:.13},"qwen-flash":{input:.05,output:.4,cached:.005,reasoning:.4,cache_creation:.06},"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"qwen3-coder-flash":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"kimi-k3":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},k3:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},"kimi-k2.7-code":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-k2.7-code-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"kimi-for-coding":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-for-coding-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"kimi-k2.5":{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2},"kimi-k2.5-thinking":{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8},"kimi-k2.6":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"deepseek-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-r1":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6v":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-5":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.8,cache_creation:.3},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.5":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.7":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.6,output:2.4,cached:.3,reasoning:3.6,cache_creation:.6},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"muse-spark-1.3":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.2":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.1":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.3-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},"muse-spark-1.2-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},"mimo-v2.6-pro":{input:.435,output:.87,cached:.0036,reasoning:.87},"mimo-v2.6-pro-claude":{input:.435,output:.87,cached:.0036,reasoning:.87},"mimo-v2.6-flash":{input:.14,output:.28,cached:.0028,reasoning:.28},"mimo-v2.6-pro-ultraspeed":{input:4.35,output:8.7,cached:.036,reasoning:8.7},auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"oswe-vscode-prime":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"coder-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},g={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},"siliconflow-cn":{"deepseek-ai/DeepSeek-V3.2":{input:.56,output:.85,cached:.06,reasoning:.85},"deepseek-ai/DeepSeek-V4-Pro":{input:1.68,output:3.36,cached:.14,reasoning:3.36},"deepseek-ai/DeepSeek-V4-Flash":{input:.21,output:.63,cached:.02,reasoning:.63},"moonshotai/Kimi-K2.6":{input:.91,output:3.78,cached:.15,reasoning:3.78}},tokenrouter:{"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.2},"anthropic/claude-fable-5":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-haiku-4.5":{input:1,output:5,cached:.1,cache_creation:1.25,reasoning:5},"anthropic/claude-opus-4.5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.6":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7-fast":{input:30,output:150,cached:3,reasoning:150},"anthropic/claude-opus-4.8":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.8-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-opus-5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-5-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-sonnet-4":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.5":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.6":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10},"claude-opus-4-8-m-aws":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"deepseek/deepseek-v3.2":{input:.26,output:.38,cached:.13,reasoning:.38},"deepseek/deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-flash-0731":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87},"ex/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"google/gemini-2.5-flash-image":{input:.3,output:2.5,reasoning:2.5},"google/gemini-3-flash-preview":{input:.5,output:3,cached:.05,cache_creation:.08333,reasoning:3},"google/gemini-3-pro-image-preview":{input:2,output:12,reasoning:12},"google/gemini-3.1-flash-image-preview":{input:.5,output:3,reasoning:3},"google/gemini-3.1-flash-lite-image":{input:.25,output:1.5,reasoning:1.5},"google/gemini-3.1-pro-preview":{input:2,output:12,cached:.2,cache_creation:.375,reasoning:12},"google/gemini-3.5-flash":{input:1.5,output:9,cached:.15,cache_creation:.08333,reasoning:9},"google/gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,cache_creation:.08333,reasoning:2.5},"google/gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,cache_creation:.08333,reasoning:7.5},"google/gemini-embedding-2":{input:1,output:6,cached:.1,reasoning:6},"google/gemma-4-26b-a4b-it":{input:.06,output:.33,reasoning:.33},"kling-3.0-turbo":{input:2.1,output:2.1,reasoning:2.1},"microsoft/mai-image-2.5":{input:5,output:47,reasoning:47},"minimax/minimax-m2-her":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"minimax/minimax-m2.5":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.7":{input:.3,output:1.2,cached:.06,reasoning:1.2},"minimax/minimax-m2.7-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"miromind/mirothinker-1-7-deepresearch":{input:4,output:25,reasoning:25},"miromind/mirothinker-1-7-deepresearch-mini":{input:1.25,output:10,reasoning:10},"mistralai/devstral-2512":{input:.4,output:2,cached:.04,reasoning:2},"mistralai/mistral-medium-3-5":{input:1.5,output:7.5,reasoning:7.5},"mistralai/mistral-small-2603":{input:.15,output:.6,cached:.015,reasoning:.6},"mistralai/voxtral-small-24b-2507":{input:.1,output:.3,cached:.01,reasoning:.3},"moonshotai/kimi-k2.5":{input:.6,output:3,cached:.1,reasoning:3},"moonshotai/kimi-k2.6":{input:.95,output:4,cached:.16,reasoning:4},"moonshotai/kimi-k2.7-code":{input:.9286,output:3.8571,cached:.1857,reasoning:3.8571},"moonshotai/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"nvidia/nemotron-3-super-120b-a12b":{input:.3,output:.9,cached:.1,reasoning:.9},"openai/gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.6},"openai/gpt-5":{input:1.25,output:10,cached:.125,reasoning:10},"openai/gpt-5-image":{input:10,output:40,cached:2.5,reasoning:40},"openai/gpt-5-image-mini":{input:2.5,output:8,cached:.25,reasoning:8},"openai/gpt-5-mini":{input:.25,output:2,cached:.025,reasoning:2},"openai/gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"openai/gpt-5.4-image-2":{input:8,output:30,cached:2,reasoning:30},"openai/gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5},"openai/gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25},"openai/gpt-5.4-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.5":{input:5,output:30,cached:.5,reasoning:30},"openai/gpt-5.5-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.6-luna":{input:.2,output:1.2,cached:.02,cache_creation:.25,reasoning:1.2},"openai/gpt-5.6-sol":{input:5,output:30,cached:.5,cache_creation:6.25,reasoning:30},"openai/gpt-5.6-terra":{input:2,output:12,cached:.2,cache_creation:2.5,reasoning:12},"openai/gpt-audio":{input:2.5,output:10,reasoning:10},"openai/gpt-audio-mini":{input:.6,output:2.4,reasoning:2.4},"openai/gpt-oss-120b":{input:.039,output:.18,reasoning:.18},"qwen/qwen3-coder-next":{input:.12,output:.75,cached:.06,reasoning:.75},"qwen/qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen/qwen3.5-35b-a3b":{input:.1625,output:1.3,reasoning:1.3},"qwen/qwen3.5-397b-a17b":{input:.39,output:2.34,reasoning:2.34},"qwen/qwen3.5-9b":{input:.1,output:.15,reasoning:.15},"qwen/qwen3.5-flash":{input:.1048,output:.4194,reasoning:.4194},"qwen/qwen3.5-plus-02-15":{input:.26,output:1.56,reasoning:1.56},"qwen/qwen3.6-plus":{input:.54,output:3.21,reasoning:3.21},"qwen/qwen3.7-max":{input:1.25,output:3.75,cached:.25,reasoning:3.75},"qwen/qwen3.7-plus":{input:.4,output:1.6,cached:.08,reasoning:1.6},"qwen/qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.5-omni-plus":{input:1,output:5.7143,reasoning:5.7143},"qwen3.6-flash":{input:.171,output:1.029,cached:.017,cache_creation:.214,reasoning:1.029},"sakana/fugu-ultra":{input:5,output:30,cached:.5,reasoning:30},"seed-2-0-code-preview-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"seed-2-0-lite-260428":{input:.5,output:4,cached:.1,cache_creation:.008333,reasoning:4},"seed-2-0-mini-260428":{input:.2,output:.8,cached:.04,cache_creation:.00833,reasoning:.8},"seed-2-0-pro-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"stepfun/step-3.5-flash":{input:.1,output:.3,cached:.02,reasoning:.3},"stepfun/step-3.7-flash":{input:.2,output:1.15,cached:.04,reasoning:1.15},"tencent/hy3-preview":{input:.066,output:.26,cached:.029,reasoning:.26},"tencent/hy4-preview":{input:.834,output:2.501,cached:.042,reasoning:2.501},"x-ai/grok-4.1-fast":{input:.2,output:.5,cached:.05,reasoning:.5},"x-ai/grok-4.20-beta":{input:2,output:6,cached:.2,reasoning:6},"x-ai/grok-4.3":{input:1.25,output:2.5,cached:.2,reasoning:2.5},"x-ai/grok-4.5":{input:2,output:6,cached:.5,reasoning:6},"x-ai/grok-build-0.1":{input:1,output:2,cached:.2,reasoning:2},"xiaomi/mimo-v2-flash":{input:.1,output:.3,cached:.01,reasoning:.3},"xiaomi/mimo-v2-omni":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2-pro":{input:1,output:3,cached:.2,reasoning:3},"xiaomi/mimo-v2.5":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2.5-pro":{input:1,output:3,cached:.2,reasoning:3},"z-ai/glm-4.5-air":{input:.13,output:.85,cached:.025,reasoning:.85},"z-ai/glm-4.6":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-4.6v":{input:.3,output:.9,reasoning:.9},"z-ai/glm-4.7":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-5":{input:1,output:3.2,cached:.2,reasoning:3.2},"z-ai/glm-5-turbo":{input:1.2,output:4,cached:.24,reasoning:4},"z-ai/glm-5.1":{input:1.05,output:3.5,cached:.525,reasoning:3.5},"z-ai/glm-5.2":{input:1.4,output:4.4,cached:.26,reasoning:4.4}}},h=[{pattern:"*-codex-xhigh",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"*-codex-high",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-max",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-mini-*",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-mini",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-low",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-none",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"claude-opus-*",pricing:{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25}},{pattern:"claude-sonnet-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"claude-haiku-*",pricing:{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25}},{pattern:"claude-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"gemini-*-flash-lite",pricing:{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},{pattern:"gemini-*-flash",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*-pro",pricing:{input:2,output:12,cached:.25,reasoning:18,cache_creation:2}},{pattern:"gemini-3-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gemini-2.5-*",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gpt-5.6-*",pricing:{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-5.3-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.2-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.1-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-4o-*",pricing:{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15}},{pattern:"gpt-4o",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-4*",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"o1-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"o1",pricing:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15}},{pattern:"o3-*",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"o4-*",pricing:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},{pattern:"qwen3-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"kimi-*-thinking",pricing:{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8}},{pattern:"kimi-k3*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3}},{pattern:"kimi-k2*",pricing:{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2}},{pattern:"kimi-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"deepseek-*reasoner*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-r*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-v*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"glm-5*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"glm-4*",pricing:{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},{pattern:"glm-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"MiniMax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"minimax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-code-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}}];function i(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}function j(a,b){if(!b)return null;if(a&&g[a]?.[b])return g[a][b];if(function(a){if(!a)return!1;let b=String(a).toLowerCase();return d.some(a=>b.startsWith(a))}(b))return e;let c=b.includes("/")?b.split("/").pop():b;if(f[c])return f[c];if(f[b])return f[b];for(let{pattern:a,pricing:d}of h)if(i(a,c)||i(a,b))return d;return null}function k(a,b){if(!a||!b)return 0;let c=0,d=a.prompt_tokens||a.input_tokens||0,e=a.cached_tokens||a.cache_read_input_tokens||0,f=a.cache_creation_input_tokens||0;c+=Math.max(0,d-e-f)*(b.input/1e6),e>0&&(c+=e*((b.cached||b.input)/1e6)),c+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let g=a.reasoning_tokens||0;return g>0&&(c+=g*((b.reasoning||b.output)/1e6)),f>0&&(c+=f*((b.cache_creation||b.input)/1e6)),c}}};
1
+ "use strict";exports.id=539,exports.ids=[539],exports.modules={40539:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>g,calculateCostFromTokens:()=>k,gH:()=>i,getPricingForModel:()=>j});let d=["cline-free/"],e={input:0,output:0,cached:0,reasoning:0,cache_creation:0},f={"claude-opus-5-5":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-thinking":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-high":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-medium":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-low":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-4-6":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-opus-4-5-20251101":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-sonnet-5-5":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-thinking":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-high":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-medium":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-low":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25},"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:25,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"claude-opus-4.1":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.5":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-5-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-fable-5":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"gpt-3.5-turbo":{input:.5,output:1.5,cached:.25,reasoning:2.25,cache_creation:.5},"gpt-4":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-5":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5-mini":{input:.25,output:2,cached:.125,reasoning:2,cache_creation:.25},"gpt-5-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1-codex-mini-high":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.2-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},"gpt-5.6":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5},"gpt-5.6-luna":{input:1,output:6,cached:.1,reasoning:6,cache_creation:1},"gpt-5.6-terra":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5},"gpt-5.6-sol":{input:5,output:30,cached:.5,reasoning:30,cache_creation:5},"gpt-6-astra":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"gpt-6.1-sol":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"gpt-6-sol":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-6-luna":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gemini-4-argon":{input:2,output:10},"gemini-3.8-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.375},"gemini-3.5-flash-high":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-pro-agent":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash-agent":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-extra-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15},"qwen3.8-max":{input:2,output:6,cached:.2,reasoning:6,cache_creation:2.5},"qwen3.8-max-0902":{input:2,output:6,cached:.2,reasoning:6,cache_creation:2.5},"qwen3.7-max":{input:2.5,output:7.5,cached:.25,reasoning:7.5,cache_creation:3.13},"qwen3.7-max-2026-05-20":{input:2.5,output:7.5,cached:.25,reasoning:7.5,cache_creation:3.13},"qwen3.7-plus":{input:.4,output:1.6,cached:.04,reasoning:1.6,cache_creation:.5},"qwen3.6-plus":{input:.5,output:3,cached:.05,reasoning:3,cache_creation:.63},"qwen3.5-plus":{input:.4,output:2.4,cached:.04,reasoning:2.4,cache_creation:.5},"qwen-plus":{input:.4,output:1.2,cached:.04,reasoning:4,cache_creation:.5},"qwen3.8-flash":{input:.15,output:.47,cached:.015,reasoning:.47,cache_creation:.19},"qwen3.6-flash":{input:.25,output:1.5,cached:.025,reasoning:1.5,cache_creation:.31},"qwen3.5-flash":{input:.1,output:.4,cached:.01,reasoning:.4,cache_creation:.13},"qwen-flash":{input:.05,output:.4,cached:.005,reasoning:.4,cache_creation:.06},"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"qwen3-coder-flash":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"kimi-k3":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},k3:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},"kimi-k2.7-code":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-k2.7-code-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"kimi-for-coding":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-for-coding-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"kimi-k2.5":{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2},"kimi-k2.5-thinking":{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8},"kimi-k2.6":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"deepseek-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-r1":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435},"deepseek-flash":{input:.15,output:.6,cached:.003,reasoning:.6,cache_creation:.15},"deepseek-v4-flash-vision-exp":{input:.15,output:.6,cached:.003,reasoning:.6,cache_creation:.15},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6v":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-5":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"MiniMax-M3.1-Flash":{input:.15,output:.6,cached:.015,reasoning:.9,cache_creation:.15},"minimax-m3.1-flash":{input:.15,output:.6,cached:.015,reasoning:.9,cache_creation:.15},"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.8,cache_creation:.3},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.5":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.7":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.6,output:2.4,cached:.3,reasoning:3.6,cache_creation:.6},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"muse-spark-1.3":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.2":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.1":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.3-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},"muse-spark-1.2-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},"mimo-v2.6-pro":{input:.435,output:.87,cached:.0036,reasoning:.87},"mimo-v2.6-pro-claude":{input:.435,output:.87,cached:.0036,reasoning:.87},"mimo-v2.6-flash":{input:.14,output:.28,cached:.0028,reasoning:.28},"mimo-v2.6-pro-ultraspeed":{input:4.35,output:8.7,cached:.036,reasoning:8.7},auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"oswe-vscode-prime":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"coder-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},g={deepseek:{"deepseek-v4-flash":{input:.15,output:.6,cached:.003,reasoning:.6},"deepseek-v4-pro":{input:.66,output:1.98,cached:.022,reasoning:1.98},"deepseek-chat":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28}},gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},"siliconflow-cn":{"deepseek-ai/DeepSeek-V3.2":{input:.56,output:.85,cached:.06,reasoning:.85},"deepseek-ai/DeepSeek-V4-Pro":{input:1.68,output:3.36,cached:.14,reasoning:3.36},"deepseek-ai/DeepSeek-V4-Flash":{input:.21,output:.63,cached:.02,reasoning:.63},"moonshotai/Kimi-K2.6":{input:.91,output:3.78,cached:.15,reasoning:3.78}},inception:{"mercury-3":{input:.1,output:.35,cached:.01,reasoning:.35},"mercury-2.5":{input:.2,output:.75,cached:.02,reasoning:.75}},tokenrouter:{"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.2},"anthropic/claude-fable-5":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-haiku-4.5":{input:1,output:5,cached:.1,cache_creation:1.25,reasoning:5},"anthropic/claude-opus-4.5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.6":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7-fast":{input:30,output:150,cached:3,reasoning:150},"anthropic/claude-opus-4.8":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.8-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-opus-5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-5-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-sonnet-4":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.5":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.6":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10},"claude-opus-4-8-m-aws":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"deepseek/deepseek-v3.2":{input:.26,output:.38,cached:.13,reasoning:.38},"deepseek/deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-flash-0731":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87},"ex/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"google/gemini-2.5-flash-image":{input:.3,output:2.5,reasoning:2.5},"google/gemini-3-flash-preview":{input:.5,output:3,cached:.05,cache_creation:.08333,reasoning:3},"google/gemini-3-pro-image-preview":{input:2,output:12,reasoning:12},"google/gemini-3.1-flash-image-preview":{input:.5,output:3,reasoning:3},"google/gemini-3.1-flash-lite-image":{input:.25,output:1.5,reasoning:1.5},"google/gemini-3.1-pro-preview":{input:2,output:12,cached:.2,cache_creation:.375,reasoning:12},"google/gemini-3.5-flash":{input:1.5,output:9,cached:.15,cache_creation:.08333,reasoning:9},"google/gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,cache_creation:.08333,reasoning:2.5},"google/gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,cache_creation:.08333,reasoning:7.5},"google/gemini-embedding-2":{input:1,output:6,cached:.1,reasoning:6},"google/gemma-4-26b-a4b-it":{input:.06,output:.33,reasoning:.33},"kling-3.0-turbo":{input:2.1,output:2.1,reasoning:2.1},"microsoft/mai-image-2.5":{input:5,output:47,reasoning:47},"minimax/minimax-m2-her":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"minimax/minimax-m2.5":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.7":{input:.3,output:1.2,cached:.06,reasoning:1.2},"minimax/minimax-m2.7-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"minimax/minimax-m3.1-flash":{input:.15,output:.6,cached:.015,reasoning:.6},"minimax/minimax-m3.1-flash:free":{input:.15,output:.6,cached:.015,reasoning:.6},"miromind/mirothinker-1-7-deepresearch":{input:4,output:25,reasoning:25},"miromind/mirothinker-1-7-deepresearch-mini":{input:1.25,output:10,reasoning:10},"mistralai/devstral-2512":{input:.4,output:2,cached:.04,reasoning:2},"mistralai/mistral-medium-3-5":{input:1.5,output:7.5,reasoning:7.5},"mistralai/mistral-small-2603":{input:.15,output:.6,cached:.015,reasoning:.6},"mistralai/voxtral-small-24b-2507":{input:.1,output:.3,cached:.01,reasoning:.3},"moonshotai/kimi-k2.5":{input:.6,output:3,cached:.1,reasoning:3},"moonshotai/kimi-k2.6":{input:.95,output:4,cached:.16,reasoning:4},"moonshotai/kimi-k2.7-code":{input:.9286,output:3.8571,cached:.1857,reasoning:3.8571},"moonshotai/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"nvidia/nemotron-3-super-120b-a12b":{input:.3,output:.9,cached:.1,reasoning:.9},"openai/gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.6},"openai/gpt-5":{input:1.25,output:10,cached:.125,reasoning:10},"openai/gpt-5-image":{input:10,output:40,cached:2.5,reasoning:40},"openai/gpt-5-image-mini":{input:2.5,output:8,cached:.25,reasoning:8},"openai/gpt-5-mini":{input:.25,output:2,cached:.025,reasoning:2},"openai/gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"openai/gpt-5.4-image-2":{input:8,output:30,cached:2,reasoning:30},"openai/gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5},"openai/gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25},"openai/gpt-5.4-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.5":{input:5,output:30,cached:.5,reasoning:30},"openai/gpt-5.5-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.6-luna":{input:.2,output:1.2,cached:.02,cache_creation:.25,reasoning:1.2},"openai/gpt-5.6-sol":{input:5,output:30,cached:.5,cache_creation:6.25,reasoning:30},"openai/gpt-5.6-terra":{input:2,output:12,cached:.2,cache_creation:2.5,reasoning:12},"openai/gpt-audio":{input:2.5,output:10,reasoning:10},"openai/gpt-audio-mini":{input:.6,output:2.4,reasoning:2.4},"openai/gpt-oss-120b":{input:.039,output:.18,reasoning:.18},"qwen/qwen3-coder-next":{input:.12,output:.75,cached:.06,reasoning:.75},"qwen/qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen/qwen3.5-35b-a3b":{input:.1625,output:1.3,reasoning:1.3},"qwen/qwen3.5-397b-a17b":{input:.39,output:2.34,reasoning:2.34},"qwen/qwen3.5-9b":{input:.1,output:.15,reasoning:.15},"qwen/qwen3.5-flash":{input:.1048,output:.4194,reasoning:.4194},"qwen/qwen3.5-plus-02-15":{input:.26,output:1.56,reasoning:1.56},"qwen/qwen3.6-plus":{input:.54,output:3.21,reasoning:3.21},"qwen/qwen3.7-max":{input:1.25,output:3.75,cached:.25,reasoning:3.75},"qwen/qwen3.7-plus":{input:.4,output:1.6,cached:.08,reasoning:1.6},"qwen/qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.5-omni-plus":{input:1,output:5.7143,reasoning:5.7143},"qwen3.6-flash":{input:.171,output:1.029,cached:.017,cache_creation:.214,reasoning:1.029},"sakana/fugu-ultra":{input:5,output:30,cached:.5,reasoning:30},"seed-2-0-code-preview-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"seed-2-0-lite-260428":{input:.5,output:4,cached:.1,cache_creation:.008333,reasoning:4},"seed-2-0-mini-260428":{input:.2,output:.8,cached:.04,cache_creation:.00833,reasoning:.8},"seed-2-0-pro-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"stepfun/step-3.5-flash":{input:.1,output:.3,cached:.02,reasoning:.3},"stepfun/step-3.7-flash":{input:.2,output:1.15,cached:.04,reasoning:1.15},"tencent/hy3-preview":{input:.066,output:.26,cached:.029,reasoning:.26},"tencent/hy4-preview":{input:.834,output:2.501,cached:.042,reasoning:2.501},"x-ai/grok-4.1-fast":{input:.2,output:.5,cached:.05,reasoning:.5},"x-ai/grok-4.20-beta":{input:2,output:6,cached:.2,reasoning:6},"x-ai/grok-4.3":{input:1.25,output:2.5,cached:.2,reasoning:2.5},"x-ai/grok-4.5":{input:2,output:6,cached:.5,reasoning:6},"x-ai/grok-build-0.1":{input:1,output:2,cached:.2,reasoning:2},"xiaomi/mimo-v2-flash":{input:.1,output:.3,cached:.01,reasoning:.3},"xiaomi/mimo-v2-omni":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2-pro":{input:1,output:3,cached:.2,reasoning:3},"xiaomi/mimo-v2.5":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2.5-pro":{input:1,output:3,cached:.2,reasoning:3},"z-ai/glm-4.5-air":{input:.13,output:.85,cached:.025,reasoning:.85},"z-ai/glm-4.6":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-4.6v":{input:.3,output:.9,reasoning:.9},"z-ai/glm-4.7":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-5":{input:1,output:3.2,cached:.2,reasoning:3.2},"z-ai/glm-5-turbo":{input:1.2,output:4,cached:.24,reasoning:4},"z-ai/glm-5.1":{input:1.05,output:3.5,cached:.525,reasoning:3.5},"z-ai/glm-5.2":{input:1.4,output:4.4,cached:.26,reasoning:4.4}},cohere:{"command-a-03-2025":{input:2.5,output:10,reasoning:10},"command-r-plus-08-2024":{input:2.5,output:10,reasoning:10},"command-r-08-2024":{input:.15,output:.6,reasoning:.6}},groq:{"llama-3.3-70b-versatile":{input:.59,output:.79,reasoning:.79},"openai/gpt-oss-120b":{input:.15,output:.6,cached:.075,reasoning:.6}},mistral:{"mistral-large-latest":{input:.5,output:1.5,cached:.05,reasoning:1.5},"codestral-latest":{input:.3,output:.9,cached:.03,reasoning:.9},"mistral-medium-latest":{input:1.5,output:7.5,cached:.15,reasoning:7.5}},morph:{"morph-v3-large":{input:.9,output:1.9,reasoning:1.9},"morph-v3-fast":{input:.8,output:1.2,reasoning:1.2}},perplexity:{sonar:{input:1,output:1,reasoning:1},"sonar-pro":{input:3,output:15,reasoning:15}},"perplexity-agent":{"perplexity/sonar":{input:.25,output:2.5,cached:.0625,reasoning:2.5},"nvidia/nemotron-3-super-120b-a12b":{input:.25,output:2.5,reasoning:2.5}},siliconflow:{"openai/gpt-oss-120b":{input:.05,output:.45,reasoning:.45},"inclusionAI/Ling-flash-2.0":{input:.14,output:.57,reasoning:.57}},stepfun:{"step-5-preview":{input:.959,output:2.741,cached:.048,reasoning:2.741},"step-3.7-flash":{input:.185,output:1.11,cached:.037,reasoning:1.11},"step-3.5-flash":{input:.1,output:.3,cached:.02,reasoning:.3},"step-3.5-flash-2603":{input:.1,output:.3,cached:.02,reasoning:.3}},"stepfun-cn":{"step-5-preview":{input:1,output:2.7,cached:.05,reasoning:2.7},"step-3.7-flash":{input:.185,output:1.11,cached:.037,reasoning:1.11},"step-3.5-flash":{input:.1,output:.3,cached:.02,reasoning:.3},"step-3.5-flash-2603":{input:.1,output:.3,cached:.02,reasoning:.3}},venice:{"venice-uncensored-1-2":{input:.2,output:.9,reasoning:.9},"zai-org-glm-5":{input:1,output:3.2,cached:.2,reasoning:3.2},"llama-3.3-70b":{input:.7,output:2.8,reasoning:2.8},"hermes-3-llama-3.1-405b":{input:1.1,output:3,reasoning:3},"mistral-small-3-2-24b-instruct":{input:.09375,output:.25,reasoning:.25}},cerebras:{"gpt-oss-120b":{input:.35,output:.75,reasoning:.75}},openai:{o3:{input:2,output:8,cached:.5,reasoning:8}},longcat:{"LongCat-2.0":{input:.75,output:2.95,cached:.015,reasoning:2.95},"LongCat-2.5-Preview":{input:.75,output:2.95,cached:.015,reasoning:2.95}},"longcat-intl":{"LongCat-2.0":{input:.75,output:2.95,cached:.015,reasoning:2.95},"LongCat-2.5-Preview":{input:.75,output:2.95,cached:.015,reasoning:2.95}}},h=[{pattern:"*-codex-xhigh",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"*-codex-high",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-max",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-mini-*",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-mini",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-low",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-none",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"claude-opus-*",pricing:{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25}},{pattern:"claude-sonnet-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"claude-haiku-*",pricing:{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25}},{pattern:"claude-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"gemini-*-flash-lite",pricing:{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},{pattern:"gemini-*-flash",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*-pro",pricing:{input:2,output:12,cached:.25,reasoning:18,cache_creation:2}},{pattern:"gemini-3-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gemini-2.5-*",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gpt-5.6-*",pricing:{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-5.3-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.2-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.1-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-4o-*",pricing:{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15}},{pattern:"gpt-4o",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-4*",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"o1-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"o1",pricing:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15}},{pattern:"o3-*",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"o4-*",pricing:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},{pattern:"qwen3-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"kimi-*-thinking",pricing:{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8}},{pattern:"kimi-k3*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3}},{pattern:"kimi-k2*",pricing:{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2}},{pattern:"kimi-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"deepseek-*reasoner*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-r*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-v*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"glm-5*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"glm-4*",pricing:{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},{pattern:"glm-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"MiniMax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"minimax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-code-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}}];function i(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}function j(a,b){if(!b)return null;if(a&&g[a]?.[b])return g[a][b];if(function(a){if(!a)return!1;let b=String(a).toLowerCase();return d.some(a=>b.startsWith(a))}(b))return e;let c=b.includes("/")?b.split("/").pop():b;if(f[c])return f[c];if(f[b])return f[b];for(let{pattern:a,pricing:d}of h)if(i(a,c)||i(a,b))return d;return null}function k(a,b){if(!a||!b)return 0;let c=0,d=a.prompt_tokens||a.input_tokens||0,e=a.cached_tokens||a.cache_read_input_tokens||0,f=a.cache_creation_input_tokens||0;c+=Math.max(0,d-e-f)*(b.input/1e6),e>0&&(c+=e*((b.cached||b.input)/1e6)),c+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let g=a.reasoning_tokens||0;return g>0&&(c+=g*((b.reasoning||b.output)/1e6)),f>0&&(c+=f*((b.cache_creation||b.input)/1e6)),c}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=5598,exports.ids=[3217,5598],exports.modules={5598:(a,b,c)=>{c.r(b),c.d(b,{checkinOneMinimax:()=>s,isEligibleMinimaxConnection:()=>q,msUntilNextTick:()=>j,runMinimaxCheckinTick:()=>t,startMinimaxCheckin:()=>w,stopMinimaxCheckin:()=>x});var d=c(7803),e=c(44725);let f=new Set(["minimax-code","minimax-code-global"]),g=!1,h=null,i=null;function j(a=Date.now(),b=Math.random){return Math.max(72e5+Math.floor(6e5*b()),1e3)}async function k(){try{let{getSettings:a}=await Promise.resolve().then(c.bind(c,89718));return await a()||{}}catch{return{}}}async function l(){if(i)return i;let a=await k(),b=a?.minimaxDailyDone;return i=b&&"object"==typeof b&&!Array.isArray(b)?{...b}:{}}function m(a=Date.now()){let b=new Date(a),c=a=>String(a).padStart(2,"0");return`${b.getFullYear()}-${c(b.getMonth()+1)}-${c(b.getDate())}`}function n(a){let b="minimax-code-global"===a.provider?"MiniMax Global":"MiniMax Code",c=a.name||a.displayName||a.email||`${String(a.id||"?").slice(0,8)}…`;return`${b}: ${c}`}function o(a){let b=Math.max(0,Math.round(a/1e3));if(b<60)return`${b}s`;let c=Math.round(b/60);return c<60?`${c}m`:`${Math.floor(c/60)}h${String(c%60).padStart(2,"0")}m`}async function p(){if(!i)return;let a=m(),b={};for(let[c,d]of Object.entries(i))d===a&&(b[c]=d);try{let{updateSettings:a}=await Promise.resolve().then(c.bind(c,89718));for(let c of(await a({minimaxDailyDone:b}),Object.keys(i)))delete i[c];Object.assign(i,b)}catch(a){d.warn("MINIMAX_CHECKIN",`Persist daily-done map failed: ${a?.message??String(a)}`)}}function q(a){if(!a||!1===a.isActive||!f.has(a.provider))return!1;let b=a.accessToken;return"string"==typeof b&&b.trim().length>0}function r(a,b,c){let d="minimax-code-global"===a.provider?{agent:"https://agent.minimax.io",lang:"en"}:{agent:"https://agent.minimax.cn",lang:"zh"};return(0,e.zP)(d,b,{access:a.accessToken,userID:a.providerSpecificData?.realUserID,body:c})}async function s(a,b={}){let c=b.fetch||fetch,d=a.accessToken,e={connectionId:a.id,account:a.name||a.email||a.id,provider:a.provider};if(!d)return{...e,status:"failed",error:"Token unavailable"};try{let{url:b,init:d}=r(a,"/minimax-cloud/api/v1/signin/status"),f=await c(b,{...d,signal:AbortSignal.timeout(15e3)});if(401===f.status||403===f.status)return{...e,status:"failed",error:`Authentication failed (${f.status})`};if(!f.ok)return{...e,status:"failed",error:`Status check failed: HTTP ${f.status}`};let g=await f.json().catch(()=>null),h=g?.base_resp;if(!g||h&&0!==h.status_code)return{...e,status:"failed",error:`Status check error: ${h?.status_msg||"unknown"}`};let i=(g?.data?.days||[]).find(a=>a.is_today);if(i&&3===i.status)return{...e,status:"already",message:`今日第 ${i.day_no||1} 天已签到(+${(i.points||0)+(i.bonus_points||0)} 积分)`,claimedAmount:0};let{url:j,init:k}=r(a,"/minimax-cloud/api/v1/signin/claim",{}),l=await c(j,{...k,signal:AbortSignal.timeout(15e3)});if(401===l.status||403===l.status)return{...e,status:"failed",error:`Authentication failed (${l.status})`};if(!l.ok)return{...e,status:"failed",error:`Claim failed: HTTP ${l.status}`};let m=await l.json().catch(()=>null),n=m?.base_resp;if(!m||n&&0!==n.status_code)return{...e,status:"failed",error:`Claim error: ${n?.status_msg||"unknown"}`};let o=m.data||{},p=Number(o.points)||(i?.points||0)+(i?.bonus_points||0);if(2===o.claim_result)return{...e,status:"already",message:`今日已领取(+${p} 积分)`,claimedAmount:0};return{...e,status:"checked-in",message:`签到成功第 ${o.day_no||1} 天(+${p} 积分)`,claimedAmount:p}}catch(a){return{...e,status:"failed",error:a?.message||"Network error"}}}async function t(a={}){let{getProviderConnections:b}=await Promise.resolve().then(c.bind(c,89718)),e=(await b()).filter(b=>q(b)&&(!a.provider||b.provider===a.provider));if(0===e.length)return d.debug("MINIMAX_CHECKIN","Tick: no eligible MiniMax connections"),[];d.debug("MINIMAX_CHECKIN",`领取轮次开始:${e.map(a=>n(a)).join("、")}`);let f=a.doneMap||await l(),g=m(a.nowMs),h=[];for(let b of e)try{if(a.skipIfCheckedToday&&f[b.id]===g){d.debug("MINIMAX_CHECKIN",`${n(b)}:今日已确认完成,跳过`),h.push({connectionId:b.id,account:b.name||b.email||b.id,provider:b.provider,status:"already",memoized:!0});continue}let c=a.checkinConnection||s,e=await c(b,{...a,doneMap:f});h.push(e),"checked-in"===e.status?(f[b.id]=g,d.info("MINIMAX_CHECKIN",`${n(b)} 签到成功 +${e.claimedAmount} 积分`)):"already"===e.status?(f[b.id]=g,d.debug("MINIMAX_CHECKIN",`${n(b)}:${e.message||"今日已签"}`)):d.warn("MINIMAX_CHECKIN",`${n(b)} 签到失败:${e.error||e.status}`)}catch(a){h.push({connectionId:b.id,account:b.name||b.id,provider:b.provider,status:"failed",error:a?.message||String(a)}),d.warn("MINIMAX_CHECKIN",`${n(b)} 签到异常:${a?.message||a}`)}let i=h.filter(a=>"checked-in"===a.status),j=h.filter(a=>"failed"===a.status),k=h.length-i.length-j.length,o=i.reduce((a,b)=>a+(b.claimedAmount||0),0),r=`签到汇总:成功 ${i.length}(+${o} 积分)、已签 ${k}、失败 ${j.length}`;return i.length>0||j.length>0?d.info("MINIMAX_CHECKIN",r):d.debug("MINIMAX_CHECKIN",r),await p(),h}async function u(a){try{let b=await k();if(!0!==b.minimaxCheckin)return void d.debug("MINIMAX_CHECKIN",`Scheduled ${a}: setting off, skipping`);let c=await l();await t({skipIfCheckedToday:!0,doneMap:c}),await p()}catch(b){d.warn("MINIMAX_CHECKIN",`定时签到(${a})失败:${b?.message??String(b)}`)}}function v(){h&&(clearTimeout(h),h=null)}function w(a={}){let b;if(g)return!1;if("phase-production-build"===(b=process.env.NEXT_PHASE||"")||"phase-export"===b||"phase-static"===b)return d.debug("MINIMAX_CHECKIN","Skip start outside long-running server runtime"),!1;g=!0,!0!==a.skipBoot&&u("boot");let c=function a(){if(!g)return 0;let b=j();return v(),(h=setTimeout(()=>{u("tick").finally(()=>a())},b))&&"function"==typeof h.unref&&h.unref(),d.debug("MINIMAX_CHECKIN",`下次签到约 ${o(b)} 后`),b}();return d.info("MINIMAX_CHECKIN",`每日签到调度已启动(全天轮询)— 下次约 ${o(c)} 后`),!0}function x(){v(),g&&(g=!1,d.info("MINIMAX_CHECKIN","Scheduler stopped"))}},7803:(a,b,c)=>{c.r(b),c.d(b,{debug:()=>o,error:()=>r,errorLine:()=>l,fmtThink:()=>m,info:()=>p,line:()=>k,maskKey:()=>v,nextTag:()=>i,request:()=>s,response:()=>t,stream:()=>u,tagForSession:()=>j,warn:()=>q});let d={DEBUG:0,INFO:1,WARN:2,ERROR:3},e=d[process.env.LOG_LEVEL?.toUpperCase?.()]??d.INFO;function f(){return new Date().toLocaleTimeString("en-US",{hour12:!1})}let g=["\uD83D\uDFE2","\uD83D\uDD35","\uD83D\uDFE3","\uD83D\uDFE1","\uD83D\uDFE0","\uD83D\uDD34","⚪","\uD83D\uDFE4"],h=0;function i(){let a=g[h%g.length];return h++,a}function j(a){if(!a)return i();let b=0;for(let c=0;c<a.length;c++)b=31*b+a.charCodeAt(c)|0;return g[Math.abs(b)%g.length]}function k(a,b,c){e>d.INFO||console.log(`[${f()}] ${a} ${b} ${c}`)}function l(a,b,c){console.log(`[${f()}] ${a} ${b} ${c}`)}function m(a){return a&&a.mode?"none"===a.mode?"off":"auto"===a.mode?"auto":"budget"===a.mode?a.budget>=1e3?`${Math.round(a.budget/1e3)}k`:`${a.budget}`:"level"===a.mode?a.level:null:null}function n(a){if(!a)return"";if("string"==typeof a)return a;try{return JSON.stringify(a)}catch{return String(a)}}function o(a,b,c){if(e<=d.DEBUG){let d=c?` ${n(c)}`:"";console.log(`[${f()}] 🔍 [${a}] ${b}${d}`)}}function p(a,b,c){if(e<=d.INFO){let d=c?` ${n(c)}`:"";console.log(`[${f()}] ℹ️ [${a}] ${b}${d}`)}}function q(a,b,c){if(e<=d.WARN){let d=c?` ${n(c)}`:"";console.warn(`[${f()}] ⚠️ [${a}] ${b}${d}`)}}function r(a,b,c){if(e<=d.ERROR){let d=c?` ${n(c)}`:"";console.log(`[${f()}] ❌ [${a}] ${b}${d}`)}}function s(a,b,c){let d=c?` ${n(c)}`:"";console.log(`\x1b[36m[${f()}] 📥 ${a} ${b}${d}\x1b[0m`)}function t(a,b,c){let d=c?` ${n(c)}`:"";console.log(`[${f()}] ${a<400?"\uD83D\uDCE4":"\uD83D\uDCA5"} ${a} (${b}ms)${d}`)}function u(a,b){let c=b?` ${n(b)}`:"";console.log(`[${f()}] 🌊 [STREAM] ${a}${c}`)}function v(a){return!a||a.length<8?"***":`${a.slice(0,4)}...${a.slice(-4)}`}},39609:(a,b,c)=>{c.d(b,{proxyAwareFetch:()=>r});var d=c(27910),e=c(41004);let f=globalThis.fetch,g=new Map;function h(a,b){let c=e.v1.directFallbackTimeoutMs;if(b?.signal)return f(a,b);let d=new AbortController,g=setTimeout(()=>d.abort(Error(`fetch connect timeout (${c}ms)`)),c);return f(a,{...b,signal:d.signal}).finally(()=>clearTimeout(g))}let i=new Map,j=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],k=["8.8.8.8","8.8.4.4"];function l(a){return null==a?"":String(a).trim()}async function m(a){let b=i.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,23)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,23)),f=new b.Resolver;f.setServers(k);let g=d(f.resolve4.bind(f)),h=await g(a);return i.set(a,{ip:h[0],expiry:Date.now()+e.v1.dnsCacheTtlMs}),h[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function n(a,b){let c,d=l(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function o(a){let b=l(a);return b?/^[a-z][a-z0-9+.-]*:\/\//i.test(b)?b:`http://${b}`:null}async function p(a){let b=o(a);if(!b)return null;if(!g.has(b)){g.size>=e.v1.proxyDispatchersMaxSize&&g.delete(g.keys().next().value);let{ProxyAgent:a}=await c.e(7774).then(c.t.bind(c,47774,19));g.set(b,new a({uri:b}))}return g.get(b)}async function q(a,b,f){let g=await Promise.resolve().then(c.t.bind(c,55591,23)),h=await Promise.resolve().then(c.t.bind(c,91645,23)),i=g.default??g,j=h.default??h;return new Promise((c,g)=>{let h=new j.Socket,k=!1,l=(a,b)=>{k||(k=!0,clearTimeout(m),o(),a(b))},m=setTimeout(()=>{h.destroy(),l(g,Error(`[ProxyFetch] MITM bypass connect timeout after ${e.v1.directFallbackTimeoutMs}ms`))},e.v1.directFallbackTimeoutMs),n=()=>{h.destroy(),l(g,Error("[ProxyFetch] MITM bypass request aborted"))},o=()=>{f.signal&&f.signal.removeEventListener("abort",n)};if(f.signal){if(f.signal.aborted)return void n();f.signal.addEventListener("abort",n,{once:!0})}h.connect(443,b,()=>{let b={socket:h,servername:a.hostname,path:a.pathname+a.search,method:f.method||"POST",headers:{...f.headers,Host:a.hostname}},e=i.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:d.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};l(c,b)});e.on("error",a=>l(g,a)),f.body&&e.write("string"==typeof f.body?f.body:JSON.stringify(f.body)),e.end()}),h.on("error",a=>l(g,a))})}async function r(a,b={},c=null){let d="string"==typeof a?a:a.toString(),e=l(c?.vercelRelayUrl);if(e){let a=new URL(d),c={...b.headers,"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return f(e,{...b,headers:c})}let g=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0)return null;let c=l(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=l(b?.noProxy??b?.connectionNoProxy);return d&&n(a,d)?null:o(c)}(d,c),i=g?null:o(function(a){let b;if(n(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(d)),k=g||i;if(function(a){try{let b=new URL(a).hostname;return j.some(a=>b.includes(a))}catch{return!1}}(d)){if(k)try{let c=await p(k);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);if(c?.onProxyFallback)try{c.onProxyFallback(a)}catch{}console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await m(a.hostname);if(c)return await q(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}if(k)return h(d,b)}if(k)try{let c=await p(k);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);if(c?.onProxyFallback)try{c.onProxyFallback(a)}catch{}return console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${a.message}`),h(d,b)}let s=c?.proxyPoolId||c?.enabled===!0||c?.connectionProxyEnabled===!0||!!l(c?.url??c?.connectionProxyUrl);if(c?.strictProxy===!0&&s)throw Error("[ProxyFetch] Proxy required but none resolved (strictProxy=true)");return f(a,b)}async function s(a,b={}){return r(a,b,null)}globalThis.fetch!==s&&(globalThis.fetch=s)},44725:(a,b,c)=>{c.d(b,{K$:()=>m,zP:()=>l});var d=c(77598),e=c(39609);let f="I*7Cf%WZ#S&%1RlZJ&C2",g={"minimax-code":{agent:"https://agent.minimaxi.com",platform:"https://www.minimaxi.com",lang:"zh"},"minimax-code-global":{agent:"https://agent.minimax.io",platform:"https://platform.minimax.io",lang:"en"}},h=a=>(0,d.createHash)("md5").update(a).digest("hex"),i=a=>a&&"object"==typeof a&&!Array.isArray(a)?a:void 0,j=a=>"number"==typeof a&&Number.isFinite(a)?a:void 0,k=(a,b)=>"string"==typeof a?.[b]&&a[b].trim()?a[b].trim():void 0;function l(a,b,{access:c,userID:d,body:e,now:g=Date.now(),tzOffsetSec:i=-60*new Date().getTimezoneOffset()}={}){let j=new URL(b,a.agent);j.search=new URLSearchParams({device_platform:"mcode",biz_id:"3",app_id:"3001",version_code:"22201",unix:String(g),timezone_offset:String(i),sys_language:a.lang,lang:a.lang,device_id:"0",os_name:process.platform,browser_name:"mcode",user_id:String(d??"").trim()||"0",client:"mcode"}).toString();let k=j.pathname+j.search,m=Math.floor(g/1e3),n=void 0===e?void 0:JSON.stringify(e),o={Accept:"application/json","Content-Type":"application/json","User-Agent":"MiniMaxCode",Authorization:`Bearer ${c}`,yy:void 0===n?h(`${encodeURIComponent(k)}_{}${h(String(g))}ooui`):h(`${encodeURIComponent(k)}_${n}${h(String(g))}ooui`),"x-timestamp":String(m),"x-signature":void 0===n?h(`${m}${f}`):h(`${m}${f}${n}`)};return{url:j.toString(),init:{method:void 0===n?"GET":"POST",headers:o,...void 0===n?{}:{body:n}}}}async function m(a,b,c=null,d=null){let f=g[b];if(!f||!a)return{message:`Usage API not implemented for ${b}`};let h={},n=null;try{let b=d?.opGroupId,g=await (0,e.proxyAwareFetch)(`${f.platform}/v1/api/openplatform/coding_plan/remains`,{headers:{Accept:"application/json",Authorization:`Bearer ${a}`,...b?{"X-Group-Id":b}:{}},signal:AbortSignal.timeout(15e3)},c);if(401===g.status||403===g.status)return{message:"MiniMax Code session expired or unauthorized. Please re-authenticate."};if(g.ok){let a=await g.json().catch(()=>null);for(let b of function(a){let b=i(a?.base_resp);if(b&&"number"==typeof b.status_code&&0!==b.status_code)throw Error(k(b,"status_msg")??`MiniMax said ${b.status_code}`);if(!b&&!Array.isArray(a?.model_remains))throw Error("no plan in the reply");let c=a=>a<1e12?1e3*a:a,d=a=>0===j(a),e=[];for(let b of Array.isArray(a.model_remains)?a.model_remains:[]){let a=String(b?.model_name??"").trim();if(!a||3===j(b.current_interval_status)&&3===j(b.current_weekly_status)&&d(b.current_interval_total_count)&&d(b.current_weekly_total_count))continue;let f="general"===a.toLowerCase();for(let d of[{left:j(b.current_interval_remaining_percent),status:j(b.current_interval_status)??0,start:j(b.start_time)??0,end:j(b.end_time)??0,week:!1},{left:j(b.current_weekly_remaining_percent),status:j(b.current_weekly_status)??0,start:j(b.weekly_start_time)??0,end:j(b.weekly_end_time)??0,week:!0}]){if(3===d.status||void 0===d.left&&2!==d.status)continue;let b=2===d.status?0:Math.max(0,Math.min(100,d.left)),g=0;d.start>0&&d.end>d.start?g=c(d.end)-c(d.start):d.week&&(g=6048e5);let h=d.week?"7 days":g>864e5&&g%864e5==0?`${g/864e5} days`:g>=36e5&&g%36e5==0?`${g/36e5} hours`:g>0?`${Math.floor(g/6e4)} minutes`:"Allowance",i=f?h:`${a[0].toUpperCase()+a.slice(1)} \xb7 ${h}`;e.push({name:i,used:100-b,total:100,remaining:b,remainingPercentage:b,resetAt:d.end>0?new Date(c(d.end)).toISOString():null,recurring:!0})}}return e}(a))h[b.name]=b}}catch(a){n=a}try{let b=d?.realUserID,{url:g,init:j}=l(f,"/matrix/api/v1/commerce/get_membership_info",{access:a,userID:b,body:{}}),m=await (0,e.proxyAwareFetch)(g,j,c);if(m.ok){let a=await m.json().catch(()=>null),b=i(a?.data),c=i(a?.op_credit_summary)??i(b?.op_credit_summary),d=k(c,"total_remaining_amount")??k(a,"opcredit_balance")??k(b,"opcredit_balance");if(void 0!==d){let a=Number(d);h.Credits={name:"Credits",used:0,total:Number.isFinite(a)?a:0,remaining:Number.isFinite(a)?a:0,isCreditBalance:!0,currency:"credits"}}}}catch{}return 0===Object.keys(h).length?n?{message:`MiniMax Code usage fetch failed: ${n.message}`}:{message:"No active MiniMax Code subscription found."}:{quotas:h}}}};
@@ -40,4 +40,4 @@
40
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
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
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 t(a){return new Promise(b=>{if(l)return void b({success:!0});let d=e().createServer(async(b,d)=>{let e=new h.URL(b.url,"http://localhost");if("/callback"!==e.pathname&&"/auth/callback"!==e.pathname){d.writeHead(404),d.end("Not found");return}let f=e.searchParams.get("code"),g=e.searchParams.get("state"),i=e.searchParams.get("error"),j=g?o.get(g):null;if(j){try{if(i)throw Error(e.searchParams.get("error_description")||i);if(!f)throw Error("No authorization code received");let{exchangeTokens:a}=await Promise.all([c.e(7774),c.e(5433),c.e(8920),c.e(2557),c.e(6306),c.e(3225),c.e(3500),c.e(6922),c.e(7070),c.e(8499),c.e(318),c.e(8895),c.e(8972)]).then(c.bind(c,74177)),{createProviderConnection:b}=await c.e(1998).then(c.bind(c,71998)),h=await a("codex",f,j.redirectUri,j.codeVerifier,g),k=await b({provider:"codex",authType:"oauth",...h,expiresAt:h.expiresIn?new Date(Date.now()+1e3*h.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(s(!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(s(!1,a.message))}finally{u()}return}let k=`http://localhost:${a}/callback${e.search}`;d.writeHead(302,{Location:k}),d.end(),u()});d.listen(n,"127.0.0.1",()=>{l=d,m=setTimeout(()=>u(),3e5),b({success:!0})}),d.on("error",a=>{"EADDRINUSE"===a.code?b({success:!1,reason:"port_busy"}):b({success:!1,reason:a.message})})})}function u(){m&&(clearTimeout(m),m=null),l&&(l.close(),l=null)}let v=null,w=null,x=new Map;function y({state:a,codeVerifier:b,redirectUri:c}){return!!a&&!!b&&!!c&&(x.set(a,{codeVerifier:b,redirectUri:c,status:"pending",createdAt:Date.now()}),!0)}function z(a){return x.get(a)||null}function A(a){x.delete(a)}function B(a){return new Promise(b=>{if(v)return void b({success:!0});let d=e().createServer(async(b,d)=>{let e=new h.URL(b.url,"http://localhost");if("/callback"!==e.pathname&&"/auth/callback"!==e.pathname){d.writeHead(404),d.end("Not found");return}let f=e.searchParams.get("code"),g=e.searchParams.get("state"),i=e.searchParams.get("error"),j=g?x.get(g):null;if(j){try{if(i)throw Error(e.searchParams.get("error_description")||i);if(!f)throw Error("No authorization code received");let{exchangeTokens:a}=await Promise.all([c.e(7774),c.e(5433),c.e(8920),c.e(2557),c.e(6306),c.e(3225),c.e(3500),c.e(6922),c.e(7070),c.e(8499),c.e(318),c.e(8895),c.e(8972)]).then(c.bind(c,74177)),{createProviderConnection:b}=await c.e(1998).then(c.bind(c,71998)),h=await a("xai",f,j.redirectUri,j.codeVerifier,g),k=await b({provider:"xai",authType:"oauth",...h,expiresAt:h.expiresIn?new Date(Date.now()+1e3*h.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(s(!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(s(!1,a.message))}finally{C()}return}let k=`http://localhost:${a}/callback${e.search}`;d.writeHead(302,{Location:k}),d.end(),C()});d.listen(56121,"127.0.0.1",()=>{v=d,w=setTimeout(()=>C(),3e5),b({success:!0})}),d.on("error",a=>{"EADDRINUSE"===a.code?b({success:!1,reason:"port_busy"}):b({success:!1,reason:a.message})})})}function C(){w&&(clearTimeout(w),w=null),v&&(v.close(),v=null)}let D=null,E=null,F=null,G=null;function H({state:a}){return!!a&&(G={state:a,status:"pending",createdAt:Date.now()},!0)}function I(a){return!G||a&&G.state!==a?null:G}function J(a){(!a||G&&G.state===a)&&(G=null)}function K(){return new Promise(a=>{if(D)return void a({success:!0,port:F,callbackUrl:`http://127.0.0.1:${F}${i.SK.callbackPath}`});let b=e().createServer(async(a,b)=>{let d=new h.URL(a.url,"http://localhost");if(d.pathname!==i.SK.callbackPath&&"/auth/callback"!==d.pathname){b.writeHead(404),b.end("Not found");return}let e=G;if(!e){b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,"No active Trae login session"));return}if(!j(a.headers.origin)){b.writeHead(403,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,"Cross-origin callback rejected"));return}let f=d.searchParams.get("state");if(f&&e.state&&f!==e.state){e.status="error",e.error="Trae callback state mismatch",b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,e.error)),L();return}let g=`${d.pathname}?${d.searchParams.toString()}`;try{let{exchangeTokens:a}=await Promise.all([c.e(7774),c.e(5433),c.e(8920),c.e(2557),c.e(6306),c.e(3225),c.e(3500),c.e(6922),c.e(7070),c.e(8499),c.e(318),c.e(8895),c.e(8972)]).then(c.bind(c,74177)),{createProviderConnection:d}=await c.e(1998).then(c.bind(c,71998)),f=await a("trae",g),h=await d({provider:"trae",authType:"oauth",...f,expiresAt:f.expiresIn?new Date(Date.now()+1e3*f.expiresIn).toISOString():null,testStatus:"active"});e.status="done",e.connectionId=h.id,e.email=h.email,b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!0,"You can close this window."))}catch(a){e.status="error",e.error=a.message,b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,a.message))}finally{L()}});b.listen(0,"127.0.0.1",()=>{D=b,F=b.address().port,E=setTimeout(()=>L(),i.SK.oauthTimeoutMs),a({success:!0,port:F,callbackUrl:`http://127.0.0.1:${F}${i.SK.callbackPath}`})}),b.on("error",b=>a({success:!1,reason:b.message}))})}function L(){E&&(clearTimeout(E),E=null),D&&(D.close(),D=null),F=null}let M=null,N=null,O=null,P=null;function Q({state:a}){return!!a&&(P={state:a,status:"pending",createdAt:Date.now()},!0)}function R(a){return!P||a&&P.state!==a?null:P}function S(a){(!a||P&&P.state===a)&&(P=null)}function T(){return new Promise(a=>{if(M)return void a({success:!0,port:O,callbackUrl:`http://127.0.0.1:${O}${i.eD.callbackPath}`});let b=e().createServer(async(a,b)=>{let d=new h.URL(a.url,"http://localhost");if(d.pathname!==i.eD.callbackPath){b.writeHead(404),b.end("Not found");return}let e=P;if(!e){b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,"No active Windsurf login session"));return}if(!j(a.headers.origin)){b.writeHead(403,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,"Cross-origin callback rejected"));return}let f=d.searchParams.get("state");if(!f||!e.state||f!==e.state){e.status="error",e.error="Windsurf callback state mismatch",b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,e.error)),U();return}let g=`${d.pathname}?${d.searchParams.toString()}`;try{let{exchangeTokens:a}=await Promise.all([c.e(7774),c.e(5433),c.e(8920),c.e(2557),c.e(6306),c.e(3225),c.e(3500),c.e(6922),c.e(7070),c.e(8499),c.e(318),c.e(8895),c.e(8972)]).then(c.bind(c,74177)),{createProviderConnection:d}=await c.e(1998).then(c.bind(c,71998)),f=await a("windsurf",g,null,null,e.state),h=await d({provider:"windsurf",authType:"api_key",...f,testStatus:"active"});e.status="done",e.connectionId=h.id,e.email=h.email,b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!0,"You can close this window."))}catch(a){e.status="error",e.error=a.message,b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,a.message))}finally{U()}});b.listen(0,"127.0.0.1",()=>{M=b,O=b.address().port,N=setTimeout(()=>U(),i.eD.oauthTimeoutMs),a({success:!0,port:O,callbackUrl:`http://127.0.0.1:${O}${i.eD.callbackPath}`})}),b.on("error",b=>a({success:!1,reason:b.message}))})}function U(){N&&(clearTimeout(N),N=null),M&&(M.close(),M=null),O=null}let V=null,W=null,X=null,Y=null;function Z({state:a,codeVerifier:b}){return!!a&&!!b&&(Y={state:a,codeVerifier:b,status:"pending",createdAt:Date.now()},!0)}function $(a){return!Y||a&&Y.state!==a?null:Y}function _(a){(!a||Y&&Y.state===a)&&(Y=null)}function aa(a=0){return new Promise(b=>{if(V)return void b({success:!0,port:X,callbackUrl:`http://127.0.0.1:${X}/`});let d=e().createServer(async(a,b)=>{let d=new h.URL(a.url,"http://localhost"),e=Object.fromEntries(d.searchParams);for(let a of["access_token","user_id","code_verifier","state"])e[a]&&(e[a]="<redacted>");if(console.log("[Zed proxy]",a.method,d.pathname,JSON.stringify(e)),"/"!==d.pathname&&"/callback"!==d.pathname){b.writeHead(404),b.end("Not found");return}let f=Y;if(!f){b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,"No active Zed login session"));return}if(!j(a.headers.origin)){b.writeHead(403,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,"Cross-origin callback rejected"));return}let g=d.search?`${d.pathname}?${d.searchParams.toString()}`:d.pathname;try{let{exchangeTokens:a}=await Promise.all([c.e(7774),c.e(5433),c.e(8920),c.e(2557),c.e(6306),c.e(3225),c.e(3500),c.e(6922),c.e(7070),c.e(8499),c.e(318),c.e(8895),c.e(8972)]).then(c.bind(c,74177)),{createProviderConnection:d}=await c.e(1998).then(c.bind(c,71998)),e=await a("zed",g,null,f.codeVerifier,f.state),h=await d({provider:"zed",authType:"oauth",...e,testStatus:"active"});f.status="done",f.connectionId=h.id,f.email=h.email,b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!0,"You can close this window."))}catch(a){f.status="error",f.error=a.message,b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,a.message))}finally{ab()}}),f=Number(a)||0;d.on("error",a=>{"EADDRINUSE"===a.code&&0!==f?(console.log(`[Zed proxy] port ${f} busy, falling back to random`),d.listen(0,"127.0.0.1",()=>{V=d,X=d.address().port,W=setTimeout(()=>ab(),i.RY.oauthTimeoutMs),console.log(`[Zed proxy] listening on random port ${X}`),b({success:!0,port:X,callbackUrl:`http://127.0.0.1:${X}/`})})):(console.log(`[Zed proxy] listen error: ${a.message}`),b({success:!1,reason:a.message}))}),d.listen(f,"127.0.0.1",()=>{V=d,X=d.address().port,W=setTimeout(()=>{console.log("[Zed proxy] timeout, stopping"),ab()},i.RY.oauthTimeoutMs),console.log(`[Zed proxy] listening on port ${X}`),b({success:!0,port:X,callbackUrl:`http://127.0.0.1:${X}/`})})})}function ab(){console.log(`[Zed proxy] stopping (port ${X||"-"})`),W&&(clearTimeout(W),W=null),V&&(V.close(),V=null),X=null}let ac=null,ad=null,ae=null,af=new h.URL(i.oe.platformUrl).origin,ag=null;function ah(a,b){let c=new h.URL(`${i.oe.platformUrl}/authorize/callback`);return c.searchParams.set("status",a),b&&c.searchParams.set("message",b),c.toString()}let ai=new Map;function aj({state:a,privateKeyDer:b}){if(!a||!b)return!1;let c=Date.now()-i.oe.pendingTtlMs;for(let[a,b]of ai)b.createdAt<c&&ai.delete(a);for(;ai.size>=8;){let a=ai.keys().next();if(a.done)break;ai.delete(a.value)}return ai.set(a,{privateKeyDer:b,status:"pending",createdAt:Date.now()}),!0}function ak(a){let b=ai.get(a);return b?{status:b.status,result:b.result||null,error:b.error||null}:null}function al(a){ai.delete(a)}async function am(a){let b=function(a){let b=String(a??"").trim();if(!b)return"";let c=b.match(/(?:^|[?&])(?:u|code)=([^&\s]+)/);if(c)try{b=decodeURIComponent(c[1])}catch{b=c[1]}return(b=(b=b.replace(/^(?:授权码|验证码)\s*[::=]?\s*/,"").replace(/^(?:authorization\s*code|code)\s*[::=]\s*/i,"")).replace(/^[`'"“”‘’<([{]+/,"").replace(/[`'"“”‘’>)\]},.;:。,;:]+$/,"")).replace(/\s+/g,"")}(a);if(!b)return{ok:!1,error:"empty_payload"};if(b.length<60)return{ok:!1,error:"payload_too_short"};let d=[...ai.entries()].filter(([,a])=>"pending"===a.status);if(0===d.length)return{ok:!1,error:"no_pending_session"};let{decryptCallback:e}=await c.e(4152).then(c.bind(c,34152)),f=!1;for(let[a,c]of d){let d;try{d=e(c.privateKeyDer,b)}catch{continue}if(!d.sk){f=!0;continue}return c.status="done",c.result={uid:d.uid,accessToken:d.sk,baseUrl:d.url||i.oe.defaultBaseUrl},{ok:!0,state:a,result:c.result}}let g=f?"missing_api_key":"decrypt_failed";return console.warn(`[xiaomi-mimo oauth] code rejected (${g}): ${b.length} chars, ${d.length} pending session(s)`),{ok:!1,error:g}}function an(){return new Promise(a=>{if(ac)return void a({success:!0,port:ad,callbackUrl:`http://127.0.0.1:${ad}${ag}`});let b=ag||(ag=`/callback/${g().randomBytes(16).toString("hex")}`),c=e().createServer(async(a,c)=>{let d=a.headers.origin||"",e=d===af?{"Access-Control-Allow-Origin":d,"Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"*","Access-Control-Max-Age":"600",Vary:"Origin"}:{Vary:"Origin"};if("OPTIONS"===a.method){c.writeHead(204,e),c.end();return}let f=new h.URL(a.url,"http://127.0.0.1");if(f.pathname!==b){c.writeHead(404,e),c.end("Not Found");return}let g=f.searchParams.get("u");if(!g){c.writeHead(302,{...e,Location:ah("error","missing_data")}),c.end();return}let i=[...ai.entries()].filter(([,a])=>"pending"===a.status);try{let a=await am(g);if(!a.ok)throw Error("missing_api_key"===a.error?"Decrypted payload missing sk (API key)":"Could not decrypt with any pending session key");c.writeHead(302,{...e,Location:ah("success")}),c.end(),console.log("[xiaomi-mimo oauth] callback decrypted")}catch(a){if(console.error("[xiaomi-mimo oauth] decrypt failed:",a.message),1===i.length){let[,b]=i[0];b.status="error",b.error=a.message}c.writeHead(302,{...e,Location:ah("error","decrypt_failed")}),c.end()}});c.on("error",b=>{console.log("[xiaomi-mimo oauth] listen error:",b.message),a({success:!1,reason:b.message})}),c.listen(0,"127.0.0.1",()=>{ac=c,ad=c.address().port,ae=setTimeout(()=>{console.log("[xiaomi-mimo oauth] timeout, stopping"),ao()},i.oe.timeoutMs),console.log(`[xiaomi-mimo oauth] listening on port ${ad}`),a({success:!0,port:ad,callbackUrl:`http://127.0.0.1:${ad}${b}`})})})}function ao(){console.log(`[xiaomi-mimo oauth] stopping (port ${ad||"-"})`),ae&&(clearTimeout(ae),ae=null),ac&&(ac.close(),ac=null),ad=null,ag=null}},73159:(a,b,c)=>{c.d(b,{Ue:()=>k,oT:()=>l});var d=c(26070);let e=d.xq.xai?.clientId,f="https://auth.x.ai",g="/oauth2/authorize",h="/oauth2/token",i="/.well-known/openid-configuration",j="/callback",k=96,l={clientId:e,issuer:f,authEndpointPath:g,tokenEndpointPath:h,discoveryPath:i,authorizeUrl:`${f}${g}`,tokenUrl:`${f}${h}`,discoveryUrl:`${f}${i}`,scope:"openid profile email offline_access grok-cli:access api:access",apiBaseUrl:"https://api.x.ai/v1",redirectUri:`http://127.0.0.1:56121${j}`,loopbackPort:56121,callbackPath:j,pkceVerifierBytes:96,refreshLeadSeconds:300,userAgent:"grok-cli/10router",codeChallengeMethod:"S256"}},92990:(a,b,c)=>{c.d(b,{DI:()=>i,DV:()=>z,LT:()=>j,MZ:()=>u,Nl:()=>y,Nu:()=>o,OV:()=>h,RY:()=>J,S6:()=>r,SK:()=>D,Td:()=>A,Tx:()=>p,Vv:()=>H,WN:()=>s,Ww:()=>K,YT:()=>m,ZL:()=>l,_0:()=>F,aV:()=>t,b3:()=>I,cD:()=>n,eD:()=>E,f7:()=>x,hF:()=>k,lB:()=>v,oe:()=>C,qp:()=>B,sA:()=>G,w1:()=>w});var d=c(21820),e=c(74129),f=c(26070);function g(){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 h={...f.sr.claude},i={...f.sr.codex},j={...e.dG,...f.sr["gemini-cli"]},k={...f.sr.qoder},l={...f.sr.iflow},m={...e.XP,...f.sr.antigravity,loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:g(),pluginType:2})};function n(){return{ideType:9,platform:g(),pluginType:2}}({...f.sr.openai});let o={...f.sr.github},p={...f.sr.kiro},q=/^[a-z]{2}-[a-z]+-\d{1,2}$/;function r(a){if("string"!=typeof a||!q.test(a))throw Error("Invalid region");return a}let s={...f.sr.cursor,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"}},t={...f.sr.kimi,clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||process.env.KIMI_OAUTH_CLIENT_ID||f.xq.kimi?.clientId||f.sr.kimi?.clientId},u={...f.sr.kilocode},v={...f.sr.cline},w={...f.sr.clinepass},x={...f.sr.gitlab},y={...f.sr["codebuddy-cn"]},z={...f.sr["codebuddy-intl"]},A={...f.sr.kimchi},B={...f.sr["grok-cli"]},C={platformUrl:process.env.MIMO_PLATFORM_URL||"https://platform.xiaomimimo.com",defaultBaseUrl:"https://api.xiaomimimo.com/v1",kn:"mimocode",app:"MiMo",timeoutMs:3e5,pendingTtlMs:864e5},D={clientId:"ono9krqynydwx5",clientSecret:"-",loginGuidanceUrls:["https://api.marscode.com/cloudide/api/v3/trae/GetLoginGuidance","https://api.trae.ai/cloudide/api/v3/trae/GetLoginGuidance","https://www.trae.ai/cloudide/api/v3/trae/GetLoginGuidance"],apiOrigins:["https://api.marscode.com","https://api.trae.ai","https://www.trae.ai","https://www.marscode.com"],exchangeTokenPath:"/cloudide/api/v3/trae/oauth/ExchangeToken",getUserInfoPath:"/cloudide/api/v3/trae/GetUserInfo",authorizationPath:"/authorization",callbackPath:"/callback",minAppVersion:"3.5.54",defaultAppVersion:"3.5.54",defaultAppType:"stable",defaultPluginVersion:"local",defaultDeviceId:"0",userAgent:"Trae/1.0.0 antigravity-cockpit-tools",webUrl:"https://www.trae.ai",authScheme:"Cloud-IDE-JWT",tokenLifetimeDays:14,oauthTimeoutMs:6e5},E={clientId:"3GUryQ7ldAeKEuD2obYnppsnmj58eP5u",authBaseUrl:"https://www.windsurf.com",signInPath:"/windsurf/signin",registerApiBaseUrl:"https://register.windsurf.com",registerPath:"/exa.seat_management_pb.SeatManagementService/RegisterUser",oneTimeAuthPath:"/exa.seat_management_pb.SeatManagementService/GetOneTimeAuthToken",currentUserPath:"/exa.seat_management_pb.SeatManagementService/GetCurrentUser",planStatusPath:"/exa.seat_management_pb.SeatManagementService/GetPlanStatus",userStatusPath:"/exa.seat_management_pb.SeatManagementService/GetUserStatus",defaultApiServerUrl:"https://server.codeium.com",firebaseApiKey:"AIzaSyDsOl-1XpT5err0Tcn0TFFod1H8gVGIycY",callbackPath:"/windsurf-auth-callback",userAgent:"antigravity-cockpit-tools",oauthTimeoutMs:6e5},F={...f.sr.glm},G={...f.sr.muse},H={...f.sr["minimax-code"]},I={...f.sr["minimax-code-global"]},J={webBaseUrl:"https://zed.dev",cloudBaseUrl:"https://cloud.zed.dev",llmBaseUrl:"https://cloud.zed.dev",defaultNativeAppPort:58443,oauthTimeoutMs:6e5},K=3e5}};
43
+ </div></body></html>`}function t(a){return new Promise(b=>{if(l)return void b({success:!0});let d=e().createServer(async(b,d)=>{let e=new h.URL(b.url,"http://localhost");if("/callback"!==e.pathname&&"/auth/callback"!==e.pathname){d.writeHead(404),d.end("Not found");return}let f=e.searchParams.get("code"),g=e.searchParams.get("state"),i=e.searchParams.get("error"),j=g?o.get(g):null;if(j){try{if(i)throw Error(e.searchParams.get("error_description")||i);if(!f)throw Error("No authorization code received");let{exchangeTokens:a}=await Promise.all([c.e(7774),c.e(5433),c.e(8920),c.e(2557),c.e(6306),c.e(3225),c.e(3500),c.e(6922),c.e(447),c.e(8499),c.e(318),c.e(8895),c.e(5663)]).then(c.bind(c,74177)),{createProviderConnection:b}=await c.e(1998).then(c.bind(c,71998)),h=await a("codex",f,j.redirectUri,j.codeVerifier,g),k=await b({provider:"codex",authType:"oauth",...h,expiresAt:h.expiresIn?new Date(Date.now()+1e3*h.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(s(!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(s(!1,a.message))}finally{u()}return}let k=`http://localhost:${a}/callback${e.search}`;d.writeHead(302,{Location:k}),d.end(),u()});d.listen(n,"127.0.0.1",()=>{l=d,m=setTimeout(()=>u(),3e5),b({success:!0})}),d.on("error",a=>{"EADDRINUSE"===a.code?b({success:!1,reason:"port_busy"}):b({success:!1,reason:a.message})})})}function u(){m&&(clearTimeout(m),m=null),l&&(l.close(),l=null)}let v=null,w=null,x=new Map;function y({state:a,codeVerifier:b,redirectUri:c}){return!!a&&!!b&&!!c&&(x.set(a,{codeVerifier:b,redirectUri:c,status:"pending",createdAt:Date.now()}),!0)}function z(a){return x.get(a)||null}function A(a){x.delete(a)}function B(a){return new Promise(b=>{if(v)return void b({success:!0});let d=e().createServer(async(b,d)=>{let e=new h.URL(b.url,"http://localhost");if("/callback"!==e.pathname&&"/auth/callback"!==e.pathname){d.writeHead(404),d.end("Not found");return}let f=e.searchParams.get("code"),g=e.searchParams.get("state"),i=e.searchParams.get("error"),j=g?x.get(g):null;if(j){try{if(i)throw Error(e.searchParams.get("error_description")||i);if(!f)throw Error("No authorization code received");let{exchangeTokens:a}=await Promise.all([c.e(7774),c.e(5433),c.e(8920),c.e(2557),c.e(6306),c.e(3225),c.e(3500),c.e(6922),c.e(447),c.e(8499),c.e(318),c.e(8895),c.e(5663)]).then(c.bind(c,74177)),{createProviderConnection:b}=await c.e(1998).then(c.bind(c,71998)),h=await a("xai",f,j.redirectUri,j.codeVerifier,g),k=await b({provider:"xai",authType:"oauth",...h,expiresAt:h.expiresIn?new Date(Date.now()+1e3*h.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(s(!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(s(!1,a.message))}finally{C()}return}let k=`http://localhost:${a}/callback${e.search}`;d.writeHead(302,{Location:k}),d.end(),C()});d.listen(56121,"127.0.0.1",()=>{v=d,w=setTimeout(()=>C(),3e5),b({success:!0})}),d.on("error",a=>{"EADDRINUSE"===a.code?b({success:!1,reason:"port_busy"}):b({success:!1,reason:a.message})})})}function C(){w&&(clearTimeout(w),w=null),v&&(v.close(),v=null)}let D=null,E=null,F=null,G=null;function H({state:a}){return!!a&&(G={state:a,status:"pending",createdAt:Date.now()},!0)}function I(a){return!G||a&&G.state!==a?null:G}function J(a){(!a||G&&G.state===a)&&(G=null)}function K(){return new Promise(a=>{if(D)return void a({success:!0,port:F,callbackUrl:`http://127.0.0.1:${F}${i.SK.callbackPath}`});let b=e().createServer(async(a,b)=>{let d=new h.URL(a.url,"http://localhost");if(d.pathname!==i.SK.callbackPath&&"/auth/callback"!==d.pathname){b.writeHead(404),b.end("Not found");return}let e=G;if(!e){b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,"No active Trae login session"));return}if(!j(a.headers.origin)){b.writeHead(403,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,"Cross-origin callback rejected"));return}let f=d.searchParams.get("state");if(f&&e.state&&f!==e.state){e.status="error",e.error="Trae callback state mismatch",b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,e.error)),L();return}let g=`${d.pathname}?${d.searchParams.toString()}`;try{let{exchangeTokens:a}=await Promise.all([c.e(7774),c.e(5433),c.e(8920),c.e(2557),c.e(6306),c.e(3225),c.e(3500),c.e(6922),c.e(447),c.e(8499),c.e(318),c.e(8895),c.e(5663)]).then(c.bind(c,74177)),{createProviderConnection:d}=await c.e(1998).then(c.bind(c,71998)),f=await a("trae",g),h=await d({provider:"trae",authType:"oauth",...f,expiresAt:f.expiresIn?new Date(Date.now()+1e3*f.expiresIn).toISOString():null,testStatus:"active"});e.status="done",e.connectionId=h.id,e.email=h.email,b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!0,"You can close this window."))}catch(a){e.status="error",e.error=a.message,b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,a.message))}finally{L()}});b.listen(0,"127.0.0.1",()=>{D=b,F=b.address().port,E=setTimeout(()=>L(),i.SK.oauthTimeoutMs),a({success:!0,port:F,callbackUrl:`http://127.0.0.1:${F}${i.SK.callbackPath}`})}),b.on("error",b=>a({success:!1,reason:b.message}))})}function L(){E&&(clearTimeout(E),E=null),D&&(D.close(),D=null),F=null}let M=null,N=null,O=null,P=null;function Q({state:a}){return!!a&&(P={state:a,status:"pending",createdAt:Date.now()},!0)}function R(a){return!P||a&&P.state!==a?null:P}function S(a){(!a||P&&P.state===a)&&(P=null)}function T(){return new Promise(a=>{if(M)return void a({success:!0,port:O,callbackUrl:`http://127.0.0.1:${O}${i.eD.callbackPath}`});let b=e().createServer(async(a,b)=>{let d=new h.URL(a.url,"http://localhost");if(d.pathname!==i.eD.callbackPath){b.writeHead(404),b.end("Not found");return}let e=P;if(!e){b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,"No active Windsurf login session"));return}if(!j(a.headers.origin)){b.writeHead(403,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,"Cross-origin callback rejected"));return}let f=d.searchParams.get("state");if(!f||!e.state||f!==e.state){e.status="error",e.error="Windsurf callback state mismatch",b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,e.error)),U();return}let g=`${d.pathname}?${d.searchParams.toString()}`;try{let{exchangeTokens:a}=await Promise.all([c.e(7774),c.e(5433),c.e(8920),c.e(2557),c.e(6306),c.e(3225),c.e(3500),c.e(6922),c.e(447),c.e(8499),c.e(318),c.e(8895),c.e(5663)]).then(c.bind(c,74177)),{createProviderConnection:d}=await c.e(1998).then(c.bind(c,71998)),f=await a("windsurf",g,null,null,e.state),h=await d({provider:"windsurf",authType:"api_key",...f,testStatus:"active"});e.status="done",e.connectionId=h.id,e.email=h.email,b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!0,"You can close this window."))}catch(a){e.status="error",e.error=a.message,b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,a.message))}finally{U()}});b.listen(0,"127.0.0.1",()=>{M=b,O=b.address().port,N=setTimeout(()=>U(),i.eD.oauthTimeoutMs),a({success:!0,port:O,callbackUrl:`http://127.0.0.1:${O}${i.eD.callbackPath}`})}),b.on("error",b=>a({success:!1,reason:b.message}))})}function U(){N&&(clearTimeout(N),N=null),M&&(M.close(),M=null),O=null}let V=null,W=null,X=null,Y=null;function Z({state:a,codeVerifier:b}){return!!a&&!!b&&(Y={state:a,codeVerifier:b,status:"pending",createdAt:Date.now()},!0)}function $(a){return!Y||a&&Y.state!==a?null:Y}function _(a){(!a||Y&&Y.state===a)&&(Y=null)}function aa(a=0){return new Promise(b=>{if(V)return void b({success:!0,port:X,callbackUrl:`http://127.0.0.1:${X}/`});let d=e().createServer(async(a,b)=>{let d=new h.URL(a.url,"http://localhost"),e=Object.fromEntries(d.searchParams);for(let a of["access_token","user_id","code_verifier","state"])e[a]&&(e[a]="<redacted>");if(console.log("[Zed proxy]",a.method,d.pathname,JSON.stringify(e)),"/"!==d.pathname&&"/callback"!==d.pathname){b.writeHead(404),b.end("Not found");return}let f=Y;if(!f){b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,"No active Zed login session"));return}if(!j(a.headers.origin)){b.writeHead(403,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,"Cross-origin callback rejected"));return}let g=d.search?`${d.pathname}?${d.searchParams.toString()}`:d.pathname;try{let{exchangeTokens:a}=await Promise.all([c.e(7774),c.e(5433),c.e(8920),c.e(2557),c.e(6306),c.e(3225),c.e(3500),c.e(6922),c.e(447),c.e(8499),c.e(318),c.e(8895),c.e(5663)]).then(c.bind(c,74177)),{createProviderConnection:d}=await c.e(1998).then(c.bind(c,71998)),e=await a("zed",g,null,f.codeVerifier,f.state),h=await d({provider:"zed",authType:"oauth",...e,testStatus:"active"});f.status="done",f.connectionId=h.id,f.email=h.email,b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!0,"You can close this window."))}catch(a){f.status="error",f.error=a.message,b.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),b.end(s(!1,a.message))}finally{ab()}}),f=Number(a)||0;d.on("error",a=>{"EADDRINUSE"===a.code&&0!==f?(console.log(`[Zed proxy] port ${f} busy, falling back to random`),d.listen(0,"127.0.0.1",()=>{V=d,X=d.address().port,W=setTimeout(()=>ab(),i.RY.oauthTimeoutMs),console.log(`[Zed proxy] listening on random port ${X}`),b({success:!0,port:X,callbackUrl:`http://127.0.0.1:${X}/`})})):(console.log(`[Zed proxy] listen error: ${a.message}`),b({success:!1,reason:a.message}))}),d.listen(f,"127.0.0.1",()=>{V=d,X=d.address().port,W=setTimeout(()=>{console.log("[Zed proxy] timeout, stopping"),ab()},i.RY.oauthTimeoutMs),console.log(`[Zed proxy] listening on port ${X}`),b({success:!0,port:X,callbackUrl:`http://127.0.0.1:${X}/`})})})}function ab(){console.log(`[Zed proxy] stopping (port ${X||"-"})`),W&&(clearTimeout(W),W=null),V&&(V.close(),V=null),X=null}let ac=null,ad=null,ae=null,af=new h.URL(i.oe.platformUrl).origin,ag=null;function ah(a,b){let c=new h.URL(`${i.oe.platformUrl}/authorize/callback`);return c.searchParams.set("status",a),b&&c.searchParams.set("message",b),c.toString()}let ai=new Map;function aj({state:a,privateKeyDer:b}){if(!a||!b)return!1;let c=Date.now()-i.oe.pendingTtlMs;for(let[a,b]of ai)b.createdAt<c&&ai.delete(a);for(;ai.size>=8;){let a=ai.keys().next();if(a.done)break;ai.delete(a.value)}return ai.set(a,{privateKeyDer:b,status:"pending",createdAt:Date.now()}),!0}function ak(a){let b=ai.get(a);return b?{status:b.status,result:b.result||null,error:b.error||null}:null}function al(a){ai.delete(a)}async function am(a){let b=function(a){let b=String(a??"").trim();if(!b)return"";let c=b.match(/(?:^|[?&])(?:u|code)=([^&\s]+)/);if(c)try{b=decodeURIComponent(c[1])}catch{b=c[1]}return(b=(b=b.replace(/^(?:授权码|验证码)\s*[::=]?\s*/,"").replace(/^(?:authorization\s*code|code)\s*[::=]\s*/i,"")).replace(/^[`'"“”‘’<([{]+/,"").replace(/[`'"“”‘’>)\]},.;:。,;:]+$/,"")).replace(/\s+/g,"")}(a);if(!b)return{ok:!1,error:"empty_payload"};if(b.length<60)return{ok:!1,error:"payload_too_short"};let d=[...ai.entries()].filter(([,a])=>"pending"===a.status);if(0===d.length)return{ok:!1,error:"no_pending_session"};let{decryptCallback:e}=await c.e(4152).then(c.bind(c,34152)),f=!1;for(let[a,c]of d){let d;try{d=e(c.privateKeyDer,b)}catch{continue}if(!d.sk){f=!0;continue}return c.status="done",c.result={uid:d.uid,accessToken:d.sk,baseUrl:d.url||i.oe.defaultBaseUrl},{ok:!0,state:a,result:c.result}}let g=f?"missing_api_key":"decrypt_failed";return console.warn(`[xiaomi-mimo oauth] code rejected (${g}): ${b.length} chars, ${d.length} pending session(s)`),{ok:!1,error:g}}function an(){return new Promise(a=>{if(ac)return void a({success:!0,port:ad,callbackUrl:`http://127.0.0.1:${ad}${ag}`});let b=ag||(ag=`/callback/${g().randomBytes(16).toString("hex")}`),c=e().createServer(async(a,c)=>{let d=a.headers.origin||"",e=d===af?{"Access-Control-Allow-Origin":d,"Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"*","Access-Control-Max-Age":"600",Vary:"Origin"}:{Vary:"Origin"};if("OPTIONS"===a.method){c.writeHead(204,e),c.end();return}let f=new h.URL(a.url,"http://127.0.0.1");if(f.pathname!==b){c.writeHead(404,e),c.end("Not Found");return}let g=f.searchParams.get("u");if(!g){c.writeHead(302,{...e,Location:ah("error","missing_data")}),c.end();return}let i=[...ai.entries()].filter(([,a])=>"pending"===a.status);try{let a=await am(g);if(!a.ok)throw Error("missing_api_key"===a.error?"Decrypted payload missing sk (API key)":"Could not decrypt with any pending session key");c.writeHead(302,{...e,Location:ah("success")}),c.end(),console.log("[xiaomi-mimo oauth] callback decrypted")}catch(a){if(console.error("[xiaomi-mimo oauth] decrypt failed:",a.message),1===i.length){let[,b]=i[0];b.status="error",b.error=a.message}c.writeHead(302,{...e,Location:ah("error","decrypt_failed")}),c.end()}});c.on("error",b=>{console.log("[xiaomi-mimo oauth] listen error:",b.message),a({success:!1,reason:b.message})}),c.listen(0,"127.0.0.1",()=>{ac=c,ad=c.address().port,ae=setTimeout(()=>{console.log("[xiaomi-mimo oauth] timeout, stopping"),ao()},i.oe.timeoutMs),console.log(`[xiaomi-mimo oauth] listening on port ${ad}`),a({success:!0,port:ad,callbackUrl:`http://127.0.0.1:${ad}${b}`})})})}function ao(){console.log(`[xiaomi-mimo oauth] stopping (port ${ad||"-"})`),ae&&(clearTimeout(ae),ae=null),ac&&(ac.close(),ac=null),ad=null,ag=null}},73159:(a,b,c)=>{c.d(b,{Ue:()=>k,oT:()=>l});var d=c(26070);let e=d.xq.xai?.clientId,f="https://auth.x.ai",g="/oauth2/authorize",h="/oauth2/token",i="/.well-known/openid-configuration",j="/callback",k=96,l={clientId:e,issuer:f,authEndpointPath:g,tokenEndpointPath:h,discoveryPath:i,authorizeUrl:`${f}${g}`,tokenUrl:`${f}${h}`,discoveryUrl:`${f}${i}`,scope:"openid profile email offline_access grok-cli:access api:access",apiBaseUrl:"https://api.x.ai/v1",redirectUri:`http://127.0.0.1:56121${j}`,loopbackPort:56121,callbackPath:j,pkceVerifierBytes:96,refreshLeadSeconds:300,userAgent:"grok-cli/10router",codeChallengeMethod:"S256"}},92990:(a,b,c)=>{c.d(b,{DI:()=>i,DV:()=>z,LT:()=>j,MZ:()=>u,Nl:()=>y,Nu:()=>o,OV:()=>h,RY:()=>J,S6:()=>r,SK:()=>D,Td:()=>A,Tx:()=>p,Vv:()=>H,WN:()=>s,Ww:()=>K,YT:()=>m,ZL:()=>l,_0:()=>F,aV:()=>t,b3:()=>I,cD:()=>n,eD:()=>E,f7:()=>x,hF:()=>k,lB:()=>v,oe:()=>C,qp:()=>B,sA:()=>G,w1:()=>w});var d=c(21820),e=c(74129),f=c(26070);function g(){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 h={...f.sr.claude},i={...f.sr.codex},j={...e.dG,...f.sr["gemini-cli"]},k={...f.sr.qoder},l={...f.sr.iflow},m={...e.XP,...f.sr.antigravity,loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:g(),pluginType:2})};function n(){return{ideType:9,platform:g(),pluginType:2}}({...f.sr.openai});let o={...f.sr.github},p={...f.sr.kiro},q=/^[a-z]{2}-[a-z]+-\d{1,2}$/;function r(a){if("string"!=typeof a||!q.test(a))throw Error("Invalid region");return a}let s={...f.sr.cursor,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"}},t={...f.sr.kimi,clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||process.env.KIMI_OAUTH_CLIENT_ID||f.xq.kimi?.clientId||f.sr.kimi?.clientId},u={...f.sr.kilocode},v={...f.sr.cline},w={...f.sr.clinepass},x={...f.sr.gitlab},y={...f.sr["codebuddy-cn"]},z={...f.sr["codebuddy-intl"]},A={...f.sr.kimchi},B={...f.sr["grok-cli"]},C={platformUrl:process.env.MIMO_PLATFORM_URL||"https://platform.xiaomimimo.com",defaultBaseUrl:"https://api.xiaomimimo.com/v1",kn:"mimocode",app:"MiMo",timeoutMs:3e5,pendingTtlMs:864e5},D={clientId:"ono9krqynydwx5",clientSecret:"-",loginGuidanceUrls:["https://api.marscode.com/cloudide/api/v3/trae/GetLoginGuidance","https://api.trae.ai/cloudide/api/v3/trae/GetLoginGuidance","https://www.trae.ai/cloudide/api/v3/trae/GetLoginGuidance"],apiOrigins:["https://api.marscode.com","https://api.trae.ai","https://www.trae.ai","https://www.marscode.com"],cnLoginGuidanceUrls:["https://api.trae.com.cn/cloudide/api/v3/trae/GetLoginGuidance","https://api.marscode.cn/cloudide/api/v3/trae/GetLoginGuidance","https://api.trae.cn/cloudide/api/v3/trae/GetLoginGuidance"],cnApiOrigins:["https://api.trae.com.cn","https://api.marscode.cn","https://api.trae.cn"],intlHostSuffixes:["trae.ai","marscode.com"],cnHostSuffixes:["trae.cn","trae.com.cn","marscode.cn"],consoleUrl:"https://www.trae.ai/settings",cnConsoleUrl:"https://www.trae.cn/settings",exchangeTokenPath:"/cloudide/api/v3/trae/oauth/ExchangeToken",getUserInfoPath:"/cloudide/api/v3/trae/GetUserInfo",authorizationPath:"/authorization",callbackPath:"/callback",minAppVersion:"3.5.54",defaultAppVersion:"3.5.54",defaultAppType:"stable",defaultPluginVersion:"local",defaultDeviceId:"0",userAgent:"Trae/1.0.0 antigravity-cockpit-tools",webUrl:"https://www.trae.ai",authScheme:"Cloud-IDE-JWT",tokenLifetimeDays:14,oauthTimeoutMs:6e5},E={clientId:"3GUryQ7ldAeKEuD2obYnppsnmj58eP5u",authBaseUrl:"https://www.windsurf.com",signInPath:"/windsurf/signin",registerApiBaseUrl:"https://register.windsurf.com",registerPath:"/exa.seat_management_pb.SeatManagementService/RegisterUser",oneTimeAuthPath:"/exa.seat_management_pb.SeatManagementService/GetOneTimeAuthToken",currentUserPath:"/exa.seat_management_pb.SeatManagementService/GetCurrentUser",planStatusPath:"/exa.seat_management_pb.SeatManagementService/GetPlanStatus",userStatusPath:"/exa.seat_management_pb.SeatManagementService/GetUserStatus",defaultApiServerUrl:"https://server.codeium.com",firebaseApiKey:"AIzaSyDsOl-1XpT5err0Tcn0TFFod1H8gVGIycY",callbackPath:"/windsurf-auth-callback",userAgent:"antigravity-cockpit-tools",oauthTimeoutMs:6e5},F={...f.sr.glm},G={...f.sr.muse},H={...f.sr["minimax-code"]},I={...f.sr["minimax-code-global"]},J={webBaseUrl:"https://zed.dev",cloudBaseUrl:"https://cloud.zed.dev",llmBaseUrl:"https://cloud.zed.dev",defaultNativeAppPort:58443,oauthTimeoutMs:6e5},K=3e5}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=5625,exports.ids=[1998,5625],exports.modules={6551:(a,b,c)=>{c.d(b,{RO:()=>m,Tl:()=>k,Yt:()=>l});var d=c(39609),e=c(24295);let f={usageUrl:(0,e.U)("codex").url,resetCreditsUrl:(0,e.U)("codex").resetCreditsUrl,resetCreditsConsumeUrl:(0,e.U)("codex").resetCreditsConsumeUrl};function g(a){if(!a)return null;let b=a instanceof Date?a:new Date("number"==typeof a&&a<1e12?1e3*a:a);return Number.isFinite(b.getTime())?b.toISOString():null}function h(a){return!a||"object"!=typeof a||Array.isArray(a)?null:a.rate_limit&&"object"==typeof a.rate_limit?a.rate_limit:a}function i(a){let b=Math.max(0,Math.min(100,(0,e.IQ)(a?.used_percent??a?.percent_used,0)));return{used:b,total:100,remaining:Math.max(0,100-b),resetAt:(0,e.eZ)(a?.reset_at??a?.resets_at??a?.resetAt??null),unlimited:!1}}function j(a,b,c){let d=h(c);if(!d)return!1;let e=d.primary_window||d.primary||c.primary_window||c.primary,f=d.secondary_window||d.secondary||c.secondary_window||c.secondary,g=!1;return e&&(a[b?`${b}_session`:"session"]=i(e),g=!0),f&&(a[b?`${b}_weekly`:"weekly"]=i(f),g=!0),g}async function k(a,b=null){try{let c=await (0,d.proxyAwareFetch)(f.usageUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Codex connected. Usage API temporarily unavailable (${c.status}).`};let g=await c.json(),i=g.rate_limit||g.rate_limits||g.rate_limits_by_limit_id?.codex||{},k=function(a){if(a.code_review_rate_limit||a.review_rate_limit)return a.code_review_rate_limit||a.review_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b.code_review||b.codex_review||b.review||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return"code_review"===b||"codex_review"===b||"review"===b||b.includes("review")})||null}(g),l=Math.max(0,(0,e.IQ)(g.rate_limit_reset_credits?.available_count,0)),m={};return j(m,"",i),j(m,"review",k),{plan:g.plan_type||g.summary?.plan||"unknown",limitReached:h(i)?.limit_reached||!1,reviewLimitReached:h(k)?.limit_reached||!1,resetCredits:{availableCount:l},quotas:m}}catch(a){throw Error(`Failed to fetch Codex usage: ${a.message}`)}}async function l(a,b=null,c=null){var h,i;if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");let j=c?.workspaceId||c?.accountId||c?.chatgptAccountId||null,k={Authorization:`Bearer ${a}`,Accept:"application/json","OpenAI-Beta":"codex-1",originator:"codex_cli_rs"};j&&(k["ChatGPT-Account-ID"]=j);let m=await (0,d.proxyAwareFetch)(f.resetCreditsUrl,{method:"GET",headers:k},b),n=null;try{n=await m.json()}catch{n=null}if(!m.ok)throw Error((h=n?.message||n?.error||n?.detail,i=`Codex reset credits API unavailable (${m.status}).`,h?"string"==typeof h?h:"string"==typeof h.message?h.message:JSON.stringify(h):i));let o=Array.isArray(n?.credits)?n.credits:[];return{availableCount:Math.max(0,(0,e.IQ)(n?.available_count??n?.availableCount,0)),credits:o.map(a=>({status:String(a?.status||"unknown"),grantedAt:g(a?.granted_at??a?.grantedAt),expiresAt:g(a?.expires_at??a?.expiresAt)}))}}async function m(a,b,c=null){let g;if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");if(!b||"string"!=typeof b)throw Error("A redeem request id is required to consume a Codex reset credit.");let h=null;try{g=await (0,d.proxyAwareFetch)(f.resetCreditsConsumeUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({redeem_request_id:b})},c);let e=await g.text();h=e?JSON.parse(e):null}catch(a){throw Error(`Failed to consume Codex reset credit: ${a.message}`)}let i=h?.code||null,j=(0,e.IQ)(h?.windows_reset,0);return{ok:g.ok&&("reset"===i||j>0),noCredit:g.ok&&"no_credit"===i,status:g.status,code:i,windowsReset:j,message:h?.message||null,raw:h}}},12132:(a,b,c)=>{c.d(b,{$6:()=>G,Fp:()=>I,ND:()=>p,Nv:()=>F,XX:()=>x,getMimoAccountCookie:()=>H,readDesktopPassToken:()=>A});var d=c(73024),e=c.n(d),f=c(48161),g=c.n(f),h=c(76760),i=c.n(h),j=c(77598),k=c.n(j),l=c(39609);let m={cn:"https://mimo-server-cn.xiaomimimo.com",sgp:"https://mimo-server-sgp.xiaomimimo.com",ams:"https://mimo-server-ams.xiaomimimo.com",ru:"https://mimo-server-ru.xiaomimimo.com",in:"https://mimo-server-in.xiaomimimo.com"},n={cn:"mimopc",sgp:"mimosgp",ams:"mimoams",ru:"mimoru",in:"mimoin"};function o(a=null){return String(a?.region||"").toLowerCase()}function p(a=null){return m[o(a)]||m.cn}m.cn;let q="account.xiaomi.com",r="miNative PC/Normal Windows_NT/10.0.19045 SDKV/1.0.0 DEVT/PC DEVS/Windows APP/miaccount_desktop APPV/0.1.0",s="MiClaw/1.0",t=new Set(["EBUSY","EPERM","EACCES"]),u=new Map,v=new Map,w="Xiaomi MiMo";function x(){let a=g().homedir(),b=i().join(a,".local","share","mimocode"),c=process.env.XDG_DATA_HOME,d=c?i().join(c,"mimocode"):b;return(d===b?[d]:[d,b]).map(a=>i().join(a,"auth.json"))}async function y(){let a,b=i().join((a=g().homedir(),"win32"===process.platform?i().join(process.env.APPDATA||i().join(a,"AppData","Roaming"),w):"darwin"===process.platform?i().join(a,"Library","Application Support",w):i().join(process.env.XDG_CONFIG_HOME||i().join(a,".config"),w)),"Partitions","xiaomi-account","Network","Cookies");if(!e().existsSync(b))return null;let d=i().join(g().tmpdir(),`10router-mimo-cookies-${process.pid}-${k().randomBytes(4).toString("hex")}.db`);try{e().copyFileSync(b,d)}catch(a){if(t.has(a?.code)){let a=Error("Xiaomi MiMo Desktop is holding its cookie store (quit the app and retry)");throw a.code="DESKTOP_LOCKED",a}return null}try{e().chmodSync(d,384)}catch{}try{let{DatabaseSync:a}=await Promise.resolve().then(c.t.bind(c,80099,23)),b=null;try{let c=(b=new a(d,{readOnly:!0})).prepare("SELECT name, value FROM cookies WHERE host_key = ?").all("."+q),e=Object.fromEntries(c.map(a=>[a.name,a.value]));return e.passToken?e:null}finally{try{b?.close()}catch{}}}catch{return null}finally{await z(d)}}async function z(a){for(let b=0;b<3;b++)try{e().unlinkSync(a);return}catch(a){if("ENOENT"===a.code)return;b<2&&await new Promise(a=>setTimeout(a,20))}}async function A(){try{let a=await y();if(!a?.passToken)return null;return{passToken:a.passToken,userId:a.userId||null,cUserId:a.cUserId||null}}catch(a){if(a?.code==="DESKTOP_LOCKED")throw a;return null}}function B(a,b){for(let c of b.headers.getSetCookie?.()||[]){let b=/^([^=]+)=([^;]*)/.exec(c.trim());b&&b[2]&&(a[b[1]]=b[2])}}function C(a){return Object.entries(a).filter(([,a])=>a).map(([a,b])=>`${a}=${b}`).join("; ")}async function D(a,b,c=null){var d;let e,f={...a},g=p(c),h=function(a=null){return n[o(a)]||n.cn}(c),i=(await (0,l.proxyAwareFetch)(`${g}/api/user/xiaomi/me`,{redirect:"manual",headers:{"User-Agent":r,Cookie:C(f)},signal:AbortSignal.timeout(1e4)},b)).headers.get("location");if(!i)return null;let j=new URL(i).searchParams.get("callback");if(!j)return null;let m=await (0,l.proxyAwareFetch)(`https://${q}/pass/serviceLogin?sid=passportapi&_json=true`,{headers:{Cookie:C(f),"User-Agent":s,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b),t=JSON.parse((await m.text()).replace(/^&&&START&&&/,"")),u=t.nonce||(t.location?new URL(t.location).searchParams.get("nonce"):null);if(!u||!t.location)return null;let v=await (0,l.proxyAwareFetch)(`${t.location}&clientSign=${(e=`nonce=${u}`+((d=t.ssecurity)&&d.trim()?`&${d}`:""),encodeURIComponent(k().createHash("sha1").update(e).digest("base64")))}`,{redirect:"manual",headers:{Cookie:C(f),"User-Agent":s},signal:AbortSignal.timeout(1e4)},b);B(f,v);let w=await (0,l.proxyAwareFetch)(`https://${q}/pass/serviceLogin?sid=${encodeURIComponent(h)}&callback=${encodeURIComponent(j)}&_json=true`,{headers:{Cookie:C(f),"User-Agent":s,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b),x=JSON.parse((await w.text()).replace(/^&&&START&&&/,""));if(B(f,w),!x?.location||!/\/api\/sts/.test(x.location))return null;let y=await (0,l.proxyAwareFetch)(x.location,{redirect:"manual",headers:{"User-Agent":r,Cookie:C(f)},signal:AbortSignal.timeout(1e4)},b);if(B(f,y),!f.serviceToken)return null;let z={};for(let a of["serviceToken","mimopc_ph","mimopc_slh","userId"])f[a]&&(z[a]=f[a]);return C(z)}async function E(a,b){let c=a?.mimoPassToken?{passToken:a.mimoPassToken,userId:a.mimoUserId,cUserId:a.mimoCUserId}:null;if(!c)try{c=await y()}catch(a){if(a?.code==="DESKTOP_LOCKED")return{cookie:null,reason:"desktop-locked"};throw a}if(!c)return{cookie:null,reason:"no-pass-token"};let d=k().createHash("sha256").update(`${c.passToken}|${o(a)}`).digest("hex"),e=u.get(d);if(e&&Date.now()-e.at<18e5)return{cookie:e.cookie};let f=v.get(d);if(f){let a=await f;return a?{cookie:a}:{cookie:null,reason:"sso-failed"}}let g=(async()=>{try{return await D(c,b,a)}catch{return null}finally{v.delete(d)}})();v.set(d,g);let h=await g;return h?(u.set(d,{cookie:h,at:Date.now()}),{cookie:h}):{cookie:null,reason:"sso-failed"}}function F(){u.clear()}let G=r;async function H(a=null,b=null){try{let{cookie:c}=await E(a,b);return c}catch{return null}}async function I(a=null,b=null){let{cookie:c,reason:d}=await E(a,b);if(!c)return{error:"no-pass-token"===d||"desktop-locked"===d?"no-session":"session-failed"};try{let d=await (0,l.proxyAwareFetch)(`${p(a)}/api/user/usage`,{headers:{"User-Agent":r,Cookie:c,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b);if(!d.ok)return{error:`http-${d.status}`};let e=await d.json().catch(()=>null);if(!e||0!==e.code||!e.data)return{error:"bad-response"};return{percent:e.data.percent,resetDate:e.data.resetDate,resetAt:e.data.resetAt}}catch(a){return{error:a.message}}}},24295:(a,b,c)=>{c.d(b,{IQ:()=>h,U:()=>f,eZ:()=>g,gD:()=>i,u9:()=>j});var d=c(26070),e=c(39609);let f=a=>d.xq[a]?.usage||{};function g(a){if(!a)return null;try{if(a instanceof Date)return a.toISOString();if("number"==typeof a)return new Date(a<1e12?1e3*a:a).toISOString();if("string"==typeof a){if(/^\d+$/.test(a)){let b=Number(a);return new Date(b<1e12?1e3*b:b).toISOString()}return new Date(a).toISOString()}return null}catch(b){return console.warn(`Failed to parse reset time: ${a}`,b),null}}function h(a,b=0){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return b}function i(a){return"string"==typeof a?a.trim()||null:a&&"object"==typeof a&&"string"==typeof a.id&&a.id.trim()||null}async function j(a,b,c=1e4,d=null){let f=new AbortController,g=setTimeout(()=>f.abort(),c);try{return await (0,e.proxyAwareFetch)(a,{...b,signal:f.signal},d)}finally{clearTimeout(g)}}},39326:(a,b,c)=>{c.d(b,{B:()=>j,p:()=>i});var d=c(71998),e=c(72082);function f(a){return null==a?"":String(a).trim()}function g(a){let b=f(a);if(!b)return"";if((0,e.isEncrypted)(b))try{return f((0,e.decryptSecret)(b))}catch(a){console.warn(`[ConnectionProxy] Could not decrypt proxy URL: ${a?.message||a}`)}return b}let h=new Map;function i(a,b,c){if(!a||0===a.length)return null;if(1===a.length)return a[0];if("round-robin"===b){let b=h.get(c)||{index:-1};return b.index=(b.index+1)%a.length,h.set(c,b),a[b.index]}return"random"===b?a[Math.floor(Math.random()*a.length)]:a[0]}async function j(a={}){try{let b=f(a?.proxyPoolId),c="__none__"===b?"":b,e=function(a={}){let b=a?.connectionProxyEnabled===!0,c=g(a?.connectionProxyUrl),d=f(a?.connectionNoProxy);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:d,strictProxy:a?.strictProxy===!0}}(a),h=!1;if(c){let a=await (0,d.hr)(c);h=a?.strictProxy===!0;let b=g(a?.proxyUrl),e=f(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type||"cloudflare"===a.type||"deno"===a.type)return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:e,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:e,strictProxy:!0===a.strictProxy}}}if(e.connectionProxyEnabled&&e.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...e,strictProxy:h||e.strictProxy};return{source:"none",proxyPoolId:c||null,proxyPool:null,...e,strictProxy:h||e.strictProxy}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},44725:(a,b,c)=>{c.d(b,{K$:()=>m,zP:()=>l});var d=c(77598),e=c(39609);let f="I*7Cf%WZ#S&%1RlZJ&C2",g={"minimax-code":{agent:"https://agent.minimaxi.com",platform:"https://www.minimaxi.com",lang:"zh"},"minimax-code-global":{agent:"https://agent.minimax.io",platform:"https://platform.minimax.io",lang:"en"}},h=a=>(0,d.createHash)("md5").update(a).digest("hex"),i=a=>a&&"object"==typeof a&&!Array.isArray(a)?a:void 0,j=a=>"number"==typeof a&&Number.isFinite(a)?a:void 0,k=(a,b)=>"string"==typeof a?.[b]&&a[b].trim()?a[b].trim():void 0;function l(a,b,{access:c,userID:d,body:e,now:g=Date.now(),tzOffsetSec:i=-60*new Date().getTimezoneOffset()}={}){let j=new URL(b,a.agent);j.search=new URLSearchParams({device_platform:"mcode",biz_id:"3",app_id:"3001",version_code:"22201",unix:String(g),timezone_offset:String(i),sys_language:a.lang,lang:a.lang,device_id:"0",os_name:process.platform,browser_name:"mcode",user_id:String(d??"").trim()||"0",client:"mcode"}).toString();let k=j.pathname+j.search,m=Math.floor(g/1e3),n=void 0===e?void 0:JSON.stringify(e),o={Accept:"application/json","Content-Type":"application/json","User-Agent":"MiniMaxCode",Authorization:`Bearer ${c}`,yy:void 0===n?h(`${encodeURIComponent(k)}_{}${h(String(g))}ooui`):h(`${encodeURIComponent(k)}_${n}${h(String(g))}ooui`),"x-timestamp":String(m),"x-signature":void 0===n?h(`${m}${f}`):h(`${m}${f}${n}`)};return{url:j.toString(),init:{method:void 0===n?"GET":"POST",headers:o,...void 0===n?{}:{body:n}}}}async function m(a,b,c=null,d=null){let f=g[b];if(!f||!a)return{message:`Usage API not implemented for ${b}`};let h={},n=null;try{let b=d?.opGroupId,g=await (0,e.proxyAwareFetch)(`${f.platform}/v1/api/openplatform/coding_plan/remains`,{headers:{Accept:"application/json",Authorization:`Bearer ${a}`,...b?{"X-Group-Id":b}:{}},signal:AbortSignal.timeout(15e3)},c);if(401===g.status||403===g.status)return{message:"MiniMax Code session expired or unauthorized. Please re-authenticate."};if(g.ok){let a=await g.json().catch(()=>null);for(let b of function(a){let b=i(a?.base_resp);if(b&&"number"==typeof b.status_code&&0!==b.status_code)throw Error(k(b,"status_msg")??`MiniMax said ${b.status_code}`);if(!b&&!Array.isArray(a?.model_remains))throw Error("no plan in the reply");let c=a=>a<1e12?1e3*a:a,d=a=>0===j(a),e=[];for(let b of Array.isArray(a.model_remains)?a.model_remains:[]){let a=String(b?.model_name??"").trim();if(!a||3===j(b.current_interval_status)&&3===j(b.current_weekly_status)&&d(b.current_interval_total_count)&&d(b.current_weekly_total_count))continue;let f="general"===a.toLowerCase();for(let d of[{left:j(b.current_interval_remaining_percent),status:j(b.current_interval_status)??0,start:j(b.start_time)??0,end:j(b.end_time)??0,week:!1},{left:j(b.current_weekly_remaining_percent),status:j(b.current_weekly_status)??0,start:j(b.weekly_start_time)??0,end:j(b.weekly_end_time)??0,week:!0}]){if(3===d.status||void 0===d.left&&2!==d.status)continue;let b=2===d.status?0:Math.max(0,Math.min(100,d.left)),g=0;d.start>0&&d.end>d.start?g=c(d.end)-c(d.start):d.week&&(g=6048e5);let h=d.week?"7 days":g>864e5&&g%864e5==0?`${g/864e5} days`:g>=36e5&&g%36e5==0?`${g/36e5} hours`:g>0?`${Math.floor(g/6e4)} minutes`:"Allowance",i=f?h:`${a[0].toUpperCase()+a.slice(1)} \xb7 ${h}`;e.push({name:i,used:100-b,total:100,remaining:b,remainingPercentage:b,resetAt:d.end>0?new Date(c(d.end)).toISOString():null,recurring:!0})}}return e}(a))h[b.name]=b}}catch(a){n=a}try{let b=d?.realUserID,{url:g,init:j}=l(f,"/matrix/api/v1/commerce/get_membership_info",{access:a,userID:b,body:{}}),m=await (0,e.proxyAwareFetch)(g,j,c);if(m.ok){let a=await m.json().catch(()=>null),b=i(a?.data),c=i(a?.op_credit_summary)??i(b?.op_credit_summary),d=k(c,"total_remaining_amount")??k(a,"opcredit_balance")??k(b,"opcredit_balance");if(void 0!==d){let a=Number(d);h.Credits={name:"Credits",used:0,total:Number.isFinite(a)?a:0,remaining:Number.isFinite(a)?a:0,isCreditBalance:!0,currency:"credits"}}}}catch{}return 0===Object.keys(h).length?n?{message:`MiniMax Code usage fetch failed: ${n.message}`}:{message:"No active MiniMax Code subscription found."}:{quotas:h}}},67978:(a,b,c)=>{c.d(b,{Ut:()=>k.Ut,RO:()=>l.RO,Yt:()=>l.Yt,my:()=>aA});var d=c(39609),e=c(26070),f=c(24295);let g={apiVersion:e.sr.github?.apiVersion,userAgent:e.sr.github?.userAgent};async function h(a,b,c=null){try{if(!a)throw Error("No GitHub access token available. Please re-authorize the connection.");let b=await (0,d.proxyAwareFetch)((0,f.U)("github").url,{headers:{Authorization:`token ${a}`,Accept:"application/json","X-GitHub-Api-Version":g.apiVersion,"User-Agent":g.userAgent,"Editor-Version":"vscode/1.100.0","Editor-Plugin-Version":"copilot-chat/0.26.7"}},c);if(!b.ok){let a=await b.text();throw Error(`GitHub API error: ${a}`)}let e=await b.json();if(e.quota_snapshots){let a=e.quota_snapshots,b=(0,f.eZ)(e.quota_reset_date);return{plan:e.copilot_plan,resetDate:e.quota_reset_date,quotas:{chat:{...i(a.chat),resetAt:b},completions:{...i(a.completions),resetAt:b},premium_interactions:{...i(a.premium_interactions),resetAt:b}}}}if(e.monthly_quotas||e.limited_user_quotas){let a=e.monthly_quotas||{},b=e.limited_user_quotas||{},c=(0,f.eZ)(e.limited_user_reset_date);return{plan:e.copilot_plan||e.access_type_sku,resetDate:e.limited_user_reset_date,quotas:{chat:{used:b.chat||0,total:a.chat||0,unlimited:!1,resetAt:c},completions:{used:b.completions||0,total:a.completions||0,unlimited:!1,resetAt:c}}}}return{message:"GitHub Copilot connected. Unable to parse quota data."}}catch(a){throw Error(`Failed to fetch GitHub usage: ${a.message}`)}}function i(a){return a?{used:a.entitlement-a.remaining,total:a.entitlement,remaining:a.remaining,unlimited:a.unlimited||!1}:{used:0,total:0,unlimited:!0}}var j=c(87283),k=c(69788),l=c(6551),m=c(6382);async function n(a,b,c=null){let e=b?.authMethod||"builder-id",g="api_key"===e,h=g?{tokentype:"API_KEY"}:{},i="external_idp"===e?{TokenType:"EXTERNAL_IDP"}:{},j=g?b?.profileArn||"":b?.profileArn||(0,m.We)(e),k=new URLSearchParams({isEmailRequired:"true",origin:"AI_EDITOR",resourceType:"AGENTIC_REQUEST"}),l=!1,o=[];for(let b of[{name:"codewhisperer-get",run:async()=>(0,d.proxyAwareFetch)(`${(0,f.U)("kiro").cwHost}${(0,f.U)("kiro").limitsPath}?${k.toString()}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","x-amz-user-agent":"aws-sdk-js/1.0.0 KiroIDE","user-agent":"aws-sdk-js/1.0.0 KiroIDE",...h,...i}},c)},{name:"codewhisperer-post",run:async()=>(0,d.proxyAwareFetch)((0,f.U)("kiro").cwHost,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.GetUsageLimits",Accept:"application/json",...h,...i},body:JSON.stringify({origin:"AI_EDITOR",...j?{profileArn:j}:{},resourceType:"AGENTIC_REQUEST"})},c)},{name:"q-get",run:async()=>{let b=new URLSearchParams({origin:"AI_EDITOR",...j?{profileArn:j}:{},resourceType:"AGENTIC_REQUEST"});return(0,d.proxyAwareFetch)(`${(0,f.U)("kiro").qHost}${(0,f.U)("kiro").limitsPath}?${b}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json",...h,...i}},c)}}])try{let a=await b.run();if(!a.ok){let c=await a.text().catch(()=>"");(401===a.status||403===a.status)&&(l=!0),o.push(`${b.name}:${a.status}${c?`:${c}`:""}`);continue}let c=await a.json();return function(a){let b=a.usageBreakdownList||[],c={},d=(0,f.eZ)(a.nextDateReset||a.resetDate);return b.forEach(a=>{let b=a.resourceType?.toLowerCase()||"unknown",e=a.currentUsageWithPrecision||0,g=a.usageLimitWithPrecision||0;if(c[b]={used:e,total:g,remaining:g-e,resetAt:d,unlimited:!1},a.freeTrialInfo){let e=a.freeTrialInfo.currentUsageWithPrecision||0,g=a.freeTrialInfo.usageLimitWithPrecision||0;c[`${b}_freetrial`]={used:e,total:g,remaining:g-e,resetAt:(0,f.eZ)(a.freeTrialInfo.freeTrialExpiry||d),unlimited:!1}}}),{plan:a.subscriptionInfo?.subscriptionTitle||"Kiro",quotas:c}}(c)}catch(a){o.push(`${b.name}:${a.message}`)}return l&&"idc"===e?{message:"Kiro quota API is unavailable for the current AWS IAM Identity Center session. Chat may still work. If this persists after renewing your session, reconnect Kiro.",quotas:{}}:l&&("google"===e||"github"===e)?{message:"Kiro quota API authentication expired. Chat may still work.",quotas:{}}:l?{message:"Kiro quota API rejected the current token. Chat may still work.",quotas:{}}:{message:o.length>0?`Unable to fetch Kiro usage right now. (${o[o.length-1]})`:"Unable to fetch Kiro usage right now.",quotas:{}}}let o={minimax:(0,f.U)("minimax").urls,"minimax-cn":(0,f.U)("minimax-cn").urls};function p(a,b,c){return a&&"object"==typeof a?a[b]??a[c]??null:null}function q(a,b,c){if(!a||"object"!=typeof a)return null;let d=a[b]??a[c];if(null==d)return null;let e=Number(d);return Number.isFinite(e)?Math.max(0,Math.min(100,e)):null}function r(a){return Math.max(0,Number(p(a,"current_interval_total_count","currentIntervalTotalCount"))||0)}function s(a){return Math.max(0,Number(p(a,"current_weekly_total_count","currentWeeklyTotalCount"))||0)}function t(a){return!!(r(a)>0||s(a)>0)||null!==q(a,"current_interval_remaining_percent","currentIntervalRemainingPercent")||null!==q(a,"current_weekly_remaining_percent","currentWeeklyRemainingPercent")}function u(a,b,c,d,e,g,h,i,j,k){let l=d(c),m=q(c,h,i);if(l<=0&&null===m)return;let n=Math.max(0,Number(p(c,e,g))||0),o=l,r=n;l<=0&&(o=100,r=k?Math.round(m/100*o):Math.round(o*(1-m/100))),a[b]=function(a,b,c,d,e=null){var f,g,h;let i=Math.max(0,a),j=d?Math.max(i-b,0):Math.min(Math.max(0,b),i),k=Math.max(i-j,0),l=(f=e,g=k,h=i,null!=f&&Number.isFinite(f)?Math.max(0,Math.min(100,f)):h>0?Math.max(0,Math.min(100,g/h*100)):0);return{used:j,total:i,remaining:k,remainingPercentage:l,resetAt:c,unlimited:!1}}(o,r,function(a,b,c,d,e,g){let h=Number(p(a,c,d))||0;return h>0?new Date(b+h).toISOString():(0,f.eZ)(p(a,e,g))}(c,...j),k,m)}async function v(a,b,c=null){if(!a)return{message:"MiniMax API key not available."};let e=o[b]||[],f="";for(let b=0;b<e.length;b+=1){let g=e[b],h=b<e.length-1;try{let b=await (0,d.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"}},c),e=await b.text(),i={};if(e)try{i=JSON.parse(e)}catch{i={}}let j=(i?.base_resp??i?.baseResp)||{},k=Number(j.status_code??j.statusCode)||0,l=String(j.status_msg??j.statusMsg??"").trim(),m=`${l} ${e}`.trim(),n=/token plan|coding plan|invalid api key|invalid key|unauthorized|inactive/i;if(401===b.status||403===b.status||1004===k||n.test(m))return{message:"MiniMax API key invalid or inactive. Use an active Token/Coding Plan key."};if(!b.ok){if(f=`MiniMax usage endpoint error (${b.status})`,(404===b.status||405===b.status||b.status>=500)&&h)continue;return{message:`MiniMax connected. ${f}`}}if(0!==k)return{message:`MiniMax connected. ${l||"Upstream quota API error"}`};let o=i?.model_remains??i?.modelRemains,q=(Array.isArray(o)?o:[]).filter(t);if(0===q.length)return{message:"MiniMax connected. No quota data was returned."};let v=Date.now(),w=g.includes("/coding_plan/remains"),x={};for(let a of q){let b=function(a){let b=String(p(a,"model_name","modelName")||"").trim();return b?"MiniMax-M*"===b||"general"===b?"M-series":b.replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,a=>a.toUpperCase()).replace(/\bTo\b/g,"to").replace(/\bTts\b/g,"TTS").replace(/\bHd\b/g,"HD"):"MiniMax"}(a);u(x,`${b} (5h)`,a,r,"current_interval_usage_count","currentIntervalUsageCount","current_interval_remaining_percent","currentIntervalRemainingPercent",[v,"remains_time","remainsTime","end_time","endTime"],w),u(x,`${b} (7d)`,a,s,"current_weekly_usage_count","currentWeeklyUsageCount","current_weekly_remaining_percent","currentWeeklyRemainingPercent",[v,"weekly_remains_time","weeklyRemainsTime","weekly_end_time","weeklyEndTime"],w)}if(0===Object.keys(x).length)return{message:"MiniMax connected. Unable to extract quota usage."};return{quotas:x}}catch(a){if(f=a.message,!h)break}}return{message:f?`MiniMax connected. Unable to fetch usage: ${f}`:"MiniMax connected. Unable to fetch usage."}}function w(a,b){let c=Number(a??b);return Number.isFinite(c)?c:0}async function x(a,b,c,g,h=null){let i=b||c;if(!i)return{message:`CodeBuddy (${a}) credential not available.`};try{let b=await (0,d.proxyAwareFetch)((0,f.U)(a).url,{method:"POST",headers:{...e.xq[a]?.headers||{},Authorization:`Bearer ${i}`,"Content-Type":"application/json",Accept:"application/json"},body:"{}"},h);if(401===b.status||403===b.status)return{message:"CodeBuddy CN credential invalid or expired."};if(!b.ok)return{message:`CodeBuddy CN quota API error (${b.status}).`};let c=await b.json();if(c?.code!==0)return{message:`CodeBuddy CN quota error: ${c?.msg||"unknown"}`};let g=c?.data?.Response?.Data||{},j=Array.isArray(g.Accounts)?g.Accounts:[];if(0===j.length)return{message:"CodeBuddy CN connected. No credit package found."};let k=a=>{let b=(0,f.eZ)(a.CycleEndTime);return b?new Date(b).getTime():1/0},l=a=>{let b=k(a),c=Number(a.DeductionEndTime);return Number.isFinite(b)&&Number.isFinite(c)&&c-b>1728e5},m=(a,b)=>k(a)-k(b),n=j.filter(l).sort(m),o=j.filter(a=>!l(a)).sort(m),p={},q=0,r=0;n.forEach(a=>{q+=w(a.CycleCapacityUsedPrecise,a.CycleCapacityUsed),r+=w(a.CycleCapacitySizePrecise,a.CycleCapacitySize)}),o.forEach(a=>{q+=w(a.CapacityUsedPrecise,a.CapacityUsed),r+=w(a.CapacitySizePrecise,a.CapacitySize)}),p["Total Points"]={used:Math.round(100*q)/100,total:Math.round(100*r)/100,resetAt:null,unlimited:!1,recurring:!1};let s={};n.forEach(a=>{let b=function(a){let b=(0,f.eZ)(a.CycleStartTime),c=(0,f.eZ)(a.CycleEndTime);if(b&&c){let a=(new Date(c).getTime()-new Date(b).getTime())/864e5;if(a<=1.5)return"Daily";if(a<=10)return"Weekly"}return"Monthly"}(a);s[b]=(s[b]||0)+1,p[s[b]>1?`${b} ${s[b]}`:b]={used:w(a.CycleCapacityUsedPrecise,a.CycleCapacityUsed),total:w(a.CycleCapacitySizePrecise,a.CycleCapacitySize),resetAt:(0,f.eZ)(a.CycleEndTime),unlimited:!1,recurring:!0,giftPack:!0}}),o.forEach((a,b)=>{p[`Bonus Pack ${b+1}`]={used:w(a.CapacityUsedPrecise,a.CapacityUsed),total:w(a.CapacitySizePrecise,a.CapacitySize),resetAt:(0,f.eZ)(a.CycleEndTime),unlimited:!1,recurring:!1}});let t=Date.now(),u=j.some(a=>{let b=Number(a.CycleStartTime);if(!b)return!1;let c=new Date(b<1e12?1e3*b:b),d=new Date(t);return c.getFullYear()===d.getFullYear()&&c.getMonth()===d.getMonth()&&c.getDate()===d.getDate()}),v=n[0]||j[0]||{};return{plan:v.PackageName||v.SubProductName||"CodeBuddy",quotas:p,checkinToday:u}}catch(b){return{message:`CodeBuddy (${a}) error: ${b.message}`}}}async function y(a,b,c,d=null){return x("codebuddy-cn",a,b,c,d)}async function z(a,b,c,d=null){return x("codebuddy-intl",a,b,c,d)}var A=c(90737);function B(a,b=0){if(!Buffer.isBuffer(a)||b<0||a.length-b<5)return null;let c=a[b];if(0!==c&&1!==c&&128!==c&&129!==c)return null;let d=b+5,e=a.readUInt32BE(b+1);return e>a.length-d?null:{flag:c,payloadStart:d,payloadLength:e}}function C(a,b){let c=0n,d=0n,e=b;for(;;){if(e>=a.length)return null;let b=a[e];if(c|=BigInt(127&b)<<d,e+=1,(128&b)==0)break;if((d+=7n)>70n)return null}return{value:Number(c),next:e}}function D(a,b,c,d){return b+c>a.length?null:{field:{wireType:d,bytes:a.subarray(b,b+c)},next:b+c}}function E(a){let b=new Map,c=0;for(;c<a.length;){let d=function(a,b){let c=C(a,b);if(!c)return null;let d=c.value>>>3,e=7&c.value;if(0===d)return null;if(0===e){let b=C(a,c.next);return b?{fieldNumber:d,field:{wireType:0,value:b.value},next:b.next}:null}if(2===e){let b=function(a,b){let c=C(a,b);if(!c)return null;let{value:d,next:e}=c;return d<0||e+d>a.length?null:{field:{wireType:2,bytes:a.subarray(e,e+d)},next:e+d}}(a,c.next);return b?{fieldNumber:d,field:b.field,next:b.next}:null}if(1===e){let b=D(a,c.next,8,1);return b?{fieldNumber:d,field:b.field,next:b.next}:null}if(5===e){let b=D(a,c.next,4,5);return b?{fieldNumber:d,field:b.field,next:b.next}:null}return null}(a,c);if(!d)return null;b.set(d.fieldNumber,d.field),c=d.next}return b}let F=(0,f.U)("grok-cli"),G=F.url||"https://cli-chat-proxy.grok.com/v1/billing?format=credits",H=F.userUrl||"https://cli-chat-proxy.grok.com/v1/user?include=subscription",I=Buffer.from([0,0,0,0,0]);function J(a,b=0){return null==a?b:"object"==typeof a&&!Array.isArray(a)&&"val"in a?(0,f.IQ)(a.val,b):(0,f.IQ)(a,b)}function K(a,b){let c=a?.subscriptionTier??a?.subscription_tier??a?.subscription?.tier??b?.subscriptionTier??b?.subscription_tier;return"string"==typeof c?c.trim():""}function L({used:a,total:b,resetAt:c,unlimited:d=!1}){let e=Math.max(0,(0,f.IQ)(b,0)),g=Math.max(0,(0,f.IQ)(a,0));if(d||0===e)return{used:g,total:0,remainingPercentage:100*!!d,resetAt:c||null,unlimited:!0};let h=Math.max(0,e-g);return{used:g,total:e,remainingPercentage:h/e*100,resetAt:c||null,unlimited:!1}}async function M(a,b=null){if(!a)return null;try{let c=await (0,d.proxyAwareFetch)("https://grok.com/grok_api_v2.GrokBuildBilling/GetGrokCreditsConfig",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/grpc-web+proto","X-Grpc-Web":"1",Accept:"application/grpc-web+proto"},body:I},b);if(!c?.ok)return null;let e=await c.arrayBuffer().catch(()=>null);if(!e)return null;return function(a){if(!a||!Buffer.isBuffer(a)||0===a.length)return null;try{var b,c;let d=null!==B(a,0)?function(a){let b=0;for(;b<a.length;){let c=B(a,b);if(!c)break;let d=c.payloadStart+c.payloadLength;if((128&c.flag)==0)return a.subarray(c.payloadStart,d);b=d}return null}(a):a;if(!d)return null;let e=E(d);if(!e)return null;let f=(b=e.get(1))&&2===b.wireType?E(b.bytes):null;if(!f)return null;let g=(c=f.get(1))?5===c.wireType?c.bytes.readFloatLE(0):1===c.wireType?c.bytes.readDoubleLE(0):null:0;if(null===g||!Number.isFinite(g)||g<0)return null;return{percentUsed:Math.min(100,100*g),resetAt:function(a){if(!a||2!==a.wireType)return null;let b=E(a.bytes);if(!b)return null;let c=b.get(1),d=b.get(2),e=c?.wireType===0?c.value:0,f=new Date(1e3*e+Math.round((d?.wireType===0?d.value:0)/1e6));return Number.isNaN(f.getTime())?null:f.toISOString()}(f.get(5))}}catch{return null}}(Buffer.from(e))}catch{return null}}async function N(a,b=null,c=null){if(!a)return{message:"Grok CLI access token not available."};let e=function(a,b={}){let c=b||{},d={Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":A.fZ,"x-xai-token-auth":"xai-grok-cli","x-grok-client-identifier":A.rK,"x-grok-client-version":A.uG,"x-grok-client-mode":"headless"},e=c.email,f=c.userId||c.principalId;return e&&(d["x-email"]=e),f&&(d["x-userid"]=f),d}(a,b);try{let[b,h]=await Promise.all([(0,d.proxyAwareFetch)(G,{method:"GET",headers:e},c),(0,d.proxyAwareFetch)(H,{method:"GET",headers:e},c).catch(()=>null)]);if(401===b.status||403===b.status)return{message:"Grok CLI authentication expired. Please re-authorize."};if(!b.ok){let a=await b.text().catch(()=>""),c=a?`: ${a.slice(0,200)}`:"";return{message:`Grok CLI billing API error (${b.status})${c}`}}let i=await b.json().catch(()=>null);if(!i||"object"!=typeof i)return{message:"Grok CLI billing response was not JSON."};let j=null;h?.ok&&(j=await h.json().catch(()=>null));let k=function(a,b=null){let c,d=a&&"object"==typeof a?a:{},e=d.config&&"object"==typeof d.config&&!Array.isArray(d.config)?d.config:d,g=(0,f.eZ)(e.billingPeriodEnd)||(0,f.eZ)(e.billing_period_end)||(0,f.eZ)(e.currentPeriod?.end)||(0,f.eZ)(e.resetAt||e.resetsAt||e.periodEnd)||(0,f.eZ)(d.billingPeriodEnd)||(0,f.eZ)(d.billing_period_end)||(0,f.eZ)(d.resetAt||d.resetsAt||d.periodEnd)||null,h={},i=K(b,e),j=!!i&&!/^(free|none|null)$/i.test(i),k=J(e.monthlyLimit??e.monthly_limit??d.monthlyLimit??d.monthly_limit,NaN),l=J(e.includedUsed??e.included_used??d.includedUsed??d.included_used,NaN),m=J(e.totalUsed??e.total_used??d.totalUsed??d.total_used,NaN);Number.isFinite(k)&&k>0&&(h["Monthly included"]=L({used:Number.isFinite(l)?l:Number.isFinite(m)?m:0,total:k,resetAt:g}));let n=J(e.onDemandCap??d.onDemandCap,NaN),o=J(e.onDemandUsed??d.onDemandUsed,NaN);if(Number.isFinite(n)&&n>0){let a=Number.isFinite(o)?Math.max(0,o):0;h["On-demand"]=L({used:a,total:n,resetAt:g})}else!j&&Number.isFinite(n)&&0===n&&Number.isFinite(o)&&(h["On-demand"]={used:1,total:1,remainingPercentage:0,resetAt:g,unlimited:!1});let p=J(e.prepaidBalance??d.prepaidBalance,NaN);Number.isFinite(p)&&p>0&&(h.Prepaid={used:0,total:p,remainingPercentage:100,resetAt:null,unlimited:!1});let q=J(e.creditUsagePercent??e.credit_usage_percent??d.creditUsagePercent,NaN);for(let a of(Number.isFinite(q)&&q>=0&&(h["Weekly SuperGrok"]=L({used:Math.max(0,Math.min(100,q)),total:100,resetAt:g})),[d.credits,d.creditBalance,d.usage,e.credits,e.includedCredits,e.subscriptionCredits].filter(a=>a&&"object"==typeof a&&!Array.isArray(a)))){let b=J(a.total??a.limit??a.cap??a.allocation??a.amount,NaN),c=J(a.used??a.spent??a.consumed,NaN),d=J(a.remaining??a.balance??a.left,NaN);if(Number.isFinite(b)&&b>0){let e=Number.isFinite(c)?c:Number.isFinite(d)?Math.max(0,b-d):0;h.Credits||(h.Credits=L({used:e,total:b,resetAt:(0,f.eZ)(a.resetAt||a.resetsAt||a.end)||g}))}else Number.isFinite(d)&&d>=0&&!h.Credits&&(h.Credits={used:0,total:d>0?d:1,remainingPercentage:100*(d>0),resetAt:g,unlimited:!1})}let r=Object.keys(h).length>0&&Object.values(h).every(a=>!0!==a.unlimited&&(a.remainingPercentage??100)<=0);return{plan:(c=K(b,e))?c.replace(/[_-]+/g," ").replace(/\b\w/g,a=>a.toUpperCase()):b?.hasGrokCodeAccess===!0?"Grok Code":(e?.isUnifiedBillingUser,"Grok Build"),quotas:h,periodEnd:g,exhausted:r,subscriptionAccess:j,rawConfig:e}}(i,j);if(k.plan=function(a){try{return({0:"Free",1:"SuperGrok",2:"X Basic",3:"X Premium",4:"X Premium Plus",5:"SuperGrok Heavy",6:"SuperGrok Lite"})[JSON.parse(Buffer.from(a.split(".")[1],"base64url")).tier]||""}catch{return""}}(a)||k.plan,!k.quotas||0===Object.keys(k.quotas).length){var g;let b=(g=await M(a,c))&&Number.isFinite(g.percentUsed)?{"Weekly SuperGrok":L({used:Math.round(Math.max(0,Math.min(100,g.percentUsed))),total:100,resetAt:g.resetAt||null})}:null;if(b)return{plan:k.plan,quotas:b};return{plan:k.plan,message:k.subscriptionAccess?"Subscription access is active; Grok does not expose a numeric included quota.":"Grok Build connected, but no credit allotment was returned. Free promo may be exhausted.",quotas:{}}}return{plan:k.plan,quotas:k.quotas}}catch(a){return{message:`Grok CLI usage error: ${a.message}`}}}var O=c(75924);let P={LEVEL_BASIC:"Moderato",LEVEL_INTERMEDIATE:"Allegretto",LEVEL_ADVANCED:"Allegro",LEVEL_STANDARD:"Vivace"};function Q({used:a,total:b,remaining:c,resetAt:d}){let e,g=Math.max(0,(0,f.IQ)(b,0)),h=Math.max(0,(0,f.IQ)(a,0));return e=g>0&&null!=c&&Number.isFinite(Number(c))?Math.max(0,Number(c))/g*100:g>0?Math.max(0,g-h)/g*100:0,{used:h,total:g,remainingPercentage:e,resetAt:d||null,unlimited:!1}}async function R(a=null,b=null,c=null,e=null){let g="string"==typeof b&&b.length>0,h=!g&&"string"==typeof a&&a.length>0;if(!g&&!h)return{message:"Kimi access token or API key not available."};let i=g?{"x-api-key":b}:{Authorization:`Bearer ${a}`,...(0,O.buildKimiHeaders)(e?.deviceId)};try{let a,b=await (0,d.proxyAwareFetch)("https://api.kimi.com/coding/v1/usages",{method:"GET",headers:{...i,"Content-Type":"application/json",Accept:"application/json"}},c),e=await b.text().catch(()=>"");if(!b.ok)return{plan:"Kimi Coding",message:function(a,b){let c=null;try{c=JSON.parse(b||"")}catch{}let d=Array.isArray(c?.details)?c.details[0]:null,e=d?.debug||c?.debug||null,f=e?.reason||c?.reason||"",g=e?.localizedMessage?.message||d?.localizedMessage?.message||c?.message||"";if(401===a)return"Kimi authentication expired. Please re-authorize.";if(403===a&&("REASON_FEATURE_NO_PERMISSION"===f||/permission_denied|do not have permission|subscribe/i.test(`${c?.code||""} ${g} ${b||""}`)))return g||"Kimi connected, but this account has no permission to view usage. Subscribe to Kimi Code to access quota.";let h=(g||b||"").slice(0,100);return h?`Kimi Coding connected. API Error ${a}: ${h}`:`Kimi Coding connected. API Error ${a}`}(b.status,e)};try{a=JSON.parse(e||"{}")}catch{return{plan:"Kimi Coding",message:"Kimi Coding connected. Invalid JSON response from API."}}let g={},h=a?.usage&&"object"==typeof a.usage?a.usage:{},j=(0,f.IQ)(h.limit??h.Limit,0),k=(0,f.IQ)(h.used??h.Used,0),l=h.remaining??h.Remaining,m=null!=l&&""!==l?(0,f.IQ)(l,NaN):NaN,n=h.resetTime||h.ResetTime||h.reset_at||h.resetAt;for(let b of(j>0&&(g.Weekly=Q({used:k,total:j,remaining:Number.isFinite(m)?m:null,resetAt:(0,f.eZ)(n)})),Array.isArray(a?.limits)?a.limits:[])){if(!b||"object"!=typeof b)continue;let a=b.detail&&"object"==typeof b.detail?b.detail:{},c=(0,f.IQ)(a.limit??a.Limit,0),d=(0,f.IQ)(a.remaining??a.Remaining,NaN),e=a.resetTime||a.reset_at||a.resetAt;if(c>0){let a=Number.isFinite(d)?d:Math.max(0,c);g.Ratelimit=Q({used:Math.max(0,c-a),total:c,remaining:a,resetAt:(0,f.eZ)(e)})}}let o=a?.user?.membership?.level,p=function(a){if(!a)return"";let b=String(a);return P[b]?P[b]:b.replace(/^LEVEL_/,"").toLowerCase()}(o)||"Kimi Coding";if(Object.keys(g).length>0)return{plan:p,quotas:g};return{plan:p,message:"Kimi Coding connected. Usage tracked per request."}}catch(a){return{message:`Kimi Coding connected. Unable to fetch usage: ${a.message}`}}}async function S(a=null,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"DeepSeek API key not available. Add a key to view usage."};try{let c=await (0,d.proxyAwareFetch)("https://api.deepseek.com/user/balance",{method:"GET",headers:{Authorization:`Bearer ${a.trim()}`,"Content-Type":"application/json",Accept:"application/json"}},b);if(401===c.status||403===c.status)return{plan:"DeepSeek",message:"DeepSeek authentication failed. Check the API key."};if(!c.ok){let a=await c.text().catch(()=>"");return{plan:"DeepSeek",message:`DeepSeek balance API error (${c.status})${a?`: ${a.slice(0,120)}`:""}`}}let e=await c.json().catch(()=>null);if(!e||"object"!=typeof e)return{message:"DeepSeek balance response was not JSON."};let g=function(a){let b=Array.isArray(a?.balance_infos)?a.balance_infos:[],c=[];for(let a of b){if(!a||"object"!=typeof a)continue;let b="string"==typeof a.currency?a.currency.toUpperCase():"";if(!b)continue;let d=(0,f.IQ)(a.total_balance??a.totalBalance,0);c.push({currency:b,totalBalance:d,grantedBalance:(0,f.IQ)(a.granted_balance??a.grantedBalance,0),toppedUpBalance:(0,f.IQ)(a.topped_up_balance??a.toppedUpBalance,0)})}return c}(e);if(0===g.length)return{plan:"DeepSeek",message:"DeepSeek connected. No balance data returned."};let h=!0===e.is_available||!0===e.isAvailable,i={};for(let a of g){let b=Math.max(0,a.totalBalance);i[`Balance (${a.currency})`]={used:0,total:b,remainingPercentage:100*(b>0),resetAt:null,unlimited:b>0}}return{plan:h?"DeepSeek":"DeepSeek (Insufficient Balance)",quotas:i}}catch(a){return{message:`DeepSeek error: ${a.message}`}}}async function T(a=null,b=null){let c=(a||"").trim();if(!c)return{message:"OpenCode Go API key not available. Add a key to view usage."};try{let a=await (0,d.proxyAwareFetch)("https://opencode.ai/zen/go/v1/usage",{method:"GET",headers:{Authorization:`Bearer ${c}`,Accept:"application/json"}},b);if(401===a.status||403===a.status)return{plan:"OpenCode Go",message:"OpenCode Go authentication failed. Check the API key."};if(!a.ok){let b=await a.text().catch(()=>"");return{plan:"OpenCode Go",message:`OpenCode Go usage API error (${a.status})${b?`: ${b.slice(0,120)}`:""}`}}let e=await a.json().catch(()=>null);if(!e||"object"!=typeof e)return{message:"OpenCode Go usage response was not JSON."};let g=e.usage&&"object"==typeof e.usage?e.usage:{},h={};for(let[a,b]of[["rolling","Rolling"],["weekly","Weekly"],["monthly","Monthly"]])if(g[a]&&"object"==typeof g[a]){let c=function(a,b){if(!b||"object"!=typeof b)return null;let c=Math.min(100,Math.max(0,(0,f.IQ)(b.percent,0))),d=Math.round(100-c),e=(0,f.eZ)(b.resetsAt);return void 0!==b.percent||e?{used:c,total:100,remainingPercentage:d,resetAt:e||null,recurring:!1,name:a}:null}(b,g[a]);c&&(h[b]=c)}if(0===Object.keys(h).length)return{plan:"OpenCode Go",message:"OpenCode Go connected. No quota data returned."};let i=String(g.status||e.status||"").toLowerCase();return{plan:"ok"===i?"OpenCode Go":`OpenCode Go (${g.status||e.status||""})`,quotas:h}}catch(a){return{message:`OpenCode Go error: ${a.message}`}}}let U={rolling:"Rolling",weekly:"Weekly",monthly:"Monthly"};async function V(a=null,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"OpenCode Zen API key not available. Add a key to view usage."};try{let c=await (0,d.proxyAwareFetch)("https://opencode.ai/zen/v1/usage",{method:"GET",headers:{Authorization:`Bearer ${a.trim()}`,Accept:"application/json"}},b);if(401===c.status)return{plan:"OpenCode Zen",message:"OpenCode Zen authentication failed. Check the API key."};if(403===c.status){let a=await c.json().catch(()=>null),b=a?.error?.type==="EntitlementError";return{plan:"OpenCode Zen",message:b?"OpenCode Zen billing required for this API key.":"OpenCode Zen access forbidden for this API key."}}if(!c.ok)return{plan:"OpenCode Zen",message:`OpenCode Zen usage API error (${c.status}).`};let e=await c.json().catch(()=>null);if(!e?.usage||"object"!=typeof e.usage)return{plan:"OpenCode Zen",message:"OpenCode Zen usage response did not contain quota data."};let g={};for(let[a,b]of Object.entries(U)){let c=e.usage[a];if(!c||"object"!=typeof c)continue;let d=function(a){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return null}(c.percent);if(null===d)continue;let h=Math.max(0,Math.min(100,(0,f.IQ)(d,0)));g[b]={used:h,total:100,remainingPercentage:100-h,resetAt:(0,f.eZ)(c.resetsAt),recurring:!1,name:b}}if(0===Object.keys(g).length)return{plan:"OpenCode Zen",message:"OpenCode Zen usage response did not contain valid quota data."};return{plan:"OpenCode Zen",quotas:g}}catch(a){return{message:`OpenCode Zen error: ${a.message}`}}}var W=c(12132);async function X(a=null,b=null,c=null,{allowMachineSession:e=!0}={}){if(!e)return{plan:"Xiaomi MiMo",message:"Billed at standard API / plan rates — no separate quota to display."};let f=await (0,W.Fp)(b,c);if("number"==typeof f.percent&&Number.isFinite(f.percent))return{plan:"Xiaomi MiMo Desktop",quotas:{Weekly:Z(f.percent,f.resetAt,f.resetDate)}};let g=a||b?.apiKey,h="string"==typeof g?g.trim():"";if(h.startsWith("mimo-desktop-session"))return{plan:"Xiaomi MiMo Desktop",message:"MiMo Desktop is not signed in on this machine — sign in to it to read the weekly quota."};if(!h)return{message:"Xiaomi MiMo Desktop not connected. Add credentials to view usage."};try{let a=await (0,d.proxyAwareFetch)("https://aistudio.xiaomimimo.com/open-apis/v1/user/usage",{method:"GET",headers:{Authorization:`Bearer ${h}`,"X-Mimo-Source":"mimocode-cli",Accept:"application/json"},signal:AbortSignal.timeout(1e4)},c);if(401===a.status)return{plan:"Xiaomi MiMo Desktop",message:"Weekly quota requires Xiaomi account session. API key alone is insufficient."};if(!a.ok)return{plan:"Xiaomi MiMo Desktop",message:`Usage API error (${a.status})`};let b=await a.json().catch(()=>null);if(!b||0!==b.code||!b.data)return{plan:"Xiaomi MiMo Desktop",message:"Usage endpoint returned unexpected response."};let{percent:e,resetDate:f,resetAt:g}=b.data;if("number"!=typeof e||!Number.isFinite(e))return{plan:"Xiaomi MiMo Desktop",message:"Usage data missing percent field."};return{plan:"Xiaomi MiMo Desktop",quotas:{Weekly:Z(e,g,f)}}}catch(a){return{message:`Xiaomi MiMo Desktop usage error: ${a.message}`}}}async function Y(a=null,b=null,c=null){if(b?.mimoPassToken){let a=await (0,W.Fp)(b,c);if("number"==typeof a.percent&&Number.isFinite(a.percent))return{plan:"MiMo Token Plan",quotas:{Weekly:Z(a.percent,a.resetAt,a.resetDate)}}}return a&&"string"==typeof a&&a.trim()?{plan:"MiMo Token Plan",message:"Token Plan does not expose a quota API for standalone keys — check your plan usage in the MiMo console."}:{message:"API key not available. Add a key to view usage."}}function Z(a,b,c){let d=Math.max(0,Math.min(100,Math.round(a))),e=null;if("number"==typeof b&&b>0)e=new Date(1e3*b).toISOString();else if("string"==typeof c&&c){let a=new Date(`${c}T00:00:00Z`);Number.isNaN(a.getTime())||(e=a.toISOString())}return{used:100-d,total:100,remainingPercentage:d,resetAt:e,unlimited:!1,recurring:!0}}let $={baseUrl:"https://api.stepfun.ai",currency:"USD",brand:"StepFun"},_={baseUrl:"https://api.stepfun.com",currency:"CNY",brand:"StepFun CN"};async function aa(a=null,b=null,c={}){let{baseUrl:e="https://api.stepfun.com",currency:g="CNY",brand:h="StepFun"}=c;if(!a||"string"!=typeof a||!a.trim())return{message:`${h} API key not available. Add a key to view usage.`};let i=`${e.replace(/\/$/,"")}/v1/accounts`;try{let c=await (0,d.proxyAwareFetch)(i,{method:"GET",headers:{Authorization:`Bearer ${a.trim()}`,"Content-Type":"application/json",Accept:"application/json"}},b);if(401===c.status||403===c.status)return{plan:h,message:`${h} authentication failed. Check the API key.`};if(!c.ok){let a=await c.text().catch(()=>"");return{plan:h,message:`${h} account API error (${c.status})${a?`: ${a.slice(0,120)}`:""}`}}let e=await c.json().catch(()=>null);if(!e||"object"!=typeof e)return{message:`${h} account response was not JSON.`};let j=(0,f.IQ)(e.balance,0),k=(0,f.IQ)(e.total_cash_balance,0),l=(0,f.IQ)(e.total_voucher_balance,0),m=j>0,n={},o=a=>({used:0,total:Math.max(0,a),remainingPercentage:100*(a>0),resetAt:null,displayRemaining:!0,unlimited:!1});return n[`Balance (${g})`]=o(j),l>0&&k>0?(n[`Cash (${g})`]=o(k),n[`Voucher (${g})`]=o(l)):l>0&&(n[`Voucher (${g})`]=o(l)),{plan:m?h:`${h} (Insufficient Balance)`,quotas:n}}catch(a){return{message:`${h} error: ${a.message}`}}}var ab=c(53225),ac=c(69704);let ad=(0,f.U)("vercel-ai-gateway").url;async function ae(a){try{return{message:"iFlow connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch iFlow usage."}}}let af={session:"Session (5h)",weekly:"Weekly (7d)",monthly:"Monthly"};async function ag(a,b,c=null){if(!a)return{message:"Ollama Cloud API key not available."};try{let b,e=await (0,d.proxyAwareFetch)("https://ollama.com/api/usage",{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(401===e.status||403===e.status)return{message:"Ollama Cloud API key invalid or expired."};if(!e.ok)return{message:`Ollama Cloud usage API error (${e.status}).`};try{b=await e.json()}catch{return{message:"Ollama Cloud usage response was not JSON."}}let f=await (0,d.proxyAwareFetch)("https://ollama.com/api/me",{method:"POST",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Length":"0"}},c).then(a=>a.ok?a.json():null).catch(()=>null),g="string"==typeof f?.Plan?f.Plan:"",h=g?g.charAt(0).toUpperCase()+g.slice(1).toLowerCase():"Ollama Cloud",i=b?.limits&&"object"==typeof b.limits?b.limits:{},j="free"===g.toLowerCase()&&f?.CreatedAt?function(a,b=new Date){let c=new Date(a);if(Number.isNaN(c.getTime()))return null;let d=(b.getUTCFullYear()-c.getUTCFullYear())*12+(b.getUTCMonth()-c.getUTCMonth());for(let a=Math.max(0,d);a<=d+1;a++){let d=function(a,b){let c=a.getUTCMonth()+b,d=a.getUTCFullYear()+Math.floor(c/12),e=(c%12+12)%12,f=new Date(Date.UTC(d,e+1,0)).getUTCDate();return new Date(Date.UTC(d,e,Math.min(a.getUTCDate(),f),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds()))}(c,a);if(d>b)return d.toISOString()}return null}(f.CreatedAt):null,k={};for(let[a,b]of Object.entries(af)){let c=i[a]?.usage;if(null==c)continue;let d=Number(c);Number.isNaN(d)||(k[b]=function(a,b=null){let c=Math.max(0,Math.min(1,Number(a)||0)),d=Math.round(100*c);return{used:d,total:100,remainingPercentage:100-d,resetAt:b,unlimited:!1}}(d,"monthly"===a?j:null))}if(0===Object.keys(k).length)return{plan:h,message:"Ollama Cloud connected. No usage limits reported.",quotas:{}};return{plan:h,quotas:k}}catch(a){return{message:`Ollama Cloud error: ${a.message}`}}}async function ah(a,b=null){if(!a)return{message:"Vercel AI Gateway API key not available."};try{let c=await (0,d.proxyAwareFetch)(ad,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(401===c.status||403===c.status)return{message:"Vercel AI Gateway API key invalid or expired."};if(!c.ok){let a=await c.text().catch(()=>""),b=a?`: ${a.slice(0,200)}`:"";return{message:`Vercel AI Gateway credits API error (${c.status})${b}`}}let e=await c.json(),f=Number(e?.balance)||0,g=Number(e?.total_used)||0;if(f<=0&&g<=0)return{plan:"Pay-as-you-go",message:"Vercel AI Gateway connected. No credit allocation found (BYOK or unfunded account).",quotas:{}};return{plan:"Pay-as-you-go",quotas:{"Used (USD)":{used:g,total:0,remaining:0,remainingPercentage:100,unlimited:!0},"Remaining (USD)":{used:f,total:5,remaining:f,remainingPercentage:f/5*100,unlimited:!1}}}}catch(a){return{message:`Vercel AI Gateway error: ${a.message}`}}}async function ai(a,b="qoder",c=null){if(!a||"string"!=typeof a)return null;try{let e="qoder-cn"===b?ac.VD:ac.Dg,f=await (0,d.proxyAwareFetch)(`${e}/api/v2/me/usages/big_model_credits`,{method:"GET",headers:{Cookie:a,Accept:"application/json",Referer:`${e}/account/usage`,"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"}},c);if(!f.ok)return null;let g=await f.json().catch(()=>null);if(!g||!g.user_id)return null;let h=a=>{let b=g?.[a]?.quota_detail;return Array.isArray(b)?b.map(a=>({total:Number(a?.limit_value)||0,used:Number(a?.used_value)||0,remaining:Number(a?.remaining_value)||0,expiresAt:Number(a?.expires_at)>0?new Date(Number(a.expires_at)).toISOString():null,source:a?.source||null})).filter(a=>a.total>0).sort((a,b)=>(a.expiresAt||"9999").localeCompare(b.expiresAt||"9999")):[]},i=h("resource_package_quota"),j=h("plan_quota"),k=h("dedicated_resource_package_quota");if(!i.length&&!j.length&&!k.length)return null;return{packs:i,planRows:j,orgRows:k,resetAt:i[0]?.expiresAt||null,sourceUserId:g.user_id}}catch{return null}}async function aj(a,b=null,c="qoder",e=null){if(!a)return{message:"Qoder usage unavailable: no access token"};try{let g=(0,f.U)(c).url||(0,f.U)("qoder").url,h=await (0,d.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!h.ok)return{message:`Qoder connected. Usage fetch returned ${h.status}.`};let i=await h.json().catch(()=>null);if(!i)return{message:"Qoder connected. Usage response was not JSON."};let j=i.userQuota||{},k=i.addOnQuota||{},l=i.orgResourcePackage||{},m=Number.isFinite(Number(i.expiresAt))&&Number(i.expiresAt)>0?Number(i.expiresAt):null,n=m&&(m>=2534e11||new Date(m).getFullYear()>2099),o=m&&!n?new Date(m).toISOString():null,p=null,q=[],r=null,s=null,t=a=>{if(!Array.isArray(a)||0===a.length)return null;let b=b=>a.reduce((a,c)=>a+(Number(c[b])||0),0);return{total:b("total"),used:b("used"),remaining:b("remaining"),resetAt:a.find(a=>a.expiresAt)?.expiresAt||null}},u=e?.creditDaddyWebSession,v=!1;if(u?.cookie){let a=await ai(u.cookie,c,b),d=e?.userId||null;!a||d&&a.sourceUserId&&d!==a.sourceUserId||(v=!0,q=[...a.planRows.map(a=>({...a,name:"Plan Credits"})),...a.packs].sort((a,b)=>String(a.expiresAt||"9999").localeCompare(String(b.expiresAt||"9999"))),p=q[0]?.expiresAt||null,r=t(a.planRows),s=t(a.orgRows))}if(!(q.length>0))try{let e="qoder-cn"===c?ac.jJ:ac.L7,f=`${e}/sash/api/v1/me/campaigns?clientType=10`,g=await (0,d.proxyAwareFetch)(f,{method:"GET",headers:{Authorization:`Bearer ${a}`,"Cosy-ClientType":"10","Cosy-Version":"0.3.3","User-Agent":"Qoder",Accept:"application/json"}},b);if(g.ok){let a=await g.json().catch(()=>null),b=function({campaigns:a=[],used:b=0,total:c=0,now:d=Date.now()}={}){let e=a.filter(a=>a?.claimStatus==="CLAIMED"&&a?.benefit?.kind==="CREDITS"),f=[];for(let a of e){let b=a.benefit?.validity,c=null;b?.mode==="FIXED_END"&&b.fixedEnd?c=new Date(b.fixedEnd).getTime():b?.mode==="RELATIVE_DAYS"&&b.days&&a.startAt&&(c=1e3*a.startAt+864e5*b.days);let e=Number(a.benefit?.amount)||0;!Number.isFinite(c)||c<=d||e<=0||f.push({total:e,expiresAt:new Date(c).toISOString()})}f.sort((a,b)=>new Date(a.expiresAt)-new Date(b.expiresAt));let g=Math.max(0,Number(b)||0);for(let a of f){let b=Math.min(g,a.total);a.used=b,a.remaining=a.total-b,g-=b}let h=f.reduce((a,b)=>a+b.total,0),i=(Number(c)||0)-h;if(f.length>0&&i>0){let a=Math.min(g,i);f.push({total:i,expiresAt:null,used:a,remaining:i-a,unitemized:!0})}return{packs:f,resetAt:f.length>0&&f[0].expiresAt||null}}({campaigns:a?.campaigns||[],used:Number(k.used)||0,total:Number(k.total)||0});q=b.packs,p=b.resetAt}}catch{}let w=r||{total:Number(j.total)||0,used:Number(j.used)||0,remaining:Number(j.remaining)||0},x=s||{total:Number(l.total)||0,used:Number(l.used)||0,remaining:Number(l.remaining)||0},y=a=>q.reduce((b,c)=>b+(Number(c[a])||0),0),z=q.length>0?{total:y("total"),used:y("used"),remaining:y("remaining")}:{total:Number(k.total)||0,used:Number(k.used)||0,remaining:Number(k.remaining)||0};return{quotas:{user:{total:w.total,used:w.used,remaining:w.remaining,unit:j.unit||"credits",resetAt:w.resetAt||o,unlimited:!1},addOn:{total:z.total,used:z.used,remaining:z.remaining,unit:k.unit||"credits",resetAt:p,unlimited:!1,packs:q},organization:{total:x.total,used:x.used,remaining:x.remaining,unit:l.unit||"credits",resetAt:x.resetAt||o,unlimited:!1}},totalUsagePercentage:Number(i.totalUsagePercentage)||0,isQuotaExceeded:!!i.isQuotaExceeded,expiresAt:m,...u?.cookie&&!v?{webSessionExpired:!0}:{}}}catch(a){return{message:`Qoder connected. Unable to fetch usage: ${a.message}`}}}function ak(a="alitp-intl"){let b="alitp-cn"===a;return{plan:b?"Alibaba Token Plan (CN)":"Alibaba Token Plan (Intl)",quotas:{},message:`Alibaba Token Plan ${b?"国内版(cn-beijing)":"国际版(ap-southeast-1)"} 的额度只能在百炼控制台查看:${b?"https://bailian.console.aliyun.com/cn-beijing/subscription/overview":"https://modelstudio.console.alibabacloud.com/"} → 「免费额度」,按模型列出剩余/总量与到期时间。该产品没有公开的额度 API(实测 20+ 条路径全部 404,推理响应也不带额度字段),所以这里无法自动读取。`+(b?"":" 注意:国际版与国内版是两套 key,互不通用,用错区域会回 401 InvalidApiKey。")}}let al={international:(0,f.U)("glm").url,china:(0,f.U)("glm-cn").url};async function am(a,b,c=null){if(!a)return{message:"GLM API key not available."};let e=al["glm-cn"===b?"china":"international"];try{let b=await (0,d.proxyAwareFetch)(e,{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(!b.ok){if(401===b.status)return{message:"GLM API key invalid or expired."};return{message:`GLM quota API error (${b.status}).`}}let f=await b.json(),{plan:g,quotas:h}=function(a){let b=a?.data&&"object"==typeof a.data?a.data:{},c=Array.isArray(b.limits)?b.limits:[],d={};for(let a of c){if(!a||"TOKENS_LIMIT"!==a.type&&"CREDIT_LIMIT"!==a.type)continue;let b=Number(a.percentage)||0,c=Number(a.nextResetTime)||0,e=Math.max(0,100-b);d[3===a.unit?`Session (${a.number}h)`:6===a.unit?"Weekly (7d)":"TOKENS_LIMIT"===a.type?"Tokens":`Limit (${a.number})`]={used:b,total:100,remaining:e,remainingPercentage:e,resetAt:c>0?new Date(c).toISOString():null,unlimited:!1}}let e="string"==typeof b.level?b.level:"";return{plan:e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"Unknown",quotas:d}}(f);return{plan:g,quotas:h}}catch(a){return{message:`GLM error: ${a.message}`}}}let an={"individual-go":"Go","individual-goat":"GOAT","individual-pro":"Pro","individual-pro-v1":"Pro (Legacy)","individual-provider":"BYOK","individual-max":"Max 10x","individual-ultra":"Max 20x","teams-pro":"Team Pro"},ao={"individual-go":10,"individual-goat":70,"individual-pro":30,"individual-pro-v1":80,"individual-max":150,"individual-ultra":300,"teams-pro":40};function ap(a){return Math.round(1e4*(0,f.IQ)(a,0))/1e4}async function aq(a,b=null){if(!a||"string"!=typeof a)return{message:"Command Code API key not configured."};let c=(0,f.U)("commandcode"),e=c?.creditsUrl||"https://api.commandcode.ai/alpha/billing/credits",g=c?.subscriptionsUrl||"https://api.commandcode.ai/alpha/billing/subscriptions",h={Authorization:`Bearer ${a.trim()}`,"x-command-code-version":"1.53.1","x-cli-environment":"cli","User-Agent":"cli","Content-Type":"application/json",Accept:"application/json"};try{let a=(0,d.proxyAwareFetch)(e,{method:"GET",headers:h},b),c=Promise.resolve().then(()=>(0,d.proxyAwareFetch)(g,{method:"GET",headers:h},b)).catch(()=>null),[i,j]=await Promise.all([a,c]);if(401===i.status||403===i.status)return{message:"Command Code API key invalid or expired."};if(!i.ok)return{message:`Command Code credits API error (${i.status}).`};let k=await i.json(),l=null;if(j&&j.ok)try{l=await j.json()}catch{l=null}let m=l?.data?.planId||null,n=an[m]||(m?m.replace(/^individual-/,""):"Command Code"),o=l?.data?.currentPeriodEnd||null,p=k?.windowLimits||{},q=k?.credits||{},r={};if(p.fiveHour){let a=(0,f.IQ)(p.fiveHour.cap,0),b=ap(p.fiveHour.used),c=Math.max(0,ap(a-b)),d=a>0?Math.max(0,Math.min(100,Math.round(c/a*100))):100;r["session (5h)"]={used:b,total:a,remaining:c,remainingPercentage:d,resetAt:(0,f.eZ)(p.fiveHour.resetAt),unlimited:!1,recurring:!0}}if(p.weekly){let a=(0,f.IQ)(p.weekly.cap,0),b=ap(p.weekly.used),c=Math.max(0,ap(a-b)),d=a>0?Math.max(0,Math.min(100,Math.round(c/a*100))):100;r["weekly (7d)"]={used:b,total:a,remaining:c,remainingPercentage:d,resetAt:(0,f.eZ)(p.weekly.resetAt),unlimited:!1,recurring:!0}}if(void 0!==q.monthlyCredits&&null!==q.monthlyCredits){let a=ap(q.monthlyCredits),b=(0,f.IQ)(q.monthlyCreditsGranted)||ao[m]||Math.ceil(a)||10,c=Math.max(0,ap(b-a)),d=b>0?Math.max(0,Math.min(100,Math.round(a/b*100))):100;r["Monthly Credits"]={used:c,total:b,remaining:a,remainingPercentage:d,resetAt:(0,f.eZ)(o),unlimited:!1,recurring:!0}}if(q.purchasedCredits&&q.purchasedCredits>0){let a=ap(q.purchasedCredits);r["Purchased Credits"]={used:0,total:a,remaining:a,remainingPercentage:100,resetAt:null,unlimited:!1,recurring:!1}}return{plan:n,quotas:r}}catch(a){return{message:`Command Code usage fetch failed: ${a.message}`}}}var ar=c(44725),as=c(81756);let at=(0,f.U)("cursor");function au(a){return Number(((0,f.IQ)(a,0)/100).toFixed(2))}function av(a){return Math.max(0,100-Math.max(0,Math.min(100,(0,f.IQ)(a,0))))}async function aw(a,b,c,e){return(0,d.proxyAwareFetch)(a,{method:"POST",headers:{...(0,as.JA)(b,c||null,!0),"content-type":"application/json",accept:"application/json"},body:"{}"},e)}async function ax(a){try{return await a.json()}catch{return null}}async function ay(a,b={},c=null){if(!a||"string"!=typeof a||!a.trim())return{message:"Cursor access token not available. Reconnect Cursor to view quota."};let e=a.trim(),g=b?.machineId||null,h=at.url,i=at.planInfoUrl,j=at.authUsageUrl;if(!h)return{message:"Cursor usage endpoint is not configured."};try{let a=await aw(h,e,g,c);if(401===a.status||403===a.status)return{plan:"Cursor",message:"Cursor authentication failed. Reconnect the Cursor provider."};let b={},k=null;if(a.ok&&(k=await ax(a),!function(a,b){let c=b?.planUsage;if(!c||"object"!=typeof c)return;let d=(0,f.IQ)(c.limit,0),e=(0,f.IQ)(c.includedSpend??c.totalSpend,0),g=(0,f.IQ)(c.remaining,Math.max(0,d-e)),h=(0,f.eZ)(b.billingCycleEnd);if(d>0){let b=au(d),f=au(e),i=au(g);a["Plan (USD)"]={used:f,total:b,remainingPercentage:null!=c.totalPercentUsed?av(c.totalPercentUsed):b>0?i/b*100:0,resetAt:h}}else if(null!=c.totalPercentUsed){let b=(0,f.IQ)(c.totalPercentUsed,0);a["Included usage"]={used:b,total:100,remainingPercentage:av(b),resetAt:h}}if(null!=c.autoPercentUsed){let b=(0,f.IQ)(c.autoPercentUsed,0);a["Auto models (%)"]={used:b,total:100,remainingPercentage:av(b),resetAt:h}}if(null!=c.apiPercentUsed){let b=(0,f.IQ)(c.apiPercentUsed,0);a["Named models (%)"]={used:b,total:100,remainingPercentage:av(b),resetAt:h}}Object.keys(a).length}(b,k),!function(a,b){let c=b?.spendLimitUsage;if(!c||"object"!=typeof c)return;let d=(0,f.IQ)(c.individualLimit,0),e=(0,f.IQ)(c.pooledLimit,0),g=(0,f.eZ)(b.billingCycleEnd);if(d>0){let b=au(c.individualUsed),e=au(d),h=au(c.individualRemaining??Math.max(0,d-(0,f.IQ)(c.individualUsed,0)));a["On-demand (USD)"]={used:b,total:e,remainingPercentage:e>0?h/e*100:0,resetAt:g};return}if(e>0){let b=au(c.pooledUsed),d=au(e),h=au(c.pooledRemaining??Math.max(0,e-(0,f.IQ)(c.pooledUsed,0)));a["Team on-demand (USD)"]={used:b,total:d,remainingPercentage:d>0?h/d*100:0,resetAt:g}}}(b,k)),0===Object.keys(b).length&&j){let g=await (0,d.proxyAwareFetch)(j,{method:"GET",headers:{Authorization:`Bearer ${e.includes("::")?e.split("::")[1]:e}`,Accept:"application/json"}},c);if(g.ok)!function(a,b){if(!b||"object"!=typeof b)return;let c=(0,f.eZ)(b.startOfMonth);for(let[d,e]of Object.entries(b)){if(!e||"object"!=typeof e||Array.isArray(e))continue;let b=(0,f.IQ)(e.maxRequestUsage,0);if(b<=0)continue;let g=(0,f.IQ)(e.numRequests,0);a[`${d} requests`]={used:g,total:b,remainingPercentage:b>0?Math.max(0,(b-g)/b*100):0,resetAt:c}}}(b,await ax(g));else if(!a.ok){let b=await a.text().catch(()=>"");return{plan:"Cursor",message:`Cursor usage API error (${a.status})${b?`: ${b.slice(0,120)}`:""}`}}}if(0===Object.keys(b).length)return{plan:"Cursor",message:k?.displayMessage||"Cursor connected. No quota data returned for this plan."};let l="Cursor";if(i){let a=await aw(i,e,g,c).catch(()=>null);if(a?.ok){let b=await ax(a),c=b?.planInfo?.planName;"string"==typeof c&&c.trim()&&(l=`Cursor ${c.trim()}`)}}return{plan:l,quotas:b}}catch(a){return{message:`Cursor error: ${a.message}`}}}let az={github:a=>h(a.accessToken,a.providerSpecificData,a.proxyOptions),"gemini-cli":a=>(0,j.N)(a.accessToken,a.providerDataWithProjectId,a.proxyOptions),antigravity:a=>(0,j.c)(a.accessToken,a.providerSpecificData,a.proxyOptions,{force:a.force}),claude:a=>(0,k.gl)(a.accessToken,a.proxyOptions,{force:a.force}),codex:a=>(0,l.Tl)(a.accessToken,a.proxyOptions),kiro:a=>n(a.accessToken,a.providerSpecificData,a.proxyOptions),qoder:async a=>{let b=await (0,ab._M)(a,a.proxyOptions).catch(()=>null);return aj(b?.accessToken||a.accessToken,a.proxyOptions,"qoder",a.providerSpecificData)},"qoder-cn":async a=>{let b=await (0,ab._M)(a,a.proxyOptions).catch(()=>null);return aj(b?.accessToken||a.accessToken,a.proxyOptions,"qoder-cn",a.providerSpecificData)},iflow:a=>ae(a.accessToken),ollama:a=>ag(a.apiKey,a.providerSpecificData,a.proxyOptions),glm:a=>am(a.apiKey||a.accessToken,a.provider,a.proxyOptions),"glm-cn":a=>am(a.apiKey||a.accessToken,a.provider,a.proxyOptions),minimax:a=>v(a.apiKey,a.provider,a.proxyOptions),"minimax-cn":a=>v(a.apiKey,a.provider,a.proxyOptions),"vercel-ai-gateway":a=>ah(a.apiKey,a.proxyOptions),"codebuddy-cn":a=>y(a.accessToken,a.apiKey,a.providerSpecificData,a.proxyOptions),"codebuddy-intl":a=>z(a.accessToken,a.apiKey,a.providerSpecificData,a.proxyOptions),"grok-cli":a=>N(a.accessToken,a.providerSpecificData,a.proxyOptions),kimi:a=>R(a.accessToken,a.apiKey,a.proxyOptions,a.providerSpecificData),deepseek:a=>S(a.apiKey,a.proxyOptions),"opencode-go":a=>T(a.apiKey,a.proxyOptions),"opencode-zen":a=>V(a.apiKey,a.proxyOptions),"xiaomi-mimo":a=>X(a.accessToken,a.providerSpecificData,a.proxyOptions,{allowMachineSession:!1}),"mimo-desktop":a=>X(a.accessToken,a.providerSpecificData,a.proxyOptions),"xiaomi-tokenplan":a=>Y(a.apiKey,a.providerSpecificData,a.proxyOptions),stepfun:a=>aa(a.apiKey,a.proxyOptions,$),"stepfun-cn":a=>aa(a.apiKey,a.proxyOptions,_),commandcode:a=>aq(a.apiKey,a.proxyOptions),"minimax-code":a=>(0,ar.K$)(a.accessToken,"minimax-code",a.proxyOptions,a.providerSpecificData),"minimax-code-global":a=>(0,ar.K$)(a.accessToken,"minimax-code-global",a.proxyOptions,a.providerSpecificData),"alitp-intl":a=>ak("alitp-intl"),"alitp-cn":a=>ak("alitp-cn"),cursor:a=>ay(a.accessToken,a.providerSpecificData,a.proxyOptions)};async function aA(a,b=null,c={}){let{provider:d,accessToken:e,apiKey:f,providerSpecificData:g,projectId:h}=a,i={...g||{},...h?{projectId:h}:{}},j=az[d];return j?await j({provider:d,accessToken:e,apiKey:f,providerSpecificData:g,providerDataWithProjectId:i,proxyOptions:b,force:!0===c.force}):{message:`Usage API not implemented for ${d}`}}},69788:(a,b,c)=>{c.d(b,{Ut:()=>l,gl:()=>j});var d=c(39609),e=c(74129),f=c(24295);let g={oauthUsageUrl:(0,f.U)("claude").oauthUrl,usageUrl:(0,f.U)("claude").orgUrl,settingsUrl:(0,f.U)("claude").settingsUrl,profileUrl:(0,f.U)("claude").profileUrl,resetUrl:(0,f.U)("claude").resetUrl,apiVersion:e.b8,userAgent:`claude-cli/${e.t4} (external, cli)`},h=new Map,i=new Map;async function j(a,b=null,c={}){let d=c?.force===!0;if(!d&&a){let b=i.get(a);if(b?.promise)return b.promise;if(b&&b.expiresAt>Date.now())return b.result}let e=!d&&a&&i.get(a)?.result||null,f=(async()=>{let c=await k(a,b);return a&&c?.quotas?(i.set(a,{result:c,expiresAt:Date.now()+3e5}),c):e||c})();return a&&i.set(a,{promise:f}),f}async function k(a,b=null){try{let c=h.get(a);if(c&&Date.now()<c)return await m(a,b);let e=await (0,d.proxyAwareFetch)(`${g.oauthUsageUrl}?cedar_ember=1`,{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":g.apiVersion,"User-Agent":g.userAgent}},b);if(e.ok){let a=await e.json(),b={},c=a=>a&&"object"==typeof a&&"number"==typeof a.utilization,d=a=>{let b=a.utilization,c=Math.max(0,100-b);return{used:b,total:100,remaining:c,remainingPercentage:c,resetAt:(0,f.eZ)(a.resets_at),unlimited:!1}};c(a.five_hour)&&(b["session (5h)"]=d(a.five_hour)),c(a.seven_day)&&(b["weekly (7d)"]=d(a.seven_day));let g={fable_5_1:"fable",fable_5:"fable"};for(let[e,f]of Object.entries(a))if(e.startsWith("seven_day_")&&"seven_day"!==e&&c(f)){let a=e.replace("seven_day_",""),c=g[a]||a;b[`weekly ${c} (7d)`]=d(f)}else("fable"===e||"fable_5"===e||"fable_5_1"===e)&&c(f)&&(b["weekly fable (7d)"]=d(f));return!b["weekly fable (7d)"]&&c(a.seven_day)&&(b["weekly fable (7d)"]={used:0,total:100,remaining:100,remainingPercentage:100,resetAt:(0,f.eZ)(a.seven_day.resets_at),unlimited:!1}),{plan:"Claude Code",extraUsage:a.extra_usage??null,resetCredits:function(a){if(!a?.eligible||!Array.isArray(a.grants))return null;let b=a.grants.filter(a=>a?.id&&!a.paused&&Number(a.resets_left)>0),c=b.find(b=>b.id===a.next_grant_id)||b[0]||null;return{availableCount:b.reduce((a,b)=>a+Number(b.resets_left),0),nextGrantId:c?.id||null,expiresAt:c?.ends_at||null,clears:c?.clears||[],cooldownUntil:a.cooldown_until||null,weeklyResetsAt:a.weekly_resets_at||null,grants:a.grants.filter(a=>a?.id).map(a=>({id:a.id,label:a.label||"",resetsLeft:Number(a.resets_left)||0,resetsTotal:Number(a.resets_total)||0,startsAt:a.starts_at||null,endsAt:a.ends_at||null,clears:Array.isArray(a.clears)?a.clears:[],paused:!0===a.paused,usableNow:!0===a.usable_now,useRequiresLimit:!1!==a.use_requires_limit}))}}(a.cedar_ember),quotas:b}}return 429===e.status&&h.set(a,Date.now()+18e4),console.warn(`[Claude Usage] OAuth endpoint returned ${e.status}, falling back to legacy`),await m(a,b)}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}async function l(a,b,c=null){if(!a)throw Error("No Claude access token available. Please re-authorize the connection.");if(!/^[a-z0-9_-]{1,40}$/.test(b||""))throw Error("Invalid reset grant id.");let e={Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":g.apiVersion,"User-Agent":g.userAgent,"Content-Type":"application/json"},f=await (0,d.proxyAwareFetch)(g.profileUrl,{method:"GET",headers:e},c),h=await f.json().catch(()=>null),j=h?.organization?.uuid;if(!f.ok||!j)throw Error(`Cannot resolve Claude organization (${f.status}).`);let k=await (0,d.proxyAwareFetch)(g.resetUrl.replace("{org_id}",j),{method:"POST",headers:e,body:JSON.stringify({program:"cedar_ember",grant_id:b,request_id:crypto.randomUUID()})},c),m=await k.json().catch(()=>null);return i.delete(a),{ok:k.ok&&m?.result==="reset",status:k.status,result:m?.result||null,reason:m?.reason||null,resetsLeft:m?.resets_left??null,message:m?.error?.message||null}}async function m(a,b=null){try{let c=await (0,d.proxyAwareFetch)(g.settingsUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":g.apiVersion}},b);if(c.ok){let e=await c.json();if(e.organization_id){let c=await (0,d.proxyAwareFetch)(g.usageUrl.replace("{org_id}",e.organization_id),{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":g.apiVersion}},b);if(c.ok){let a=await c.json();return{plan:e.plan||"Unknown",organization:e.organization_name,quotas:a}}}return{plan:e.plan||"Unknown",organization:e.organization_name,message:"Claude connected. Usage details require admin access."}}return{message:"Claude connected. Usage API requires admin permissions."}}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.getProviderConnections,h1:()=>d.h1,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.updateProviderConnection,uv:()=>d.uv});var d=c(89718)},78661:(a,b,c)=>{function d(a){if(!a||"object"!=typeof a||!a.quotas)return null;let b=Date.now(),c=1/0,d=null,e=null,f=1/0,g=(a,g)=>{let h,i;if(!g||"object"!=typeof g)return;let j=g.resetAt??g.expiresAt,k=j?new Date(j).getTime():NaN,l=Number.isFinite(k),m=l&&k>b&&2099>=new Date(k).getFullYear();if((!0!==g.recurring||!0===g.giftPack)&&(h=Number(g.used??0),(i=Number(g.total??0))>0&&h>=i||void 0!==g.remaining&&0>=Number(g.remaining)||void 0!==g.remainingPercentage&&0>=Number(g.remainingPercentage)||0)||l&&!m)return;let n=function(a){if(!0===a.isCreditBalance)return null;if("number"==typeof a.remainingPercentage&&Number.isFinite(a.remainingPercentage))return a.remainingPercentage;let b=Number(a.used??0),c=Number(a.total??0);return c>0?100*Math.max(0,(c-b)/c):"number"==typeof a.remaining&&Number.isFinite(a.remaining)?a.remaining:null}(g);null!==n&&n<f&&(f=n),m&&k<c&&(c=k,d=a,e=j instanceof Date?j.toISOString():String(j))};for(let[b,c]of Object.entries(a.quotas)){if(!c||"object"!=typeof c)continue;let a=b.toLowerCase();if(!(a.includes("total")||a.includes("aggregate")||a.includes("summary"))){if(Array.isArray(c.packs)&&c.packs.length>0){for(let a of c.packs)g(a?.name?`${b} \xb7 ${a.name}`:b,a);continue}g(b,c)}}return c<1/0||Number.isFinite(f)?{expiry:e,name:d,timestamp:c<1/0?c:null,...Number.isFinite(f)?{remainingPercentage:f}:{}}:null}c.d(b,{Y:()=>d})},81756:(a,b,c)=>{c.d(b,{JA:()=>h});var d=c(55511),e=c.n(d),f=c(85081);function g(a,b=""){return e().createHash("sha256").update(a+b).digest("hex")}function h(a,b=null,c=!0){let d=a.includes("::")?a.split("::")[1]:a,i=b||g(d,"machineId"),j=(0,f.Ay)(d,f.Ay.DNS),k=g(d),l=function(a){let b=Math.floor(Date.now()/1e6),c=new Uint8Array([b>>40&255,b>>32&255,b>>24&255,b>>16&255,b>>8&255,255&b]),d=165;for(let a=0;a<c.length;a++)c[a]=(c[a]^d)+a%256&255,d=c[a];let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",f="";for(let a=0;a<c.length;a+=3){let b=c[a],d=a+1<c.length?c[a+1]:0,g=a+2<c.length?c[a+2]:0;f+=e[b>>2],f+=e[(3&b)<<4|d>>4],a+1<c.length&&(f+=e[(15&d)<<2|g>>6]),a+2<c.length&&(f+=e[63&g])}return`${f}${a}`}(i),m="linux";"u">typeof process&&("win32"===process.platform?m="windows":"darwin"===process.platform&&(m="macos"));let n="x64";return"u">typeof process&&"arm64"===process.arch&&(n="aarch64"),{authorization:`Bearer ${d}`,"connect-accept-encoding":"gzip","connect-protocol-version":"1","content-type":"application/connect+proto","user-agent":"connect-es/1.6.1","x-amzn-trace-id":`Root=${e().randomUUID()}`,"x-client-key":k,"x-cursor-checksum":l,"x-cursor-client-version":"3.12.17","x-cursor-client-commit":"0fb762053c34788bb7760d5673f8a6d4c8589d50","x-cursor-client-type":"ide","x-cursor-client-os":m,"x-cursor-client-arch":n,"x-cursor-client-device-type":"desktop","x-cursor-config-version":e().randomUUID(),"x-cursor-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC","x-ghost-mode":c?"true":"false","x-request-id":e().randomUUID(),"x-session-id":j}}},87283:(a,b,c)=>{c.d(b,{c:()=>p,N:()=>n});var d=c(75924),e=c(74129),f=c(24295);let g=new Map,h=new Map;function i(a){let b=a||{};if(Array.isArray(b.groups))return b.groups;let c=b.quotaSummary?.groups;return Array.isArray(c)?c:[]}async function j(a,b,c,d,e=null,k={}){let l=(Array.isArray(c)?c:[c]).filter(Boolean);if(!a||!b||0===l.length)return null;let m=`${a.substring(0,16)}:${b||"default"}`,n=async c=>{let i=`${m}:${c}`,j=g.get(i);if(!k.forceRefresh&&j&&Date.now()-j.fetchedAt<6e4)return j.data;let l=h.get(i);if(void 0!==l)return l;let n=(async()=>{try{let h=await (0,f.u9)(c,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json","User-Agent":d,"X-Client-Name":"antigravity","X-Client-Version":d?.match(/antigravity\/ide\/([\d.]+)/)?.[1]||"2.11.0"},body:JSON.stringify({project:b})},1e4,e);if(!h.ok)return null;let j=await h.json();return g.set(i,{data:j,fetchedAt:Date.now()}),j}catch{return null}})().finally(()=>{h.delete(i)});return h.set(i,n),n};for(let a of l){let b=await n(a);if(b&&i(b).length>0)return b}return null}function k(a){let b=String(a?.window||"").toLowerCase().trim(),c=`${String(a?.bucketId||"")} ${String(a?.displayName||"")}`.toLowerCase(),d=a=>{let b=String(a||"").toLowerCase();return/5h|five[\s_-]?hour|hourly/.test(b)?"5h":/weekly|week/.test(b)?"weekly":null};return d(b)||d(c)}async function l(a,b,c,d,e=null,g={}){let h;return h={},i(await j(a,b,c,d,e,g)).forEach((a,b)=>{var c;if(!a||"object"!=typeof a)return;let d=Array.isArray(a.buckets)?a.buckets:[],e=(c=a.displayName,String(c||"").trim()||`Quota Group ${b+1}`),g=String(e||"").toLowerCase().replace(/\bmodels?\b/g,"").replace(/\band\b/g," ").replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||`group_${b+1}`,i=a=>{let b=k(a);return"5h"===b?0:"weekly"===b?1:2},j=new Set;for(let[a,b]of[...d].filter(a=>a&&"object"==typeof a).sort((a,b)=>i(a)-i(b)).entries()){let a=k(b);if(!a||j.has(a))continue;j.add(a);let c=function(a,b,c){let d=function(a){let b=Number(a?.remainingFraction);if(Number.isFinite(b))return b;let c=a?.remaining&&"object"==typeof a.remaining?Number(a.remaining.remainingFraction):NaN;return Number.isFinite(c)?c:NaN}(a);if(!Number.isFinite(d)||d<0||a?.disabled===!0)return null;let e=Math.max(0,Math.min(1,d)),g=(0,f.eZ)(a?.resetTime),h=!g&&e>=1,i=Math.round(100*e);return{used:h?0:Math.max(0,100-i),total:100*!h,resetAt:g,remainingPercentage:h?100:100*e,unlimited:h,recurring:!0,percentScale:!0,displayName:`${b} \xb7 ${"5h"===c?"5h Window":"Weekly Window"}`}}(b,e,a);c&&(h[`${g}_${a}`]=c)}}),h}let m={...(0,f.U)("antigravity"),...e.XP,userAgent:e.Of};async function n(a,b,c=null){if(!a)return{plan:"Free",message:"Gemini CLI access token not available."};try{let d=(0,f.gD)(b?.projectId),e="Free";if(!d){let b=await o(a,c);d=(0,f.gD)(b?.cloudaicompanionProject),e=b?.currentTier?.name||e}if(!d)return{plan:e,message:"Gemini CLI project ID not available. Reconnect Gemini CLI, or configure a Google Cloud project with Gemini Code Assist access before checking quota."};let g=await (0,f.u9)((0,f.U)("gemini-cli").quotaUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({project:d})},1e4,c);if(!g.ok)return{plan:e,message:`Gemini CLI quota error (${g.status}).`};let h=await g.json(),i={};if(Array.isArray(h.buckets))for(let a of h.buckets){if(!a.modelId||null==a.remainingFraction)continue;let b=Number(a.remainingFraction)||0,c=Math.round(1e3*b),d=Math.max(0,1e3-c);i[a.modelId]={used:d,total:1e3,resetAt:(0,f.eZ)(a.resetTime),remainingPercentage:100*b,unlimited:!1}}return{plan:e,quotas:i}}catch(a){return{message:`Gemini CLI error: ${a.message}`}}}async function o(a,b=null){try{let c=await (0,f.u9)((0,f.U)("gemini-cli").loadCodeAssistUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:d.Cn})},1e4,b);if(!c.ok)return null;return await c.json()}catch{return null}}async function p(a,b,c=null,d={}){try{let g=await q(a,c),h=(0,f.gD)(b?.projectId);h||(h=(0,f.gD)(g?.cloudaicompanionProject));let i=g?.currentTier?.name||"Antigravity";if(a&&h)try{let b=await l(a,h,(0,f.U)("antigravity").quotaSummaryApiUrls,m.userAgent,c,{forceRefresh:!0===d.force||!0===d.forceRefresh});if(b&&Object.keys(b).length>0)return{plan:i,quotas:b,subscriptionInfo:g}}catch(a){console.warn("[Antigravity Usage] Quota summary unavailable, falling back to models:",a?.message)}let j=await (0,f.u9)(m.quotaApiUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":m.userAgent,"Content-Type":"application/json","X-Client-Name":"antigravity","X-Client-Version":e.Tr},body:JSON.stringify({...h?{project:h}:{}})},1e4,c);if(403===j.status)return{message:"Antigravity quota API access forbidden. Chat may still work.",quotas:{}};if(401===j.status)return{message:"Antigravity quota API authentication expired. Chat may still work.",quotas:{}};if(!j.ok)throw Error(`Antigravity API error: ${j.status}`);let k=await j.json(),n={};if(k.models){let a=["gemini-3.8-flash-high","gemini-3.8-flash-medium","gemini-3.8-flash-low","gemini-3.7-flash-high","gemini-3.7-flash-medium","gemini-3.7-flash-low","gemini-3.6-flash-high","gemini-3.6-flash-medium","gemini-3.6-flash-low","gemini-3.1-pro-high","gemini-pro-agent","gemini-3.1-pro-low","claude-sonnet-5-5-high","claude-sonnet-5-5-medium","claude-sonnet-5-5-low","claude-sonnet-5-5","claude-opus-5-5-high","claude-opus-5-5-medium","claude-opus-5-5-low","claude-opus-5-5","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3.1-flash-image","gemini-3-pro-image","gemini-2.5-flash-image","imagen-3.0-generate-002"];for(let[b,c]of Object.entries(k.models)){if(!c.quotaInfo||c.isInternal||!a.includes(b))continue;let d=c.quotaInfo.remainingFraction||0,e=100*d,g=Math.round(1e3*d),h=1e3-g;n[b]={used:h,total:1e3,resetAt:(0,f.eZ)(c.quotaInfo.resetTime),remainingPercentage:e,unlimited:!1,displayName:c.displayName||b}}}return{plan:i,quotas:n,subscriptionInfo:g}}catch(a){return console.error("[Antigravity Usage] Error:",a.message,a.cause),{message:`Antigravity error: ${a.message}`}}}async function q(a,b=null){try{let c=await (0,f.u9)(m.loadProjectApiUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":m.userAgent,"Content-Type":"application/json"},body:JSON.stringify({metadata:d.Cn,mode:1})},1e4,b);if(!c.ok)return null;return await c.json()}catch(a){return console.error("[Antigravity Subscription] Error:",a.message),null}}}};