@techysy/10router 1.3.0 → 1.3.1

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 (628) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +9 -9
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/react-loadable-manifest.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  86. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  87. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  88. package/app/.next-cli-build/server/app/_not-found.html +2 -2
  89. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  90. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  91. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
  92. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/models/caps/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/network/egress-region/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/security/status/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/security/status/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  302. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/quotas/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/quotas/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  403. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  405. package/app/.next-cli-build/server/app/callback.html +2 -2
  406. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  407. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  408. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  409. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  410. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +2 -2
  411. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  412. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  413. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  414. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  415. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +2 -2
  416. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  417. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
  418. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  419. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/combos.html +2 -2
  421. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  422. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
  423. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  424. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/endpoint.html +2 -2
  426. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  427. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  428. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  429. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/experimental.html +2 -2
  431. package/app/.next-cli-build/server/app/dashboard/experimental.rsc +7 -7
  432. package/app/.next-cli-build/server/app/dashboard/experimental.segments/!KGRhc2hib2FyZCk/dashboard/experimental/__PAGE__.segment.rsc +7 -7
  433. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_full.segment.rsc +7 -7
  434. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_tree.segment.rsc +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +2 -2
  436. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  437. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
  438. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  439. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  440. package/app/.next-cli-build/server/app/dashboard/mitm.html +2 -2
  441. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  442. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
  443. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  444. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/profile.html +2 -2
  446. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  447. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
  448. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  449. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/providers/new.html +2 -2
  451. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  452. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
  453. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  454. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/providers.html +2 -2
  456. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  457. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
  458. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  459. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +2 -2
  461. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  462. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
  463. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  464. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +2 -2
  466. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
  467. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
  468. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
  469. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -3
  471. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  472. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
  473. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  474. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  478. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +2 -2
  479. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  480. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  481. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  483. package/app/.next-cli-build/server/app/dashboard/skills.html +2 -2
  484. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  485. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
  486. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  487. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/token-saver.html +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  490. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
  491. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  492. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/translator.html +2 -2
  494. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  495. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
  496. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  497. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/usage.html +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  500. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
  501. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  502. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard.html +2 -2
  504. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  505. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  506. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  507. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  509. package/app/.next-cli-build/server/app/index.html +1 -1
  510. package/app/.next-cli-build/server/app/index.rsc +5 -5
  511. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  512. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  513. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  515. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  516. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  517. package/app/.next-cli-build/server/app/landing.html +2 -2
  518. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  519. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  520. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
  522. package/app/.next-cli-build/server/app/login/page.js +1 -1
  523. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  524. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  525. package/app/.next-cli-build/server/app/login.html +2 -2
  526. package/app/.next-cli-build/server/app/login.rsc +6 -6
  527. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  528. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  529. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
  530. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  531. package/app/.next-cli-build/server/app/page.js +1 -1
  532. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  533. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  534. package/app/.next-cli-build/server/app-paths-manifest.json +9 -9
  535. package/app/.next-cli-build/server/chunks/1159.js +1 -1
  536. package/app/.next-cli-build/server/chunks/1329.js +1 -1
  537. package/app/.next-cli-build/server/chunks/1710.js +1 -1
  538. package/app/.next-cli-build/server/chunks/2112.js +1 -1
  539. package/app/.next-cli-build/server/chunks/2120.js +1 -1
  540. package/app/.next-cli-build/server/chunks/2132.js +1 -1
  541. package/app/.next-cli-build/server/chunks/2468.js +1 -0
  542. package/app/.next-cli-build/server/chunks/2926.js +1 -1
  543. package/app/.next-cli-build/server/chunks/3245.js +1 -1
  544. package/app/.next-cli-build/server/chunks/3500.js +4 -4
  545. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  546. package/app/.next-cli-build/server/chunks/3792.js +1 -1
  547. package/app/.next-cli-build/server/chunks/3885.js +1 -1
  548. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  549. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  550. package/app/.next-cli-build/server/chunks/4177.js +1 -1
  551. package/app/.next-cli-build/server/chunks/4282.js +1 -1
  552. package/app/.next-cli-build/server/chunks/436.js +1 -1
  553. package/app/.next-cli-build/server/chunks/4575.js +1 -1
  554. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  555. package/app/.next-cli-build/server/chunks/4927.js +1 -1
  556. package/app/.next-cli-build/server/chunks/5210.js +23 -23
  557. package/app/.next-cli-build/server/chunks/5330.js +2 -2
  558. package/app/.next-cli-build/server/chunks/539.js +1 -1
  559. package/app/.next-cli-build/server/chunks/5485.js +1 -1
  560. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  561. package/app/.next-cli-build/server/chunks/5781.js +1 -1
  562. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  563. package/app/.next-cli-build/server/chunks/615.js +1 -1
  564. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  565. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  566. package/app/.next-cli-build/server/chunks/6492.js +1 -1
  567. package/app/.next-cli-build/server/chunks/6756.js +1 -1
  568. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  569. package/app/.next-cli-build/server/chunks/6922.js +1 -1
  570. package/app/.next-cli-build/server/chunks/6956.js +1 -1
  571. package/app/.next-cli-build/server/chunks/6960.js +5 -5
  572. package/app/.next-cli-build/server/chunks/7067.js +1 -1
  573. package/app/.next-cli-build/server/chunks/7070.js +1 -0
  574. package/app/.next-cli-build/server/chunks/7122.js +1 -1
  575. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  576. package/app/.next-cli-build/server/chunks/7274.js +1 -1
  577. package/app/.next-cli-build/server/chunks/7828.js +1 -1
  578. package/app/.next-cli-build/server/chunks/8172.js +2 -2
  579. package/app/.next-cli-build/server/chunks/8410.js +1 -1
  580. package/app/.next-cli-build/server/chunks/8499.js +13 -13
  581. package/app/.next-cli-build/server/chunks/8595.js +1 -1
  582. package/app/.next-cli-build/server/chunks/8672.js +1 -1
  583. package/app/.next-cli-build/server/chunks/8749.js +1 -1
  584. package/app/.next-cli-build/server/chunks/8895.js +6 -6
  585. package/app/.next-cli-build/server/chunks/890.js +1 -0
  586. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  587. package/app/.next-cli-build/server/chunks/9046.js +1 -1
  588. package/app/.next-cli-build/server/chunks/9154.js +1 -1
  589. package/app/.next-cli-build/server/chunks/9489.js +2 -2
  590. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  591. package/app/.next-cli-build/server/chunks/9628.js +1 -1
  592. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  593. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  594. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  595. package/app/.next-cli-build/server/middleware.js +4 -4
  596. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  597. package/app/.next-cli-build/server/pages/404.html +2 -2
  598. package/app/.next-cli-build/server/pages/500.html +1 -1
  599. package/app/.next-cli-build/static/chunks/1321-8478f2be717a38f6.js +1 -0
  600. package/app/.next-cli-build/static/chunks/5497-7d66b43a3bbcf07d.js +7 -0
  601. package/app/.next-cli-build/static/chunks/{6808-d3ffacc1373713c6.js → 6808-7c2c0ea1ee14763c.js} +1 -1
  602. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/experimental/page-5ec2e868aa2ff281.js +1 -0
  603. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-39a4fadcce4f3019.js +14 -0
  604. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-bc56399135571dd5.js +1 -0
  605. package/app/.next-cli-build/static/chunks/app/login/page-b5eb40dc7d4e285e.js +1 -0
  606. package/app/.next-cli-build/static/chunks/{webpack-34fe8baab4ced03b.js → webpack-1adc95943fa90500.js} +1 -1
  607. package/app/package.json +1 -1
  608. package/app/public/i18n/changelog/en.md +17 -0
  609. package/app/public/i18n/changelog/zh-CN.md +17 -0
  610. package/app/public/i18n/changelog/zh-TW.md +17 -0
  611. package/app/public/i18n/literals/zh-CN.json +10 -0
  612. package/app/public/i18n/literals/zh-TW.json +10 -0
  613. package/app/public/providers/muse.png +0 -0
  614. package/app/public/providers/v1m.png +0 -0
  615. package/package.json +1 -1
  616. package/src/cli/menus/providers.js +3 -2
  617. package/src/cli/utils/modelSelector.js +1 -1
  618. package/app/.next-cli-build/server/chunks/2051.js +0 -1
  619. package/app/.next-cli-build/server/chunks/4290.js +0 -1
  620. package/app/.next-cli-build/server/chunks/8247.js +0 -1
  621. package/app/.next-cli-build/static/chunks/1321-b226b10e6272fc21.js +0 -1
  622. package/app/.next-cli-build/static/chunks/5497-c5b293fd9b36c51d.js +0 -7
  623. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/experimental/page-f2be5e1e9fb2a81d.js +0 -1
  624. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-2bc7898568623185.js +0 -14
  625. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-f7223ed3275a94a5.js +0 -1
  626. package/app/.next-cli-build/static/chunks/app/login/page-0c4e2808c937c740.js +0 -1
  627. /package/app/.next-cli-build/static/{wj14lzSQILIu20--ipzW4 → hWZt96TEErc6dGwTZrX7O}/_buildManifest.js +0 -0
  628. /package/app/.next-cli-build/static/{wj14lzSQILIu20--ipzW4 → hWZt96TEErc6dGwTZrX7O}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{26048:(e,t,r)=>{Promise.resolve().then(r.bind(r,33769)),Promise.resolve().then(r.bind(r,25086))},33769:(e,t,r)=>{"use strict";r.d(t,{default:()=>eS});var a=r(95155),n=r(12115),s=r(73321),i=r(67852),l=r(66996),o=r(14051),c=r.n(o),d=r(73006),u=r(31474),m=r(45564),x=r(67352);let p="quotaCacheData",h="quotaAutoRefresh",b=[10,20,50,100],g=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],f=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function y(e){return"qoder"===e.provider||"qoder-cn"===e.provider?e.displayName?.trim()||e.name?.trim()||e.email?.trim()||null:e.name?.trim()||e.email?.trim()||e.displayName?.trim()||null}function w(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function v(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}function k({start:e,end:t,total:r}){return r>0?`Showing ${e}-${t} of ${r}`:"Showing 0 of 0"}async function j(e,t){return await e(t)}function N(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function S(e){return e&&"object"==typeof e?String(e.modelKey||e.name||"").trim():""}function C(e,t,r,a=[]){let n=null,s=t?.[e]?.hidden;if(Array.isArray(s))n=s.map(String);else if(r&&r!==e){let e=t?.[r]?.hidden;Array.isArray(e)&&(n=e.map(String))}return n?new Set(Array.isArray(a)&&a.length>0?function(e=[],t=[]){if(!Array.isArray(e)||0===e.length)return[];let r=new Set(t.map(S).filter(Boolean));return[...new Set(e.map(e=>String(e).trim()).filter(e=>r.has(e)))]}(n,a):n):new Set}let A="flex h-8 shrink-0 items-center gap-1.5 rounded-lg border border-black/10 bg-surface px-2.5 text-xs text-text transition-colors hover:bg-black/[0.04] disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/[0.06]",T="border-primary/30 bg-primary/10 text-primary hover:bg-primary/15",q="material-symbols-outlined text-[16px] leading-none",$={all:"apps",active:"check_circle",inactive:"block"};function P({open:e,onClose:t,align:r="left",className:n,children:s}){return e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 cursor-default bg-transparent","aria-label":"Close",onClick:t}),(0,a.jsx)("div",{className:(0,u.cn)("absolute z-40 mt-1.5 overflow-hidden rounded-xl border border-black/10 bg-surface/95 p-1 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10","right"===r?"right-0":"left-0",n),children:s})]}):null}function D({selected:e=!1,onClick:t,icon:r,children:n,hint:s,disabled:i=!1}){return(0,a.jsxs)("button",{type:"button",onClick:t,disabled:i,className:(0,u.cn)("flex w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left text-xs transition-colors disabled:opacity-50",e?"bg-primary/10 text-primary":"text-text hover:bg-black/[0.04] dark:hover:bg-white/[0.06]"),children:[r,(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block font-medium",children:n}),s?(0,a.jsx)("span",{className:"mt-0.5 block text-[11px] text-text-muted",children:s}):null]}),e?(0,a.jsx)("span",{className:(0,u.cn)(q,"text-[14px]"),children:"check"}):null]})}function M({provider:e,size:t=16}){return"all"===e?(0,a.jsx)("span",{className:(0,u.cn)(q,"text-text-muted"),children:"apps"}):(0,a.jsx)(i.A,{src:`/providers/${e}.png`,alt:e,size:t,className:"rounded object-contain",fallbackText:e.slice(0,2).toUpperCase()})}function E({view:e="cards",onViewChange:t,providerFilter:r,providerOptions:s,providerLabel:i,onProviderChange:l,accountFilter:o,onAccountChange:c,showCodexSort:m,quotaSortMode:x,onQuotaSortChange:p,expiringFirst:h,onToggleExpiringFirst:b,onDisableDepleted:y,onEnableAvailable:w,bulkToggling:v,autoRefresh:k,onToggleAutoRefresh:j,countdown:N,refreshingAll:S,onRefreshAll:C,accountCount:R}){let[O,F]=(0,n.useState)(!1),[I,_]=(0,n.useState)(!1),z="cards"===e;return(0,a.jsxs)("div",{className:"@container flex flex-wrap items-center gap-2",children:[t&&(0,a.jsx)("div",{role:"tablist","aria-label":(0,d.Tl)("View"),className:"flex h-8 items-center rounded-lg border border-black/10 bg-surface p-0.5 dark:border-white/10",children:[{value:"cards",icon:"grid_view",label:(0,d.Tl)("Cards")},{value:"windows",icon:"date_range",label:(0,d.Tl)("Quota windows")}].map(r=>(0,a.jsxs)("button",{type:"button",role:"tab","aria-selected":e===r.value,"aria-label":r.label,onClick:()=>t(r.value),className:(0,u.cn)("flex h-full items-center gap-1 rounded-md px-2.5 text-xs transition-colors",e===r.value?"bg-primary/10 font-medium text-primary":"text-text-muted hover:text-text"),children:[(0,a.jsx)("span",{className:(0,u.cn)(q,"text-[15px]"),children:r.icon}),(0,a.jsx)("span",{className:"hidden @min-[900px]:inline",children:r.label})]},r.value))}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 @max-[640px]:order-last @max-[640px]:w-full",children:[(0,a.jsxs)("div",{className:"relative min-w-0",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>F(e=>!e),className:(0,u.cn)(A,"all"!==r&&T),"aria-haspopup":"menu","aria-expanded":O,title:(0,d.Tl)("Filter quota providers"),children:[(0,a.jsx)(M,{provider:r}),(0,a.jsx)("span",{className:"max-w-[9rem] truncate capitalize @max-[640px]:max-w-[5rem]",children:i}),(0,a.jsx)("span",{className:(0,u.cn)(q,"text-[14px] text-text-muted"),children:"expand_more"})]}),(0,a.jsxs)(P,{open:O,onClose:()=>F(!1),className:"w-64",children:[(0,a.jsx)(D,{selected:"all"===r,icon:(0,a.jsx)(M,{provider:"all",size:18}),onClick:()=>{l("all"),F(!1)},children:(0,d.Tl)("All providers")}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/5 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto",children:s.map(e=>(0,a.jsx)(D,{selected:r===e,icon:(0,a.jsx)(M,{provider:e,size:18}),onClick:()=>{l(e),F(!1)},children:(0,a.jsx)("span",{className:"capitalize",children:e})},e))})]})]}),(0,a.jsx)("div",{role:"radiogroup","aria-label":(0,d.Tl)("Filter accounts by status"),className:"flex h-8 shrink-0 items-center rounded-lg border border-black/10 bg-surface p-0.5 dark:border-white/10",children:g.map(e=>{let t=o===e.value;return(0,a.jsxs)("button",{type:"button",role:"radio","aria-checked":t,"aria-label":(0,d.Tl)(e.label),onClick:()=>c(e.value),className:(0,u.cn)("flex h-full items-center gap-1 rounded-md px-2.5 text-xs transition-colors @max-[640px]:px-2",t?"bg-primary/10 font-medium text-primary":"text-text-muted hover:text-text"),children:[(0,a.jsx)("span",{className:(0,u.cn)(q,"hidden text-[14px] @max-[640px]:inline"),children:$[e.value]}),(0,a.jsx)("span",{className:"@max-[640px]:hidden",children:(0,d.Tl)(e.label)})]},e.value)})}),z&&(0,a.jsx)("button",{type:"button",onClick:b,"aria-pressed":h,className:(0,u.cn)(A,"w-8 justify-center px-0",h&&T),title:(0,d.Tl)("Sort accounts by earliest reset or expiry time"),"aria-label":(0,d.Tl)("Resets first"),children:(0,a.jsx)("span",{className:q,children:"hourglass_top"})}),z&&m&&(0,a.jsx)("select",{value:x,onChange:e=>p(e.target.value),className:(0,u.cn)(A,"pr-1 outline-none"),"aria-label":(0,d.Tl)("Sort Codex quotas by remaining"),children:f.map(e=>(0,a.jsx)("option",{value:e.value,children:(0,d.Tl)(e.label)},e.value))})]}),(0,a.jsxs)("div",{className:"ml-auto flex items-center gap-2 @max-[640px]:order-2",children:[z&&Number.isFinite(R)&&(0,a.jsx)("span",{className:"hidden text-xs tabular-nums text-text-muted @min-[1130px]:inline",children:(0,d.Tl)("{count} accounts").replace("{count}",String(R))}),z&&(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>_(e=>!e),disabled:v,className:A,"aria-haspopup":"menu","aria-expanded":I,title:(0,d.Tl)("Bulk actions"),"aria-label":(0,d.Tl)("Bulk actions"),children:[(0,a.jsx)("span",{className:q,children:v?"progress_activity":"checklist"}),(0,a.jsx)("span",{className:"hidden @min-[1060px]:inline",children:(0,d.Tl)("Bulk actions")}),(0,a.jsx)("span",{className:(0,u.cn)(q,"text-[14px] text-text-muted"),children:"expand_more"})]}),(0,a.jsxs)(P,{open:I,onClose:()=>_(!1),align:"right",className:"w-72",children:[(0,a.jsx)(D,{disabled:v,icon:(0,a.jsx)("span",{className:(0,u.cn)(q,"mt-px text-red-500"),children:"block"}),hint:(0,d.Tl)("Disable connections with depleted quota on the current page"),onClick:()=>{_(!1),y()},children:(0,d.Tl)("Turn off Empty")}),(0,a.jsx)(D,{disabled:v,icon:(0,a.jsx)("span",{className:(0,u.cn)(q,"mt-px text-emerald-500"),children:"check_circle"}),hint:(0,d.Tl)("Enable connections that still have quota on the current page"),onClick:()=>{_(!1),w()},children:(0,d.Tl)("Turn on Available")})]})]}),z&&(0,a.jsxs)("button",{type:"button",role:"switch","aria-checked":k,onClick:j,className:A,title:(0,d.Tl)(k?"Disable auto-refresh":"Enable auto-refresh"),children:[(0,a.jsx)("span",{"aria-hidden":"true",className:(0,u.cn)("relative h-4 w-7 rounded-full transition-colors",k?"bg-primary":"bg-black/15 dark:bg-white/20"),children:(0,a.jsx)("span",{className:(0,u.cn)("absolute top-0.5 size-3 rounded-full bg-white shadow transition-[left]",k?"left-[14px]":"left-0.5")})}),(0,a.jsx)("span",{className:"hidden @min-[980px]:inline",children:(0,d.Tl)("Auto-refresh")}),k&&(0,a.jsxs)("span",{className:"w-6 text-right text-[11px] tabular-nums text-text-muted",children:[N,"s"]})]}),(0,a.jsx)("button",{type:"button",onClick:C,disabled:S,className:(0,u.cn)(A,"w-8 justify-center px-0"),title:(0,d.Tl)("Refresh all"),"aria-label":(0,d.Tl)("Refresh all"),children:(0,a.jsx)("span",{className:(0,u.cn)(q,S&&"animate-spin"),children:"refresh"})})]})]})}P.propTypes={open:c().bool,onClose:c().func.isRequired,align:c().oneOf(["left","right"]),className:c().string,children:c().node},D.propTypes={selected:c().bool,onClick:c().func,icon:c().node,children:c().node,hint:c().node,disabled:c().bool},M.propTypes={provider:c().string.isRequired,size:c().number},E.propTypes={view:c().oneOf(["cards","windows"]),onViewChange:c().func,providerFilter:c().string.isRequired,providerOptions:c().arrayOf(c().string).isRequired,providerLabel:c().node,onProviderChange:c().func.isRequired,accountFilter:c().string.isRequired,onAccountChange:c().func.isRequired,showCodexSort:c().bool,quotaSortMode:c().string,onQuotaSortChange:c().func,expiringFirst:c().bool,onToggleExpiringFirst:c().func.isRequired,onDisableDepleted:c().func.isRequired,onEnableAvailable:c().func.isRequired,bulkToggling:c().bool,autoRefresh:c().bool,onToggleAutoRefresh:c().func.isRequired,countdown:c().number,refreshingAll:c().bool,onRefreshAll:c().func.isRequired,accountCount:c().number};var R=r(98500),O=r.n(R),F=r(84588),I=r(35655),_=r(75958);let z=[{re:/5h|five[\s_-]?hour|session|rolling|滚动|5\s*小时/i,ms:18e6,key:"5h"},{re:/daily|\bday\b|24h|每日|每天/i,ms:864e5,key:"day"},{re:/week|7d|周/i,ms:6048e5,key:"week"},{re:/month|月/i,ms:null,key:"month"}];function L(e,t){let r=new Date(e),a=r.getDate();r.setDate(1),r.setMonth(r.getMonth()+t);let n=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return r.setDate(Math.min(a,n)),r.getTime()}let H={week:{kinds:["day","week","month"],spanMs:12096e5,stepMs:6048e5,tickMs:864e5},hours:{kinds:["5h"],spanMs:864e5,stepMs:864e5,tickMs:36e5}},U="quotaWindowsCache",B="w-[220px] shrink-0",J=e=>String(e).padStart(2,"0"),W=e=>{let t=new Date(e);return`${J(t.getMonth()+1)}/${J(t.getDate())}`},K=e=>{let t=new Date(e);return`${J(t.getHours())}:${J(t.getMinutes())}`};function V(e){let t=(0,x.TM)(e);return t?(0,d.Tl)(t.family):(0,_.M)(e)}function G({value:e,options:t,onChange:r}){return(0,a.jsx)("div",{className:"flex h-8 items-center rounded-lg border border-black/10 bg-surface p-0.5 dark:border-white/10",children:t.map(t=>(0,a.jsx)("button",{type:"button",onClick:()=>r(t.value),"aria-pressed":e===t.value,className:(0,u.cn)("h-full rounded-md px-2.5 text-xs transition-colors",e===t.value?"bg-primary/10 font-medium text-primary":"text-text-muted hover:text-text"),children:t.label},t.value))})}function Q({win:e,lane:t,range:r,showLabel:n,view:s}){let i=e=>"hours"===s?K(e):`${W(e)} ${K(e)}`,l=r.end-r.start,o=100*Math.max(0,(e.start-r.start)/l),c=Math.max(.5,100*Math.min(1,(e.end-r.start)/l)-o),m=e.start<r.start,x=e.end>r.end,p=(0,u.cn)(!m&&"rounded-l-[4px]",!x&&"rounded-r-[4px]"),h={left:`${o}%`,width:`${c}%`};if(!e.current)return(0,a.jsx)("div",{className:(0,u.cn)("absolute inset-y-0 overflow-hidden border border-dashed border-black/15 dark:border-white/15",p),style:h,title:`${V(t.name)} \xb7 ${W(e.start)} ${K(e.start)} – ${W(e.end)} ${K(e.end)}`,children:(0,a.jsx)("span",{className:"absolute inset-y-0 left-1.5 right-1.5 flex items-center truncate text-[10px] tabular-nums text-text-muted/70",children:i(e.start)})});let b=Math.round(t.pct),g=(0,d.Tl)("resets {date}").replace("{date}",i(e.end)),f=`${n?`${V(t.name)} \xb7 `:""}${b}% \xb7 ${g}`;return(0,a.jsxs)("div",{className:(0,u.cn)("absolute inset-y-0 overflow-hidden bg-black/[0.06] dark:bg-white/[0.08]",p),style:h,title:f,children:[(0,a.jsx)("div",{className:"absolute inset-y-0 left-0",style:{width:`${b}%`,opacity:.85,...(0,I.jE)(b)}}),(0,a.jsx)("span",{className:"absolute inset-y-0 left-1.5 right-1.5 flex items-center truncate text-[10px] font-medium tabular-nums text-text",children:f})]})}function Y({providerFilter:e="all",accountFilter:t="all",refreshKey:r=0,showTrackerLink:s=!0}){let[l,o]=(0,n.useState)(null),[c,m]=(0,n.useState)(null),[p,h]=(0,n.useState)(!1),[b,g]=(0,n.useState)("week"),[f,y]=(0,n.useState)(0),[w,v]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e=!1,t=0===r?function(){try{let e=window.localStorage.getItem(U);return e?JSON.parse(e):null}catch{return null}}():null;(async()=>{t?.connections&&o(t.connections),v(Date.now()),h(!0);try{let t=await fetch(`/api/usage/quotas${r>0?"?force=1":""}`,{cache:"no-store"}),n=await t.json();if(!t.ok)throw Error(n?.error||`HTTP ${t.status}`);if(e)return;o(n.connections||[]),m(null);var a=n.connections||[];try{window.localStorage.setItem(U,JSON.stringify({connections:a,at:Date.now()}))}catch{}}catch(t){e||m(t.message||"Failed to load quotas")}finally{e||h(!1)}})();let a=setInterval(()=>v(Date.now()),6e4);return()=>{e=!0,clearInterval(a)}},[r]);let k=(0,n.useMemo)(()=>(l||[]).filter(r=>("all"===e||r.provider===e)&&("active"!==t||!1!==r.isActive)&&("inactive"!==t||!1===r.isActive)),[l,e,t]),j=(0,n.useMemo)(()=>w?function(e,t,r=0){let a,n,s,i=H[e]||H.week,l=("hours"===e?((a=new Date(t-432e5)).setMinutes(0,0,0),a.getTime()):((n=new Date(t)).setHours(0,0,0,0),s=(n.getDay()+6)%7,n.setDate(n.getDate()-s),n.getTime()))+r*i.stepMs;return{start:l,end:l+i.spanMs}}(b,w,f):null,[b,w,f]),N=(0,n.useMemo)(()=>j&&l?function(e=[],{view:t="week",rangeStart:r,rangeEnd:a}={}){let n=(H[t]||H.week).kinds,s=[];for(let t of e||[]){let e=(Array.isArray(t?.quotas)?t.quotas:[]).map(e=>({q:e,kind:function(e){if(e?.giftPack===!0||e?.detailOnly===!0||!(0,x.OG)(e)||!e?.resetAt)return null;let t=String(e?.name||""),r=(0,x.TM)(t)?.window||t;for(let e of z)if(e.re.test(r))return e.key;return null}(e)})).filter(e=>e.kind);if(0===e.length)continue;let i=e.map(({q:e,kind:t})=>({name:e.name,kind:t,pct:Math.round((0,x.pR)(e))})),l=e.filter(({kind:e})=>n.includes(e)).map(({q:e,kind:t})=>({name:e.name,kind:t,pct:(0,x.pR)(e),resetAt:e.resetAt,windows:function(e,t,r,a,n=60){let s=[],i=new Date(e?.resetAt).getTime(),l=function(e,t){let r=new Date(t).getTime();if("month"===e)return L(r,-1);let a=z.find(t=>t.key===e);return a?.ms?r-a.ms:NaN}(t,i);if(!Number.isFinite(i)||!Number.isFinite(l))return s;for(let e=0;e<=n&&l<a;e+=1){i>r&&s.push({start:l,end:i,current:0===e});let a=function(e,t){let r=new Date(t).getTime();if("month"===e)return L(r,1);let a=z.find(t=>t.key===e);return a?.ms?r+a.ms:NaN}(t,i);if(!Number.isFinite(a))break;l=i,i=a}return s}(e,t,r,a)})).filter(e=>e.windows.length>0);s.push({id:t.id,provider:t.provider,label:t.name||t.email||t.providerName||t.provider,providerName:t.providerName||t.provider,isActive:!1!==t.isActive,chips:i,lanes:l})}return s}(k,{view:b,rangeStart:j.start,rangeEnd:j.end}):[],[l,k,b,j]),S=(0,n.useMemo)(()=>{if(!j)return[];let e=H[b].tickMs,t=[];for(let r=j.start;r<j.end;r+=e)t.push(r);return t},[j,b]),C=j&&w>=j.start&&w<j.end?(w-j.start)/(j.end-j.start)*100:null,A=w?new Date(new Date(w).setHours(0,0,0,0)).getTime():null,T=j?"hours"===b?`${W(j.start)} ${K(j.start)} – ${W(j.end)} ${K(j.end)}`:`${W(j.start)} – ${W(j.end-864e5)} \xb7 ${(0,d.Tl)("two weeks")}`:"";return(0,a.jsxs)(F.default,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-lg font-semibold",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"date_range"}),(0,d.Tl)("Quota windows"),p&&(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px] text-text-muted","aria-label":(0,d.Tl)("Refreshing"),children:"progress_activity"})]}),(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted tabular-nums",children:[T,0===f&&T?` \xb7 ${(0,d.Tl)("current")}`:""]})]}),(0,a.jsxs)("div",{className:"flex h-8 items-center rounded-lg border border-black/10 bg-surface dark:border-white/10",children:[(0,a.jsx)("button",{type:"button",onClick:()=>y(e=>e-1),className:"flex h-full w-8 items-center justify-center text-text-muted hover:text-text","aria-label":(0,d.Tl)("Previous"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>y(0),disabled:0===f,className:"h-full border-x border-black/10 px-2.5 text-xs text-text disabled:text-text-muted dark:border-white/10",children:(0,d.Tl)("hours"===b?"current":"Today")}),(0,a.jsx)("button",{type:"button",onClick:()=>y(e=>e+1),className:"flex h-full w-8 items-center justify-center text-text-muted hover:text-text","aria-label":(0,d.Tl)("Next"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})})]}),(0,a.jsx)(G,{value:b,onChange:e=>{g(e),y(0)},options:[{value:"week",label:(0,d.Tl)("By week")},{value:"hours",label:(0,d.Tl)("5 hours")}]}),s&&(0,a.jsxs)(O(),{href:"/dashboard/quota",className:"flex h-8 items-center gap-1 rounded-lg px-2 text-xs text-text-muted hover:bg-black/[0.04] hover:text-text dark:hover:bg-white/[0.06]",children:[(0,d.Tl)("Quota Tracker"),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_forward"})]})]}),null===l?(0,a.jsx)("div",{className:"py-10 text-center text-xs text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[22px]",children:"progress_activity"})}):0===N.length?(0,a.jsx)("div",{className:"py-8 text-center text-xs text-text-muted",children:c?`${(0,d.Tl)("Failed to load quotas")} \xb7 ${c}`:(0,d.Tl)("No accounts with recurring quota windows")}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"min-w-[760px]",children:[(0,a.jsxs)("div",{className:"flex border-b border-black/10 bg-black/[0.015] dark:border-white/10 dark:bg-white/[0.02]",children:[(0,a.jsx)("div",{className:(0,u.cn)(B,"flex items-end px-3 pb-1.5 text-[11px] text-text-muted"),children:(0,d.Tl)("Account")}),(0,a.jsx)("div",{className:"relative flex flex-1",children:S.map((e,t)=>{let r="week"===b&&e===A,n="hours"!==b||new Date(e).getHours()%2==0;return(0,a.jsx)("div",{className:(0,u.cn)("flex-1 border-l border-black/5 px-0.5 py-1.5 text-center dark:border-white/5",0===t&&"border-l-0",r&&"bg-primary/[0.06]"),children:"hours"===b?(0,a.jsx)("div",{className:"text-[10px] tabular-nums text-text-muted",children:n?`${J(new Date(e).getHours())}`:""}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:(0,u.cn)("text-[10px]",r?"text-primary":"text-text-muted"),children:function(e){try{return new Date(e).toLocaleDateString((0,d.kk)()||void 0,{weekday:"short"})}catch{return""}}(e)}),(0,a.jsx)("div",{className:(0,u.cn)("text-[11px] font-medium tabular-nums",r?"text-primary":"text-text"),children:W(e)})]})},e)})})]}),N.map(e=>(0,a.jsxs)("div",{className:(0,u.cn)("flex border-b border-black/5 last:border-b-0 dark:border-white/5",!e.isActive&&"opacity-55"),children:[(0,a.jsxs)("div",{className:(0,u.cn)(B,"space-y-1 px-3 py-2.5"),children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)(i.A,{src:`/providers/${e.provider}.png`,alt:e.provider,size:16,className:"shrink-0 rounded object-contain",fallbackText:String(e.provider||"?").slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate text-xs font-medium text-text",title:`${e.providerName} \xb7 ${e.label}`,children:e.label})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:e.chips.map(e=>(0,a.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1 rounded-[3px] bg-black/[0.04] px-1.5 py-px text-[10px] text-text-muted dark:bg-white/[0.06]",title:(0,_.M)(e.name),children:[(0,a.jsx)("span",{className:"size-1.5 shrink-0 rounded-full",style:{background:(0,I.dI)(e.pct)}}),(0,a.jsx)("span",{className:"truncate",children:(0,_.M)(e.name)}),(0,a.jsxs)("b",{className:"font-semibold tabular-nums text-text",children:[e.pct,"%"]})]},e.name))})]}),(0,a.jsxs)("div",{className:"relative flex-1 py-2.5",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 flex",children:S.map((e,t)=>(0,a.jsx)("div",{className:(0,u.cn)("flex-1 border-l border-black/[0.04] dark:border-white/[0.05]",0===t&&"border-l-0","week"===b&&e===A&&"bg-primary/[0.04]")},e))}),null!==C&&(0,a.jsx)("div",{className:"pointer-events-none absolute inset-y-0 w-px bg-primary/60",style:{left:`${C}%`}}),(0,a.jsx)("div",{className:"relative space-y-1",children:0===e.lanes.length?(0,a.jsx)("div",{className:"flex h-[18px] items-center px-2 text-[10px] text-text-muted/70",children:(0,d.Tl)("hours"===b?"No 5-hour window":"No daily / weekly / monthly window")}):e.lanes.map(t=>(0,a.jsx)("div",{className:"relative h-[18px]",children:t.windows.map(r=>(0,a.jsx)(Q,{win:r,lane:t,range:j,view:b,showLabel:e.lanes.length>1},`${t.name}-${r.start}`))},t.name))})]})]},e.id))]})})]})}G.propTypes={value:c().string.isRequired,options:c().arrayOf(c().shape({value:c().string,label:c().node})).isRequired,onChange:c().func.isRequired},Q.propTypes={win:c().object.isRequired,lane:c().object.isRequired,range:c().object.isRequired,showLabel:c().bool,view:c().string},Y.propTypes={providerFilter:c().string,accountFilter:c().string,refreshKey:c().number,showTrackerLink:c().bool};let Z="quotaConnectionsCache";function X(e){try{let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}}function ee(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function et({page:e,pageSize:t,accountFilter:r,providerFilter:a}){return[e,t,r,a].join("|")}function er(e){if(!e?.providerSpecificData?.connectionProxyUrl)return e;let t={...e.providerSpecificData};return delete t.connectionProxyUrl,{...e,providerSpecificData:t}}function ea(e){let t=e?.cachedAt?new Date(e.cachedAt).getTime():NaN;return Number.isFinite(t)?t:0}function en(e){let t=X(p)||{},r={};for(let a of e||[])t[a.id]&&(r[a.id]=t[a.id]);return r}function es(e,t,r=Date.now()){let a=X(p)||{};for(let[n,s]of(a[e]={...function(e){if(!e||"object"!=typeof e)return e;let{raw:t,...r}=e;return t?.resetCredits?{...r,raw:{resetCredits:t.resetCredits}}:r}(t),cachedAt:new Date(r).toISOString()},Object.entries(a)))r-ea(s)>6048e5&&delete a[n];ee(p,a)}function ei(e){return Number(Number(e||0).toFixed(2)).toLocaleString("en-US")}function el({quota:e,now:t,onHide:r}){let n=(0,x.Cd)(e,e.pct),s=(0,x.OG)(e),i=(0,x.D2)(e,t),l=!!e.resetAt&&2099>=new Date(e.resetAt).getFullYear(),o=l?function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e;if(Number.isNaN(t?.getTime?.())||t.getFullYear()>2099||t-new Date<=0)return"-";return(0,x.TV)(t)||"-"}catch(e){return"-"}}(e.resetAt):"-",c=l?[function(e){let t=new Date(e);if(Number.isNaN(t.getTime())||t.getFullYear()>2099)return"";let r=e=>String(e).padStart(2,"0");return`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())} ${r(t.getHours())}:${r(t.getMinutes())}`}(e.resetAt),"-"!==o?o:null].filter(Boolean).join(" \xb7 "):void 0,u=e.percentScale?`${e.pct}%`:e.unlimited?"∞":`${ei(Math.max(0,e.total-e.used))} / ${ei(e.total)}`;return(0,a.jsxs)("div",{className:"group min-w-0 space-y-1 py-1",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2 text-[11px] tabular-nums",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-[8px] shrink-0 rounded-[2px]",style:{background:(0,I.dI)(e.pct)},"aria-hidden":"true"}),(0,a.jsx)("span",{className:"truncate text-text",children:(0,_.M)(e.name)})]}),(0,a.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[(0,a.jsx)("span",{className:I.pM[n],title:e.percentScale||e.unlimited?void 0:`${(0,d.Tl)("Used")} ${ei(e.used)}`,children:u}),l?(0,a.jsx)("span",{className:"text-text-muted",title:c,children:(0,I.h7)(s,e.resetAt,{expired:i})}):null,r?(0,a.jsx)("button",{type:"button",onClick:()=>r(e),className:"-my-1 inline-flex size-5 items-center justify-center rounded text-text-muted opacity-30 transition hover:bg-black/5 hover:text-text group-hover:opacity-100 focus-visible:opacity-100 dark:hover:bg-white/5",title:(0,d.Tl)("Hide this quota row"),"aria-label":`${(0,d.Tl)("Hide this quota row")}: ${(0,_.M)(e.name)}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"visibility_off"})}):null]})]}),(0,a.jsx)(I.Ay,{pct:e.pct})]})}function eo({rows:e,now:t,onHide:r,limit:n,onMore:s}){let i=e.length-n;return(0,a.jsxs)(a.Fragment,{children:[e.slice(0,n).map(e=>(0,a.jsx)(el,{quota:e,now:t,onHide:r},`${e.name}-${e.index}`)),i>0&&(0,a.jsx)("button",{type:"button",onClick:s,className:"w-full rounded-md py-1 text-[11px] text-text-muted transition-colors hover:bg-black/5 hover:text-text dark:hover:bg-white/5",children:(0,d.Tl)("Show {count} more").replace("{count}",String(Math.min(10,i)))})]})}function ec({quotas:e=[],sortMode:t="default",showSortLabel:r=!1,onHideQuota:s=null}){let[i,l]=(0,n.useState)(10),[o,c]=(0,n.useState)(10),[m,p]=(0,n.useState)(!1),[h,b]=(0,n.useState)(()=>Date.now());(0,n.useEffect)(()=>{b(Date.now())},[e]);let{live:g,history:f}=(0,n.useMemo)(()=>{var r;let a=(r=e.map((e,t)=>({...e,index:t,used:Number(e.used||0),total:Number(e.total||0),pct:e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):e?.remaining!==void 0&&(e?.total===100||e?.total===void 0)?Math.max(0,Math.round(e.remaining)):N(e?.used,e?.total)})),"remaining-asc"===t?[...r].sort((e,t)=>e.pct-t.pct||e.name.localeCompare(t.name)):"remaining-desc"===t?[...r].sort((e,t)=>t.pct-e.pct||e.name.localeCompare(t.name)):r);return{live:a.filter(e=>!(0,x.UY)(e,h)),history:a.filter(e=>(0,x.UY)(e,h))}},[e,t,h]);if(!e||0===e.length)return null;let y="function"==typeof s?s:null;return(0,a.jsxs)("div",{className:"space-y-0.5",children:[r&&(0,a.jsx)("div",{className:"pb-1 text-[10px] text-text-muted",children:(0,d.Tl)("Sorted by account remaining")}),(0,a.jsx)(eo,{rows:g,now:h,onHide:y,limit:i,onMore:()=>l(e=>e+10)}),f.length>0&&(0,a.jsxs)("div",{className:(0,u.cn)(g.length>0&&"mt-1 border-t border-black/5 pt-1 dark:border-white/5"),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>p(e=>!e),className:"flex w-full items-center gap-1 rounded-md py-1 text-[11px] text-text-muted transition-colors hover:bg-black/5 hover:text-text dark:hover:bg-white/5","aria-expanded":m,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:m?"expand_less":"expand_more"}),(0,d.Tl)("Used up / expired"),(0,a.jsxs)("span",{className:"tabular-nums opacity-60",children:["(",f.length,")"]})]}),m&&(0,a.jsx)("div",{className:"opacity-60",children:(0,a.jsx)(eo,{rows:f,now:h,onHide:y,limit:o,onMore:()=>c(e=>e+10)})})]})]})}el.propTypes={quota:c().object.isRequired,now:c().number.isRequired,onHide:c().func},eo.propTypes={rows:c().array.isRequired,now:c().number.isRequired,onHide:c().func,limit:c().number.isRequired,onMore:c().func.isRequired},ec.propTypes={quotas:c().array,sortMode:c().string,showSortLabel:c().bool,onHideQuota:c().func};var ed=r(98542),eu=r(97677),em=r(35497),ex=r(88105),ep=r(11059);let eh={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},eb={claude:"claudeAutoPing",codex:"codexAutoPing"},eg={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota."};function ef(e){let t=y(e);if(e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()){let r=e.email.trim();if(r!==t)return r}if(e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()){let r=e.displayName.trim();if(r!==t)return r}return null}function ey(e){let t=e.providerSpecificData?.region;if(t)return t;let r=e.providerSpecificData?.profileArn;return("string"==typeof r?r.split(":")[3]:"")||""}let ew={five_hour:"session",seven_day:"weekly",seven_day_overage_included:"weekly",seven_day_opus:"Opus weekly",seven_day_sonnet:"Sonnet weekly"};function ev(e){let t=[...new Set((e||[]).map(e=>ew[e]).filter(Boolean))];return t.length?`${t.join(" + ")} limits`:"limits"}function ek(e){if(!e)return"N/A";let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"N/A"}function ej(e){if(!e)return"N/A";let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t))return"N/A";if(t<=0)return"Expired";let r=Math.ceil(t/36e5),a=Math.floor(r/24),n=r%24;return a>0?`${a}d ${n}h`:`${n}h`}let eN={"qoder-cn":"Qoder CN",qoder:"Qoder","codebuddy-cn":"CodeBuddy CN","codebuddy-intl":"CodeBuddy Intl","minimax-cn":"MiniMax CN","glm-cn":"GLM CN","kimi-cn":"Kimi CN"};function eS(){let{copied:e,copy:t}=(0,ep.C)(),[r,o]=(0,n.useState)([]),[c,u]=(0,n.useState)({}),[g,f]=(0,n.useState)({}),[A,T]=(0,n.useState)({}),[q,$]=(0,n.useState)(!0),[P,D]=(0,n.useState)({claude:{},codex:{}}),[M,R]=(0,n.useState)(null),[O,I]=(0,n.useState)(!1),[z,L]=(0,n.useState)(!1),[H,U]=(0,n.useState)(60),[B,J]=(0,n.useState)(!0),[W,K]=(0,n.useState)(null),[V,G]=(0,n.useState)(null),[Q,ei]=(0,n.useState)(null),[el,eo]=(0,n.useState)(null),[ew,eS]=(0,n.useState)(null),[eC,eA]=(0,n.useState)(!1),[eT,eq]=(0,n.useState)(null),[e$,eP]=(0,n.useState)([]),eD=(0,s.useSearchParams)(),eM=(0,s.useRouter)(),eE=(0,s.usePathname)(),[eR,eO]=(0,n.useState)(()=>{var e;let t=window.localStorage.getItem("quotaProviderFilter");return e=eD?.get("provider"),e||t||"all"}),eF=(0,n.useCallback)(e=>{var t;let r,a;eO(e),eM.replace((t=eD?.toString()||"",r=new URLSearchParams(t||""),e&&"all"!==e?r.set("provider",e):r.delete("provider"),(a=r.toString())?`${eE}?${a}`:eE),{scroll:!1})},[eM,eE,eD]),[eI,e_]=(0,n.useState)([]),[ez,eL]=(0,n.useState)(()=>window.localStorage.getItem("quotaAccountFilter")||"all");(0,n.useEffect)(()=>{window.localStorage.setItem("quotaProviderFilter",eR)},[eR]),(0,n.useEffect)(()=>{window.localStorage.setItem("quotaAccountFilter",ez)},[ez]);let[eH,eU]=(0,n.useState)("default"),[eB,eJ]=(0,n.useState)("cards"),[eW,eK]=(0,n.useState)(0),[eV,eG]=(0,n.useState)({}),[eQ,eY]=(0,n.useState)(!1),[eZ]=(0,n.useState)(()=>"1"===window.localStorage.getItem("quotaHideNoQuota")),[eX]=(0,n.useState)(()=>"1"===window.localStorage.getItem("quotaNestedCycle")),[e0,e1]=(0,n.useState)(!1),[e5,e2]=(0,n.useState)(()=>new Set),e3=(0,n.useCallback)(e=>{e2(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),[e4,e6]=(0,n.useState)(1),[e8,e9]=(0,n.useState)(20),[e7,te]=(0,n.useState)(String(20)),[tt,tr]=(0,n.useState)({page:1,pageSize:20,total:0,totalPages:1}),[ta,tn]=(0,n.useState)({eligibleConnections:0,providerFilteredConnections:0}),ts=(0,n.useRef)(null),ti=(0,n.useRef)(null),tl=(0,n.useRef)(0),to=(0,n.useCallback)(async(e=e4)=>{try{var t,r;let a=new URLSearchParams({page:String(e),pageSize:String(e8),accountStatus:ez,sort:"priority"});"all"!==eR&&a.set("provider",eR);let n=await fetch(`/api/providers/client?${a.toString()}`);if(!n.ok)throw Error("Failed to fetch connections");let s=await n.json(),i=s.connections||[],l=(t=s.pagination,t||{page:1,pageSize:e8,total:0,totalPages:1}),c=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(s.totals,i.length);return o(i),e_(s.providerOptions||[]),tr(l),tn(c),e6((r=s.pagination,r?.page||e)),!function(e,{connections:t,pagination:r,totals:a,providerOptions:n}){ee(Z,{key:e,connections:(t||[]).map(er),pagination:r,totals:a,providerOptions:n,cachedAt:Date.now()})}(et({page:e,pageSize:e8,accountFilter:ez,providerFilter:eR}),{connections:i,pagination:l,totals:c,providerOptions:s.providerOptions}),i}catch(e){return console.error("Error fetching connections:",e),null}},[ez,eQ,e4,e8,eR]),tc=(0,n.useCallback)(async(e,t,{force:r=!1}={})=>{f(t=>({...t,[e]:!0})),T(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let a=`/api/usage/${e}${r?"?force=1":""}`,n=await fetch(a);if(!n.ok){let r=(await n.json().catch(()=>({}))).error||n.statusText;if(404===n.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===n.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,r);let a={quotas:[],message:r,cachedAt:new Date().toISOString()};u(t=>({...t,[e]:a})),es(e,a);return}throw Error(`HTTP ${n.status}: ${r}`)}let s=await n.json();console.log(`[ProviderLimits] Got quota for ${t}:`,s);let i={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":if(t.quotas){let e=Object.entries(t.quotas),a=e.filter(([e])=>e.startsWith("gemini-")&&!e.includes("image")),n=e.filter(([e])=>e.startsWith("claude-")||e.startsWith("gpt-")),s=e.filter(([e])=>e.includes("image")),i=e.filter(([e])=>!e.startsWith("gemini-")&&!e.startsWith("claude-")&&!e.startsWith("gpt-")&&!e.includes("image"));if(a.length>0){let e=a.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1];r.push({name:"Gemini (Flash / Pro)",modelKey:"gemini",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage,percentScale:!0})}if(n.length>0){let e=n.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1];r.push({name:"Claude (Sonnet / Opus / GPT)",modelKey:"claude",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage,percentScale:!0})}s.forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,percentScale:!0})}),i.forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,percentScale:!0})})}break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":case"qoder-cn":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{let a=Number(t?.total)||0;if("user"===e||("organization"===e||"addOn"===e)&&0===a)return;let n=t.resetAt&&2099>=new Date(t.resetAt).getFullYear()?t.resetAt:null;r.push({name:"addOn"===e?"Resource Package":"organization"===e?"Organization":e,used:t.used||0,total:a,unit:t.unit,resetAt:"addOn"===e?null:n,unlimited:!0===t.unlimited,aggregate:!0,..."addOn"===e&&Array.isArray(t.packs)&&t.packs.length>0?{summarizesDetail:!0}:{}}),"addOn"===e&&Array.isArray(t.packs)&&t.packs.forEach((e,a)=>{r.push({name:e.name||(e.unitemized?"Bonus Pack (unitemized)":`Bonus Pack ${a+1}`),used:e.used||0,total:e.total||0,unit:t.unit,resetAt:e.expiresAt&&2099>=new Date(e.expiresAt).getFullYear()?e.expiresAt:null,unlimited:!1,recurring:!1,detailOnly:!0})})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:void 0!==t.remaining?t.remaining:Math.max(0,(t.total||100)-(t.used||0)),remainingPercentage:void 0!==t.remainingPercentage?t.remainingPercentage:N(t.used,t.total),resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codebuddy-cn":case"codebuddy-intl":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,recurring:!1!==t.recurring,displayRemaining:!0,..."Monthly"===e?{giftPack:!0}:{}})});break;case"grok-cli":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"kimi":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"deepseek":case"stepfun":case"stepfun-cn":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,displayRemaining:t.displayRemaining})});break;case"ollama":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"commandcode":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:void 0!==t.remaining?t.remaining:Math.max(0,(t.total||0)-(t.used||0)),remainingPercentage:void 0!==t.remainingPercentage?t.remainingPercentage:N(t.used,t.total),resetAt:t.resetAt||null,recurring:!0===t.recurring,displayRemaining:!0})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}if(e?.toLowerCase()==="claude"){let e={"session (5h)":0,"weekly (7d)":1,"weekly fable (7d)":2,"weekly opus (7d)":3,"weekly sonnet (7d)":4};return r.sort((t,r)=>(e[t.name]??99)-(e[r.name]??99)),r}if(e?.toLowerCase()==="commandcode"){let e={"session (5h)":0,"weekly (7d)":1,"Monthly Credits":2,"Purchased Credits":3};return r.sort((t,r)=>(e[t.name]??99)-(e[r.name]??99)),r}let a=(0,m.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,n=r.modelKey||r.name;return(e.get(a)??999)-(e.get(n)??999)})}return r}(t,s),plan:s.plan||null,message:s.message||null,raw:s,cachedAt:new Date().toISOString()};u(t=>({...t,[e]:i})),es(e,i)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),T(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{f(t=>({...t,[e]:!1}))}},[]),[td]=(0,n.useState)(()=>(function(e=4){let t=0,r=[],a=()=>{if(t>=e||0===r.length)return;t+=1;let{fn:n,resolve:s,reject:i}=r.shift();Promise.resolve().then(n).then(s,i).finally(()=>{t-=1,a()})};return e=>new Promise((t,n)=>{r.push({fn:e,resolve:t,reject:n}),a()})})()),tu=(0,n.useRef)(new Set),tm=(0,n.useRef)(new Map),tx=(0,n.useRef)(null),tp=(0,n.useRef)(tc);(0,n.useEffect)(()=>{tp.current=tc},[tc]);let th=(0,n.useCallback)(()=>(tx.current||"u"<typeof IntersectionObserver||(tx.current=new IntersectionObserver(e=>{for(let t of e){let e=t.target.dataset.connId;if(e){if(!t.isIntersecting){tu.current.delete(e);continue}if(tu.current.add(e),tm.current.has(e)){let t=tm.current.get(e);tm.current.delete(e),td(()=>tp.current(e,t))}}}},{rootMargin:"200px 0px"})),tx.current),[td]);(0,n.useEffect)(()=>()=>tx.current?.disconnect(),[]);let tb=(0,n.useCallback)(e=>{let t=th();if(e&&t)return t.observe(e),()=>{t.unobserve(e),tu.current.delete(e.dataset.connId)}},[th]),tg=(0,n.useCallback)((e,{lazy:t=!0,skipFreshFrom:r=null}={})=>{let a="u">typeof IntersectionObserver,n=[];for(let s of e)if(!(r&&function(e,t=Date.now(),r=6e4){let a=ea(e);return a>0&&t-a<r}(r[s.id]))){if(t&&a&&!tu.current.has(s.id)){tm.current.set(s.id,s.provider);continue}tm.current.delete(s.id),n.push(td(()=>tp.current(s.id,s.provider)))}return Promise.all(n)},[td]),tf=(0,n.useCallback)(async(e,t)=>{await tc(e,t,{force:!0}),R(new Date)},[tc]),ty=(0,n.useCallback)(async(e,t)=>{if(("codex"===t||"claude"===t)&&!Q){ei(e),T(t=>({...t,[e]:null}));try{let r="claude"===t?await fetch(`/api/usage/${e}/claude-reset`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grantId:c[e]?.raw?.resetCredits?.nextGrantId})}):await fetch(`/api/usage/${e}/codex-reset-credits`,{method:"POST"}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a.message||a.error||a.code||"Failed to reset limit");await tc(e,t,{force:!0}),R(new Date)}catch(t){T(r=>({...r,[e]:t.message||"Failed to reset limit"}))}finally{ei(null)}}},[tc,Q,c]),tw=(0,n.useCallback)((e,t)=>{eS({connection:e,loading:!1,error:null,data:{kind:"claude",...t}})},[]),tv=(0,n.useCallback)(async e=>{eS({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||r.message||"Failed to load Codex reset credits");let a=Array.isArray(r.credits)?[...r.credits]:[];a.sort((e,t)=>{let r=e.expiresAt?new Date(e.expiresAt).getTime():1/0,a=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return r-a}),eS({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){eS({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),tk=(0,n.useCallback)(async e=>{if(confirm("Delete this connection?")){K(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){u(t=>{let r={...t};return delete r[e],r}),f(t=>{let r={...t};return delete r[e],r}),T(t=>{let r={...t};return delete r[e],r});try{let t=function(){try{let e=window.localStorage.getItem(p);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}();t[e]&&(delete t[e],window.localStorage.setItem(p,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await j(to,e4)}}catch(e){console.error("Error deleting connection:",e)}finally{K(null)}}},[to,e4]),tj=(0,n.useCallback)(async(e,t)=>{G(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(u(e=>({...e})),await j(to,e4))}catch(e){console.error("Error updating connection status:",e)}finally{G(null)}},[to,e4]),tN=(0,n.useCallback)(async e=>{if(!eT?.id)return;let t=eT.id,r=eT.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await to(),eA(!1),eq(null),ex.wb.includes(r)&&await tc(t,r))}catch(e){console.error("Error saving connection:",e)}},[eT,to,tc]);(0,n.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&eP(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let tS=(0,n.useCallback)(async(e=!1)=>{if(z)return;L(!0),U(60);let t=tl.current+=1,r=Math.round(10);try{let a=await to(e4);if(!a)return;T(e=>v(e,a)),u(e=>v(e,a)),await tg(a.filter(a=>e||"claude"!==a.provider||t%r==0),{lazy:!e}),R(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{L(!1)}},[z,to,tg,e4]);(0,n.useEffect)(()=>{var e;let t,r=!1,a=(e=et({page:e4,pageSize:e8,accountFilter:ez,providerFilter:eR}),(t=X(Z))&&t.key===e&&Array.isArray(t.connections)?t:null);return a?(o(a.connections),e_(a.providerOptions||[]),a.pagination&&tr(a.pagination),a.totals&&tn(a.totals),u(e=>({...en(a.connections),...e})),J(!1)):J(!0),(async()=>{let e=await to(e4);if(r||(J(!1),!e))return;let t=en(e);T(t=>v(t,e)),u(r=>({...t,...v(r,e)})),await tg(e,{skipFreshFrom:t}),r||R(new Date)})(),()=>{r=!0}},[to,tg,e4,e8,ez,eR]),(0,n.useEffect)(()=>{let e=window.localStorage.getItem(h);$(null===e||"true"===e),I(!0)},[]),(0,n.useEffect)(()=>{O&&window.localStorage.setItem(h,String(q))},[q,O]),(0,n.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>{D({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}}),eG(e?.quotaVisibility||{})}).catch(()=>{})},[]);let tC=(0,n.useCallback)(async(e,t,r)=>{let a=eb[t];if(!a)return;let n={...P[t]||{},[e]:r};D({...P,[t]:n});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[a]||{},connections:n};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[a]:t})})}catch{D(P)}},[P]);(0,n.useCallback)(async(e,t)=>{eG(e);try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:e})})).ok)throw Error("Failed to update quota visibility")}catch(e){console.error("Error updating quota visibility:",e),eG(t)}},[]);let tA=(0,n.useCallback)((e,t)=>{e&&eG(r=>{let a=r[e]||{},n=t(new Set(a.hidden||[])),s={...r,[e]:{...a,hidden:[...n]}};return(async()=>{try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:s})})).ok)throw Error("Failed to update quota visibility")}catch(e){console.error("Error updating quota visibility:",e),eG(r)}})(),s})},[]),tT=(e,t)=>{if("gemini"===t)for(let t of e)t.startsWith("gemini-")&&!t.includes("image")&&e.delete(t);else if("claude"===t)for(let t of e)(t.startsWith("claude-")||t.startsWith("gpt-"))&&e.delete(t)},tq=(0,n.useCallback)((e,t,r)=>{let a=S(t);e&&a&&tA(e,e=>(e.add(a),"antigravity"===r&&tT(e,a),e))},[tA]),t$=(0,n.useCallback)(e=>{e&&tA(e,()=>new Set)},[tA]),tP=(0,n.useCallback)((e,t,r)=>{let a=S(t);e&&a&&tA(e,e=>(e.delete(a),"antigravity"===r&&tT(e,a),e))},[tA]);(0,n.useCallback)((e,t)=>{e.length&&eG(r=>{let a={...r},n=!1;for(let r of e){let e=a[r]||{},s=t(r,e);if(null===s)continue;let i=e.hidden||[];(s.length!==i.length||s.some((e,t)=>e!==i[t]))&&(a[r]={...e,hidden:s},n=!0)}return n?((async()=>{try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:a})})).ok)throw Error("Failed to update quota visibility")}catch(e){console.error("Error updating quota visibility:",e),eG(r)}})(),a):r})},[]),(0,n.useEffect)(()=>{if(!O||!q){ts.current&&(clearInterval(ts.current),ts.current=null),ti.current&&(clearInterval(ti.current),ti.current=null);return}return ts.current=setInterval(()=>{tS()},6e4),ti.current=setInterval(()=>{U(e=>e<=1?60:e-1)},1e3),()=>{ts.current&&clearInterval(ts.current),ti.current&&clearInterval(ti.current)}},[q,tS,O]),(0,n.useEffect)(()=>{let e=()=>{document.hidden?(ts.current&&(clearInterval(ts.current),ts.current=null),ti.current&&(clearInterval(ti.current),ti.current=null)):q&&O&&(ts.current=setInterval(()=>tS(),6e4),ti.current=setInterval(()=>{U(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[q,tS,O]);let tD=(0,n.useMemo)(()=>(function(e,t,r,a,n){if("codex"===a&&"default"!==n)return[...e].sort((e,r)=>{let a=w(e,t),s=w(r,t),i="remaining-asc"===n?a-s:s-a;return 0!==i?i:(y(e)||"").localeCompare(y(r)||"")});if(!r){let t=new Map;for(let r of e){let e=r.provider||"";t.has(e)||t.set(e,[]),t.get(e).push(r)}return Array.from(t.values()).flat()}let s=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=s(e)-s(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(y(e)||"").localeCompare(y(t)||"")})})(r,c,eQ,eR,eH),[r,c,eQ,eR,eH]),tM=(0,n.useMemo)(()=>eZ?tD.filter(e=>{if(g[e.id]||A[e.id])return!0;let t=c[e.id];return!t||(t.quotas?.length??0)>0}):tD,[tD,eZ,g,A,c]),tE=e=>{let t=c[e.id]?.quotas;if(!t?.length)return!1;let r=t.filter(e=>!0!==e.unlimited);return 0!==r.length&&r.every(e=>{let t=e.total||0;return t<=0||(e.used||0)>=t})},tR=(0,n.useCallback)(async(e,t)=>{if(e.length&&!e0){e1(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await j(to,e4)}catch(e){console.error("Error bulk toggling connections:",e)}finally{e1(!1)}}},[e0,to,e4]),tO="all"===eR?"All providers":eR,tF=ta.eligibleConnections>0,tI=tM.length>0,t_=ta.eligibleConnections?ta.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===eR?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===ez?"turned off":"active"===ez?"active":"matching"} accounts found for ${eR}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},tz=({start:e,end:t,total:r})=>(0,d.Tl)("Showing {start}-{end} of {total}").replace("{start}",String(e)).replace("{end}",String(t)).replace("{total}",String(r)),tL=function(e,t=k){var r;let{start:a,end:n}=(r=e).total?{start:(r.page-1)*r.pageSize+1,end:Math.min(r.page*r.pageSize,r.total)}:{start:0,end:0};return t({start:a,end:n,total:e.total})}(tt,tz),tH=tM.length!==tD.length,tU=function(e,t,r=k){let a=Math.max(0,Number(e)||0);if(0===a)return r({start:0,end:0,total:0});let n=Math.max(1,Number(t)||a);return r({start:1,end:Math.min(a,n),total:a})}(tM.length,e8,tz),tB=!b.includes(e8),tJ=B||tF?B||tI?null:(0,a.jsx)(F.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:t_.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text",children:t_.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:t_.description})]})}):(0,a.jsx)(F.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})});return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(E,{view:eB,onViewChange:eJ,providerFilter:eR,providerOptions:eI,providerLabel:"all"===eR?(0,d.Tl)("All providers"):tO,onProviderChange:e=>{eR!==e&&e6(1),eF(e)},accountFilter:ez,onAccountChange:e=>{ez!==e&&e6(1),eL(e)},showCodexSort:"codex"===eR,quotaSortMode:eH,onQuotaSortChange:eU,expiringFirst:eQ,onToggleExpiringFirst:()=>eY(e=>!e),onDisableDepleted:()=>{tR(tD.filter(e=>(e.isActive??!0)&&tE(e)).map(e=>e.id),!1)},onEnableAvailable:()=>{tR(tD.filter(e=>!(e.isActive??!0)&&!tE(e)).map(e=>e.id),!0)},bulkToggling:e0,autoRefresh:q,onToggleAutoRefresh:()=>$(e=>!e),countdown:H,refreshingAll:z,onRefreshAll:()=>"windows"===eB?eK(e=>e+1):tS(!0),accountCount:tt.total}),"windows"===eB?(0,a.jsx)(Y,{providerFilter:eR,accountFilter:ez,refreshKey:eW,showTrackerLink:!1}):(0,a.jsxs)(a.Fragment,{children:[tJ&&(0,a.jsx)("div",{className:"pt-2",children:tJ}),!tJ&&(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:tM.map(r=>{let n,s,o,u=c[r.id],m=!!g[r.id],p=A[r.id],h=!u&&!p,b=!1===r.isActive,f="codex"===r.provider,w="claude"===r.provider?u?.raw?.resetCredits:null,v=f?"Codex reset credit":"Claude limit reset",k=Number.isFinite(s="number"==typeof(n=u?.raw?.resetCredits?.availableCount)?n:Number(n))?Math.max(0,s):0,j=Q===r.id,N=W===r.id||V===r.id||j,T=u?.quotas||[],q=function(e,t=[],r={},a){if(!Array.isArray(t)||0===t.length)return[];let n=C(e,r,a,t);return 0===n.size?t:t.filter(e=>!n.has(S(e)))}(r.id,T,eV,r.provider),$=function(e,t=[],r={},a){if(!Array.isArray(t)||0===t.length)return[];let n=C(e,r,a,t);return 0===n.size?[]:t.filter(e=>n.has(S(e)))}(r.id,T,eV,r.provider),D=(0,x.PZ)(q),M=(0,x.qz)(q);return(0,a.jsxs)(F.default,{ref:tb,"data-conn-id":r.id,padding:"none",className:`min-w-0 ${b?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(i.A,{src:`/providers/${r.provider}.png`,alt:r.provider,size:32,className:"object-contain",fallbackText:r.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text truncate",children:eN[r.provider]||(0,a.jsx)("span",{className:"capitalize",children:r.provider})}),y(r)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:y(r)}):null,ef(r)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:ef(r)}):null,"kiro"===r.provider&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,a.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(o=r.providerSpecificData?.authMethod)&&eh[o]?eh[o]:"api_key"===r.authType?"API Key":"OAuth"}),ey(r)&&(0,a.jsx)("span",{className:"rounded-full bg-blue-500/10 px-2 py-0.5 text-[10px] font-semibold text-blue-600 dark:text-blue-400",children:ey(r)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${b?"bg-surface-2 text-text-muted":"active"===r.testStatus||"success"===r.testStatus?"bg-green-500/10 text-green-600 dark:text-green-400":"error"===r.testStatus||"expired"===r.testStatus||"unavailable"===r.testStatus?"bg-red-500/10 text-red-600 dark:text-red-400":"bg-surface-2 text-text-muted"}`,children:b?"disabled":r.testStatus||"unknown"}),r.providerSpecificData?.profileArn&&(0,a.jsxs)("button",{type:"button",onClick:()=>t(r.providerSpecificData.profileArn,r.id),title:r.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:e===r.id?"check":"content_copy"}),(0,a.jsx)("code",{className:"truncate font-mono",children:r.providerSpecificData.profileArn})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(f||w)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eu.default,{text:k>0?w?`Use your reset now (${k} left, use by ${ek(w.expiresAt)}) \xb7 refills ${ev(w.clears)}`:`Use one ${v}. Available: ${k}`:`No ${v}s available`,children:(0,a.jsxs)("button",{type:"button",onClick:()=>eo({connection:r,resetCreditCount:k}),disabled:k<=0||h||m||N,"aria-label":k>0?`Use one ${v}. ${k} available.`:`No ${v}s available`,className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${k>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-black/10 bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${j?"animate-spin":""}`,children:j?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:k})]})}),(0,a.jsx)(eu.default,{text:f?"View Codex reset credit expiry":"View Claude Code reset expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>f?tv(r):tw(r,w),disabled:h||N,"aria-label":f?"View Codex reset credit expiry":"View Claude Code reset expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-muted transition-colors hover:bg-black/5 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})})]}),eb[r.provider]&&"oauth"===r.authType&&(0,a.jsx)(eu.default,{text:eg[r.provider],children:(0,a.jsx)("button",{type:"button",onClick:()=>tC(r.id,r.provider,P[r.provider]?.[r.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${P[r.provider]?.[r.id]===!0?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)(eu.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>tf(r.id,r.provider),disabled:m||N,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${m||h?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(eu.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>{eq(r),eA(!0)},disabled:N,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(eu.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>tk(r.id),disabled:N,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${W===r.id?"animate-pulse":""}`,children:"delete"})})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:r.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(ed.default,{size:"sm",checked:r.isActive??!0,disabled:N,onChange:e=>tj(r.id,e)})})]})]})}),u&&q.length>0&&(0,a.jsx)("div",{className:"px-3 pt-2.5",children:(0,a.jsx)(l.default,{packs:q,nestedCycle:eX})}),(0,a.jsxs)("div",{className:"px-2 py-1.5",children:[p&&u&&(0,a.jsxs)("p",{className:"px-1 pb-1 text-[11px] text-red-500/80",children:[(0,d.Tl)("Update failed, showing last known")," \xb7 ",p]}),h?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):p&&!u?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:p})]}):u?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:u.message})}):(0,a.jsxs)(a.Fragment,{children:[0===q.length&&T.length>0&&(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-text-muted opacity-40",children:"visibility_off"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:(0,d.Tl)("All quota rows are hidden — use the chips below to show them")})]}),M&&(0,a.jsxs)("button",{type:"button",onClick:()=>e3(r.id),className:"flex w-full items-center gap-1 rounded-lg py-1.5 text-[11px] text-text-muted transition-colors hover:bg-black/5 hover:text-text dark:hover:bg-white/5","aria-expanded":e5.has(r.id),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:e5.has(r.id)?"expand_less":"expand_more"}),(0,d.Tl)("Per-pack details"),(0,a.jsxs)("span",{className:"tabular-nums opacity-60",children:["(",D.length,")"]})]}),M&&e5.has(r.id)&&(0,a.jsx)(ec,{quotas:D,sortMode:"default",showSortLabel:"codex"===r.provider&&"default"!==eH,onHideQuota:e=>tq(r.id,e,r.provider)})]}),$.length>0&&(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 border-t border-black/5 pt-1.5 text-[11px] text-text-muted dark:border-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px]",children:"visibility_off"}),(0,a.jsxs)("span",{className:"shrink-0",children:[(0,d.Tl)("Hidden"),(0,a.jsxs)("span",{className:"tabular-nums opacity-60",children:[" (",$.length,")"]})]}),(0,a.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap",children:$.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>tP(r.id,e,r.provider),className:"shrink-0 rounded-[3px] bg-black/5 px-1.5 py-px transition-colors hover:bg-black/10 hover:text-text dark:bg-white/5 dark:hover:bg-white/10",title:(0,d.Tl)("Show this quota row"),children:(0,_.M)(e.name)},S(e)))}),$.length>1&&(0,a.jsx)("button",{type:"button",onClick:()=>t$(r.id),className:"shrink-0 rounded-md px-1.5 py-px transition-colors hover:bg-black/5 hover:text-text dark:hover:bg-white/5",children:(0,d.Tl)("Show all")})]})]})]},r.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:tH?tU:tL}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:tB?"custom":String(e8),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(e6(1),e9(r),te(String(r)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[b.map(e=>(0,a.jsx)("option",{value:String(e),children:(0,d.Tl)("{count} / page").replace("{count}",String(e))},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:e7,onChange:e=>te(e.target.value),onBlur:()=>{let e=Number.parseInt(e7,10);if(!Number.isFinite(e))return void te(String(e8));let t=Math.min(500,Math.max(1,e));e6(1),e9(t),te(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(e7,10);if(!Number.isFinite(t))return void te(String(e8));let r=Math.min(500,Math.max(1,t));e6(1),e9(r),te(String(r))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsx)("span",{className:"text-xs text-text-muted",children:(0,d.Tl)("Page {page} / {total}").replace("{page}",String(tt.page)).replace("{total}",String(tt.totalPages))})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>e6(1),disabled:tt.page<=1||B||z,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>e6(e=>Math.max(1,e-1)),disabled:tt.page<=1||B||z,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>e6(e=>Math.min(tt.totalPages,e+1)),disabled:tt.page>=tt.totalPages||B||z,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>e6(tt.totalPages),disabled:tt.page>=tt.totalPages||B||z,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})})]}),(0,a.jsx)(em.uo,{isOpen:!!el,onClose:()=>{Q||eo(null)},onConfirm:async()=>{let e=el?.connection;e&&(await ty(e.id,e.provider),eo(null))},title:el?.connection?.provider==="claude"?"Reset Claude limits?":"Reset Codex limit?",message:el?.connection?.provider==="claude"?`Refills your ${ev(c[el.connection.id]?.raw?.resetCredits?.clears)} now for ${y(el.connection)||"this account"} \xb7 your weekly reset day stays ${ek(c[el.connection.id]?.raw?.resetCredits?.weeklyResetsAt)}. This cannot be undone. Resets left: ${el.resetCreditCount??0}.`:`Use 1 Codex reset credit for ${y(el?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${el?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!Q}),ew&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-4 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"w-full max-w-2xl overflow-hidden rounded-2xl border border-black/15 bg-white shadow-2xl ring-1 ring-black/10 dark:border-white/15 dark:bg-neutral-950 dark:ring-white/10",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-black/10 bg-black/[0.03] px-4 py-3 dark:border-white/10 dark:bg-white/[0.04]",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-text",children:ew.data?.kind==="claude"?"Claude Code Limit Resets":"Codex Reset Credit Expiry"}),(0,a.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:y(ew.connection)||(ew.data?.kind==="claude"?"Claude account":"Codex account")})]}),(0,a.jsx)("button",{type:"button",onClick:()=>eS(null),className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-black/5 hover:text-text dark:hover:bg-white/5","aria-label":"Close reset credit expiry modal",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,a.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-white p-4 dark:bg-neutral-950",children:ew.loading?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading reset credits..."]}):ew.error?(0,a.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300",children:ew.error}):ew.data?.kind==="claude"&&ew.data.grants?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("span",{children:[ew.data.availableCount??0," reset",1===ew.data.availableCount?"":"s"," left"]}),(0,a.jsxs)("span",{children:["Weekly reset day: ",ek(ew.data.weeklyResetsAt)]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Reset"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Left"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Refills"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Use By"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:(ew.data.grants||[]).map(e=>(0,a.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,a.jsxs)("td",{className:"px-3 py-2",children:[(0,a.jsx)("div",{className:"text-text",children:e.label||e.id}),(0,a.jsx)("span",{className:"mt-1 inline-block rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.resetsLeft<=0?"used":e.paused?"paused":e.endsAt&&new Date(e.endsAt).getTime()<=Date.now()?"expired":e.usableNow?"usable now":e.startsAt&&new Date(e.startsAt).getTime()>Date.now()?"not started":e.useRequiresLimit?"at limit only":"unavailable"})]}),(0,a.jsxs)("td",{className:"whitespace-nowrap px-3 py-2 font-medium tabular-nums text-text",children:[e.resetsLeft," / ",e.resetsTotal]}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:ev(e.clears)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text",children:ek(e.endsAt)}),(0,a.jsx)("td",{className:"whitespace-nowrap px-3 py-2 font-medium text-text",children:ej(e.endsAt)})]},e.id))})]})})]}):ew.data?.credits?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("span",{children:[ew.data.credits.length," reset credit",1===ew.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[ew.data.availableCount??0," available"]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Granted At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:ew.data.credits.map((e,t)=>(0,a.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.status||"unknown"})}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:ek(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text",children:ek(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text",children:ej(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-8 text-center text-sm text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:ew.data?.kind==="claude"?"No limit resets available for this account.":"No reset credit details returned for this account."})})]})}),(0,a.jsx)(em.wI,{isOpen:eC,connection:eT,proxyPools:e$,onSave:tN,onClose:()=>{eA(!1),eq(null)}})]})}}},e=>{e.O(0,[3170,305,1321,5497,8441,3794,7358],()=>e(e.s=26048)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{5315:(e,t,s)=>{Promise.resolve().then(s.bind(s,83016))},83016:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var a=s(95155),r=s(12115),n=s(35497),l=s(38587),o=s(73006),i=s(73321);function d(){let[e,t]=(0,r.useState)(""),[s,d]=(0,r.useState)(""),[c,h]=(0,r.useState)(!1),[x,p]=(0,r.useState)(null),[u,m]=(0,r.useState)(!1),f=(0,i.useRouter)();(0,r.useEffect)(()=>{fetch("/api/auth/status").then(e=>e.json()).then(e=>p(e||{})).catch(()=>p({}))},[]);let w=async t=>{t.preventDefault(),h(!0),d("");try{let t=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e})});if(t.ok)f.push("/dashboard"),f.refresh();else{let e=await t.json();d(e.error||"Invalid password")}}catch(e){d("An error occurred. Please try again.")}finally{h(!1)}},b=x?.needsLocalSetup===!0,g=x?.bootstrapLocal===!0,[j]=(0,r.useState)(()=>{let{protocol:e,hostname:t,port:s}=window.location;return`${e}//${t}:${s||("https:"===e?"443":"80")}`});return(0,a.jsxs)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4 relative",children:[(0,a.jsx)("div",{className:"absolute top-6 right-6 z-20",children:(0,a.jsx)(l.default,{variant:"card"})}),(0,a.jsxs)("div",{className:"w-full max-w-md",children:[(0,a.jsxs)("div",{className:"text-center mb-8",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold text-primary mb-2",children:"10Router"}),(0,a.jsx)("p",{className:"text-text-muted",children:"Enter your password to access the dashboard"})]}),(0,a.jsx)(n.Zp,{children:b?(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"No dashboard password is set yet"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Remote access to the dashboard stays disabled until a password is set. Set the first password on the machine running 10Router (open"," ",(0,a.jsx)("code",{className:"break-all font-mono text-text",children:j})," there), or start it with the INITIAL_PASSWORD environment variable."]})]}):g?(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"No dashboard password is set yet"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Only this machine can open the dashboard until one is set. Set a password on the Settings page and LAN access turns back on."}),(0,a.jsx)(n.$n,{type:"button",variant:"primary",className:"w-full",onClick:()=>f.push("/dashboard"),children:"Open dashboard"})]}):(0,a.jsxs)("form",{onSubmit:w,className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Password"}),(0,a.jsx)(n.pd,{type:"password",placeholder:"Enter password",value:e,onChange:e=>t(e.target.value),required:!0,autoFocus:!0}),s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s})]}),(0,a.jsx)(n.$n,{type:"submit",variant:"primary",className:"w-full",isLoading:c,children:"Login"}),(0,a.jsx)("button",{type:"button",className:"text-xs text-text-muted underline self-center hover:text-text",onClick:()=>m(e=>!e),children:(0,o.Tl)("Forgot your password?")}),u&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-border bg-surface-2 p-3 text-xs text-text-muted",children:[x?.installChannel==="fpk"&&(0,a.jsx)("p",{children:(0,o.Tl)("fnOS: open App Center → 10Router → Settings, enter a new dashboard password and save. Sign in with it right away.")}),(0,a.jsx)("p",{className:"font-medium text-text",children:(0,o.Tl)("Recovery file format:")}),(0,a.jsx)("p",{children:(0,o.Tl)("Name: reset-password — any extension works too (.txt, .md, …), since Windows makes extensionless files awkward. Content: plain UTF-8 text holding only the new password — a single line, no quotes, nothing else (leading/trailing whitespace is ignored).")}),(0,a.jsx)("p",{children:(0,o.Tl)("An empty file removes the stored password and falls back to the first-login password (INITIAL_PASSWORD / fnOS initial-password).")}),(0,a.jsx)("p",{children:(0,o.Tl)("Put it in the data folder — Windows: %APPDATA%\\10router \xb7 macOS / Linux: ~/.10router \xb7 Docker: the mounted DATA_DIR \xb7 fnOS: @appdata/10router on the app's volume. It applies on your next sign-in attempt (no restart) and is deleted the moment it is read.")}),x?.installChannel==="fpk"&&x?.hasPassword===!1&&(0,a.jsx)("p",{children:(0,o.Tl)("First sign-in on fnOS: the generated password is in the initial-password file in that folder.")}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"https://github.com/techysy/10router/blob/main/docs/zh-CN/dashboard-password-recovery.md",target:"_blank",rel:"noreferrer",className:"underline hover:text-text",children:(0,o.Tl)("Full format reference (docs)")})})]})]})})]})]})}}},e=>{e.O(0,[3170,305,1321,5497,8441,3794,7358],()=>e(e.s=5315)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (()=>{"use strict";var e,t,r,o,n,a,i,c,l,s={},u={};function f(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}},o=!0;try{s[e].call(r.exports,r,r.exports,f),o=!1}finally{o&&delete u[e]}return r.exports}f.m=s,e=[],f.O=(t,r,o,n)=>{if(r){n=n||0;for(var a=e.length;a>0&&e[a-1][2]>n;a--)e[a]=e[a-1];e[a]=[r,o,n];return}for(var i=1/0,a=0;a<e.length;a++){for(var[r,o,n]=e[a],c=!0,l=0;l<r.length;l++)(!1&n||i>=n)&&Object.keys(f.O).every(e=>f.O[e](r[l]))?r.splice(l--,1):(c=!1,n<i&&(i=n));if(c){e.splice(a--,1);var s=o();void 0!==s&&(t=s)}}return t},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var n=Object.create(null);f.r(n);var a={};t=t||[null,r({}),r([]),r(r)];for(var i=2&o&&e;"object"==typeof i&&!~t.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach(t=>a[t]=()=>e[t]);return a.default=()=>e,f.d(n,a),n},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce((t,r)=>(f.f[r](e,t),t),[])),f.u=e=>6808===e?"static/chunks/6808-d3ffacc1373713c6.js":3842===e?"static/chunks/3842-da1878db3339b090.js":839===e?"static/chunks/839-e45391c69a64b949.js":"static/chunks/"+(3862===e?"1a258343":e)+"."+({124:"8b2f018d999d9a51",1966:"b8f83f7ba376c962",3521:"3107c4bff48fe566",3862:"47d9fcf6a691d03c",3899:"d4d0ae202f418161",6357:"59e23f8c59426c8f",8202:"1ffc6ce531e066ce",9233:"4e4be172e7d96210"})[e]+".js",f.miniCssF=e=>"static/css/e07f2bf4fa519943.css",f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},f.l=(e,t,r,n)=>{if(o[e])return void o[e].push(t);if(void 0!==r)for(var a,i,c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var s=c[l];if(s.getAttribute("src")==e||s.getAttribute("data-webpack")=="_N_E:"+r){a=s;break}}a||(i=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,f.nc&&a.setAttribute("nonce",f.nc),a.setAttribute("data-webpack","_N_E:"+r),a.src=f.tu(e)),o[e]=[t];var u=(t,r)=>{a.onerror=a.onload=null,clearTimeout(d);var n=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach(e=>e(r)),t)return t(r)},d=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),i&&document.head.appendChild(a)},f.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.tt=()=>(void 0===n&&(n={createScriptURL:e=>e},"u">typeof trustedTypes&&trustedTypes.createPolicy&&(n=trustedTypes.createPolicy("nextjs#bundler",n))),n),f.tu=e=>f.tt().createScriptURL(e),f.p="/_next/",a={8068:0},f.f.miniCss=(e,t)=>{if(a[e])t.push(a[e]);else 0!==a[e]&&({2574:1})[e]&&t.push(a[e]=new Promise((t,r)=>{var o=f.miniCssF(e),n=f.p+o;if(((e,t)=>{for(var r=document.getElementsByTagName("link"),o=0;o<r.length;o++){var n=r[o],a=n.getAttribute("data-href")||n.getAttribute("href");if("stylesheet"===n.rel&&(a===e||a===t))return n}for(var i=document.getElementsByTagName("style"),o=0;o<i.length;o++){var n=i[o],a=n.getAttribute("data-href");if(a===e||a===t)return n}})(o,n))return t();((e,t,r,o)=>{var n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.onerror=n.onload=a=>{if(n.onerror=n.onload=null,"load"===a.type)r();else{var i=a&&("load"===a.type?"missing":a.type),c=a&&a.target&&a.target.href||t,l=Error("Loading CSS chunk "+e+" failed.\n("+c+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=i,l.request=c,n.parentNode.removeChild(n),o(l)}},n.href=t;if("function"==typeof _N_E_STYLE_LOAD){var a=n.href,i=n.onload,c=n.onerror;_N_E_STYLE_LOAD(0===a.indexOf(window.location.origin)?new URL(a).pathname:a).then(function(){i&&i.call(n,{type:"load"})},function(){c&&c.call(n,{})})}else document.head.appendChild(n)})(e,n,t,r)}).then(()=>{a[e]=0},t=>{throw delete a[e],t}))},i={8068:0,4652:0,3334:0},f.f.j=(e,t)=>{var r=f.o(i,e)?i[e]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(2574|3334|4652|8068)$/.test(e))i[e]=0;else{var o=new Promise((t,o)=>r=i[e]=[t,o]);t.push(r[2]=o);var n=f.p+f.u(e),a=Error();f.l(n,t=>{if(f.o(i,e)&&(0!==(r=i[e])&&(i[e]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+n+")",a.name="ChunkLoadError",a.type=o,a.request=n,r[1](a)}},"chunk-"+e,e)}},f.O.j=e=>0===i[e],c=(e,t)=>{var r,o,[n,a,c]=t,l=0;if(n.some(e=>0!==i[e])){for(r in a)f.o(a,r)&&(f.m[r]=a[r]);if(c)var s=c(f)}for(e&&e(t);l<n.length;l++)o=n[l],f.o(i,o)&&i[o]&&i[o][0](),i[o]=0;return f.O(s)},(l=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(c.bind(null,0)),l.push=c.bind(null,l.push.bind(l))})();
