@ltgiang/9router 0.5.59 → 0.5.60

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 (519) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +14 -14
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  74. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  75. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  76. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  82. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  85. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  86. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  87. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  89. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  100. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  102. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  107. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  111. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  117. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  119. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  121. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  125. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  127. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  129. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/combos/reorder/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/models/order/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/providers/[id]/connections/disabled/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/providers/[id]/pool/pull/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/providers/[id]/pool/push/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/providers/[id]/pool/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  225. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  273. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  275. package/app/.next-cli-build/server/app/callback.html +1 -1
  276. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  277. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  278. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  279. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  280. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  281. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  282. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  283. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  284. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  285. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  286. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  287. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  288. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  289. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  290. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  291. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  292. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  293. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  294. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  295. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  296. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  297. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  298. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  299. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  300. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  301. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  302. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  303. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  304. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  305. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  306. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  307. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  308. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  309. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  310. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  311. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  312. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  313. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  314. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  315. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  316. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  317. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  318. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  319. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  320. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  321. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  322. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  323. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  324. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  325. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  326. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  327. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  328. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  329. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  330. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  331. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  332. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  333. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  334. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  335. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  336. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  337. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  338. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  339. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  340. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  341. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  342. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  343. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  344. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  345. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  346. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  347. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  348. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  349. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  350. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  351. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  352. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  353. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  354. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  355. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  356. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  357. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  358. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  359. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  360. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  361. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  362. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  363. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  364. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  365. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  366. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  367. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  368. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  369. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  370. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  371. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  372. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  373. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  374. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  375. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  376. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  377. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  378. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  379. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  380. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  381. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  382. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  383. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  384. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  385. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  386. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  387. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  388. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  389. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  390. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  391. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  392. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  394. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  395. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  396. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  398. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  399. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  400. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  401. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  403. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  405. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  406. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  410. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  411. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  412. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  414. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  415. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  416. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  417. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  420. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  421. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  422. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  424. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  425. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  427. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  429. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  430. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  431. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  432. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  434. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  435. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  436. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  437. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  440. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  441. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  444. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  445. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  447. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  449. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  450. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  451. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  452. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  453. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  454. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  456. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  457. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/index.html +1 -1
  459. package/app/.next-cli-build/server/app/index.rsc +4 -4
  460. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  461. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  462. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  463. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  464. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  466. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  467. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  468. package/app/.next-cli-build/server/app/landing.html +1 -1
  469. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  470. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  471. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  472. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  473. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  474. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/login/page.js +1 -1
  477. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  478. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  479. package/app/.next-cli-build/server/app/login.html +1 -1
  480. package/app/.next-cli-build/server/app/login.rsc +5 -5
  481. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  482. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  484. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  486. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  488. package/app/.next-cli-build/server/app/page.js +1 -1
  489. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  490. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  491. package/app/.next-cli-build/server/app-paths-manifest.json +14 -14
  492. package/app/.next-cli-build/server/chunks/{1064.js → 3210.js} +1 -1
  493. package/app/.next-cli-build/server/chunks/3617.js +1 -1
  494. package/app/.next-cli-build/server/chunks/412.js +2 -2
  495. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  496. package/app/.next-cli-build/server/chunks/4827.js +1 -1
  497. package/app/.next-cli-build/server/chunks/5330.js +2 -2
  498. package/app/.next-cli-build/server/chunks/5394.js +10 -0
  499. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  500. package/app/.next-cli-build/server/chunks/7094.js +1 -10
  501. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  502. package/app/.next-cli-build/server/chunks/8668.js +1 -1
  503. package/app/.next-cli-build/server/chunks/8895.js +3 -3
  504. package/app/.next-cli-build/server/chunks/914.js +2 -2
  505. package/app/.next-cli-build/server/chunks/9350.js +1 -1
  506. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  507. package/app/.next-cli-build/server/middleware.js +3 -3
  508. package/app/.next-cli-build/server/pages/404.html +1 -1
  509. package/app/.next-cli-build/server/pages/500.html +1 -1
  510. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  511. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  512. package/app/.next-cli-build/static/chunks/{1321-375600000ca9e76b.js → 1321-ed0c05a3926d798d.js} +1 -1
  513. package/app/cli/.build-home/.9router/db/backups/{upgrade-0.5.54-to-0.5.55-0.5.55-20260706-225849 → upgrade-0.5.58-to-0.5.59-0.5.59-20260708-021757}/data.sqlite +0 -0
  514. package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
  515. package/app/package.json +1 -1
  516. package/package.json +1 -1
  517. package/app/.next-cli-build/server/chunks/4713.js +0 -1
  518. /package/app/.next-cli-build/static/{6DlcFIbNVVQ80tzM8_60j → w-ITB5pDWdUgMc8QL6uC_}/_buildManifest.js +0 -0
  519. /package/app/.next-cli-build/static/{6DlcFIbNVVQ80tzM8_60j → w-ITB5pDWdUgMc8QL6uC_}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- exports.id=3617,exports.ids=[3617],exports.modules={8590:(a,b,c)=>{"use strict";c.d(b,{$B:()=>U,Bc:()=>s,I9:()=>J,Ib:()=>v,Og:()=>n,Ql:()=>M,iD:()=>S,jR:()=>P,jT:()=>R,oD:()=>l,qZ:()=>X});var d=c(16698),e=c(61408),f=c(86522),g=c(77598),h=c(95538),i=c(57843),j=c(54444),k=c(44418);let l=3e5,m={codex:3e5,openai:3e5,claude:3e5,"gitlab-duo":3e5,kiro:3e5,"kimi-coding":3e5,qwen:3e5,iflow:864e5,antigravity:9e5,agy:9e5};function n(a,b){let c=b?.refreshLeadMs;return"number"==typeof c&&Number.isFinite(c)&&c>0?c:m[a]??l}let o=new Map,p=new Map,q=new Map,r=new d.AsyncLocalStorage;function s(a,b){return a?r.run(a,b):b()}let t=new d.AsyncLocalStorage,u={skipped:0,persisted:0};function v(a,b){return a?t.run(a,b):b()}async function w(a){let b,c=t.getStore();if(!c||!c.expectedRefreshToken)return!1;try{b=await c.reread()}catch{return!1}return(0,i.Jv)(c.expectedRefreshToken,b)?(u.skipped++,a?.warn?.("TOKEN_REFRESH","CAS guard: skipping persist — a concurrent writer already rotated the refresh_token (#4038)"),!0):(u.persisted++,!1)}function x(a){let b=new URLSearchParams;for(let[c,d]of Object.entries(a))"string"==typeof d&&d.length>0&&b.set(c,d);return b}function y(a,b){let c=(0,g.pbkdf2Sync)(b,"omniroute-token-cache",1e3,32,"sha256").toString("hex");return`${a}:${c}`}let z=new Set(["invalid_grant","invalid_request","refresh_token_reused","invalid_token","expired_token","unauthorized_client","access_denied"]);function A(a,b=0){if(null==a||b>6)return null;if("string"==typeof a){let c=a.trim();if(!c)return null;if(z.has(c))return c;if("{"===c[0]||"["===c[0]||'"'===c[0])try{let a=A(JSON.parse(c),b+1);if(a)return a}catch{}let d=c.match(/"error(?:_code)?"\s*:\s*"([a-z_]+)"/i);return d&&z.has(d[1])?d[1]:null}return"object"==typeof a?A(a.error,b+1)??A(a.code,b+1)??A(a.error_code,b+1):null}async function B(a){let b=await a.text().catch(()=>""),c=b;try{c=JSON.parse(b)}catch{}let d=A(c)??A(b);return{rawText:b,code:d}}async function C(a,b,c,d,f=null){let g=e.xq[a],i=g?.refreshUrl||g?.tokenUrl;if(!g||!i)return d?.warn?.("TOKEN_REFRESH",`No refresh endpoint configured for provider: ${a}`),null;if(!b)return d?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null;try{let c=new URLSearchParams({grant_type:"refresh_token",refresh_token:b});g.clientId&&c.set("client_id",g.clientId),g.clientSecret&&c.set("client_secret",g.clientSecret);let e=await (0,h.jf)(f,()=>fetch(i,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:c}));if(!e.ok){let b=await e.text();d?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:e.status,error:b});let c=A(b);if("invalid_grant"===c||"invalid_request"===c)return{error:"unrecoverable_refresh_error",code:c};return null}let j=await e.json();return d?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!j.access_token,hasNewRefreshToken:!!j.refresh_token,expiresIn:j.expires_in}),{accessToken:j.access_token,refreshToken:j.refresh_token||b,expiresIn:j.expires_in}}catch(b){return d?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}}async function D(a,b,c,d=null){if(!a)return c?.warn?.("TOKEN_REFRESH","No refresh token stored for Windsurf — token may be a long-lived API key"),null;if("import"===(b?.authMethod||"import"))return c?.debug?.("TOKEN_REFRESH","Windsurf import token is long-lived — no refresh needed"),null;let e=j.e.firebaseApiKey||"";if(!e)return c?.warn?.("TOKEN_REFRESH","Windsurf Firebase API key unavailable — skipping Firebase token refresh"),null;let f=`https://securetoken.googleapis.com/v1/token?key=${e}`;try{let b=await (0,h.jf)(d,()=>fetch(f,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:x({grant_type:"refresh_token",refresh_token:a})}));if(!b.ok){let a=await b.text();c?.error?.("TOKEN_REFRESH","Failed to refresh Windsurf Firebase token",{status:b.status,error:a.slice(0,200)});try{let b=JSON.parse(a),d="string"==typeof b?.error?.message?b.error.message:"string"==typeof b?.error?b.error:null;if("string"==typeof d&&(d.includes("USER_DISABLED")||d.includes("TOKEN_EXPIRED")||d.includes("INVALID_REFRESH_TOKEN")||d.includes("USER_NOT_FOUND")))return c?.error?.("TOKEN_REFRESH","Windsurf Firebase token is permanently invalid. Re-authentication required.",{fbCode:d}),{error:"unrecoverable_refresh_error",code:d}}catch{}return null}let e=await b.json(),g=parseInt(e.expires_in??"3600",10);return c?.info?.("TOKEN_REFRESH","Successfully refreshed Windsurf Firebase token",{expiresIn:g,hasNewIdToken:!!e.id_token}),{accessToken:e.id_token,refreshToken:e.refresh_token||a,expiresIn:g}}catch(a){return c?.error?.("TOKEN_REFRESH",`Network error refreshing Windsurf token: ${a instanceof Error?a.message:String(a)}`),null}}async function E(a,b,d=null){if(!a)return null;let{CODEBUDDY_CN_CONFIG:e}=await Promise.resolve().then(c.bind(c,54444));try{let c=await (0,h.jf)(d,()=>fetch(e.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":e.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"}));if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy CN token",{status:c.status,error:a}),null}let f=await c.json();if(f?.code!==0||!f?.data?.accessToken)return b?.error?.("TOKEN_REFRESH","CodeBuddy CN token refresh returned no token",{code:f?.code,msg:f?.msg}),null;return b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy CN token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing CodeBuddy CN token: ${a?.message}`),null}}async function F(a,b,c=null){let d=e.xq.cline?.refreshUrl;if(!d)return b?.warn?.("TOKEN_REFRESH","No refresh URL configured for Cline"),null;try{let e=await (0,h.jf)(c,()=>fetch(d,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a,grantType:"refresh_token",clientType:"extension"})}));if(!e.ok){let a=await e.text();b?.error?.("TOKEN_REFRESH","Failed to refresh Cline token",{status:e.status,error:a});let c=A(a);if("invalid_grant"===c||"invalid_request"===c)return{error:"unrecoverable_refresh_error",code:c};return null}let f=await e.json(),g=f?.data||f,i=g?.expiresAt,j=i?Math.max(1,Math.floor((new Date(i).getTime()-Date.now())/1e3)):void 0;return b?.info?.("TOKEN_REFRESH","Successfully refreshed Cline token",{hasNewAccessToken:!!g?.accessToken,hasNewRefreshToken:!!g?.refreshToken,expiresIn:j}),{accessToken:g?.accessToken,refreshToken:g?.refreshToken||a,expiresIn:j}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Cline token: ${a.message}`),null}}async function G(a,b,c,d=null){let f=e.xq["kimi-coding"]?.refreshUrl||e.xq["kimi-coding"]?.tokenUrl;if(!f)return c?.warn?.("TOKEN_REFRESH","No refresh URL configured for Kimi Coding"),null;let i=b?.deviceId||(0,g.pbkdf2Sync)(a,"kimi-device-id",1e3,16,"sha256").toString("hex"),j=process.env.KIMI_CLI_VERSION||"1.36.0",k="u">typeof process?process.platform:"unknown",l=[k,"u">typeof process?process.arch:"unknown"].filter(Boolean).join(" ");try{let g=new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:e.xq["kimi-coding"]?.clientId||""}),m=await (0,h.jf)(d,()=>fetch(f,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","X-Msh-Platform":"kimi_cli","X-Msh-Version":j,"X-Msh-Device-Model":b?.deviceModel||l,"X-Msh-Device-Id":i,"X-Msh-Device-Name":b?.deviceName||k,"X-Msh-Os-Version":b?.osVersion||k},body:g}));if(!m.ok){let a=await m.text();try{let b=JSON.parse(a),d=b?.error;if("invalid_grant"===d||"invalid_request"===d)return c?.error?.("TOKEN_REFRESH","Kimi Coding refresh token invalid. Re-authentication required.",{errorCode:d}),{error:"unrecoverable_refresh_error",code:d}}catch{}return c?.error?.("TOKEN_REFRESH","Failed to refresh Kimi Coding token",{status:m.status,error:a.slice(0,200)}),null}let n=await m.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kimi Coding token",{hasNewAccessToken:!!n.access_token,hasNewRefreshToken:!!n.refresh_token,expiresIn:n.expires_in}),{accessToken:n.access_token,refreshToken:n.refresh_token||a,expiresIn:n.expires_in,tokenType:n.token_type,scope:n.scope}}catch(a){return c?.error?.("TOKEN_REFRESH",`Network error refreshing Kimi Coding token: ${a instanceof Error?a.message:String(a)}`),null}}async function H(a,b,c,d=null){if(!a)return c?.warn?.("TOKEN_REFRESH","No refresh token for GitLab Duo"),null;let f=(0,k.L_)(b),g=(0,k.Tg)(f).tokenUrl,i=b?.clientId||e.xq["gitlab-duo"]?.clientId||process.env.GITLAB_DUO_OAUTH_CLIENT_ID||process.env.GITLAB_OAUTH_CLIENT_ID||"";try{let b=await (0,h.jf)(d,()=>fetch(g,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:x({grant_type:"refresh_token",refresh_token:a,client_id:i})}));if(!b.ok){let a=await b.text();try{let b=JSON.parse(a).error;if("invalid_grant"===b||"invalid_request"===b)return c?.error?.("TOKEN_REFRESH","GitLab Duo refresh token invalid. Re-authentication required.",{errorCode:b}),{error:"unrecoverable_refresh_error",code:b}}catch{}return c?.error?.("TOKEN_REFRESH","Failed to refresh GitLab Duo token",{status:b.status,error:a.slice(0,200)}),null}let e=await b.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed GitLab Duo token",{hasNewAccessToken:!!e.access_token,hasNewRefreshToken:!!e.refresh_token,expiresIn:e.expires_in}),{accessToken:e.access_token,refreshToken:e.refresh_token||a,expiresIn:e.expires_in}}catch(a){return c?.error?.("TOKEN_REFRESH",`Network error refreshing GitLab Duo token: ${a instanceof Error?a.message:String(a)}`),null}}async function I(a,b,c=null){try{let d=x({grant_type:"refresh_token",refresh_token:a,client_id:e.xq.claude.clientId}),f=await (0,h.jf)(c,()=>fetch(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","anthropic-beta":"oauth-2025-04-20"},body:d.toString()}));if(!f.ok){let{rawText:a,code:c}=await B(f);if(b?.error?.("TOKEN_REFRESH","Failed to refresh Claude OAuth token",{status:f.status,error:a.slice(0,300)}),"invalid_grant"===c||"invalid_request"===c)return{error:"unrecoverable_refresh_error",code:c};return null}let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}}async function J(a,b,c,d,f=null){let g=await (0,h.jf)(f,()=>fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:x({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})}));if(!g.ok){let a=await g.text();d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:g.status,error:a.slice(0,200)});try{let b=JSON.parse(a);if("invalid_grant"===b.error)return d?.error?.("TOKEN_REFRESH","Google refresh token invalid. Re-authentication required.",{provider:"google"}),{error:"unrecoverable_refresh_error",code:"invalid_grant"}}catch{}return null}let i=await g.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!i.access_token,hasNewRefreshToken:!!i.refresh_token,expiresIn:i.expires_in}),{accessToken:i.access_token,refreshToken:i.refresh_token||a,expiresIn:i.expires_in}}async function K(a,b,c=null){let d=e.NA.qwen.token;try{let f=await (0,h.jf)(c,()=>fetch(d,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:x({grant_type:"refresh_token",refresh_token:a,client_id:e.xq.qwen.clientId})}));if(200===f.status){let c=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await f.text().catch(()=>""),c=null;try{let b=JSON.parse(a);c=b?.error}catch{}if("invalid_request"===c||"invalid_grant"===c)return b?.error?.("TOKEN_REFRESH","Qwen refresh token is invalid or expired. Re-authentication required.",{status:f.status,errorCode:c}),{error:"unrecoverable_refresh_error",code:c};b?.warn?.("TOKEN_REFRESH","Error with Qwen endpoint",{status:f.status,error:a})}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null}async function L(a,b,c=null){try{let d=await (0,h.jf)(c,()=>fetch(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:x({grant_type:"refresh_token",refresh_token:a,client_id:e.xq.codex.clientId})}));if(!d.ok){let a=await d.text(),c=null;try{let b=JSON.parse(a);c=b?.error?.code||("string"==typeof b?.error?b.error:null)}catch{}if("refresh_token_reused"===c||"invalid_grant"===c||"token_expired"===c||"invalid_token"===c)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-authentication required.",{status:d.status,errorCode:c}),{error:"unrecoverable_refresh_error",code:c};if(401===d.status){let a=c||"unauthorized";return b?.error?.("TOKEN_REFRESH","Codex OAuth token endpoint returned 401. Re-authentication required.",{status:d.status,errorCode:a}),{error:"unrecoverable_refresh_error",code:a}}return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:d.status,error:a}),null}let f=await d.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}}async function M(a,b,c,d=null){try{let f=b?.authMethod,g=b?.clientId,i=b?.clientSecret,j=b?.region;if(g&&i&&"imported"!==f){let b=`https://oidc.${j||"us-east-1"}.amazonaws.com/token`,e=await (0,h.jf)(d,()=>fetch(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:g,clientSecret:i,refreshToken:a,grantType:"refresh_token"})}));if(!e.ok){let f,g=await e.text();try{let a=JSON.parse(g);f=a.__type||a.error}catch{}if("InvalidGrantException"===f||"ExpiredTokenException"===f||"invalid_grant"===f)return c?.error?.("TOKEN_REFRESH","Kiro AWS refresh token expired/invalid. Re-authentication required.",{awsErrorType:f}),{error:"unrecoverable_refresh_error",code:f};c?.warn?.("TOKEN_REFRESH","Kiro OIDC refresh failed, attempting client re-registration...",{status:e.status,error:g.slice(0,200)});try{let e=`https://oidc.${j||"us-east-1"}.amazonaws.com/client/register`,f=await (0,h.jf)(d,()=>fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientName:"kiro-oauth-client",clientType:"public",scopes:["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations"],grantTypes:["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],issuerUrl:"https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6"})}));if(f.ok){let e=await f.json(),g=await (0,h.jf)(d,()=>fetch(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:a,grantType:"refresh_token"})}));if(g.ok){let b=await g.json();return c?.info?.("TOKEN_REFRESH","Kiro refresh recovered via client re-registration",{hasNewAccessToken:!!b.accessToken,expiresIn:b.expiresIn}),{accessToken:b.accessToken,refreshToken:b.refreshToken||a,expiresIn:b.expiresIn,_newClientId:e.clientId,_newClientSecret:e.clientSecret,_newClientSecretExpiresAt:e.clientSecretExpiresAt}}}}catch(a){c?.warn?.("TOKEN_REFRESH","Kiro client re-registration fallback failed",{error:String(a)})}return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:e.status,error:g.slice(0,200)}),null}let f=await e.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!f.accessToken,expiresIn:f.expiresIn}),{accessToken:f.accessToken,refreshToken:f.refreshToken||a,expiresIn:f.expiresIn}}let k=e.xq.kiro.tokenUrl;if(!k)return c?.error?.("TOKEN_REFRESH","Missing Kiro token endpoint"),null;let l=await (0,h.jf)(d,()=>fetch(k,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a})}));if(!l.ok){let a=await l.text();try{let b=JSON.parse(a),d=b.__type||b.error;if("InvalidGrantException"===d||"ExpiredTokenException"===d||"invalid_grant"===d)return c?.error?.("TOKEN_REFRESH","Kiro social refresh token expired/invalid. Re-authentication required.",{awsErrorType:d}),{error:"unrecoverable_refresh_error",code:d}}catch{}return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:l.status,error:a.slice(0,200)}),null}let m=await l.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!m.accessToken,expiresIn:m.expiresIn}),{accessToken:m.accessToken,refreshToken:m.refreshToken||a,expiresIn:m.expiresIn}}catch(a){return c?.error?.("TOKEN_REFRESH",`Network error refreshing Kiro token: ${a.message}`),null}}async function N(a,b,c=null){if(!e.NA.qoder.token||!e.xq.qoder.clientId||!e.xq.qoder.clientSecret)return b?.warn?.("TOKEN_REFRESH","Qoder OAuth refresh skipped: browser OAuth is not configured in this environment"),null;let d=btoa(`${e.xq.qoder.clientId}:${e.xq.qoder.clientSecret}`),f=await (0,h.jf)(c,()=>fetch(e.NA.qoder.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${d}`},body:x({grant_type:"refresh_token",refresh_token:a,client_id:e.xq.qoder.clientId,client_secret:e.xq.qoder.clientSecret})}));if(!f.ok){let a=await f.text();b?.error?.("TOKEN_REFRESH","Failed to refresh Qoder token",{status:f.status,error:a});let c=A(a);return"invalid_grant"===c||"invalid_request"===c?{error:"unrecoverable_refresh_error",code:c}:null}let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qoder token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}async function O(a,b,c=null){let d=await (0,h.jf)(c,()=>fetch(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:x({grant_type:"refresh_token",refresh_token:a,client_id:e.xq.github.clientId,client_secret:e.xq.github.clientSecret})}));if(!d.ok){let a=await d.text();b?.error?.("TOKEN_REFRESH","Failed to refresh GitHub token",{status:d.status,error:a});let c=A(a);return"invalid_grant"===c||"invalid_request"===c?{error:"unrecoverable_refresh_error",code:c}:null}let f=await d.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}async function P(a,b,c=null){try{let d=await (0,h.jf)(c,()=>fetch("https://api.github.com/copilot_internal/v2/token",{headers:(0,f.H_)(`token ${a}`)}));if(!d.ok){let a=await d.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:d.status,error:a}),null}let e=await d.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!e.token,expiresAt:e.expires_at}),{token:e.token,expiresAt:e.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}}async function Q(a,b,c,d=null){switch(a){case"gemini":case"antigravity":case"agy":return await J(b.refreshToken,e.xq[a].clientId,e.xq[a].clientSecret,c,d);case"claude":return await I(b.refreshToken,c,d);case"codex":return await L(b.refreshToken,c,d);case"qwen":return await K(b.refreshToken,c,d);case"qoder":return await N(b.refreshToken,c,d);case"github":return await O(b.refreshToken,c,d);case"kiro":case"amazon-q":return await M(b.refreshToken,b.providerSpecificData,c,d);case"cline":return await F(b.refreshToken,c,d);case"kimi-coding":return await G(b.refreshToken,b.providerSpecificData,c,d);case"gitlab-duo":return await H(b.refreshToken,b.providerSpecificData,c,d);case"windsurf":case"devin-cli":return await D(b.refreshToken,b.providerSpecificData,c,d);case"codebuddy-cn":return await E(b.refreshToken,c,d);default:return C(a,b.refreshToken,b,c,d)}}function R(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}async function S(a,b,d,e=null,f){if(!b||!b.refreshToken||"string"!=typeof b.refreshToken)return d?.warn?.("TOKEN_REFRESH",`No valid refresh token available for provider: ${a}`),null;let g=f??r.getStore(),h=b.connectionId;if(h&&"string"==typeof h){let f=p.get(h);if(f)return f.waiters++,d?.info?.("TOKEN_REFRESH","Concurrent refresh detected — sharing in-flight refresh",{provider:a,connectionId:h,waiters:f.waiters}),f.promise;let i={promise:null,waiters:0};return i.promise=(async()=>{let f=await T(a,b,d,e);if(f?.accessToken&&g){if(await w(d))return f;try{await g(f)}catch(e){let{sanitizeErrorMessage:b}=await c.e(3659).then(c.bind(c,43659));throw d?.error?.("TOKEN_REFRESH",`onPersist callback failed for ${a}/${h}: ${b(e instanceof Error?e:Error(String(e)))}`),e}}return f})().finally(()=>{p.delete(h)}),p.set(h,i),i.promise}let j=y(a,b.refreshToken);if(o.has(j))return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),o.get(j);let k=(0,i.Aj)(a,()=>Q(a,b,d,e)).then(async b=>{if(b?.accessToken&&g){if(await w(d))return b;try{await g(b)}catch(e){let{sanitizeErrorMessage:b}=await c.e(3659).then(c.bind(c,43659));throw d?.error?.("TOKEN_REFRESH",`Layer 2 onPersist callback failed for ${a}: ${b(e instanceof Error?e:Error(String(e)))}`),e}}else b?.accessToken&&!g&&d?.warn?.("TOKEN_REFRESH",`Layer 2 refresh succeeded for ${a} without onPersist — DB row will not be updated with rotated token. Callers should pass connectionId for Layer 1 atomicity.`);return b}).finally(()=>{o.delete(j)});return o.set(j,k),k}async function T(a,b,d,e){let f=function(a,b){!function(a=Date.now()){if(0!==q.size)for(let[b,c]of q.entries())c.expiresAt<=a&&q.delete(b)}();let c=y(a,b),d=q.get(c);if(d)return d.expiresAt<=Date.now()?void q.delete(c):d}(a,b.refreshToken);if(f)return d?.info?.("TOKEN_REFRESH",`Rotation map hit for ${a}. Returning cached rotated tokens (avoids family-revoke).`),f.result;if(b.connectionId)try{let{getProviderConnectionById:e}=await c.e(4713).then(c.bind(c,87094)),f=await e(b.connectionId);if(f&&f.refreshToken){let c=Date.now(),e=f.expiresAt?new Date(f.expiresAt).getTime():0;if(f.refreshToken!==b.refreshToken){if(d?.info?.("TOKEN_REFRESH",`Stale token detected in memory for ${a}. Using refreshed token from DB.`),e>c+6e4)return d?.info?.("TOKEN_REFRESH","DB token is still valid. Skipping OAuth refresh."),{accessToken:f.accessToken,refreshToken:f.refreshToken,expiresAt:f.expiresAt};b.refreshToken=f.refreshToken,b.accessToken=f.accessToken}}}catch(a){d?.warn?.("TOKEN_REFRESH",`Failed to check DB for stale token: ${a instanceof Error?a.message:String(a)}`)}let g=b.refreshToken,h=await (0,i.Aj)(a,()=>Q(a,b,d,e));return h&&"object"==typeof h&&!("error"in h)&&h.accessToken&&h.refreshToken&&function(a,b,c){if(!b||!c.refreshToken||b===c.refreshToken)return;let d=y(a,b);q.set(d,{result:c,expiresAt:Date.now()+6e4})}(a,g,h),h}let U=S,V={};async function W(a,b){return await new Promise((c,d)=>{let e=setTimeout(()=>c(null),b);"object"==typeof e&&"unref"in e&&e.unref?.(),a().then(a=>{clearTimeout(e),c(a)},a=>{clearTimeout(e),d(a)})})}async function X(a,b=3,c=null,d="unknown"){let e;if((e=V[d])&&e.blockedUntil&&(e.blockedUntil>Date.now()||(delete V[d],0)))return c?.warn?.("TOKEN_REFRESH",`⚡ Circuit breaker active for ${d}, skipping refresh`),null;for(let e=0;e<b;e++){if(e>0){let a=1e3*e;c?.debug?.("TOKEN_REFRESH",`Retry ${e}/${b} after ${a}ms`),await new Promise(b=>setTimeout(b,a))}try{let b=await W(a,3e4);if(R(b))return c?.warn?.("TOKEN_REFRESH",`Unrecoverable refresh error for ${d}: ${b.error} — skipping retries`),b;if(b)return V[d]&&delete V[d],b}catch(a){c?.warn?.("TOKEN_REFRESH",`Attempt ${e+1}/${b} failed: ${a.message}`)}}return!function(a,b=null){V[a]||(V[a]={failures:0,blockedUntil:0}),V[a].failures++,V[a].failures>=5&&(V[a].blockedUntil=Date.now()+18e5,b?.error?.("TOKEN_REFRESH",`🔴 Circuit breaker tripped for ${a}: 5 consecutive failures. Blocked for 30min. Provider needs re-authentication.`))}(d,c),c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed for ${d}`),null}},20927:(a,b,c)=>{"use strict";var d=c(75919),e=c.n(d),f=c(28064);e()&&!e().markAsUncloneable&&(e().markAsUncloneable=function(a){if(e().markAsUntransferable)try{e().markAsUntransferable(a)}catch{}}),void 0===Promise.withResolvers&&(Promise.withResolvers=function(){let a,b;return{promise:new Promise((c,d)=>{a=c,b=d}),resolve:a,reject:b}}),void 0===globalThis.WebSocket&&(globalThis.WebSocket=f.WebSocket)},39727:()=>{},47990:()=>{},54444:(a,b,c)=>{"use strict";c.d(b,{e:()=>d});let d=null},57843:(a,b,c)=>{"use strict";c.d(b,{Aj:()=>f,Jv:()=>g});let d={codex:"openai-auth0",openai:"openai-auth0",claude:"anthropic-oauth","gitlab-duo":"gitlab-duo",kiro:"kiro","kimi-coding":"kimi-coding",qwen:"qwen"},e=new Map;async function f(a,b){let c,f=d[a]??null;if(!f)return b();let g=e.get(f)??Promise.resolve(),h=new Promise(a=>{c=a}),i=g.then(()=>h);e.set(f,i),await g.catch(()=>{});try{return await b()}finally{if(e.get(f)!==i){let a=function(){let a=process.env.CODEX_REFRESH_SPACING_MS;if(void 0===a||""===a)return 2e3;let b=Number(a);return Number.isFinite(b)&&b>=0?b:2e3}();a>0&&await new Promise(b=>setTimeout(b,a))}c(),e.get(f)===i&&e.delete(f)}}function g(a,b){return"string"==typeof a&&a.length>0&&"string"==typeof b&&b.length>0&&b!==a}},58643:(a,b,c)=>{"use strict";let d;c.d(b,{A:()=>g});var e=c(99765);try{let a=c(3725);d="function"==typeof a.createSession?a.createSession:null}catch{d=null}class f{constructor(){this.session=null,this.failureCount=0,this.maxFailures=3,this.baseCooldownMs=3e4,this.cooldownMs=3e4,this.cooldownMultiplier=1,this.MAX_COOLDOWN_MS=6e5,this.circuitOpenUntil=0,this.circuitTripped=!1,this._libraryAvailable=!!d}get available(){return!!this._libraryAvailable&&(!this.circuitTripped||Date.now()>=this.circuitOpenUntil)}recordFailure(){this.failureCount++,this.failureCount>=this.maxFailures&&(this.circuitOpenUntil=Date.now()+this.cooldownMs,this.circuitTripped=!0,this.session&&(Promise.resolve(this.session.close()).catch(()=>{}),this.session=null),console.warn(`[TlsClient] Circuit opened after ${this.failureCount} consecutive failures, cooling down for ${this.cooldownMs}ms`),this.escalateCooldown())}recordSuccess(){this.failureCount=0,this.circuitTripped&&(this.cooldownMultiplier=1,this.cooldownMs=this.baseCooldownMs,console.log("[TlsClient] Circuit closed (success after cooldown)"),this.circuitTripped=!1)}escalateCooldown(){this.cooldownMultiplier=Math.min(2*this.cooldownMultiplier,20),this.cooldownMs=Math.min(this.baseCooldownMs*this.cooldownMultiplier,this.MAX_COOLDOWN_MS)}checkCircuit(){return!this.circuitTripped||Date.now()>=this.circuitOpenUntil&&(console.log("[TlsClient] Half-open: retrying after cooldown"),!0)}async getSession(){if(!this.checkCircuit()||!this.available)return null;if(this.session)return this.session;let a=d;if(!a)return null;let b=process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy||void 0,c={browser:"chrome_124",os:"macos"};return b&&(c.proxy=b,console.log(`[TlsClient] Using proxy: ${b}`)),this.session=await a(c),console.log("[TlsClient] Session created (Chrome 124 TLS fingerprint)"),this.session}async fetch(a,b={}){if(!this.checkCircuit())throw Error("wreq-js circuit open — skipping TLS request");try{let c=await this.getSession();if(!c)throw Error("wreq-js not available");let{timeoutMs:d}=(0,e.uw)(process.env,a=>{console.warn(`[TlsClient] ${a}`)}),f={method:(b.method||"GET").toUpperCase(),headers:function(a){if(!a)return;if(a instanceof Headers)return Object.fromEntries(a.entries());if(Array.isArray(a))return Object.fromEntries(a.map(([a,b])=>[a,String(b)]));let b={};for(let[c,d]of Object.entries(a))"string"==typeof d&&(b[c]=d);return b}(b.headers),body:b.body,redirect:"manual"===b.redirect?"manual":"follow",timeout:d};b.signal&&(f.signal=b.signal);let g=await c.fetch(a,f);return this.recordSuccess(),g}catch(a){throw a instanceof Error&&("AbortError"===a.name||a.message.includes("aborted"))||this.recordFailure(),a}}async exit(){this.session&&(await this.session.close(),this.session=null)}resetCircuit(){this.failureCount=0,this.circuitTripped=!1,this.circuitOpenUntil=0}getCircuitState(){return{available:this.available,circuitTripped:this.circuitTripped,failureCount:this.failureCount,circuitOpenUntil:this.circuitOpenUntil,coolDownRemainingMs:this.circuitOpenUntil>0?Math.max(0,this.circuitOpenUntil-Date.now()):0}}}let g=new f},68404:(a,b,c)=>{"use strict";c.d(b,{KS:()=>d,wX:()=>e});let d=()=>!1,e=()=>!1},69889:(a,b,c)=>{"use strict";c.d(b,{Bm:()=>e,UL:()=>g,wI:()=>f});var d=c(77030);function e(a){return"string"!=typeof a?"":a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a}function f(a){let b=e(a),c=(0,d.isIP)(b);return 0===c?null:c}function g(a){return"ipv4"===a||"ipv6"===a?a:"auto"}},85376:(a,b,c)=>{"use strict";c.d(b,{R4:()=>y,I_:()=>A,DJ:()=>q,Sn:()=>r,g4:()=>o,zP:()=>x,HN:()=>z,OK:()=>w}),c(20927);var d=c(47774),e=c(20406),f=c(99765),g=c(69889),h=c(13092);let i=Symbol.for("omniroute.proxyDispatcher.cache"),j=Symbol.for("omniroute.proxyDispatcher.default"),k=Symbol.for("omniroute.proxyDispatcher.retry");class l{constructor(a){this.nextIndex=0,this.dispatchers=a}dispatch(a,b){let c=this.dispatchers[this.nextIndex%this.dispatchers.length];return this.nextIndex=(this.nextIndex+1)%this.dispatchers.length,c.dispatch(a,b)}close(a){let b=Promise.all(this.dispatchers.map(a=>a.close())).then(()=>void 0);return a?void b.then(a):b}destroy(a,b){let c="function"==typeof a?a:b,d="function"==typeof a?null:a??null,e=Promise.all(this.dispatchers.map(a=>a.destroy(d))).then(()=>void 0);return c?void e.then(c):e}}let m=new Set(["http:","https:","socks5:"]),n=new Set(["vercel","deno","cloudflare"]);function o(a){return"string"==typeof a&&n.has(a)}function p(){let a=(0,f.pf)(process.env,a=>{console.warn(`[ProxyDispatcher] ${a}`)});return{headersTimeout:a.fetchHeadersTimeoutMs,bodyTimeout:a.fetchBodyTimeoutMs,connectTimeout:a.fetchConnectTimeoutMs,keepAliveTimeout:a.fetchKeepAliveTimeoutMs,keepAliveMaxTimeout:a.fetchKeepAliveTimeoutMs}}function q(){let a=globalThis[j];if(!a){var b,c;let e;c=function(a=process.env){let b=a.OMNIROUTE_DIRECT_DISPATCHER_CONNECTIONS;if(null==b||""===b.trim())return 32;let c=Number(b);return!Number.isFinite(c)||c<1?(console.warn(`[ProxyDispatcher] Invalid OMNIROUTE_DIRECT_DISPATCHER_CONNECTIONS="${b}". Using default 32.`),32):Math.min(Math.floor(c),256)}(),e={...p(),connections:1,pipelining:0},b=a=new l(Array.from({length:c},()=>new d.Agent(e))),globalThis[j]=b}return a}function r(){let a=globalThis[k];if(!a){var b;b=a=new d.Agent({...p(),keepAliveTimeout:1,keepAliveMaxTimeout:1,pipelining:0}),globalThis[k]=b}return a}function s(a){try{let b=a.indexOf("://");if(-1===b)return null;let c=b+3,d=a.indexOf("/",c),e=-1===d?a.slice(c):a.slice(c,d),f=e.lastIndexOf(":"),g=e.lastIndexOf("@");if(-1!==f&&f>g){let a=e.slice(f+1);if(/^\d+$/.test(a)){let b=Number(a);if(Number.isInteger(b)&&b>=1&&b<=65535)return String(b)}}}catch{}return null}function t(a){return"https:"===a||"wss:"===a?"443":"socks5:"===a?"1080":"8080"}function u(a,b){if(!a)return t(b);let c=Number(a);if(!Number.isInteger(c)||c<1||c>65535)throw Error("[ProxyDispatcher] Invalid proxy port");return String(c)}function v(){return!["false","0","no","off"].includes((process.env.ENABLE_SOCKS5_PROXY??"").trim().toLowerCase())}function w(a){let b=s(a),c=new URL(a),d=b||c.port||t(c.protocol);return`${c.protocol}//${c.hostname}:${d}`}function x(a,b="proxy",{allowSocks5:c=v()}={}){var d;let e,f,h=a.match(/\?family=(ipv4|ipv6)$/),i=h?h[0]:"",j=i?a.slice(0,-i.length):a,k=s(j);try{e=new URL(j)}catch{throw Error(`[ProxyDispatcher] Invalid ${b} URL`)}if(!m.has(e.protocol))throw Error(`[ProxyDispatcher] Unsupported ${b} protocol: ${e.protocol.replace(":","")}`);if("socks5:"===e.protocol&&!c)throw Error("[ProxyDispatcher] SOCKS5 proxy is disabled (remove ENABLE_SOCKS5_PROXY=false to enable — it is ON by default)");if(!e.hostname)throw Error(`[ProxyDispatcher] Invalid ${b} host`);let l=k||u(e.port,e.protocol),n=(0,g.UL)((h?h[1]:e.searchParams.get("family"))??void 0),o=(f=(d=e).username?`${d.username}${d.password?`:${d.password}`:""}@`:"",`${d.protocol}//${f}${d.hostname}:${l}`);return"auto"===n?o:`${o}?family=${n}`}function y(a,b){let c=new URL(a);return{"x-relay-target":`${c.protocol}//${c.host}`,"x-relay-path":c.pathname+c.search,"x-relay-auth":b}}function z(a,{allowSocks5:b=v()}={}){if(!a)return null;if("string"==typeof a)return x(a,"context proxy",{allowSocks5:b});if("object"!=typeof a||Array.isArray(a))throw Error("[ProxyDispatcher] Invalid context proxy config");if(!a.host)return null;let c=String(a.type||"http").toLowerCase();if(n.has(c))return a.host?`https://${a.host}`:null;let d=`${c}:`;if(!m.has(d))throw Error(`[ProxyDispatcher] Unsupported context proxy protocol: ${c}`);if("socks5:"===d&&!b)throw Error("[ProxyDispatcher] SOCKS5 proxy is disabled (remove ENABLE_SOCKS5_PROXY=false to enable — it is ON by default)");let e=u(a.port,d),f=a.username?`${encodeURIComponent(a.username)}:${a.password?encodeURIComponent(a.password):""}@`:"",h=`${c}://${f}${a.host}:${e}`,i=(0,g.UL)(a.family),j=x(h,"context proxy",{allowSocks5:b});return"auto"===i?j:`${j}?family=${i}`}function A(a){let b,c=x(a,"proxy dispatcher"),f=((b=globalThis)[i]||(b[i]=new Map),b[i]),j=function(a=process.env){return{...p(),connections:function(a=process.env){let b=a.OMNIROUTE_PROXY_DISPATCHER_CONNECTIONS;if(null==b||""===b.trim())return 32;let c=Number(b);return!Number.isFinite(c)||c<1?(console.warn(`[ProxyDispatcher] Invalid OMNIROUTE_PROXY_DISPATCHER_CONNECTIONS="${b}". Using default 32.`),32):Math.min(Math.floor(c),256)}(a),keepAliveTimeout:1,keepAliveMaxTimeout:1,pipelining:0}}(),k=f.get(c);if(k)return k;let l=new URL(c),m=function(a){let b=(0,g.UL)(a.searchParams.get("family")??void 0),c=(0,g.wI)(a.hostname);if("auto"===b)return c;let d="ipv6"===b?6:4;if(null!==c&&c!==d)throw Error(`[ProxyDispatcher] Proxy family directive ${b} contradicts ${6===c?"IPv6":"IPv4"} literal host`);return d}(l);l.searchParams.delete("family");let n=c.replace(/\?family=(ipv4|ipv6)$/,""),o=s(n)||u(l.port,l.protocol);if("socks5:"===l.protocol){let a={type:5,host:(0,g.Bm)(l.hostname),port:Number(o)};l.username&&(a.userId=decodeURIComponent(l.username)),l.password&&(a.password=decodeURIComponent(l.password)),k=null===m?(0,e.vI)(a,j):function(a,b,c={}){let{connect:e,...f}=c;return new d.Agent({...f,connect:function(a,b,c={}){let e=(0,d.buildConnector)(c),f=6===b?{family:6,autoSelectFamily:!1}:4===b?{family:4,autoSelectFamily:!1}:{};return async(b,c)=>{let{protocol:d,hostname:g,port:i,httpSocket:j}=b;try{let k=(await h.SocksClient.createConnection({command:"connect",proxy:a,timeout:function(a=process.env){let b=a.SOCKS_HANDSHAKE_TIMEOUT_MS;if(null==b||""===b.trim())return 1e4;let c=Number(b);return!Number.isFinite(c)||c<1?1e4:Math.min(Math.floor(c),12e4)}(),destination:{host:g,port:i?Number.parseInt(i,10):"http:"===d?80:443},existing_socket:j,socket_options:f})).socket;if("https:"!==d)return c(null,k.setNoDelay());return e({...b,httpSocket:k},c)}catch(a){return c(a,null)}}}(a,b,e)})}(a,m,j)}else k=new d.ProxyAgent({uri:n,...j,...null!==m?{proxyTls:{family:m,autoSelectFamily:!1}}:{}});return f.set(c,k),k}},95538:(a,b,c)=>{"use strict";let d;c.d(b,{proxyAwareFetch:()=>C,l:()=>x,jf:()=>z}),c(20927);var e=c(16698),f=c(47774),g=c(85376),h=c(58643),i=c(68404),j=c(89718);let k=new Map;function l(a){let b=a.username?`${encodeURIComponent(a.username)}:${encodeURIComponent(a.password||"")}@`:"";return`${a.type}://${b}${a.host}:${a.port}`}async function m(a){let b=new Set;try{let a=await (0,j.P)("global");a?.proxy&&b.add(l(a.proxy))}catch{}try{for(let a of(await (0,j.zU)({includeSecrets:!0})))a.host&&a.port&&b.add(l(a))}catch{}try{for(let a of(await (0,j.Bb)({limit:5})))a.host&&a.port&&b.add(l(a))}catch{}if(a)try{let c=function(a){let b,c=process.env.NO_PROXY||process.env.no_proxy;if(c){let b;try{b=new URL(a).hostname.toLowerCase()}catch{return null}if(c.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.includes("*")?RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$").test(b):b===a||b.endsWith(`.${a}`))))return null}try{b=new URL(a).protocol}catch{return null}let d="https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy;if(!d)return null;try{return(0,g.zP)(d,"environment proxy")}catch{return null}}(a);c&&b.add(c)}catch{}return Array.from(b)}async function n(a,b,c=3e3){let d=Date.now();try{let e=new AbortController,h=setTimeout(()=>e.abort(),c),i=(0,g.I_)(a);await (0,f.fetch)(b,{method:"HEAD",signal:e.signal,dispatcher:i,headers:{"User-Agent":"OmniRoute/1.0"}}),clearTimeout(h);let j=Date.now()-d;return{ok:!0,latencyMs:j}}catch{return{ok:!1,latencyMs:null}}}async function o(a,b){if(!a)return null;let c=function(a,b){try{let a=new URL(b),c=`${a.pathname||"/"}${a.search}`;return`${a.protocol}//${a.host}${c}`}catch{return a.toLowerCase()}}(a,b),d=k.get(c);if(d){if(d.expiresAt>Date.now())return d.proxyUrl||null;k.delete(c)}let e=await ((void 0)??m)(b);if(0===e.length)return null;let f=(await Promise.allSettled(e.map(async a=>{let{ok:c}=await ((void 0)??n)(a,b);return{proxyUrl:a,ok:c}}))).find(a=>"fulfilled"===a.status&&a.value.ok);if(f&&"fulfilled"===f.status){let a=f.value.proxyUrl;return k.set(c,{proxyUrl:a,expiresAt:Date.now()+3e5}),a}return k.set(c,{proxyUrl:"",expiresAt:Date.now()+3e5}),null}let p=new e.AsyncLocalStorage,q=new e.AsyncLocalStorage;function r(a){let b=[],c=new Set,d=a;for(let a=0;d&&a<5&&!c.has(d);a++){c.add(d);let a=d,e=["string"==typeof a.name&&"Error"!==a.name?a.name:null,"string"==typeof a.message?a.message.slice(0,160):null,null!=a.code?`code=${String(a.code)}`:null,null!=a.syscall?`syscall=${String(a.syscall)}`:null,null!=a.errno?`errno=${String(a.errno)}`:null,null!=a.address?`address=${String(a.address)}${null!=a.port?`:${String(a.port)}`:""}`:null].filter(Boolean).join(" ");if(e&&b.push(e),Array.isArray(a.errors))for(let c of a.errors.slice(0,4)){let a=c??{},d=[null!=a.code?`code=${String(a.code)}`:null,null!=a.syscall?`syscall=${String(a.syscall)}`:null,null!=a.address?`address=${String(a.address)}${null!=a.port?`:${String(a.port)}`:""}`:null].filter(Boolean).join(" ");d?b.push(`↳ ${d}`):"string"==typeof a.message&&b.push(`↳ ${a.message.slice(0,80)}`)}d=a.cause}return b.join(" | ")||String(a)}let s="u">typeof caches&&"object"==typeof caches,t=Symbol.for("omniroute.proxyFetch.state"),u=((d=globalThis)[t]||(d[t]={originalFetch:globalThis.fetch,proxyContext:new e.AsyncLocalStorage,isPatched:!1}),d[t]),v=u.originalFetch,w=u.proxyContext;function x(a){let b,c;try{b=new URL(a)}catch{b=null}if(b&&("localhost"===(c=b.hostname.toLowerCase().replace(/^\[/,"").replace(/\]$/,"").replace(/^::ffff:/i,""))||"0.0.0.0"===c||"127.0.0.1"===c||"::1"===c||c.endsWith(".local")||c.endsWith(".lan")||c.endsWith(".internal")||c.startsWith("192.168.")||c.startsWith("10.")||c.startsWith("127.")||c.startsWith("169.254.")||/^172\.(1[6-9]|2\d|3[0-1])\./.test(c)||/^100\.(6[4-9]|[7-9]\d|1[01]\d|12[0-7])\./.test(c)||/^f[cd][0-9a-f]*:/i.test(c)||c.startsWith("fe80:")))return{source:"direct",proxyUrl:null};let d=w.getStore();if(d)return{source:"context",proxyUrl:(0,g.HN)(d)};let e=function(a){let b;if(function(a){let b,c=process.env.NO_PROXY||process.env.no_proxy;if(!c)return!1;try{b=new URL(a)}catch{return!1}let d=b.hostname.toLowerCase(),e=b.port||("https:"===b.protocol?"443":"80");return c.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>{if("*"===a)return!0;let[b,c]=a.split(":");if(c&&c!==e||!b)return!1;if(b.includes("*")){let a=b.split("*"),c=0,e=d.startsWith(a[0]);if(e){c=a[0].length;for(let b=1;b<a.length&&e;b++){let f=a[b];if(b===a.length-1)e=""===f||d.endsWith(f)&&d.length-f.length>=c;else{let a=f?d.indexOf(f,c):c;-1===a?e=!1:c=a+f.length}}}if(e)return!0}return b.startsWith(".")?d.endsWith(b)||d===b.slice(1):d===b||d.endsWith(`.${b}`)})}(a))return null;try{b=new URL(a).protocol}catch{return null}let c="https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy;return c?(0,g.zP)(c,"environment proxy"):null}(a);return e?{source:"env",proxyUrl:e}:{source:"direct",proxyUrl:null}}function y(a){return"string"==typeof a?a:a&&"string"==typeof a.url?a.url:String(a)}async function z(a,b,d){if("function"!=typeof b)throw TypeError("runWithProxyContext requires a callback function");let e=w.getStore(),f=a||e||null,h=f?(0,g.HN)(f):null,j=d?.directFallbackOnUnreachable===!0&&(0,i.KS)(),k=(0,g.g4)(f?.type);if(h&&!k&&!await !1){let a=(0,g.OK)(h);if(j)return console.warn(`[ProxyFetch] Proxy unreachable (${a}); using a direct connection for this request.`),w.run(null,b);let c=Error(`[Proxy Fast-Fail] Proxy unreachable: ${a}`);throw c.code="PROXY_UNREACHABLE",c.statusCode=503,c}if(h&&!k)try{let a=new URL(h),b=a.searchParams.get("family");if("ipv6"===b||"ipv4"===b){let{assertHostnameSupportsFamily:d}=await c.e(3041).then(c.bind(c,53041));await d(a.hostname,"ipv6"===b?6:4)}}catch(a){if(j)return console.warn(`[ProxyFetch] Proxy family pre-check failed (${(0,g.OK)(h)}); using a direct connection for this request.`),w.run(null,b);throw a.code=a.code||"PROXY_FAMILY_UNAVAILABLE",a.statusCode=a.statusCode||503,a}return w.run(f,async()=>{if(h&&f!==e&&console.log(`[ProxyFetch] Applied request proxy context: ${(0,g.OK)(h)}`),f){let a=q.getStore();a&&(a.proxy=f)}return b()})}async function A(a,b={},c={}){let d;if(b?.dispatcher)return(c.undiciFetch??f.fetch)(a,b);let e=y(a);try{d=x(e)}catch(b){let a=b instanceof Error?b.message:String(b);throw console.error(`[ProxyFetch] Proxy configuration error: ${a}`),b}let{source:j,proxyUrl:k}=d;if(!k){var l,m;if("true"===process.env.ENABLE_TLS_FINGERPRINT&&h.A.available)try{let a=p.getStore();return a&&(a.used=!0),await h.A.fetch(e,{...b,headers:b.headers,signal:b.signal??void 0})}catch(c){let a=c instanceof Error?c.message:String(c);console.warn(`[ProxyFetch] TLS fingerprint failed, falling back to native fetch: ${a}`);let b=p.getStore();b&&(b.used=!1)}let d=(l=a,!!(null!=(m=b.body)&&"object"==typeof m&&("function"==typeof m.getReader||"function"==typeof m.stream)||"u">typeof Request&&l instanceof Request&&(l.bodyUsed||null!==l.body))||!1),k=d?1:2,n=c.undiciFetch??f.fetch,q=c.nativeFetch??v,s=null;for(let c=0;c<k;c++)try{return await n(a,{...b,dispatcher:0===c?(0,g.DJ)():(0,g.Sn)()})}catch(l){let f=l instanceof Error?l.message:String(l);if(f.includes("onRequestStart"))throw console.error(`[ProxyFetch] Fatal version mismatch: Dispatcher (v8) vs Fetch (v6/native). Hardware upgrade or SOCKS5 config isolation required. Error: ${f}`),l;let h=l?.code;if(f.includes("fetch failed")||"ECONNREFUSED"===h||f.includes("ECONNREFUSED")||"string"==typeof h&&h.startsWith("UND_ERR")||f.includes("UND_ERR")){if(0===c&&k>1){s=l,await new Promise(a=>setTimeout(a,25+50*Math.random()));continue}if(d){let a=`dispatcher=[${r(l)}] native=[skipped: non-replayable request body]`;throw console.warn(`[ProxyFetch] skipping native fetch fallback for non-replayable body: ${a}`),l instanceof Error&&(l.proxyFetchDetail=a),l}if("direct"===j&&(0,i.wX)("PROXY_AUTO_SELECT_ENABLED")){let c="";try{c=new URL(e).hostname}catch{}if(c){let d=await o(c,e);if(d)try{let c=(0,g.I_)(d);return await n(a,{...b,dispatcher:c})}catch{}}}console.warn(`[ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): ${r(l)}`);try{return await q(a,b)}catch(b){let a=`dispatcher=[${r(l)}] native=[${r(b)}]`;throw console.warn(`[ProxyFetch] native fetch fallback ALSO failed: ${a}`),b instanceof Error&&(b.proxyFetchDetail=a),b}}throw l}throw s}let n=w.getStore();if(n&&"object"==typeof n&&(0,g.g4)(n.type)){if(!n.relayAuth){let a="vercel"===n.type?"Vercel relay":`${n.type||"Edge"} relay`;throw Error(`${a} configuration error: missing relayAuth`)}let c=y(a),d=(0,g.R4)(c,n.relayAuth),e=new Headers(b?.headers);for(let[a,b]of Object.entries(d))e.set(a,b);let f=(0,g.OK)(n.host?`https://${n.host}`:"");return"true"===process.env.OMNIROUTE_PROXY_FETCH_DEBUG&&console.debug(`[ProxyFetch] Routing via ${n.type||"edge"} relay: ${f}`),await v(`https://${n.host}`,{...b,headers:e,duplex:"half"})}try{let d=(0,g.I_)(k),e=c.undiciFetch??f.fetch;return await e(a,{...b,dispatcher:d})}catch(b){let a=b instanceof Error?b.message:String(b);throw console.error(`[ProxyFetch] Proxy request failed (${j}, fail-closed): ${a}`),b}}async function B(a,b={},c={}){return A(a,b,c)}async function C(a,b={},c=null){return B(a,b)}s||u.isPatched||(globalThis.fetch=A,u.isPatched=!0)}};
1
+ exports.id=3617,exports.ids=[3617],exports.modules={8590:(a,b,c)=>{"use strict";c.d(b,{$B:()=>U,Bc:()=>s,I9:()=>J,Ib:()=>v,Og:()=>n,Ql:()=>M,iD:()=>S,jR:()=>P,jT:()=>R,oD:()=>l,qZ:()=>X});var d=c(16698),e=c(61408),f=c(86522),g=c(77598),h=c(95538),i=c(57843),j=c(54444),k=c(44418);let l=3e5,m={codex:3e5,openai:3e5,claude:3e5,"gitlab-duo":3e5,kiro:3e5,"kimi-coding":3e5,qwen:3e5,iflow:864e5,antigravity:9e5,agy:9e5};function n(a,b){let c=b?.refreshLeadMs;return"number"==typeof c&&Number.isFinite(c)&&c>0?c:m[a]??l}let o=new Map,p=new Map,q=new Map,r=new d.AsyncLocalStorage;function s(a,b){return a?r.run(a,b):b()}let t=new d.AsyncLocalStorage,u={skipped:0,persisted:0};function v(a,b){return a?t.run(a,b):b()}async function w(a){let b,c=t.getStore();if(!c||!c.expectedRefreshToken)return!1;try{b=await c.reread()}catch{return!1}return(0,i.Jv)(c.expectedRefreshToken,b)?(u.skipped++,a?.warn?.("TOKEN_REFRESH","CAS guard: skipping persist — a concurrent writer already rotated the refresh_token (#4038)"),!0):(u.persisted++,!1)}function x(a){let b=new URLSearchParams;for(let[c,d]of Object.entries(a))"string"==typeof d&&d.length>0&&b.set(c,d);return b}function y(a,b){let c=(0,g.pbkdf2Sync)(b,"omniroute-token-cache",1e3,32,"sha256").toString("hex");return`${a}:${c}`}let z=new Set(["invalid_grant","invalid_request","refresh_token_reused","invalid_token","expired_token","unauthorized_client","access_denied"]);function A(a,b=0){if(null==a||b>6)return null;if("string"==typeof a){let c=a.trim();if(!c)return null;if(z.has(c))return c;if("{"===c[0]||"["===c[0]||'"'===c[0])try{let a=A(JSON.parse(c),b+1);if(a)return a}catch{}let d=c.match(/"error(?:_code)?"\s*:\s*"([a-z_]+)"/i);return d&&z.has(d[1])?d[1]:null}return"object"==typeof a?A(a.error,b+1)??A(a.code,b+1)??A(a.error_code,b+1):null}async function B(a){let b=await a.text().catch(()=>""),c=b;try{c=JSON.parse(b)}catch{}let d=A(c)??A(b);return{rawText:b,code:d}}async function C(a,b,c,d,f=null){let g=e.xq[a],i=g?.refreshUrl||g?.tokenUrl;if(!g||!i)return d?.warn?.("TOKEN_REFRESH",`No refresh endpoint configured for provider: ${a}`),null;if(!b)return d?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null;try{let c=new URLSearchParams({grant_type:"refresh_token",refresh_token:b});g.clientId&&c.set("client_id",g.clientId),g.clientSecret&&c.set("client_secret",g.clientSecret);let e=await (0,h.jf)(f,()=>fetch(i,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:c}));if(!e.ok){let b=await e.text();d?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:e.status,error:b});let c=A(b);if("invalid_grant"===c||"invalid_request"===c)return{error:"unrecoverable_refresh_error",code:c};return null}let j=await e.json();return d?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!j.access_token,hasNewRefreshToken:!!j.refresh_token,expiresIn:j.expires_in}),{accessToken:j.access_token,refreshToken:j.refresh_token||b,expiresIn:j.expires_in}}catch(b){return d?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}}async function D(a,b,c,d=null){if(!a)return c?.warn?.("TOKEN_REFRESH","No refresh token stored for Windsurf — token may be a long-lived API key"),null;if("import"===(b?.authMethod||"import"))return c?.debug?.("TOKEN_REFRESH","Windsurf import token is long-lived — no refresh needed"),null;let e=j.e.firebaseApiKey||"";if(!e)return c?.warn?.("TOKEN_REFRESH","Windsurf Firebase API key unavailable — skipping Firebase token refresh"),null;let f=`https://securetoken.googleapis.com/v1/token?key=${e}`;try{let b=await (0,h.jf)(d,()=>fetch(f,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:x({grant_type:"refresh_token",refresh_token:a})}));if(!b.ok){let a=await b.text();c?.error?.("TOKEN_REFRESH","Failed to refresh Windsurf Firebase token",{status:b.status,error:a.slice(0,200)});try{let b=JSON.parse(a),d="string"==typeof b?.error?.message?b.error.message:"string"==typeof b?.error?b.error:null;if("string"==typeof d&&(d.includes("USER_DISABLED")||d.includes("TOKEN_EXPIRED")||d.includes("INVALID_REFRESH_TOKEN")||d.includes("USER_NOT_FOUND")))return c?.error?.("TOKEN_REFRESH","Windsurf Firebase token is permanently invalid. Re-authentication required.",{fbCode:d}),{error:"unrecoverable_refresh_error",code:d}}catch{}return null}let e=await b.json(),g=parseInt(e.expires_in??"3600",10);return c?.info?.("TOKEN_REFRESH","Successfully refreshed Windsurf Firebase token",{expiresIn:g,hasNewIdToken:!!e.id_token}),{accessToken:e.id_token,refreshToken:e.refresh_token||a,expiresIn:g}}catch(a){return c?.error?.("TOKEN_REFRESH",`Network error refreshing Windsurf token: ${a instanceof Error?a.message:String(a)}`),null}}async function E(a,b,d=null){if(!a)return null;let{CODEBUDDY_CN_CONFIG:e}=await Promise.resolve().then(c.bind(c,54444));try{let c=await (0,h.jf)(d,()=>fetch(e.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":e.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"}));if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy CN token",{status:c.status,error:a}),null}let f=await c.json();if(f?.code!==0||!f?.data?.accessToken)return b?.error?.("TOKEN_REFRESH","CodeBuddy CN token refresh returned no token",{code:f?.code,msg:f?.msg}),null;return b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy CN token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing CodeBuddy CN token: ${a?.message}`),null}}async function F(a,b,c=null){let d=e.xq.cline?.refreshUrl;if(!d)return b?.warn?.("TOKEN_REFRESH","No refresh URL configured for Cline"),null;try{let e=await (0,h.jf)(c,()=>fetch(d,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a,grantType:"refresh_token",clientType:"extension"})}));if(!e.ok){let a=await e.text();b?.error?.("TOKEN_REFRESH","Failed to refresh Cline token",{status:e.status,error:a});let c=A(a);if("invalid_grant"===c||"invalid_request"===c)return{error:"unrecoverable_refresh_error",code:c};return null}let f=await e.json(),g=f?.data||f,i=g?.expiresAt,j=i?Math.max(1,Math.floor((new Date(i).getTime()-Date.now())/1e3)):void 0;return b?.info?.("TOKEN_REFRESH","Successfully refreshed Cline token",{hasNewAccessToken:!!g?.accessToken,hasNewRefreshToken:!!g?.refreshToken,expiresIn:j}),{accessToken:g?.accessToken,refreshToken:g?.refreshToken||a,expiresIn:j}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Cline token: ${a.message}`),null}}async function G(a,b,c,d=null){let f=e.xq["kimi-coding"]?.refreshUrl||e.xq["kimi-coding"]?.tokenUrl;if(!f)return c?.warn?.("TOKEN_REFRESH","No refresh URL configured for Kimi Coding"),null;let i=b?.deviceId||(0,g.pbkdf2Sync)(a,"kimi-device-id",1e3,16,"sha256").toString("hex"),j=process.env.KIMI_CLI_VERSION||"1.36.0",k="u">typeof process?process.platform:"unknown",l=[k,"u">typeof process?process.arch:"unknown"].filter(Boolean).join(" ");try{let g=new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:e.xq["kimi-coding"]?.clientId||""}),m=await (0,h.jf)(d,()=>fetch(f,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","X-Msh-Platform":"kimi_cli","X-Msh-Version":j,"X-Msh-Device-Model":b?.deviceModel||l,"X-Msh-Device-Id":i,"X-Msh-Device-Name":b?.deviceName||k,"X-Msh-Os-Version":b?.osVersion||k},body:g}));if(!m.ok){let a=await m.text();try{let b=JSON.parse(a),d=b?.error;if("invalid_grant"===d||"invalid_request"===d)return c?.error?.("TOKEN_REFRESH","Kimi Coding refresh token invalid. Re-authentication required.",{errorCode:d}),{error:"unrecoverable_refresh_error",code:d}}catch{}return c?.error?.("TOKEN_REFRESH","Failed to refresh Kimi Coding token",{status:m.status,error:a.slice(0,200)}),null}let n=await m.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kimi Coding token",{hasNewAccessToken:!!n.access_token,hasNewRefreshToken:!!n.refresh_token,expiresIn:n.expires_in}),{accessToken:n.access_token,refreshToken:n.refresh_token||a,expiresIn:n.expires_in,tokenType:n.token_type,scope:n.scope}}catch(a){return c?.error?.("TOKEN_REFRESH",`Network error refreshing Kimi Coding token: ${a instanceof Error?a.message:String(a)}`),null}}async function H(a,b,c,d=null){if(!a)return c?.warn?.("TOKEN_REFRESH","No refresh token for GitLab Duo"),null;let f=(0,k.L_)(b),g=(0,k.Tg)(f).tokenUrl,i=b?.clientId||e.xq["gitlab-duo"]?.clientId||process.env.GITLAB_DUO_OAUTH_CLIENT_ID||process.env.GITLAB_OAUTH_CLIENT_ID||"";try{let b=await (0,h.jf)(d,()=>fetch(g,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:x({grant_type:"refresh_token",refresh_token:a,client_id:i})}));if(!b.ok){let a=await b.text();try{let b=JSON.parse(a).error;if("invalid_grant"===b||"invalid_request"===b)return c?.error?.("TOKEN_REFRESH","GitLab Duo refresh token invalid. Re-authentication required.",{errorCode:b}),{error:"unrecoverable_refresh_error",code:b}}catch{}return c?.error?.("TOKEN_REFRESH","Failed to refresh GitLab Duo token",{status:b.status,error:a.slice(0,200)}),null}let e=await b.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed GitLab Duo token",{hasNewAccessToken:!!e.access_token,hasNewRefreshToken:!!e.refresh_token,expiresIn:e.expires_in}),{accessToken:e.access_token,refreshToken:e.refresh_token||a,expiresIn:e.expires_in}}catch(a){return c?.error?.("TOKEN_REFRESH",`Network error refreshing GitLab Duo token: ${a instanceof Error?a.message:String(a)}`),null}}async function I(a,b,c=null){try{let d=x({grant_type:"refresh_token",refresh_token:a,client_id:e.xq.claude.clientId}),f=await (0,h.jf)(c,()=>fetch(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","anthropic-beta":"oauth-2025-04-20"},body:d.toString()}));if(!f.ok){let{rawText:a,code:c}=await B(f);if(b?.error?.("TOKEN_REFRESH","Failed to refresh Claude OAuth token",{status:f.status,error:a.slice(0,300)}),"invalid_grant"===c||"invalid_request"===c)return{error:"unrecoverable_refresh_error",code:c};return null}let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}}async function J(a,b,c,d,f=null){let g=await (0,h.jf)(f,()=>fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:x({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})}));if(!g.ok){let a=await g.text();d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:g.status,error:a.slice(0,200)});try{let b=JSON.parse(a);if("invalid_grant"===b.error)return d?.error?.("TOKEN_REFRESH","Google refresh token invalid. Re-authentication required.",{provider:"google"}),{error:"unrecoverable_refresh_error",code:"invalid_grant"}}catch{}return null}let i=await g.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!i.access_token,hasNewRefreshToken:!!i.refresh_token,expiresIn:i.expires_in}),{accessToken:i.access_token,refreshToken:i.refresh_token||a,expiresIn:i.expires_in}}async function K(a,b,c=null){let d=e.NA.qwen.token;try{let f=await (0,h.jf)(c,()=>fetch(d,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:x({grant_type:"refresh_token",refresh_token:a,client_id:e.xq.qwen.clientId})}));if(200===f.status){let c=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await f.text().catch(()=>""),c=null;try{let b=JSON.parse(a);c=b?.error}catch{}if("invalid_request"===c||"invalid_grant"===c)return b?.error?.("TOKEN_REFRESH","Qwen refresh token is invalid or expired. Re-authentication required.",{status:f.status,errorCode:c}),{error:"unrecoverable_refresh_error",code:c};b?.warn?.("TOKEN_REFRESH","Error with Qwen endpoint",{status:f.status,error:a})}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null}async function L(a,b,c=null){try{let d=await (0,h.jf)(c,()=>fetch(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:x({grant_type:"refresh_token",refresh_token:a,client_id:e.xq.codex.clientId})}));if(!d.ok){let a=await d.text(),c=null;try{let b=JSON.parse(a);c=b?.error?.code||("string"==typeof b?.error?b.error:null)}catch{}if("refresh_token_reused"===c||"invalid_grant"===c||"token_expired"===c||"invalid_token"===c)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-authentication required.",{status:d.status,errorCode:c}),{error:"unrecoverable_refresh_error",code:c};if(401===d.status){let a=c||"unauthorized";return b?.error?.("TOKEN_REFRESH","Codex OAuth token endpoint returned 401. Re-authentication required.",{status:d.status,errorCode:a}),{error:"unrecoverable_refresh_error",code:a}}return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:d.status,error:a}),null}let f=await d.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}}async function M(a,b,c,d=null){try{let f=b?.authMethod,g=b?.clientId,i=b?.clientSecret,j=b?.region;if(g&&i&&"imported"!==f){let b=`https://oidc.${j||"us-east-1"}.amazonaws.com/token`,e=await (0,h.jf)(d,()=>fetch(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:g,clientSecret:i,refreshToken:a,grantType:"refresh_token"})}));if(!e.ok){let f,g=await e.text();try{let a=JSON.parse(g);f=a.__type||a.error}catch{}if("InvalidGrantException"===f||"ExpiredTokenException"===f||"invalid_grant"===f)return c?.error?.("TOKEN_REFRESH","Kiro AWS refresh token expired/invalid. Re-authentication required.",{awsErrorType:f}),{error:"unrecoverable_refresh_error",code:f};c?.warn?.("TOKEN_REFRESH","Kiro OIDC refresh failed, attempting client re-registration...",{status:e.status,error:g.slice(0,200)});try{let e=`https://oidc.${j||"us-east-1"}.amazonaws.com/client/register`,f=await (0,h.jf)(d,()=>fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientName:"kiro-oauth-client",clientType:"public",scopes:["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations"],grantTypes:["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],issuerUrl:"https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6"})}));if(f.ok){let e=await f.json(),g=await (0,h.jf)(d,()=>fetch(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:a,grantType:"refresh_token"})}));if(g.ok){let b=await g.json();return c?.info?.("TOKEN_REFRESH","Kiro refresh recovered via client re-registration",{hasNewAccessToken:!!b.accessToken,expiresIn:b.expiresIn}),{accessToken:b.accessToken,refreshToken:b.refreshToken||a,expiresIn:b.expiresIn,_newClientId:e.clientId,_newClientSecret:e.clientSecret,_newClientSecretExpiresAt:e.clientSecretExpiresAt}}}}catch(a){c?.warn?.("TOKEN_REFRESH","Kiro client re-registration fallback failed",{error:String(a)})}return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:e.status,error:g.slice(0,200)}),null}let f=await e.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!f.accessToken,expiresIn:f.expiresIn}),{accessToken:f.accessToken,refreshToken:f.refreshToken||a,expiresIn:f.expiresIn}}let k=e.xq.kiro.tokenUrl;if(!k)return c?.error?.("TOKEN_REFRESH","Missing Kiro token endpoint"),null;let l=await (0,h.jf)(d,()=>fetch(k,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a})}));if(!l.ok){let a=await l.text();try{let b=JSON.parse(a),d=b.__type||b.error;if("InvalidGrantException"===d||"ExpiredTokenException"===d||"invalid_grant"===d)return c?.error?.("TOKEN_REFRESH","Kiro social refresh token expired/invalid. Re-authentication required.",{awsErrorType:d}),{error:"unrecoverable_refresh_error",code:d}}catch{}return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:l.status,error:a.slice(0,200)}),null}let m=await l.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!m.accessToken,expiresIn:m.expiresIn}),{accessToken:m.accessToken,refreshToken:m.refreshToken||a,expiresIn:m.expiresIn}}catch(a){return c?.error?.("TOKEN_REFRESH",`Network error refreshing Kiro token: ${a.message}`),null}}async function N(a,b,c=null){if(!e.NA.qoder.token||!e.xq.qoder.clientId||!e.xq.qoder.clientSecret)return b?.warn?.("TOKEN_REFRESH","Qoder OAuth refresh skipped: browser OAuth is not configured in this environment"),null;let d=btoa(`${e.xq.qoder.clientId}:${e.xq.qoder.clientSecret}`),f=await (0,h.jf)(c,()=>fetch(e.NA.qoder.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${d}`},body:x({grant_type:"refresh_token",refresh_token:a,client_id:e.xq.qoder.clientId,client_secret:e.xq.qoder.clientSecret})}));if(!f.ok){let a=await f.text();b?.error?.("TOKEN_REFRESH","Failed to refresh Qoder token",{status:f.status,error:a});let c=A(a);return"invalid_grant"===c||"invalid_request"===c?{error:"unrecoverable_refresh_error",code:c}:null}let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qoder token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}async function O(a,b,c=null){let d=await (0,h.jf)(c,()=>fetch(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:x({grant_type:"refresh_token",refresh_token:a,client_id:e.xq.github.clientId,client_secret:e.xq.github.clientSecret})}));if(!d.ok){let a=await d.text();b?.error?.("TOKEN_REFRESH","Failed to refresh GitHub token",{status:d.status,error:a});let c=A(a);return"invalid_grant"===c||"invalid_request"===c?{error:"unrecoverable_refresh_error",code:c}:null}let f=await d.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}async function P(a,b,c=null){try{let d=await (0,h.jf)(c,()=>fetch("https://api.github.com/copilot_internal/v2/token",{headers:(0,f.H_)(`token ${a}`)}));if(!d.ok){let a=await d.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:d.status,error:a}),null}let e=await d.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!e.token,expiresAt:e.expires_at}),{token:e.token,expiresAt:e.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}}async function Q(a,b,c,d=null){switch(a){case"gemini":case"antigravity":case"agy":return await J(b.refreshToken,e.xq[a].clientId,e.xq[a].clientSecret,c,d);case"claude":return await I(b.refreshToken,c,d);case"codex":return await L(b.refreshToken,c,d);case"qwen":return await K(b.refreshToken,c,d);case"qoder":return await N(b.refreshToken,c,d);case"github":return await O(b.refreshToken,c,d);case"kiro":case"amazon-q":return await M(b.refreshToken,b.providerSpecificData,c,d);case"cline":return await F(b.refreshToken,c,d);case"kimi-coding":return await G(b.refreshToken,b.providerSpecificData,c,d);case"gitlab-duo":return await H(b.refreshToken,b.providerSpecificData,c,d);case"windsurf":case"devin-cli":return await D(b.refreshToken,b.providerSpecificData,c,d);case"codebuddy-cn":return await E(b.refreshToken,c,d);default:return C(a,b.refreshToken,b,c,d)}}function R(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}async function S(a,b,d,e=null,f){if(!b||!b.refreshToken||"string"!=typeof b.refreshToken)return d?.warn?.("TOKEN_REFRESH",`No valid refresh token available for provider: ${a}`),null;let g=f??r.getStore(),h=b.connectionId;if(h&&"string"==typeof h){let f=p.get(h);if(f)return f.waiters++,d?.info?.("TOKEN_REFRESH","Concurrent refresh detected — sharing in-flight refresh",{provider:a,connectionId:h,waiters:f.waiters}),f.promise;let i={promise:null,waiters:0};return i.promise=(async()=>{let f=await T(a,b,d,e);if(f?.accessToken&&g){if(await w(d))return f;try{await g(f)}catch(e){let{sanitizeErrorMessage:b}=await c.e(3659).then(c.bind(c,43659));throw d?.error?.("TOKEN_REFRESH",`onPersist callback failed for ${a}/${h}: ${b(e instanceof Error?e:Error(String(e)))}`),e}}return f})().finally(()=>{p.delete(h)}),p.set(h,i),i.promise}let j=y(a,b.refreshToken);if(o.has(j))return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),o.get(j);let k=(0,i.Aj)(a,()=>Q(a,b,d,e)).then(async b=>{if(b?.accessToken&&g){if(await w(d))return b;try{await g(b)}catch(e){let{sanitizeErrorMessage:b}=await c.e(3659).then(c.bind(c,43659));throw d?.error?.("TOKEN_REFRESH",`Layer 2 onPersist callback failed for ${a}: ${b(e instanceof Error?e:Error(String(e)))}`),e}}else b?.accessToken&&!g&&d?.warn?.("TOKEN_REFRESH",`Layer 2 refresh succeeded for ${a} without onPersist — DB row will not be updated with rotated token. Callers should pass connectionId for Layer 1 atomicity.`);return b}).finally(()=>{o.delete(j)});return o.set(j,k),k}async function T(a,b,d,e){let f=function(a,b){!function(a=Date.now()){if(0!==q.size)for(let[b,c]of q.entries())c.expiresAt<=a&&q.delete(b)}();let c=y(a,b),d=q.get(c);if(d)return d.expiresAt<=Date.now()?void q.delete(c):d}(a,b.refreshToken);if(f)return d?.info?.("TOKEN_REFRESH",`Rotation map hit for ${a}. Returning cached rotated tokens (avoids family-revoke).`),f.result;if(b.connectionId)try{let{getProviderConnectionById:e}=await c.e(7094).then(c.bind(c,87094)),f=await e(b.connectionId);if(f&&f.refreshToken){let c=Date.now(),e=f.expiresAt?new Date(f.expiresAt).getTime():0;if(f.refreshToken!==b.refreshToken){if(d?.info?.("TOKEN_REFRESH",`Stale token detected in memory for ${a}. Using refreshed token from DB.`),e>c+6e4)return d?.info?.("TOKEN_REFRESH","DB token is still valid. Skipping OAuth refresh."),{accessToken:f.accessToken,refreshToken:f.refreshToken,expiresAt:f.expiresAt};b.refreshToken=f.refreshToken,b.accessToken=f.accessToken}}}catch(a){d?.warn?.("TOKEN_REFRESH",`Failed to check DB for stale token: ${a instanceof Error?a.message:String(a)}`)}let g=b.refreshToken,h=await (0,i.Aj)(a,()=>Q(a,b,d,e));return h&&"object"==typeof h&&!("error"in h)&&h.accessToken&&h.refreshToken&&function(a,b,c){if(!b||!c.refreshToken||b===c.refreshToken)return;let d=y(a,b);q.set(d,{result:c,expiresAt:Date.now()+6e4})}(a,g,h),h}let U=S,V={};async function W(a,b){return await new Promise((c,d)=>{let e=setTimeout(()=>c(null),b);"object"==typeof e&&"unref"in e&&e.unref?.(),a().then(a=>{clearTimeout(e),c(a)},a=>{clearTimeout(e),d(a)})})}async function X(a,b=3,c=null,d="unknown"){let e;if((e=V[d])&&e.blockedUntil&&(e.blockedUntil>Date.now()||(delete V[d],0)))return c?.warn?.("TOKEN_REFRESH",`⚡ Circuit breaker active for ${d}, skipping refresh`),null;for(let e=0;e<b;e++){if(e>0){let a=1e3*e;c?.debug?.("TOKEN_REFRESH",`Retry ${e}/${b} after ${a}ms`),await new Promise(b=>setTimeout(b,a))}try{let b=await W(a,3e4);if(R(b))return c?.warn?.("TOKEN_REFRESH",`Unrecoverable refresh error for ${d}: ${b.error} — skipping retries`),b;if(b)return V[d]&&delete V[d],b}catch(a){c?.warn?.("TOKEN_REFRESH",`Attempt ${e+1}/${b} failed: ${a.message}`)}}return!function(a,b=null){V[a]||(V[a]={failures:0,blockedUntil:0}),V[a].failures++,V[a].failures>=5&&(V[a].blockedUntil=Date.now()+18e5,b?.error?.("TOKEN_REFRESH",`🔴 Circuit breaker tripped for ${a}: 5 consecutive failures. Blocked for 30min. Provider needs re-authentication.`))}(d,c),c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed for ${d}`),null}},20927:(a,b,c)=>{"use strict";var d=c(75919),e=c.n(d),f=c(28064);e()&&!e().markAsUncloneable&&(e().markAsUncloneable=function(a){if(e().markAsUntransferable)try{e().markAsUntransferable(a)}catch{}}),void 0===Promise.withResolvers&&(Promise.withResolvers=function(){let a,b;return{promise:new Promise((c,d)=>{a=c,b=d}),resolve:a,reject:b}}),void 0===globalThis.WebSocket&&(globalThis.WebSocket=f.WebSocket)},39727:()=>{},47990:()=>{},54444:(a,b,c)=>{"use strict";c.d(b,{e:()=>d});let d=null},57843:(a,b,c)=>{"use strict";c.d(b,{Aj:()=>f,Jv:()=>g});let d={codex:"openai-auth0",openai:"openai-auth0",claude:"anthropic-oauth","gitlab-duo":"gitlab-duo",kiro:"kiro","kimi-coding":"kimi-coding",qwen:"qwen"},e=new Map;async function f(a,b){let c,f=d[a]??null;if(!f)return b();let g=e.get(f)??Promise.resolve(),h=new Promise(a=>{c=a}),i=g.then(()=>h);e.set(f,i),await g.catch(()=>{});try{return await b()}finally{if(e.get(f)!==i){let a=function(){let a=process.env.CODEX_REFRESH_SPACING_MS;if(void 0===a||""===a)return 2e3;let b=Number(a);return Number.isFinite(b)&&b>=0?b:2e3}();a>0&&await new Promise(b=>setTimeout(b,a))}c(),e.get(f)===i&&e.delete(f)}}function g(a,b){return"string"==typeof a&&a.length>0&&"string"==typeof b&&b.length>0&&b!==a}},58643:(a,b,c)=>{"use strict";let d;c.d(b,{A:()=>g});var e=c(99765);try{let a=c(3725);d="function"==typeof a.createSession?a.createSession:null}catch{d=null}class f{constructor(){this.session=null,this.failureCount=0,this.maxFailures=3,this.baseCooldownMs=3e4,this.cooldownMs=3e4,this.cooldownMultiplier=1,this.MAX_COOLDOWN_MS=6e5,this.circuitOpenUntil=0,this.circuitTripped=!1,this._libraryAvailable=!!d}get available(){return!!this._libraryAvailable&&(!this.circuitTripped||Date.now()>=this.circuitOpenUntil)}recordFailure(){this.failureCount++,this.failureCount>=this.maxFailures&&(this.circuitOpenUntil=Date.now()+this.cooldownMs,this.circuitTripped=!0,this.session&&(Promise.resolve(this.session.close()).catch(()=>{}),this.session=null),console.warn(`[TlsClient] Circuit opened after ${this.failureCount} consecutive failures, cooling down for ${this.cooldownMs}ms`),this.escalateCooldown())}recordSuccess(){this.failureCount=0,this.circuitTripped&&(this.cooldownMultiplier=1,this.cooldownMs=this.baseCooldownMs,console.log("[TlsClient] Circuit closed (success after cooldown)"),this.circuitTripped=!1)}escalateCooldown(){this.cooldownMultiplier=Math.min(2*this.cooldownMultiplier,20),this.cooldownMs=Math.min(this.baseCooldownMs*this.cooldownMultiplier,this.MAX_COOLDOWN_MS)}checkCircuit(){return!this.circuitTripped||Date.now()>=this.circuitOpenUntil&&(console.log("[TlsClient] Half-open: retrying after cooldown"),!0)}async getSession(){if(!this.checkCircuit()||!this.available)return null;if(this.session)return this.session;let a=d;if(!a)return null;let b=process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy||void 0,c={browser:"chrome_124",os:"macos"};return b&&(c.proxy=b,console.log(`[TlsClient] Using proxy: ${b}`)),this.session=await a(c),console.log("[TlsClient] Session created (Chrome 124 TLS fingerprint)"),this.session}async fetch(a,b={}){if(!this.checkCircuit())throw Error("wreq-js circuit open — skipping TLS request");try{let c=await this.getSession();if(!c)throw Error("wreq-js not available");let{timeoutMs:d}=(0,e.uw)(process.env,a=>{console.warn(`[TlsClient] ${a}`)}),f={method:(b.method||"GET").toUpperCase(),headers:function(a){if(!a)return;if(a instanceof Headers)return Object.fromEntries(a.entries());if(Array.isArray(a))return Object.fromEntries(a.map(([a,b])=>[a,String(b)]));let b={};for(let[c,d]of Object.entries(a))"string"==typeof d&&(b[c]=d);return b}(b.headers),body:b.body,redirect:"manual"===b.redirect?"manual":"follow",timeout:d};b.signal&&(f.signal=b.signal);let g=await c.fetch(a,f);return this.recordSuccess(),g}catch(a){throw a instanceof Error&&("AbortError"===a.name||a.message.includes("aborted"))||this.recordFailure(),a}}async exit(){this.session&&(await this.session.close(),this.session=null)}resetCircuit(){this.failureCount=0,this.circuitTripped=!1,this.circuitOpenUntil=0}getCircuitState(){return{available:this.available,circuitTripped:this.circuitTripped,failureCount:this.failureCount,circuitOpenUntil:this.circuitOpenUntil,coolDownRemainingMs:this.circuitOpenUntil>0?Math.max(0,this.circuitOpenUntil-Date.now()):0}}}let g=new f},68404:(a,b,c)=>{"use strict";c.d(b,{KS:()=>d,wX:()=>e});let d=()=>!1,e=()=>!1},69889:(a,b,c)=>{"use strict";c.d(b,{Bm:()=>e,UL:()=>g,wI:()=>f});var d=c(77030);function e(a){return"string"!=typeof a?"":a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a}function f(a){let b=e(a),c=(0,d.isIP)(b);return 0===c?null:c}function g(a){return"ipv4"===a||"ipv6"===a?a:"auto"}},85376:(a,b,c)=>{"use strict";c.d(b,{R4:()=>y,I_:()=>A,DJ:()=>q,Sn:()=>r,g4:()=>o,zP:()=>x,HN:()=>z,OK:()=>w}),c(20927);var d=c(47774),e=c(20406),f=c(99765),g=c(69889),h=c(13092);let i=Symbol.for("omniroute.proxyDispatcher.cache"),j=Symbol.for("omniroute.proxyDispatcher.default"),k=Symbol.for("omniroute.proxyDispatcher.retry");class l{constructor(a){this.nextIndex=0,this.dispatchers=a}dispatch(a,b){let c=this.dispatchers[this.nextIndex%this.dispatchers.length];return this.nextIndex=(this.nextIndex+1)%this.dispatchers.length,c.dispatch(a,b)}close(a){let b=Promise.all(this.dispatchers.map(a=>a.close())).then(()=>void 0);return a?void b.then(a):b}destroy(a,b){let c="function"==typeof a?a:b,d="function"==typeof a?null:a??null,e=Promise.all(this.dispatchers.map(a=>a.destroy(d))).then(()=>void 0);return c?void e.then(c):e}}let m=new Set(["http:","https:","socks5:"]),n=new Set(["vercel","deno","cloudflare"]);function o(a){return"string"==typeof a&&n.has(a)}function p(){let a=(0,f.pf)(process.env,a=>{console.warn(`[ProxyDispatcher] ${a}`)});return{headersTimeout:a.fetchHeadersTimeoutMs,bodyTimeout:a.fetchBodyTimeoutMs,connectTimeout:a.fetchConnectTimeoutMs,keepAliveTimeout:a.fetchKeepAliveTimeoutMs,keepAliveMaxTimeout:a.fetchKeepAliveTimeoutMs}}function q(){let a=globalThis[j];if(!a){var b,c;let e;c=function(a=process.env){let b=a.OMNIROUTE_DIRECT_DISPATCHER_CONNECTIONS;if(null==b||""===b.trim())return 32;let c=Number(b);return!Number.isFinite(c)||c<1?(console.warn(`[ProxyDispatcher] Invalid OMNIROUTE_DIRECT_DISPATCHER_CONNECTIONS="${b}". Using default 32.`),32):Math.min(Math.floor(c),256)}(),e={...p(),connections:1,pipelining:0},b=a=new l(Array.from({length:c},()=>new d.Agent(e))),globalThis[j]=b}return a}function r(){let a=globalThis[k];if(!a){var b;b=a=new d.Agent({...p(),keepAliveTimeout:1,keepAliveMaxTimeout:1,pipelining:0}),globalThis[k]=b}return a}function s(a){try{let b=a.indexOf("://");if(-1===b)return null;let c=b+3,d=a.indexOf("/",c),e=-1===d?a.slice(c):a.slice(c,d),f=e.lastIndexOf(":"),g=e.lastIndexOf("@");if(-1!==f&&f>g){let a=e.slice(f+1);if(/^\d+$/.test(a)){let b=Number(a);if(Number.isInteger(b)&&b>=1&&b<=65535)return String(b)}}}catch{}return null}function t(a){return"https:"===a||"wss:"===a?"443":"socks5:"===a?"1080":"8080"}function u(a,b){if(!a)return t(b);let c=Number(a);if(!Number.isInteger(c)||c<1||c>65535)throw Error("[ProxyDispatcher] Invalid proxy port");return String(c)}function v(){return!["false","0","no","off"].includes((process.env.ENABLE_SOCKS5_PROXY??"").trim().toLowerCase())}function w(a){let b=s(a),c=new URL(a),d=b||c.port||t(c.protocol);return`${c.protocol}//${c.hostname}:${d}`}function x(a,b="proxy",{allowSocks5:c=v()}={}){var d;let e,f,h=a.match(/\?family=(ipv4|ipv6)$/),i=h?h[0]:"",j=i?a.slice(0,-i.length):a,k=s(j);try{e=new URL(j)}catch{throw Error(`[ProxyDispatcher] Invalid ${b} URL`)}if(!m.has(e.protocol))throw Error(`[ProxyDispatcher] Unsupported ${b} protocol: ${e.protocol.replace(":","")}`);if("socks5:"===e.protocol&&!c)throw Error("[ProxyDispatcher] SOCKS5 proxy is disabled (remove ENABLE_SOCKS5_PROXY=false to enable — it is ON by default)");if(!e.hostname)throw Error(`[ProxyDispatcher] Invalid ${b} host`);let l=k||u(e.port,e.protocol),n=(0,g.UL)((h?h[1]:e.searchParams.get("family"))??void 0),o=(f=(d=e).username?`${d.username}${d.password?`:${d.password}`:""}@`:"",`${d.protocol}//${f}${d.hostname}:${l}`);return"auto"===n?o:`${o}?family=${n}`}function y(a,b){let c=new URL(a);return{"x-relay-target":`${c.protocol}//${c.host}`,"x-relay-path":c.pathname+c.search,"x-relay-auth":b}}function z(a,{allowSocks5:b=v()}={}){if(!a)return null;if("string"==typeof a)return x(a,"context proxy",{allowSocks5:b});if("object"!=typeof a||Array.isArray(a))throw Error("[ProxyDispatcher] Invalid context proxy config");if(!a.host)return null;let c=String(a.type||"http").toLowerCase();if(n.has(c))return a.host?`https://${a.host}`:null;let d=`${c}:`;if(!m.has(d))throw Error(`[ProxyDispatcher] Unsupported context proxy protocol: ${c}`);if("socks5:"===d&&!b)throw Error("[ProxyDispatcher] SOCKS5 proxy is disabled (remove ENABLE_SOCKS5_PROXY=false to enable — it is ON by default)");let e=u(a.port,d),f=a.username?`${encodeURIComponent(a.username)}:${a.password?encodeURIComponent(a.password):""}@`:"",h=`${c}://${f}${a.host}:${e}`,i=(0,g.UL)(a.family),j=x(h,"context proxy",{allowSocks5:b});return"auto"===i?j:`${j}?family=${i}`}function A(a){let b,c=x(a,"proxy dispatcher"),f=((b=globalThis)[i]||(b[i]=new Map),b[i]),j=function(a=process.env){return{...p(),connections:function(a=process.env){let b=a.OMNIROUTE_PROXY_DISPATCHER_CONNECTIONS;if(null==b||""===b.trim())return 32;let c=Number(b);return!Number.isFinite(c)||c<1?(console.warn(`[ProxyDispatcher] Invalid OMNIROUTE_PROXY_DISPATCHER_CONNECTIONS="${b}". Using default 32.`),32):Math.min(Math.floor(c),256)}(a),keepAliveTimeout:1,keepAliveMaxTimeout:1,pipelining:0}}(),k=f.get(c);if(k)return k;let l=new URL(c),m=function(a){let b=(0,g.UL)(a.searchParams.get("family")??void 0),c=(0,g.wI)(a.hostname);if("auto"===b)return c;let d="ipv6"===b?6:4;if(null!==c&&c!==d)throw Error(`[ProxyDispatcher] Proxy family directive ${b} contradicts ${6===c?"IPv6":"IPv4"} literal host`);return d}(l);l.searchParams.delete("family");let n=c.replace(/\?family=(ipv4|ipv6)$/,""),o=s(n)||u(l.port,l.protocol);if("socks5:"===l.protocol){let a={type:5,host:(0,g.Bm)(l.hostname),port:Number(o)};l.username&&(a.userId=decodeURIComponent(l.username)),l.password&&(a.password=decodeURIComponent(l.password)),k=null===m?(0,e.vI)(a,j):function(a,b,c={}){let{connect:e,...f}=c;return new d.Agent({...f,connect:function(a,b,c={}){let e=(0,d.buildConnector)(c),f=6===b?{family:6,autoSelectFamily:!1}:4===b?{family:4,autoSelectFamily:!1}:{};return async(b,c)=>{let{protocol:d,hostname:g,port:i,httpSocket:j}=b;try{let k=(await h.SocksClient.createConnection({command:"connect",proxy:a,timeout:function(a=process.env){let b=a.SOCKS_HANDSHAKE_TIMEOUT_MS;if(null==b||""===b.trim())return 1e4;let c=Number(b);return!Number.isFinite(c)||c<1?1e4:Math.min(Math.floor(c),12e4)}(),destination:{host:g,port:i?Number.parseInt(i,10):"http:"===d?80:443},existing_socket:j,socket_options:f})).socket;if("https:"!==d)return c(null,k.setNoDelay());return e({...b,httpSocket:k},c)}catch(a){return c(a,null)}}}(a,b,e)})}(a,m,j)}else k=new d.ProxyAgent({uri:n,...j,...null!==m?{proxyTls:{family:m,autoSelectFamily:!1}}:{}});return f.set(c,k),k}},95538:(a,b,c)=>{"use strict";let d;c.d(b,{proxyAwareFetch:()=>C,l:()=>x,jf:()=>z}),c(20927);var e=c(16698),f=c(47774),g=c(85376),h=c(58643),i=c(68404),j=c(89718);let k=new Map;function l(a){let b=a.username?`${encodeURIComponent(a.username)}:${encodeURIComponent(a.password||"")}@`:"";return`${a.type}://${b}${a.host}:${a.port}`}async function m(a){let b=new Set;try{let a=await (0,j.P)("global");a?.proxy&&b.add(l(a.proxy))}catch{}try{for(let a of(await (0,j.zU)({includeSecrets:!0})))a.host&&a.port&&b.add(l(a))}catch{}try{for(let a of(await (0,j.Bb)({limit:5})))a.host&&a.port&&b.add(l(a))}catch{}if(a)try{let c=function(a){let b,c=process.env.NO_PROXY||process.env.no_proxy;if(c){let b;try{b=new URL(a).hostname.toLowerCase()}catch{return null}if(c.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.includes("*")?RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$").test(b):b===a||b.endsWith(`.${a}`))))return null}try{b=new URL(a).protocol}catch{return null}let d="https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy;if(!d)return null;try{return(0,g.zP)(d,"environment proxy")}catch{return null}}(a);c&&b.add(c)}catch{}return Array.from(b)}async function n(a,b,c=3e3){let d=Date.now();try{let e=new AbortController,h=setTimeout(()=>e.abort(),c),i=(0,g.I_)(a);await (0,f.fetch)(b,{method:"HEAD",signal:e.signal,dispatcher:i,headers:{"User-Agent":"OmniRoute/1.0"}}),clearTimeout(h);let j=Date.now()-d;return{ok:!0,latencyMs:j}}catch{return{ok:!1,latencyMs:null}}}async function o(a,b){if(!a)return null;let c=function(a,b){try{let a=new URL(b),c=`${a.pathname||"/"}${a.search}`;return`${a.protocol}//${a.host}${c}`}catch{return a.toLowerCase()}}(a,b),d=k.get(c);if(d){if(d.expiresAt>Date.now())return d.proxyUrl||null;k.delete(c)}let e=await ((void 0)??m)(b);if(0===e.length)return null;let f=(await Promise.allSettled(e.map(async a=>{let{ok:c}=await ((void 0)??n)(a,b);return{proxyUrl:a,ok:c}}))).find(a=>"fulfilled"===a.status&&a.value.ok);if(f&&"fulfilled"===f.status){let a=f.value.proxyUrl;return k.set(c,{proxyUrl:a,expiresAt:Date.now()+3e5}),a}return k.set(c,{proxyUrl:"",expiresAt:Date.now()+3e5}),null}let p=new e.AsyncLocalStorage,q=new e.AsyncLocalStorage;function r(a){let b=[],c=new Set,d=a;for(let a=0;d&&a<5&&!c.has(d);a++){c.add(d);let a=d,e=["string"==typeof a.name&&"Error"!==a.name?a.name:null,"string"==typeof a.message?a.message.slice(0,160):null,null!=a.code?`code=${String(a.code)}`:null,null!=a.syscall?`syscall=${String(a.syscall)}`:null,null!=a.errno?`errno=${String(a.errno)}`:null,null!=a.address?`address=${String(a.address)}${null!=a.port?`:${String(a.port)}`:""}`:null].filter(Boolean).join(" ");if(e&&b.push(e),Array.isArray(a.errors))for(let c of a.errors.slice(0,4)){let a=c??{},d=[null!=a.code?`code=${String(a.code)}`:null,null!=a.syscall?`syscall=${String(a.syscall)}`:null,null!=a.address?`address=${String(a.address)}${null!=a.port?`:${String(a.port)}`:""}`:null].filter(Boolean).join(" ");d?b.push(`↳ ${d}`):"string"==typeof a.message&&b.push(`↳ ${a.message.slice(0,80)}`)}d=a.cause}return b.join(" | ")||String(a)}let s="u">typeof caches&&"object"==typeof caches,t=Symbol.for("omniroute.proxyFetch.state"),u=((d=globalThis)[t]||(d[t]={originalFetch:globalThis.fetch,proxyContext:new e.AsyncLocalStorage,isPatched:!1}),d[t]),v=u.originalFetch,w=u.proxyContext;function x(a){let b,c;try{b=new URL(a)}catch{b=null}if(b&&("localhost"===(c=b.hostname.toLowerCase().replace(/^\[/,"").replace(/\]$/,"").replace(/^::ffff:/i,""))||"0.0.0.0"===c||"127.0.0.1"===c||"::1"===c||c.endsWith(".local")||c.endsWith(".lan")||c.endsWith(".internal")||c.startsWith("192.168.")||c.startsWith("10.")||c.startsWith("127.")||c.startsWith("169.254.")||/^172\.(1[6-9]|2\d|3[0-1])\./.test(c)||/^100\.(6[4-9]|[7-9]\d|1[01]\d|12[0-7])\./.test(c)||/^f[cd][0-9a-f]*:/i.test(c)||c.startsWith("fe80:")))return{source:"direct",proxyUrl:null};let d=w.getStore();if(d)return{source:"context",proxyUrl:(0,g.HN)(d)};let e=function(a){let b;if(function(a){let b,c=process.env.NO_PROXY||process.env.no_proxy;if(!c)return!1;try{b=new URL(a)}catch{return!1}let d=b.hostname.toLowerCase(),e=b.port||("https:"===b.protocol?"443":"80");return c.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>{if("*"===a)return!0;let[b,c]=a.split(":");if(c&&c!==e||!b)return!1;if(b.includes("*")){let a=b.split("*"),c=0,e=d.startsWith(a[0]);if(e){c=a[0].length;for(let b=1;b<a.length&&e;b++){let f=a[b];if(b===a.length-1)e=""===f||d.endsWith(f)&&d.length-f.length>=c;else{let a=f?d.indexOf(f,c):c;-1===a?e=!1:c=a+f.length}}}if(e)return!0}return b.startsWith(".")?d.endsWith(b)||d===b.slice(1):d===b||d.endsWith(`.${b}`)})}(a))return null;try{b=new URL(a).protocol}catch{return null}let c="https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy;return c?(0,g.zP)(c,"environment proxy"):null}(a);return e?{source:"env",proxyUrl:e}:{source:"direct",proxyUrl:null}}function y(a){return"string"==typeof a?a:a&&"string"==typeof a.url?a.url:String(a)}async function z(a,b,d){if("function"!=typeof b)throw TypeError("runWithProxyContext requires a callback function");let e=w.getStore(),f=a||e||null,h=f?(0,g.HN)(f):null,j=d?.directFallbackOnUnreachable===!0&&(0,i.KS)(),k=(0,g.g4)(f?.type);if(h&&!k&&!await !1){let a=(0,g.OK)(h);if(j)return console.warn(`[ProxyFetch] Proxy unreachable (${a}); using a direct connection for this request.`),w.run(null,b);let c=Error(`[Proxy Fast-Fail] Proxy unreachable: ${a}`);throw c.code="PROXY_UNREACHABLE",c.statusCode=503,c}if(h&&!k)try{let a=new URL(h),b=a.searchParams.get("family");if("ipv6"===b||"ipv4"===b){let{assertHostnameSupportsFamily:d}=await c.e(3041).then(c.bind(c,53041));await d(a.hostname,"ipv6"===b?6:4)}}catch(a){if(j)return console.warn(`[ProxyFetch] Proxy family pre-check failed (${(0,g.OK)(h)}); using a direct connection for this request.`),w.run(null,b);throw a.code=a.code||"PROXY_FAMILY_UNAVAILABLE",a.statusCode=a.statusCode||503,a}return w.run(f,async()=>{if(h&&f!==e&&console.log(`[ProxyFetch] Applied request proxy context: ${(0,g.OK)(h)}`),f){let a=q.getStore();a&&(a.proxy=f)}return b()})}async function A(a,b={},c={}){let d;if(b?.dispatcher)return(c.undiciFetch??f.fetch)(a,b);let e=y(a);try{d=x(e)}catch(b){let a=b instanceof Error?b.message:String(b);throw console.error(`[ProxyFetch] Proxy configuration error: ${a}`),b}let{source:j,proxyUrl:k}=d;if(!k){var l,m;if("true"===process.env.ENABLE_TLS_FINGERPRINT&&h.A.available)try{let a=p.getStore();return a&&(a.used=!0),await h.A.fetch(e,{...b,headers:b.headers,signal:b.signal??void 0})}catch(c){let a=c instanceof Error?c.message:String(c);console.warn(`[ProxyFetch] TLS fingerprint failed, falling back to native fetch: ${a}`);let b=p.getStore();b&&(b.used=!1)}let d=(l=a,!!(null!=(m=b.body)&&"object"==typeof m&&("function"==typeof m.getReader||"function"==typeof m.stream)||"u">typeof Request&&l instanceof Request&&(l.bodyUsed||null!==l.body))||!1),k=d?1:2,n=c.undiciFetch??f.fetch,q=c.nativeFetch??v,s=null;for(let c=0;c<k;c++)try{return await n(a,{...b,dispatcher:0===c?(0,g.DJ)():(0,g.Sn)()})}catch(l){let f=l instanceof Error?l.message:String(l);if(f.includes("onRequestStart"))throw console.error(`[ProxyFetch] Fatal version mismatch: Dispatcher (v8) vs Fetch (v6/native). Hardware upgrade or SOCKS5 config isolation required. Error: ${f}`),l;let h=l?.code;if(f.includes("fetch failed")||"ECONNREFUSED"===h||f.includes("ECONNREFUSED")||"string"==typeof h&&h.startsWith("UND_ERR")||f.includes("UND_ERR")){if(0===c&&k>1){s=l,await new Promise(a=>setTimeout(a,25+50*Math.random()));continue}if(d){let a=`dispatcher=[${r(l)}] native=[skipped: non-replayable request body]`;throw console.warn(`[ProxyFetch] skipping native fetch fallback for non-replayable body: ${a}`),l instanceof Error&&(l.proxyFetchDetail=a),l}if("direct"===j&&(0,i.wX)("PROXY_AUTO_SELECT_ENABLED")){let c="";try{c=new URL(e).hostname}catch{}if(c){let d=await o(c,e);if(d)try{let c=(0,g.I_)(d);return await n(a,{...b,dispatcher:c})}catch{}}}console.warn(`[ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): ${r(l)}`);try{return await q(a,b)}catch(b){let a=`dispatcher=[${r(l)}] native=[${r(b)}]`;throw console.warn(`[ProxyFetch] native fetch fallback ALSO failed: ${a}`),b instanceof Error&&(b.proxyFetchDetail=a),b}}throw l}throw s}let n=w.getStore();if(n&&"object"==typeof n&&(0,g.g4)(n.type)){if(!n.relayAuth){let a="vercel"===n.type?"Vercel relay":`${n.type||"Edge"} relay`;throw Error(`${a} configuration error: missing relayAuth`)}let c=y(a),d=(0,g.R4)(c,n.relayAuth),e=new Headers(b?.headers);for(let[a,b]of Object.entries(d))e.set(a,b);let f=(0,g.OK)(n.host?`https://${n.host}`:"");return"true"===process.env.OMNIROUTE_PROXY_FETCH_DEBUG&&console.debug(`[ProxyFetch] Routing via ${n.type||"edge"} relay: ${f}`),await v(`https://${n.host}`,{...b,headers:e,duplex:"half"})}try{let d=(0,g.I_)(k),e=c.undiciFetch??f.fetch;return await e(a,{...b,dispatcher:d})}catch(b){let a=b instanceof Error?b.message:String(b);throw console.error(`[ProxyFetch] Proxy request failed (${j}, fail-closed): ${a}`),b}}async function B(a,b={},c={}){return A(a,b,c)}async function C(a,b={},c=null){return B(a,b)}s||u.isPatched||(globalThis.fetch=A,u.isPatched=!0)}};