1
+ (()=>{"use strict";var e,t,r,o,n,a,i,c,l,s={},u={};function f(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}},o=!0;try{s[e].call(r.exports,r,r.exports,f),o=!1}finally{o&&delete u[e]}return r.exports}f.m=s,e=[],f.O=(t,r,o,n)=>{if(r){n=n||0;for(var a=e.length;a>0&&e[a-1][2]>n;a--)e[a]=e[a-1];e[a]=[r,o,n];return}for(var i=1/0,a=0;a<e.length;a++){for(var[r,o,n]=e[a],c=!0,l=0;l<r.length;l++)(!1&n||i>=n)&&Object.keys(f.O).every(e=>f.O[e](r[l]))?r.splice(l--,1):(c=!1,n<i&&(i=n));if(c){e.splice(a--,1);var s=o();void 0!==s&&(t=s)}}return t},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var n=Object.create(null);f.r(n);var a={};t=t||[null,r({}),r([]),r(r)];for(var i=2&o&&e;"object"==typeof i&&!~t.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach(t=>a[t]=()=>e[t]);return a.default=()=>e,f.d(n,a),n},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce((t,r)=>(f.f[r](e,t),t),[])),f.u=e=>6808===e?"static/chunks/6808-7c2c0ea1ee14763c.js":3842===e?"static/chunks/3842-da1878db3339b090.js":839===e?"static/chunks/839-e45391c69a64b949.js":"static/chunks/"+(3862===e?"1a258343":e)+"."+({124:"8b2f018d999d9a51",1966:"b8f83f7ba376c962",3521:"3107c4bff48fe566",3862:"47d9fcf6a691d03c",3899:"d4d0ae202f418161",6357:"59e23f8c59426c8f",8202:"1ffc6ce531e066ce",9233:"4e4be172e7d96210"})[e]+".js",f.miniCssF=e=>"static/css/e07f2bf4fa519943.css",f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},f.l=(e,t,r,n)=>{if(o[e])return void o[e].push(t);if(void 0!==r)for(var a,i,c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var s=c[l];if(s.getAttribute("src")==e||s.getAttribute("data-webpack")=="_N_E:"+r){a=s;break}}a||(i=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,f.nc&&a.setAttribute("nonce",f.nc),a.setAttribute("data-webpack","_N_E:"+r),a.src=f.tu(e)),o[e]=[t];var u=(t,r)=>{a.onerror=a.onload=null,clearTimeout(d);var n=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach(e=>e(r)),t)return t(r)},d=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),i&&document.head.appendChild(a)},f.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.tt=()=>(void 0===n&&(n={createScriptURL:e=>e},"u">typeof trustedTypes&&trustedTypes.createPolicy&&(n=trustedTypes.createPolicy("nextjs#bundler",n))),n),f.tu=e=>f.tt().createScriptURL(e),f.p="/_next/",a={8068:0},f.f.miniCss=(e,t)=>{if(a[e])t.push(a[e]);else 0!==a[e]&&({2574:1})[e]&&t.push(a[e]=new Promise((t,r)=>{var o=f.miniCssF(e),n=f.p+o;if(((e,t)=>{for(var r=document.getElementsByTagName("link"),o=0;o<r.length;o++){var n=r[o],a=n.getAttribute("data-href")||n.getAttribute("href");if("stylesheet"===n.rel&&(a===e||a===t))return n}for(var i=document.getElementsByTagName("style"),o=0;o<i.length;o++){var n=i[o],a=n.getAttribute("data-href");if(a===e||a===t)return n}})(o,n))return t();((e,t,r,o)=>{var n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.onerror=n.onload=a=>{if(n.onerror=n.onload=null,"load"===a.type)r();else{var i=a&&("load"===a.type?"missing":a.type),c=a&&a.target&&a.target.href||t,l=Error("Loading CSS chunk "+e+" failed.\n("+c+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=i,l.request=c,n.parentNode.removeChild(n),o(l)}},n.href=t;if("function"==typeof _N_E_STYLE_LOAD){var a=n.href,i=n.onload,c=n.onerror;_N_E_STYLE_LOAD(0===a.indexOf(window.location.origin)?new URL(a).pathname:a).then(function(){i&&i.call(n,{type:"load"})},function(){c&&c.call(n,{})})}else document.head.appendChild(n)})(e,n,t,r)}).then(()=>{a[e]=0},t=>{throw delete a[e],t}))},i={8068:0,4652:0,3334:0},f.f.j=(e,t)=>{var r=f.o(i,e)?i[e]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(2574|3334|4652|8068)$/.test(e))i[e]=0;else{var o=new Promise((t,o)=>r=i[e]=[t,o]);t.push(r[2]=o);var n=f.p+f.u(e),a=Error();f.l(n,t=>{if(f.o(i,e)&&(0!==(r=i[e])&&(i[e]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+n+")",a.name="ChunkLoadError",a.type=o,a.request=n,r[1](a)}},"chunk-"+e,e)}},f.O.j=e=>0===i[e],c=(e,t)=>{var r,o,[n,a,c]=t,l=0;if(n.some(e=>0!==i[e])){for(r in a)f.o(a,r)&&(f.m[r]=a[r]);if(c)var s=c(f)}for(e&&e(t);l<n.length;l++)o=n[l],f.o(i,o)&&i[o]&&i[o][0](),i[o]=0;return f.O(s)},(l=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(c.bind(null,0)),l.push=c.bind(null,l.push.bind(l))})();
package/app/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "10router-app",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "10Router web dashboard",
5
5
  "private": true,
6
6
  "scripts": {
@@ -2,6 +2,23 @@
2
2
 
3
3
  User-facing highlights per release. See [CHANGELOG.md](https://github.com/techysy/10router/blob/main/CHANGELOG.md) for the full developer log.
4
4
 
5
+ ## v1.3.1 (2026-10-02)
6
+
7
+ ### ✨ New
8
+
9
+ - **GLM Coding: Z.ai OAuth sign-in (dual-auth)**: browser authorization alongside pasting an API key; quota cards work with either.
10
+ - **New Meta Muse provider (OAuth + model catalog)**: Meta's official Muse Code channel with device-flow sign-in; five Muse Spark models at official pricing.
11
+ - **New System One decision provider v1m (v1m.ir)**: a second Jev-compatible decision backend alongside Drex.
12
+ - **Codex exposes GPT-6 / GPT-5.6 `[1m]` long-context variants**: 872K window — just suffix the model name with `[1m]`.
13
+ - **Experimental "nested cycle quota bars"**: a toggle on the Experimental page restores the concentric nested track for rolling ⊂ weekly ⊂ monthly chains.
14
+
15
+ ### 🐛 Fixes
16
+
17
+ - **Four upstream 9router v0.5.95 port batches (20+ items)**: codex CLI identity bumped to 0.159 plus a fix for accounts being logged out by auto-ping (refresh-token reuse); grok-cli bumped to 1.0.44 (upstream 426 wall); codebuddy 6004 rate-limit → precise cooldown; Claude trailing-turn retention and thinking-format adaptation plus tool-loop cache breakpoint; new Claude Sonnet 5.5 / Kiro Opus 5.5 models; official GPT-6 pricing and real context windows; same-name tool dedupe for DeepSeek; broader Gemini tool-schema cleaning; strict proxy no longer falls back to direct connections on resolution failure; Responses completion watchdog.
18
+ - **Quota fix pack**: reset dates become adaptive countdowns (day+hour / hour+minute / minute+second); the 5-hour timeline centers on now (±12h); the monthly window anchors the bottom of the card; qoder / qoder-cn Auto & Efficient tiers and display-name aliases no longer fall to default capabilities.
19
+ - **Sign-in & security**: enabling "Require login" no longer kicks you to the login page; the "Forgot your password?" entry is localized and documents the reset-password file format (any extension works — .txt, .md, …); hidden providers are excluded from usage stats.
20
+ - **Drex key link now points at the official invite registration** (Nace is invite-only).
21
+
5
22
  ## v1.3.0 (2026-10-01)
6
23
 
7
24
  ### ✨ New
@@ -2,6 +2,23 @@
2
2
 
3
3
  这里展示面向用户的关键更新;完整开发明细见 [CHANGELOG.md](https://github.com/techysy/10router/blob/main/CHANGELOG.md)。
4
4
 
5
+ ## v1.3.1 (2026-10-02)
6
+
7
+ ### ✨ 新增
8
+
9
+ - **GLM Coding 支持 Z.ai OAuth 登录(双认证)**:除粘贴 API key 外新增浏览器授权登录,额度卡片两种登录方式通用。
10
+ - **新增 Meta Muse 供应商(OAuth + 模型目录)**:Meta 官方 Muse Code 通道,设备流程一键登录,五个 Muse Spark 模型与官方定价齐备。
11
+ - **新增 System One 决策供应商 v1m(v1m.ir)**:与 Drex 同协议的第二家决策模型后端。
12
+ - **codex 暴露 GPT-6 / GPT-5.6「[1m]」超长上下文变体**:872K 窗口,模型名后缀加 `[1m]` 即用。
13
+ - **配额卡片实验性「嵌套周期配额条」**:实验页开关开启后,滚动 ⊂ 每周 ⊂ 月度 的包含链恢复为一条同心嵌套进度条。
14
+
15
+ ### 🐛 修复
16
+
17
+ - **同步上游 9router v0.5.95 四大批次(20+ 项)**:codex CLI 身份升 0.159 并修复 auto-ping 反复掉授权;grok-cli 升 1.0.44 恢复可用;codebuddy 6004 限流转精确冷却;Claude 尾部轮保留与思考格式适配、工具循环缓存优化;Claude Sonnet 5.5 / Kiro Opus 5.5 新模型;GPT-6 系列官方定价与真实上下文窗口;DeepSeek 同名工具去重;Gemini 工具 schema 兼容增强;严格代理解析失败时不再静默直连;Responses 流补发 watchdog。
18
+ - **配额修复打包**:重置时间改自适应倒计时(天+时 / 时+分 / 分+秒);「5 小时」时间轴以现在为中心前后各 12 小时;月度窗口固定显示在卡片底部;qoder / qoder-cn 的 Auto/Efficient 档位与显示名别名不再落到默认能力值。
19
+ - **登录与安全**:开启「需要登录」不再把自己踢出登录页;登录页「忘记密码?」补中文并写明 reset-password 文件格式(reset-password.txt / .md 等任意扩展名均可);用量统计排除隐藏供应商。
20
+ - **Drex 取 key 链接改为官方邀请注册**(Nace 现为邀请制)。
21
+
5
22
  ## v1.3.0 (2026-10-01)
6
23
 
7
24
  ### ✨ 新增
@@ -2,6 +2,23 @@
2
2
 
3
3
  這裡展示面向用戶的關鍵更新;完整開發明細見 [CHANGELOG.md](https://github.com/techysy/10router/blob/main/CHANGELOG.md)。
4
4
 
5
+ ## v1.3.1 (2026-10-02)
6
+
7
+ ### ✨ 新增
8
+
9
+ - **GLM Coding 支援 Z.ai OAuth 登入(雙認證)**:除貼上 API key 外新增瀏覽器授權登入,額度卡片兩種登入方式通用。
10
+ - **新增 Meta Muse 供應商(OAuth + 模型目錄)**:Meta 官方 Muse Code 通道,裝置流程一鍵登入,五個 Muse Spark 模型與官方定價齊備。
11
+ - **新增 System One 決策供應商 v1m(v1m.ir)**:與 Drex 同協議的第二家決策模型後端。
12
+ - **codex 暴露 GPT-6 / GPT-5.6「[1m]」超長上下文變體**:872K 窗口,模型名後綴加 `[1m]` 即用。
13
+ - **配額卡片實驗性「巢狀週期配額條」**:實驗頁開關開啟後,滾動 ⊂ 每週 ⊂ 月度 的包含鏈恢復為一條同心巢狀進度條。
14
+
15
+ ### 🐛 修正
16
+
17
+ - **同步上游 9router v0.5.95 四大批次(20+ 項)**:codex CLI 身份升 0.159 並修復 auto-ping 反覆掉授權;grok-cli 升 1.0.44 恢復可用;codebuddy 6004 限流轉精確冷卻;Claude 尾部輪保留與思考格式適配、工具循環快取優化;Claude Sonnet 5.5 / Kiro Opus 5.5 新模型;GPT-6 系列官方定價與真實上下文窗口;DeepSeek 同名工具去重;Gemini 工具 schema 相容增強;嚴格代理解析失敗時不再靜默直連;Responses 流補發 watchdog。
18
+ - **配額修正打包**:重置時間改自適應倒數(天+時 / 時+分 / 分+秒);「5 小時」時間軸以現在為中心前後各 12 小時;月度窗口固定顯示在卡片底部;qoder / qoder-cn 的 Auto/Efficient 檔位與顯示名別名不再落到預設能力值。
19
+ - **登入與安全**:開啟「需要登入」不再把自己踢出登入頁;登入頁「忘記密碼?」補中文並寫明 reset-password 檔案格式(reset-password.txt / .md 等任意副檔名均可);用量統計排除隱藏供應商。
20
+ - **Drex 取 key 連結改為官方邀請註冊**(Nace 現為邀請制)。
21
+
5
22
  ## v1.3.0 (2026-10-01)
6
23
 
7
24
  ### ✨ 新增
@@ -1261,6 +1261,8 @@
1261
1261
  "Turn off Empty": "关闭空账号",
1262
1262
  "Turn on Available": "可用账号",
1263
1263
  "Hide no-quota provider cards": "隐藏无配额提供商卡片",
1264
+ "Nested cycle quota bars": "嵌套周期配额条",
1265
+ "Draw contained windows (rolling ⊂ weekly ⊂ monthly) as one nested track instead of flat rows": "把包含关系的周期窗口(滚动 ⊂ 每周 ⊂ 月度)画成一条嵌套轨道,而不是拆分平铺行",
1264
1266
  "Quota page view: hide cards that have no quota to display": "配额页视图:隐藏没有配额可显示的卡片",
1265
1267
  "Turn request detail recording on/off globally": "全局打开/关闭请求详细信息记录",
1266
1268
  "Turned off": "已关闭",
@@ -1721,6 +1723,7 @@
1721
1723
  "Copied": "已复制",
1722
1724
  "Web console": "网页版",
1723
1725
  "Use your CommandCode CLI API key (starts with user_...) from ~/.commandcode/auth.json or commandcode.ai/studio.": "使用来自 ~/.commandcode/auth.json 或 commandcode.ai/studio 的 CommandCode CLI API 密钥(以 user_ 开头)。",
1726
+ "v1m System One calibrated decision engine. Fast probabilistic evaluations over state and questions.": "v1m System One 校准决策引擎:针对状态与问题做快速概率评估。",
1724
1727
  "Monthly Credits": "月度额度",
1725
1728
  "Purchased Credits": "加量额度",
1726
1729
  "Earliest Expiry First": "配额包到期优先",
@@ -1844,6 +1847,13 @@
1844
1847
  "Hide it": "隐藏",
1845
1848
  "Check for updates automatically": "自动检查更新",
1846
1849
  "Forgot your password?": "忘记密码?",
1850
+ "Recovery file format:": "找回文件格式:",
1851
+ "Name: reset-password — any extension works too (.txt, .md, …), since Windows makes extensionless files awkward. Content: plain UTF-8 text holding only the new password — a single line, no quotes, nothing else (leading/trailing whitespace is ignored).": "文件名:reset-password——带任意扩展名也可以(.txt、.md 等,Windows 上创建无扩展名文件不便)。内容:UTF-8 纯文本,只写新密码本身——单独一行,不带引号、不带其他文字(首尾空白与换行会被忽略)。",
1852
+ "Full format reference (docs)": "完整格式说明(文档)",
1853
+ "An empty file removes the stored password and falls back to the first-login password (INITIAL_PASSWORD / fnOS initial-password).": "留空文件:删除已存密码,回到首次登录密码(INITIAL_PASSWORD / fnOS 初始密码)。",
1854
+ "Put it in the data folder — Windows: %APPDATA%\\10router · macOS / Linux: ~/.10router · Docker: the mounted DATA_DIR · fnOS: @appdata/10router on the app's volume. It applies on your next sign-in attempt (no restart) and is deleted the moment it is read.": "放入数据目录——Windows:%APPDATA%\\10router · macOS / Linux:~/.10router · Docker:挂载的 DATA_DIR · fnOS:应用卷上的 @appdata/10router。下次登录尝试时生效(无需重启),读取后立即删除。",
1855
+ "First sign-in on fnOS: the generated password is in the initial-password file in that folder.": "fnOS 首次登录:安装时生成的随机密码在同目录的 initial-password 文件里。",
1856
+ "fnOS: open App Center → 10Router → Settings, enter a new dashboard password and save. Sign in with it right away.": "fnOS:打开 应用中心 → 10Router → 应用设置,输入新的仪表盘密码并保存,然后立即用它登录。",
1847
1857
  "fnOS: open App Center → 10Router → Settings, enter a new dashboard password and save. Sign in with it right away.": "飞牛 fnOS:打开「应用中心 → 10Router → 应用设置」,填写新的仪表盘密码并保存,即可用新密码登录。",
1848
1858
  "Any install: create a file named reset-password in the 10Router data folder with the new password inside, then sign in with it. The file is read once and deleted.": "任何安装方式:在 10Router 数据目录里新建一个名为 reset-password 的文件,内容写新密码,然后用它登录。该文件只读取一次,随即删除。",
1849
1859
  "Leave that file empty to remove the password and go back to the first-login password.": "若该文件留空,则会移除当前密码,恢复为首次登录密码。",
@@ -269,6 +269,8 @@
269
269
  "Turn off Empty": "關閉空帳號",
270
270
  "Turn on Available": "可用帳號",
271
271
  "Hide no-quota provider cards": "隱藏無配額提供者卡片",
272
+ "Nested cycle quota bars": "巢狀週期配額條",
273
+ "Draw contained windows (rolling ⊂ weekly ⊂ monthly) as one nested track instead of flat rows": "把包含關係的週期窗口(滾動 ⊂ 每週 ⊂ 月度)畫成一條巢狀軌道,而不是拆分平鋪行",
272
274
  "Quota page view: hide cards that have no quota to display": "配額頁檢視:隱藏沒有配額可顯示的卡片",
273
275
  "Only with balance": "只看有餘額",
274
276
  "Show all": "顯示全部",
@@ -563,6 +565,7 @@
563
565
  "Web console": "網頁版",
564
566
  "Get API Key →": "取得 API 金鑰 →",
565
567
  "Use your CommandCode CLI API key (starts with user_...) from ~/.commandcode/auth.json or commandcode.ai/studio.": "使用來自 ~/.commandcode/auth.json 或 commandcode.ai/studio 的 CommandCode CLI API 金鑰(以 user_ 開頭)。",
568
+ "v1m System One calibrated decision engine. Fast probabilistic evaluations over state and questions.": "v1m System One 校準決策引擎:針對狀態與問題做快速機率評估。",
566
569
  "Monthly Credits": "月度額度",
567
570
  "Purchased Credits": "加量額度",
568
571
  "Earliest Expiry First": "配額包到期優先",
@@ -670,6 +673,13 @@
670
673
  "Hide it": "隱藏",
671
674
  "Check for updates automatically": "自動檢查更新",
672
675
  "Forgot your password?": "忘記密碼?",
676
+ "Recovery file format:": "找回檔案格式:",
677
+ "Name: reset-password — any extension works too (.txt, .md, …), since Windows makes extensionless files awkward. Content: plain UTF-8 text holding only the new password — a single line, no quotes, nothing else (leading/trailing whitespace is ignored).": "檔名:reset-password——帶任意副檔名也可以(.txt、.md 等,Windows 上建立無副檔名檔案不便)。內容:UTF-8 純文字,只寫新密碼本身——單獨一行,不帶引號、不帶其他文字(首尾空白與換行會被忽略)。",
678
+ "Full format reference (docs)": "完整格式說明(文件)",
679
+ "An empty file removes the stored password and falls back to the first-login password (INITIAL_PASSWORD / fnOS initial-password).": "留空檔案:刪除已存密碼,回到首次登入密碼(INITIAL_PASSWORD / fnOS 初始密碼)。",
680
+ "Put it in the data folder — Windows: %APPDATA%\\10router · macOS / Linux: ~/.10router · Docker: the mounted DATA_DIR · fnOS: @appdata/10router on the app's volume. It applies on your next sign-in attempt (no restart) and is deleted the moment it is read.": "放入資料目錄——Windows:%APPDATA%\\10router · macOS / Linux:~/.10router · Docker:掛載的 DATA_DIR · fnOS:應用磁碟區上的 @appdata/10router。下次登入嘗試時生效(無需重啟),讀取後立即刪除。",
681
+ "First sign-in on fnOS: the generated password is in the initial-password file in that folder.": "fnOS 首次登入:安裝時產生的隨機密碼在同目錄的 initial-password 檔案裡。",
682
+ "fnOS: open App Center → 10Router → Settings, enter a new dashboard password and save. Sign in with it right away.": "fnOS:開啟 應用中心 → 10Router → 應用設定,輸入新的儀表板密碼並儲存,然後立即用它登入。",
673
683
  "fnOS: open App Center → 10Router → Settings, enter a new dashboard password and save. Sign in with it right away.": "飛牛 fnOS:開啟「應用中心 → 10Router → 應用設定」,填寫新的儀表板密碼並儲存,即可用新密碼登入。",
674
684
  "Any install: create a file named reset-password in the 10Router data folder with the new password inside, then sign in with it. The file is read once and deleted.": "任何安裝方式:在 10Router 資料目錄中新增一個名為 reset-password 的檔案,內容寫新密碼,然後用它登入。該檔案只讀取一次,隨即刪除。",
675
685
  "Leave that file empty to remove the password and go back to the first-login password.": "若該檔案留空,則會移除目前密碼,恢復為首次登入密碼。",
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techysy/10router",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "10Router CLI - Start and manage 10Router server",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -137,11 +137,12 @@ const OAUTH_PROVIDERS = {
137
137
  iflow: { id: "iflow", alias: "if", name: "iFlow AI" },
138
138
  qwen: { id: "qwen", alias: "qw", name: "Qwen Code" },
139
139
  kiro: { id: "kiro", alias: "kr", name: "Kiro AI" },
140
+ glm: { id: "glm", alias: "glm", name: "Zai GLM Coding" },
140
141
  };
141
142
 
142
143
  const APIKEY_PROVIDERS = {
143
144
  openrouter: { id: "openrouter", name: "OpenRouter" },
144
- glm: { id: "glm", name: "GLM Coding" },
145
+ glm: { id: "glm", name: "Zai GLM Coding" },
145
146
  minimax: { id: "minimax", name: "Minimax Coding" },
146
147
  kimi: { id: "kimi", name: "Kimi" },
147
148
  openai: { id: "openai", name: "OpenAI" },
@@ -398,7 +399,7 @@ async function showConnectionActions(connection, providerId, breadcrumb = []) {
398
399
  * @param {string} authType - "oauth" or "apikey"
399
400
  */
400
401
  // Providers that use Device Code Flow (terminal-based polling)
401
- const DEVICE_CODE_PROVIDERS = ["github", "qwen", "kiro"];
402
+ const DEVICE_CODE_PROVIDERS = ["github", "qwen", "kiro", "glm"];
402
403
 
403
404
  /**
404
405
  * Handle adding new connection - auto-detect flow type
@@ -22,7 +22,7 @@ const PROVIDER_ALIAS_NAMES = {
22
22
  oc: "OpenCode Free",
23
23
  opencode: "OpenCode Free",
24
24
  openrouter: "OpenRouter",
25
- glm: "GLM Coding",
25
+ glm: "Zai GLM Coding",
26
26
  kimi: "Kimi Coding",
27
27
  minimax: "Minimax Coding",
28
28
  openai: "OpenAI",
@@ -1 +0,0 @@
1
- "use strict";exports.id=2051,exports.ids=[2051],exports.modules={52007:(a,b,c)=>{c.d(b,{av:()=>o,gK:()=>m});var d=c(55511),e=c(39609);let f="https://llm.kimchi.dev",g=new Set([429,500,502,503,504]),h=new Map,i=new Map;function j(a){return(("string"==typeof a?a.trim():"")||f).replace(/\/+$/,"")}function k(a){return a?.accessToken||a?.apiKey||a?.providerSpecificData?.apiKey||null}function l(a){if(!a||"object"!=typeof a)return null;let b=a.slug||a.id||a.model||a.name;if("string"!=typeof b||""===b.trim())return null;let c=Array.isArray(a.input_modalities)?a.input_modalities.filter(a=>"text"===a||"image"===a):[],d=a.limits&&"object"==typeof a.limits?a.limits:{},e=Number(d.context_window||a.contextLength||a.context_length)||void 0,f=Number(d.max_output_tokens||a.maxOutputTokens||a.max_output_tokens)||void 0,g="string"==typeof a.provider?a.provider:"",h=!0===a.reasoning,i=Array.isArray(c)&&c.includes("image")?"imageToText":"llm",j={...a,id:b.trim(),name:String(a.display_name||a.displayName||a.name||b).trim(),provider:g,upstreamProvider:g,reasoning:h,inputModalities:c,kind:i,type:i,capabilities:{vision:c.includes("image"),reasoning:h,...e?{contextWindow:e}:{},...f?{maxOutput:f}:{},...g?{upstreamProvider:g}:{}},...e?{contextLength:e}:{},...f?{maxOutputTokens:f}:{}};return"anthropic"===g&&(j.compat={supportsReasoningEffort:!1,cacheControlFormat:"anthropic"}),j}function m(a){if("string"!=typeof a||""===a.trim())return null;let b=a.includes("/")?a.split("/").pop():a;return i.get(b)||i.get(b.toLowerCase())||null}async function n(a,b,c={}){let d=`${j(b)}/v1/models/metadata?include_in_cli=true`,f=new AbortController,h=setTimeout(()=>f.abort(Error("Kimchi models fetch timeout")),2e4),i=c.signal?AbortSignal.any([c.signal,f.signal]):f.signal;try{let b=await (0,e.proxyAwareFetch)(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${a}`,"User-Agent":"kimchi/0.1.40"},cache:"no-store",signal:i},c.proxyOptions||null);if(!b.ok){let a=Error(`Kimchi models ${b.status}: ${b.statusText}`);throw a.status=b.status,a.retryable=g.has(b.status),a}let f=await b.json();return Array.isArray(f?.models)?f.models:[]}finally{clearTimeout(h)}}async function o(a,b={}){let c,e,g,m=k(a);if(!m)return null;let p=a?.providerSpecificData?.kimchiEndpoint||b.endpoint||f,q=(g=(e=a?.providerSpecificData||{}).userId||e.username||a?.refreshToken||k(a)||"anonymous",(0,d.createHash)("sha256").update(`kimchi:${j(p)}:${g}`).digest("hex")),r=Date.now();if(!b.forceRefresh){let a=h.get(q);if(a&&a.expiresAt>r)return a}try{c=await n(m,p,b)}catch(a){return b.log?.warn?.("KIMCHI_MODELS",a.message),null}let s=c.map(l).filter(Boolean);if(0===s.length)return null;for(let a of s||[])a?.id&&(i.set(a.id,a),i.set(a.id.toLowerCase(),a));let t={expiresAt:Date.now()+3e5,models:s,rawModels:c};return h.set(q,t),t}},55456:(a,b,c)=>{c.d(b,{CP:()=>r,Xh:()=>l,Y8:()=>q,tM:()=>n,yI:()=>o});var d=c(94755),e=c(74075),f=c.n(e);let g="1"===process.env.CURSOR_PROTOBUF_DEBUG,h=(a,...b)=>g&&console.log(`[PROTOBUF:${a}]`,...b);new TextDecoder;let i="1.1.3",j=new Set([1,2,3,9,10,11,27,1,25]);function k(a){let b=[];for(;a>=128;)b.push(127&a|128),a>>>=7;return b.push(127&a),new Uint8Array(b)}function l(a,b,c){let d=k(a<<3|b);if(0===b)return m(d,k(c));if(2===b){let a="string"==typeof c?new TextEncoder().encode(c):c instanceof Uint8Array?c:Buffer.isBuffer(c)?new Uint8Array(c):new Uint8Array(0);return m(d,k(a.length),a)}return new Uint8Array(0)}function m(...a){let b=new Uint8Array(a.reduce((a,b)=>a+b.length,0)),c=0;for(let d of a)b.set(d,c),c+=d.length;return b}function n(a,b=!1){let c=a,d=0;b&&(c=new Uint8Array(f().gzipSync(Buffer.from(a))),d=1);let e=new Uint8Array(5+c.length);return e[0]=d,e[1]=c.length>>24&255,e[2]=c.length>>16&255,e[3]=c.length>>8&255,e[4]=255&c.length,e.set(c,5),e}function o(a,b,c=[],e=null,f=!1){h("BODY",`Generating: ${a.length} msgs, model=${b}, tools=${c.length}, reasoning=${e||"none"}, forceAgentMode=${f}`);let g=function(a,b,c=[],e=null,f=!1){return l(1,2,function(a,b,c=[],e=null,f=!1){let g,i=c?.length>0,j=i||f,n=[],o=[],p=[];for(let b=0;b<a.length;b++){let c=a[b],d=Array.isArray(c?.tool_calls)&&c.tool_calls.length>0,e=Array.isArray(c?.tool_results)&&c.tool_results.length>0;if(c?.role==="assistant"&&d&&e){h("ENCODE",`normalizing mixed assistant tool payload at msg[${b}] (calls=${c.tool_calls.length}, results=${c.tool_results.length})`),p.push({...c,tool_results:[]});let d=a[b+1],e=d?.role==="assistant"&&Array.isArray(d?.tool_results)&&d.tool_results.length>0,f=new Set(c.tool_results.map(a=>a?.tool_call_id).filter(a=>"string"==typeof a)),g=new Set((d?.tool_results||[]).map(a=>a?.tool_call_id).filter(a=>"string"==typeof a)),i=f.size>0&&f.size===g.size;if(i){for(let a of f)if(!g.has(a)){i=!1;break}}e&&i||p.push({role:"assistant",content:"",tool_results:c.tool_results});continue}p.push(c)}for(let a=0;a<p.length;a++){let b=p[a],c="user"===b.role?1:2,e=(0,d.A)(),f=a===p.length-1;n.push({content:b.content,role:c,messageId:e,isLast:f,hasTools:i,toolResults:b.tool_results||[]}),o.push({messageId:e,role:c})}let q=0;return"medium"===e?q=1:"high"===e&&(q=2),m(...n.map(a=>l(1,2,function(a,b,c,d=!1,e=!1,f=[],g=null){let h=f.length>0;return m(l(1,2,a),l(2,0,b),l(13,2,c),...g?[l(32,2,g)]:[],...h?f.map(a=>l(18,2,function(a){var b;let c,d,e=function(a){let b="string"==typeof a&&a.length>0?a:"tool";if(b.startsWith("mcp__")){let a=b.slice(5),c=a.indexOf("__");if(c>=0){let b=a.slice(0,c)||"custom",d=a.slice(c+2)||"tool";return`mcp_${b}_${d}`}return`mcp_custom_${a||"tool"}`}return b.startsWith("mcp_")?b:`mcp_custom_${b}`}(a.tool_name||a.name||""),f=a.raw_args||"{}",g=a.result_content||a.result||"",{toolCallId:h,modelCallId:i}=(b=a.tool_call_id||"",c="\nmc_",(d=b.indexOf(c))>=0?{toolCallId:b.slice(0,d),modelCallId:b.slice(d+c.length)}:{toolCallId:b,modelCallId:null}),j=a.tool_index||a.index||1,{serverName:k,selectedTool:n}=function(a){if("string"!=typeof a||!a.startsWith("mcp_"))return{serverName:"custom",selectedTool:a||"tool"};let b=a.slice(4),c=b.indexOf("_");return c<0?{serverName:"custom",selectedTool:b||"tool"}:{serverName:b.slice(0,c)||"custom",selectedTool:b.slice(c+1)||"tool"}}(e);return m(l(1,2,h),l(2,2,e),l(3,0,j>0?j:1),...i?[l(12,2,i)]:[],l(5,2,f),l(8,2,function(a,b,c,d,e=1){return m(l(1,0,19),l(28,2,m(l(1,2,c),l(2,2,d))),l(35,2,a),...b?[l(48,2,b)]:[],l(49,0,e>0?e:1))}(h,i,n,g,j)),l(11,2,function(a,b,c,d,e,f,g=1){let h;return m(l(1,0,19),l(27,2,(h=m(l(1,2,c),l(3,2,e),l(4,2,d)),l(1,2,h))),l(3,2,a),l(9,2,b),l(10,2,e),l(48,0,g>0?g:1),...f?[l(49,2,f)]:[])}(h,e,n,k,f,i,j)))}(a))):[],l(29,0,+!!e),l(47,0,e?2:1),...d&&e?[l(51,2,k(1))]:[])}(a.content,a.role,a.messageId,a.isLast,a.hasTools,a.toolResults))),l(2,0,1),l(3,2,new Uint8Array(0)),l(4,0,1),l(5,2,m(l(1,2,b),l(4,2,new Uint8Array(0)))),l(8,2,""),l(13,0,1),l(15,2,(g=m(l(1,2,new Uint8Array(0)),l(2,2,new Uint8Array(0))),m(l(1,2,"cursor\\aisettings"),l(3,2,new Uint8Array(0)),l(6,2,g),l(8,0,1),l(9,0,1)))),l(19,0,1),l(23,2,(0,d.A)()),l(26,2,m(l(1,2,process.platform||"linux"),l(2,2,process.arch||"x64"),l(3,2,process.version||"v20.0.0"),l(4,2,process.cwd?.()||"/"),l(5,2,new Date().toISOString()))),l(27,0,+!!j),...j?[l(29,2,k(1))]:[],...o.map(a=>l(30,2,function(a,b,c=null){return m(l(1,2,a),...c?[l(2,2,c)]:[],l(3,0,b))}(a.messageId,a.role))),...c?.length>0?c.map(a=>{let b,c,d;return l(34,2,(b=a.function?.name||a.name||"",c=a.function?.description||a.description||"",d=a.function?.parameters||a.input_schema||{},m(...b?[l(1,2,b)]:[],...c?[l(2,2,c)]:[],...Object.keys(d).length>0?[l(3,2,JSON.stringify(d))]:[],l(4,2,"custom"))))}):[],l(35,0,0),l(38,0,0),l(46,0,j?2:1),l(47,2,""),l(48,0,+!j),l(49,0,q),l(51,0,0),l(53,0,1),l(54,2,j?"Agent":"Ask"))}(a,b,c,e,f))}(a,b,c,e,f),i=n(g,!1);return h("BODY",`Protobuf=${g.length}B, Framed=${i.length}B`),i}function p(a,b){let c=0,d=0,e=b;for(;e<a.length;){let b=a[e];if(c|=(127&b)<<d,e++,!(128&b))break;d+=7}return[c,e]}function q(a){let b=new Map,c=0;for(;c<a.length;){let[d,e,f,g]=function(a,b){let c;if(b>=a.length)return[null,null,null,b];let[d,e]=p(a,b),f=7&d,g=e;if(0===f)[c,g]=p(a,g);else if(2===f){let[b,d]=p(a,g);c=a.slice(d,d+b),g=d+b}else 1===f?(c=a.slice(g,g+8),g+=8):5===f?(c=a.slice(g,g+4),g+=4):c=null;return[d>>3,f,c,g]}(a,c);if(null===d)break;b.has(d)||b.set(d,[]),b.get(d).push({wireType:e,value:f}),c=g}return b}function r(a){try{let b=q(a);for(let a of b.keys())j.has(a)||h("SCHEMA",`Unknown response field #${a} detected. Schema v${i} may be outdated.`);if(b.has(1)){let a=function(a){let b=q(a),c="",d="",e="",f=!1;if(b.has(3)&&(c=new TextDecoder().decode(b.get(3)[0].value).split("\n")[0]),b.has(9)&&(d=new TextDecoder().decode(b.get(9)[0].value)),b.has(11)&&(f=0!==b.get(11)[0].value),b.has(27))try{let a=q(b.get(27)[0].value);if(a.has(1)){let b=q(a.get(1)[0].value);b.has(1)&&(d=new TextDecoder().decode(b.get(1)[0].value)),b.has(3)&&(e=new TextDecoder().decode(b.get(3)[0].value))}}catch(a){h("EXTRACT",`MCP parse error: ${a.message}`)}return(!e&&b.has(10)&&(e=new TextDecoder().decode(b.get(10)[0].value)),c&&d)?{id:c,type:"function",function:{name:d,arguments:e||"{}"},isLast:f}:null}(b.get(1)[0].value);if(a)return h("EXTRACT",`Tool call: ${a.function.name}`),{text:null,error:null,toolCall:a,thinking:null}}if(b.has(2)){let{text:a,thinking:c}=function(a){let b=q(a),c=null,d=null;if(b.has(1)&&(c=new TextDecoder().decode(b.get(1)[0].value)),b.has(25))try{let a=q(b.get(25)[0].value);a.has(1)&&(d=new TextDecoder().decode(a.get(1)[0].value))}catch(a){h("EXTRACT",`Thinking parse error: ${a.message}`)}return{text:c,thinking:d}}(b.get(2)[0].value);if(a||c)return{text:a,error:null,toolCall:null,thinking:c}}return{text:null,error:null,toolCall:null,thinking:null}}catch(b){return h("EXTRACT",`Decode failed (schema v${i}): ${b.message}`),{text:null,error:null,toolCall:null,thinking:null,raw:Buffer.from(a).toString("base64"),decodeError:b.message}}}},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}}}};