@thangnm.nip/irouter 0.0.17 → 0.0.19

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 (732) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +10 -4
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/prerender-manifest.json +27 -3
  5. package/app/.next/routes-manifest.json +38 -0
  6. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  7. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  10. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  13. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  16. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  18. package/app/.next/server/app/(dashboard)/dashboard/employees/[keyId]/page.js +2 -2
  19. package/app/.next/server/app/(dashboard)/dashboard/employees/[keyId]/page.js.nft.json +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/employees/[keyId]/page_client-reference-manifest.js +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/employees/page.js +5 -3
  22. package/app/.next/server/app/(dashboard)/dashboard/employees/page.js.nft.json +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/employees/page_client-reference-manifest.js +1 -1
  24. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +3 -3
  25. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  28. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  30. package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
  31. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  32. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  33. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  34. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  35. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  36. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  37. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  38. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  39. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  40. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  41. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  42. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  43. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  44. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  45. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  46. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  47. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  48. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +2 -0
  49. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -0
  50. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -0
  51. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  52. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  53. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  54. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  55. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  56. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  57. package/app/.next/server/app/_global-error/page.js +3 -3
  58. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  59. package/app/.next/server/app/_global-error.html +1 -1
  60. package/app/.next/server/app/_global-error.rsc +1 -1
  61. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  62. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  63. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  64. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  65. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  66. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  67. package/app/.next/server/app/_not-found/page.js +2 -2
  68. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  69. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  70. package/app/.next/server/app/_not-found.html +1 -1
  71. package/app/.next/server/app/_not-found.rsc +4 -4
  72. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
  73. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  74. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
  75. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  76. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  77. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  78. package/app/.next/server/app/api/9remote/install/route.js +1 -0
  79. package/app/.next/server/app/api/9remote/install/route.js.nft.json +1 -0
  80. package/app/.next/server/app/api/9remote/install/route_client-reference-manifest.js +1 -0
  81. package/app/.next/server/app/api/9remote/start/route.js +1 -0
  82. package/app/.next/server/app/api/9remote/start/route.js.nft.json +1 -0
  83. package/app/.next/server/app/api/9remote/start/route_client-reference-manifest.js +1 -0
  84. package/app/.next/server/app/api/9remote/status/route.js +1 -0
  85. package/app/.next/server/app/api/9remote/status/route.js.nft.json +1 -0
  86. package/app/.next/server/app/api/9remote/status/route_client-reference-manifest.js +1 -0
  87. package/app/.next/server/app/api/auth/login/route.js +1 -1
  88. package/app/.next/server/app/api/auth/login/route.js.nft.json +1 -1
  89. package/app/.next/server/app/api/auth/logout/route.js +1 -1
  90. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  91. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  92. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +2 -2
  93. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  94. package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
  95. package/app/.next/server/app/api/cli-tools/codex-settings/route.js +3 -3
  96. package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  97. package/app/.next/server/app/api/cli-tools/droid-settings/route.js +1 -1
  98. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  99. package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  100. package/app/.next/server/app/api/cloud/auth/route.js +1 -1
  101. package/app/.next/server/app/api/cloud/auth/route.js.nft.json +1 -1
  102. package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
  103. package/app/.next/server/app/api/cloud/credentials/update/route.js.nft.json +1 -1
  104. package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
  105. package/app/.next/server/app/api/cloud/model/resolve/route.js.nft.json +1 -1
  106. package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
  107. package/app/.next/server/app/api/cloud/models/alias/route.js.nft.json +1 -1
  108. package/app/.next/server/app/api/combos/[id]/route.js +1 -1
  109. package/app/.next/server/app/api/combos/[id]/route.js.nft.json +1 -1
  110. package/app/.next/server/app/api/combos/route.js +1 -1
  111. package/app/.next/server/app/api/combos/route.js.nft.json +1 -1
  112. package/app/.next/server/app/api/employees/[keyId]/stats/route.js +3 -3
  113. package/app/.next/server/app/api/employees/[keyId]/stats/route.js.nft.json +1 -1
  114. package/app/.next/server/app/api/employees/stats/route.js +3 -3
  115. package/app/.next/server/app/api/employees/stats/route.js.nft.json +1 -1
  116. package/app/.next/server/app/api/init/route.js +1 -1
  117. package/app/.next/server/app/api/init/route.js.nft.json +1 -1
  118. package/app/.next/server/app/api/keys/[id]/route.js +1 -1
  119. package/app/.next/server/app/api/keys/[id]/route.js.nft.json +1 -1
  120. package/app/.next/server/app/api/keys/route.js +1 -1
  121. package/app/.next/server/app/api/keys/route.js.nft.json +1 -1
  122. package/app/.next/server/app/api/locale/route.js +1 -1
  123. package/app/.next/server/app/api/models/alias/route.js +1 -1
  124. package/app/.next/server/app/api/models/alias/route.js.nft.json +1 -1
  125. package/app/.next/server/app/api/models/availability/route.js +1 -1
  126. package/app/.next/server/app/api/models/availability/route.js.nft.json +1 -1
  127. package/app/.next/server/app/api/models/route.js +1 -1
  128. package/app/.next/server/app/api/models/route.js.nft.json +1 -1
  129. package/app/.next/server/app/api/models/test/route.js +1 -1
  130. package/app/.next/server/app/api/models/test/route.js.nft.json +1 -1
  131. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  132. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  133. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  134. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  135. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  136. package/app/.next/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  137. package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
  138. package/app/.next/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  139. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  140. package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
  141. package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  142. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  143. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  144. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  145. package/app/.next/server/app/api/pricing/route.js +1 -1
  146. package/app/.next/server/app/api/pricing/route.js.nft.json +1 -1
  147. package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
  148. package/app/.next/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  149. package/app/.next/server/app/api/provider-nodes/route.js +1 -1
  150. package/app/.next/server/app/api/provider-nodes/route.js.nft.json +1 -1
  151. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  152. package/app/.next/server/app/api/providers/[id]/access-policy/route.js +1 -0
  153. package/app/.next/server/app/api/providers/[id]/access-policy/route.js.nft.json +1 -0
  154. package/app/.next/server/app/api/providers/[id]/access-policy/route_client-reference-manifest.js +1 -0
  155. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  156. package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  157. package/app/.next/server/app/api/providers/[id]/route.js +1 -1
  158. package/app/.next/server/app/api/providers/[id]/route.js.nft.json +1 -1
  159. package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
  160. package/app/.next/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  161. package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
  162. package/app/.next/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  163. package/app/.next/server/app/api/providers/client/route.js +1 -1
  164. package/app/.next/server/app/api/providers/client/route.js.nft.json +1 -1
  165. package/app/.next/server/app/api/providers/route.js +1 -1
  166. package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
  167. package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
  168. package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  169. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  170. package/app/.next/server/app/api/providers/validate/route.js.nft.json +1 -1
  171. package/app/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
  172. package/app/.next/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  173. package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  174. package/app/.next/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  175. package/app/.next/server/app/api/proxy-pools/route.js +1 -1
  176. package/app/.next/server/app/api/proxy-pools/route.js.nft.json +1 -1
  177. package/app/.next/server/app/api/settings/database/route.js +1 -1
  178. package/app/.next/server/app/api/settings/database/route.js.nft.json +1 -1
  179. package/app/.next/server/app/api/settings/proxy-test/route.js +1 -1
  180. package/app/.next/server/app/api/settings/require-login/route.js +1 -1
  181. package/app/.next/server/app/api/settings/require-login/route.js.nft.json +1 -1
  182. package/app/.next/server/app/api/settings/route.js +1 -1
  183. package/app/.next/server/app/api/settings/route.js.nft.json +1 -1
  184. package/app/.next/server/app/api/shutdown/route.js +1 -1
  185. package/app/.next/server/app/api/tags/route.js +1 -1
  186. package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
  187. package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
  188. package/app/.next/server/app/api/translator/load/route.js +1 -1
  189. package/app/.next/server/app/api/translator/save/route.js +1 -1
  190. package/app/.next/server/app/api/translator/send/route.js +1 -1
  191. package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
  192. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  193. package/app/.next/server/app/api/translator/translate/route.js.nft.json +1 -1
  194. package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
  195. package/app/.next/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  196. package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
  197. package/app/.next/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  198. package/app/.next/server/app/api/tunnel/status/route.js +1 -1
  199. package/app/.next/server/app/api/tunnel/status/route.js.nft.json +1 -1
  200. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  201. package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  202. package/app/.next/server/app/api/usage/chart/route.js +3 -3
  203. package/app/.next/server/app/api/usage/chart/route.js.nft.json +1 -1
  204. package/app/.next/server/app/api/usage/history/route.js +3 -3
  205. package/app/.next/server/app/api/usage/history/route.js.nft.json +1 -1
  206. package/app/.next/server/app/api/usage/logs/route.js +3 -3
  207. package/app/.next/server/app/api/usage/logs/route.js.nft.json +1 -1
  208. package/app/.next/server/app/api/usage/providers/route.js +2 -2
  209. package/app/.next/server/app/api/usage/providers/route.js.nft.json +1 -1
  210. package/app/.next/server/app/api/usage/request-details/[id]/download/route.js +2 -2
  211. package/app/.next/server/app/api/usage/request-details/[id]/route.js +1 -1
  212. package/app/.next/server/app/api/usage/request-details/[id]/route.js.nft.json +1 -1
  213. package/app/.next/server/app/api/usage/request-details/aggregate/route.js +66 -0
  214. package/app/.next/server/app/api/usage/request-details/aggregate/route.js.nft.json +1 -0
  215. package/app/.next/server/app/api/usage/request-details/aggregate/route_client-reference-manifest.js +1 -0
  216. package/app/.next/server/app/api/usage/request-details/route.js +3 -3
  217. package/app/.next/server/app/api/usage/request-details/route.js.nft.json +1 -1
  218. package/app/.next/server/app/api/usage/request-logs/route.js +3 -3
  219. package/app/.next/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  220. package/app/.next/server/app/api/usage/stats/route.js +3 -3
  221. package/app/.next/server/app/api/usage/stats/route.js.nft.json +1 -1
  222. package/app/.next/server/app/api/usage/stream/route.js +4 -4
  223. package/app/.next/server/app/api/usage/stream/route.js.nft.json +1 -1
  224. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  225. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  226. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  227. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  228. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  229. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  230. package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
  231. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  232. package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
  233. package/app/.next/server/app/api/v1/models/route.js +1 -1
  234. package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
  235. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  236. package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
  237. package/app/.next/server/app/api/v1/route.js +1 -1
  238. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  239. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  240. package/app/.next/server/app/api/v1beta/models/route.js +1 -1
  241. package/app/.next/server/app/api/v1internal/route.js +1 -1
  242. package/app/.next/server/app/api/v1internal/route.js.nft.json +1 -1
  243. package/app/.next/server/app/api/version/route.js +1 -1
  244. package/app/.next/server/app/callback/page.js +2 -2
  245. package/app/.next/server/app/callback/page.js.nft.json +1 -1
  246. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  247. package/app/.next/server/app/callback.html +1 -1
  248. package/app/.next/server/app/callback.rsc +4 -4
  249. package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
  250. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  251. package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
  252. package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
  253. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  254. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  255. package/app/.next/server/app/dashboard/basic-chat.html +1 -1
  256. package/app/.next/server/app/dashboard/basic-chat.rsc +6 -6
  257. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  258. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  259. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  260. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  261. package/app/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  262. package/app/.next/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  263. package/app/.next/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  264. package/app/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  265. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  266. package/app/.next/server/app/dashboard/cli-tools.rsc +6 -6
  267. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  268. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  269. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  270. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  271. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  272. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  273. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  274. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  275. package/app/.next/server/app/dashboard/combos.html +1 -1
  276. package/app/.next/server/app/dashboard/combos.rsc +6 -6
  277. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  278. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  279. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  280. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  281. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  282. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  283. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  284. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  285. package/app/.next/server/app/dashboard/employees.html +1 -1
  286. package/app/.next/server/app/dashboard/employees.rsc +6 -6
  287. package/app/.next/server/app/dashboard/employees.segments/!KGRhc2hib2FyZCk/dashboard/employees/__PAGE__.segment.rsc +2 -2
  288. package/app/.next/server/app/dashboard/employees.segments/!KGRhc2hib2FyZCk/dashboard/employees.segment.rsc +1 -1
  289. package/app/.next/server/app/dashboard/employees.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  290. package/app/.next/server/app/dashboard/employees.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  291. package/app/.next/server/app/dashboard/employees.segments/_full.segment.rsc +6 -6
  292. package/app/.next/server/app/dashboard/employees.segments/_head.segment.rsc +1 -1
  293. package/app/.next/server/app/dashboard/employees.segments/_index.segment.rsc +4 -4
  294. package/app/.next/server/app/dashboard/employees.segments/_tree.segment.rsc +2 -2
  295. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  296. package/app/.next/server/app/dashboard/endpoint.rsc +6 -6
  297. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  298. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  299. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  300. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  301. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  302. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  303. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  304. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  305. package/app/.next/server/app/dashboard/mitm.html +1 -1
  306. package/app/.next/server/app/dashboard/mitm.rsc +6 -6
  307. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  308. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  309. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  310. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  311. package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  312. package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  313. package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  314. package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  315. package/app/.next/server/app/dashboard/profile.html +1 -1
  316. package/app/.next/server/app/dashboard/profile.rsc +6 -6
  317. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  318. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  319. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  320. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  321. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  322. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  323. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  324. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  325. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  326. package/app/.next/server/app/dashboard/providers/new.rsc +6 -6
  327. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  328. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  329. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  330. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  331. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  332. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  333. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  334. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  335. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  336. package/app/.next/server/app/dashboard/providers.html +1 -1
  337. package/app/.next/server/app/dashboard/providers.rsc +6 -6
  338. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  339. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  340. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  341. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  342. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  343. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  344. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  345. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  346. package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
  347. package/app/.next/server/app/dashboard/proxy-pools.rsc +6 -6
  348. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  349. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  350. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  351. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  352. package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  353. package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  354. package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  355. package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  356. package/app/.next/server/app/dashboard/quota.html +2 -0
  357. package/app/.next/server/app/dashboard/quota.meta +17 -0
  358. package/app/.next/server/app/dashboard/quota.rsc +25 -0
  359. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -0
  360. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +5 -0
  361. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
  362. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +6 -0
  363. package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +25 -0
  364. package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +6 -0
  365. package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +9 -0
  366. package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +6 -0
  367. package/app/.next/server/app/dashboard/settings/pricing/page.js +2 -2
  368. package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  369. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  370. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  371. package/app/.next/server/app/dashboard/settings/pricing.rsc +4 -4
  372. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  373. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  374. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  375. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  376. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  377. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  378. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  379. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  380. package/app/.next/server/app/dashboard/translator.html +1 -1
  381. package/app/.next/server/app/dashboard/translator.rsc +6 -6
  382. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  383. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  384. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  385. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  386. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  387. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  388. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  389. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  390. package/app/.next/server/app/dashboard/usage.html +1 -1
  391. package/app/.next/server/app/dashboard/usage.rsc +6 -6
  392. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  393. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  394. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  395. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  396. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  397. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  398. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  399. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  400. package/app/.next/server/app/dashboard.html +1 -1
  401. package/app/.next/server/app/dashboard.rsc +5 -5
  402. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +1 -1
  403. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  404. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  405. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +5 -5
  406. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  407. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +4 -4
  408. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  409. package/app/.next/server/app/favicon.ico/route.js +1 -1
  410. package/app/.next/server/app/index.html +1 -1
  411. package/app/.next/server/app/index.rsc +4 -4
  412. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  413. package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
  414. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  415. package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
  416. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  417. package/app/.next/server/app/landing/page.js +2 -2
  418. package/app/.next/server/app/landing/page.js.nft.json +1 -1
  419. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  420. package/app/.next/server/app/landing.html +1 -1
  421. package/app/.next/server/app/landing.rsc +4 -4
  422. package/app/.next/server/app/landing.segments/_full.segment.rsc +4 -4
  423. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  424. package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
  425. package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
  426. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  427. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  428. package/app/.next/server/app/login/page.js +2 -2
  429. package/app/.next/server/app/login/page.js.nft.json +1 -1
  430. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  431. package/app/.next/server/app/login.html +1 -1
  432. package/app/.next/server/app/login.rsc +5 -5
  433. package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
  434. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  435. package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
  436. package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  437. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  438. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  439. package/app/.next/server/app/manifest.webmanifest/route.js +2 -2
  440. package/app/.next/server/app/page.js +2 -2
  441. package/app/.next/server/app/page.js.nft.json +1 -1
  442. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  443. package/app/.next/server/app-paths-manifest.json +10 -4
  444. package/app/.next/server/chunks/1051.js +1 -0
  445. package/app/.next/server/chunks/2664.js +1 -1
  446. package/app/.next/server/chunks/3093.js +5 -5
  447. package/app/.next/server/chunks/336.js +1 -1
  448. package/app/.next/server/chunks/3832.js +1 -1
  449. package/app/.next/server/chunks/4013.js +1 -0
  450. package/app/.next/server/chunks/412.js +2 -2
  451. package/app/.next/server/chunks/5297.js +1 -1
  452. package/app/.next/server/chunks/6072.js +4 -4
  453. package/app/.next/server/chunks/6557.js +1 -0
  454. package/app/.next/server/chunks/6811.js +1 -0
  455. package/app/.next/server/chunks/6898.js +1 -0
  456. package/app/.next/server/chunks/7568.js +1 -0
  457. package/app/.next/server/chunks/7774.js +4 -4
  458. package/app/.next/server/chunks/7994.js +1 -0
  459. package/app/.next/server/chunks/8895.js +1 -1
  460. package/app/.next/server/chunks/8985.js +1 -0
  461. package/app/.next/server/chunks/9489.js +1 -0
  462. package/app/.next/server/chunks/9609.js +1 -1
  463. package/app/.next/server/chunks/9718.js +1 -1
  464. package/app/.next/server/functions-config-manifest.json +24 -0
  465. package/app/.next/server/middleware-build-manifest.js +1 -1
  466. package/app/.next/server/middleware.js +3 -3
  467. package/app/.next/server/pages/404.html +1 -1
  468. package/app/.next/server/pages/500.html +1 -1
  469. package/app/.next/server/server-reference-manifest.js +1 -1
  470. package/app/.next/server/server-reference-manifest.json +1 -1
  471. package/app/.next/static/chunks/2652-141c69cce7667f8c.js +1 -0
  472. package/app/.next/static/chunks/3810-dc43d31e61000522.js +1 -0
  473. package/app/.next/static/chunks/548-a88d48687e936c37.js +1 -0
  474. package/app/.next/static/chunks/5497-189ace2180e8dc37.js +7 -0
  475. package/app/.next/static/chunks/8222-1f462fde4e5fc8b8.js +1 -0
  476. package/app/.next/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-e48946710b5781b9.js → page-1a8fb5fbd425d3bb.js} +1 -1
  477. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-60022ddd7d6d3e88.js → page-78c007c59c2f62a8.js} +1 -1
  478. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-eaf7ee3bcfa943cf.js +1 -0
  479. package/app/.next/static/chunks/app/(dashboard)/dashboard/console-log/{page-9588cda906b745c2.js → page-ca4f6c8400508127.js} +1 -1
  480. package/app/.next/static/chunks/app/(dashboard)/dashboard/employees/[keyId]/{page-a8dfa0076abced5f.js → page-1c14d6f8a479aca1.js} +1 -1
  481. package/app/.next/static/chunks/app/(dashboard)/dashboard/employees/page-a25175993e8c3dce.js +11 -0
  482. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/{page-6443ec34ca34ab96.js → page-3377f46082bab6fc.js} +1 -1
  483. package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/{page-693e22a33e693e5e.js → page-84e24e814210e7f3.js} +1 -1
  484. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-378b8dff959a5ad8.js +1 -0
  485. package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/{page-41f227c36a9bda03.js → page-b7c7a2ee454a11f0.js} +1 -1
  486. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-592b4c4f5e745ebe.js +1 -0
  487. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/{page-9f51d6b750e712f2.js → page-8c18fb25e1a11800.js} +1 -1
  488. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{page-21555c82aa050168.js → page-264f344daaa29c78.js} +1 -1
  489. package/app/.next/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-7b5915c4b3dfa07d.js → page-240a8c20bf126cd5.js} +1 -1
  490. package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-a69cbbaff82034fc.js +1 -0
  491. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/{page-e3c730416459e326.js → page-db958d97d862974c.js} +1 -1
  492. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/{page-3ed1c402dcfff748.js → page-548c2ee0f2a720c7.js} +1 -1
  493. package/app/.next/static/chunks/app/(dashboard)/layout-42cf370ce36268bc.js +1 -0
  494. package/app/.next/static/chunks/app/_global-error/page-378b8dff959a5ad8.js +1 -0
  495. package/app/.next/static/chunks/app/api/9remote/install/route-378b8dff959a5ad8.js +1 -0
  496. package/app/.next/static/chunks/app/api/9remote/start/route-378b8dff959a5ad8.js +1 -0
  497. package/app/.next/static/chunks/app/api/9remote/status/route-378b8dff959a5ad8.js +1 -0
  498. package/app/.next/static/chunks/app/api/auth/login/route-378b8dff959a5ad8.js +1 -0
  499. package/app/.next/static/chunks/app/api/auth/logout/route-378b8dff959a5ad8.js +1 -0
  500. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-378b8dff959a5ad8.js +1 -0
  501. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-378b8dff959a5ad8.js +1 -0
  502. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-378b8dff959a5ad8.js +1 -0
  503. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-378b8dff959a5ad8.js +1 -0
  504. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-378b8dff959a5ad8.js +1 -0
  505. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-378b8dff959a5ad8.js +1 -0
  506. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-378b8dff959a5ad8.js +1 -0
  507. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-378b8dff959a5ad8.js +1 -0
  508. package/app/.next/static/chunks/app/api/cloud/auth/route-378b8dff959a5ad8.js +1 -0
  509. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-378b8dff959a5ad8.js +1 -0
  510. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-378b8dff959a5ad8.js +1 -0
  511. package/app/.next/static/chunks/app/api/cloud/models/alias/route-378b8dff959a5ad8.js +1 -0
  512. package/app/.next/static/chunks/app/api/combos/[id]/route-378b8dff959a5ad8.js +1 -0
  513. package/app/.next/static/chunks/app/api/combos/route-378b8dff959a5ad8.js +1 -0
  514. package/app/.next/static/chunks/app/api/employees/[keyId]/stats/route-378b8dff959a5ad8.js +1 -0
  515. package/app/.next/static/chunks/app/api/employees/stats/route-378b8dff959a5ad8.js +1 -0
  516. package/app/.next/static/chunks/app/api/init/route-378b8dff959a5ad8.js +1 -0
  517. package/app/.next/static/chunks/app/api/keys/[id]/route-378b8dff959a5ad8.js +1 -0
  518. package/app/.next/static/chunks/app/api/keys/route-378b8dff959a5ad8.js +1 -0
  519. package/app/.next/static/chunks/app/api/locale/route-378b8dff959a5ad8.js +1 -0
  520. package/app/.next/static/chunks/app/api/models/alias/route-378b8dff959a5ad8.js +1 -0
  521. package/app/.next/static/chunks/app/api/models/availability/route-378b8dff959a5ad8.js +1 -0
  522. package/app/.next/static/chunks/app/api/models/route-378b8dff959a5ad8.js +1 -0
  523. package/app/.next/static/chunks/app/api/models/test/route-378b8dff959a5ad8.js +1 -0
  524. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-378b8dff959a5ad8.js +1 -0
  525. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-378b8dff959a5ad8.js +1 -0
  526. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-378b8dff959a5ad8.js +1 -0
  527. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-378b8dff959a5ad8.js +1 -0
  528. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-378b8dff959a5ad8.js +1 -0
  529. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-378b8dff959a5ad8.js +1 -0
  530. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-378b8dff959a5ad8.js +1 -0
  531. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-378b8dff959a5ad8.js +1 -0
  532. package/app/.next/static/chunks/app/api/pricing/route-378b8dff959a5ad8.js +1 -0
  533. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-378b8dff959a5ad8.js +1 -0
  534. package/app/.next/static/chunks/app/api/provider-nodes/route-378b8dff959a5ad8.js +1 -0
  535. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-378b8dff959a5ad8.js +1 -0
  536. package/app/.next/static/chunks/app/api/providers/[id]/access-policy/route-378b8dff959a5ad8.js +1 -0
  537. package/app/.next/static/chunks/app/api/providers/[id]/models/route-378b8dff959a5ad8.js +1 -0
  538. package/app/.next/static/chunks/app/api/providers/[id]/route-378b8dff959a5ad8.js +1 -0
  539. package/app/.next/static/chunks/app/api/providers/[id]/test/route-378b8dff959a5ad8.js +1 -0
  540. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-378b8dff959a5ad8.js +1 -0
  541. package/app/.next/static/chunks/app/api/providers/client/route-378b8dff959a5ad8.js +1 -0
  542. package/app/.next/static/chunks/app/api/providers/route-378b8dff959a5ad8.js +1 -0
  543. package/app/.next/static/chunks/app/api/providers/test-batch/route-378b8dff959a5ad8.js +1 -0
  544. package/app/.next/static/chunks/app/api/providers/validate/route-378b8dff959a5ad8.js +1 -0
  545. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-378b8dff959a5ad8.js +1 -0
  546. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-378b8dff959a5ad8.js +1 -0
  547. package/app/.next/static/chunks/app/api/proxy-pools/route-378b8dff959a5ad8.js +1 -0
  548. package/app/.next/static/chunks/app/api/settings/database/route-378b8dff959a5ad8.js +1 -0
  549. package/app/.next/static/chunks/app/api/settings/proxy-test/route-378b8dff959a5ad8.js +1 -0
  550. package/app/.next/static/chunks/app/api/settings/require-login/route-378b8dff959a5ad8.js +1 -0
  551. package/app/.next/static/chunks/app/api/settings/route-378b8dff959a5ad8.js +1 -0
  552. package/app/.next/static/chunks/app/api/shutdown/route-378b8dff959a5ad8.js +1 -0
  553. package/app/.next/static/chunks/app/api/tags/route-378b8dff959a5ad8.js +1 -0
  554. package/app/.next/static/chunks/app/api/translator/console-logs/route-378b8dff959a5ad8.js +1 -0
  555. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-378b8dff959a5ad8.js +1 -0
  556. package/app/.next/static/chunks/app/api/translator/load/route-378b8dff959a5ad8.js +1 -0
  557. package/app/.next/static/chunks/app/api/translator/save/route-378b8dff959a5ad8.js +1 -0
  558. package/app/.next/static/chunks/app/api/translator/send/route-378b8dff959a5ad8.js +1 -0
  559. package/app/.next/static/chunks/app/api/translator/translate/route-378b8dff959a5ad8.js +1 -0
  560. package/app/.next/static/chunks/app/api/tunnel/disable/route-378b8dff959a5ad8.js +1 -0
  561. package/app/.next/static/chunks/app/api/tunnel/enable/route-378b8dff959a5ad8.js +1 -0
  562. package/app/.next/static/chunks/app/api/tunnel/status/route-378b8dff959a5ad8.js +1 -0
  563. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-378b8dff959a5ad8.js +1 -0
  564. package/app/.next/static/chunks/app/api/usage/chart/route-378b8dff959a5ad8.js +1 -0
  565. package/app/.next/static/chunks/app/api/usage/history/route-378b8dff959a5ad8.js +1 -0
  566. package/app/.next/static/chunks/app/api/usage/logs/route-378b8dff959a5ad8.js +1 -0
  567. package/app/.next/static/chunks/app/api/usage/providers/route-378b8dff959a5ad8.js +1 -0
  568. package/app/.next/static/chunks/app/api/usage/request-details/[id]/download/route-378b8dff959a5ad8.js +1 -0
  569. package/app/.next/static/chunks/app/api/usage/request-details/[id]/route-378b8dff959a5ad8.js +1 -0
  570. package/app/.next/static/chunks/app/api/usage/request-details/aggregate/route-378b8dff959a5ad8.js +1 -0
  571. package/app/.next/static/chunks/app/api/usage/request-details/route-378b8dff959a5ad8.js +1 -0
  572. package/app/.next/static/chunks/app/api/usage/request-logs/route-378b8dff959a5ad8.js +1 -0
  573. package/app/.next/static/chunks/app/api/usage/stats/route-378b8dff959a5ad8.js +1 -0
  574. package/app/.next/static/chunks/app/api/usage/stream/route-378b8dff959a5ad8.js +1 -0
  575. package/app/.next/static/chunks/app/api/v1/api/chat/route-378b8dff959a5ad8.js +1 -0
  576. package/app/.next/static/chunks/app/api/v1/chat/completions/route-378b8dff959a5ad8.js +1 -0
  577. package/app/.next/static/chunks/app/api/v1/embeddings/route-378b8dff959a5ad8.js +1 -0
  578. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-378b8dff959a5ad8.js +1 -0
  579. package/app/.next/static/chunks/app/api/v1/messages/route-378b8dff959a5ad8.js +1 -0
  580. package/app/.next/static/chunks/app/api/v1/models/route-378b8dff959a5ad8.js +1 -0
  581. package/app/.next/static/chunks/app/api/v1/responses/route-378b8dff959a5ad8.js +1 -0
  582. package/app/.next/static/chunks/app/api/v1/route-378b8dff959a5ad8.js +1 -0
  583. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-378b8dff959a5ad8.js +1 -0
  584. package/app/.next/static/chunks/app/api/v1beta/models/route-378b8dff959a5ad8.js +1 -0
  585. package/app/.next/static/chunks/app/api/v1internal/route-378b8dff959a5ad8.js +1 -0
  586. package/app/.next/static/chunks/app/api/version/route-378b8dff959a5ad8.js +1 -0
  587. package/app/.next/static/chunks/app/layout-dcc32c615c88bd9b.js +1 -0
  588. package/app/.next/static/chunks/app/login/{page-ef0b18015f49da00.js → page-ee04b4fa7715f2c7.js} +1 -1
  589. package/app/.next/static/chunks/app/manifest.webmanifest/route-378b8dff959a5ad8.js +1 -0
  590. package/app/.next/static/chunks/app/page-378b8dff959a5ad8.js +1 -0
  591. package/app/.next/static/chunks/{main-57a34ed4945507d8.js → main-e7ca6b252844c612.js} +3 -3
  592. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-378b8dff959a5ad8.js +1 -0
  593. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-378b8dff959a5ad8.js +1 -0
  594. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-378b8dff959a5ad8.js +1 -0
  595. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-378b8dff959a5ad8.js +1 -0
  596. package/app/.next/static/css/bcba695583d9b815.css +1 -0
  597. package/app/.next/static/fnUmDHie_XiGTj2DnZpYB/_buildManifest.js +1 -0
  598. package/app/open-sse/config/providerModels.js +35 -2
  599. package/app/open-sse/config/providers.js +7 -1
  600. package/app/open-sse/config/runtimeConfig.js +8 -1
  601. package/app/open-sse/executors/base.js +8 -4
  602. package/app/open-sse/executors/kiro.js +33 -16
  603. package/app/open-sse/executors/vertex.js +14 -3
  604. package/app/open-sse/handlers/chatCore/nonStreamingHandler.js +1 -1
  605. package/app/open-sse/services/model.js +1 -0
  606. package/app/open-sse/translator/formats.js +4 -0
  607. package/app/open-sse/translator/helpers/openaiHelper.js +2 -2
  608. package/app/open-sse/translator/helpers/responsesApiHelper.js +9 -1
  609. package/app/open-sse/translator/index.js +1 -0
  610. package/app/open-sse/translator/request/claude-to-openai.js +1 -1
  611. package/app/open-sse/translator/request/openai-responses.js +8 -4
  612. package/app/open-sse/translator/request/openai-to-gemini.js +20 -5
  613. package/app/open-sse/translator/request/openai-to-ollama.js +38 -5
  614. package/app/open-sse/translator/request/openai-to-vertex.js +50 -0
  615. package/app/open-sse/translator/response/gemini-to-openai.js +1 -0
  616. package/app/package.json +5 -3
  617. package/package.json +1 -1
  618. package/app/.next/server/chunks/1130.js +0 -1
  619. package/app/.next/server/chunks/118.js +0 -1
  620. package/app/.next/server/chunks/1424.js +0 -1
  621. package/app/.next/server/chunks/289.js +0 -1
  622. package/app/.next/server/chunks/5172.js +0 -1
  623. package/app/.next/server/chunks/5270.js +0 -1
  624. package/app/.next/server/chunks/5296.js +0 -1
  625. package/app/.next/server/chunks/6828.js +0 -1
  626. package/app/.next/static/NE40wwY-97u2w_r9iMzIM/_buildManifest.js +0 -1
  627. package/app/.next/static/chunks/1321-60e1aa92cc4ecddf.js +0 -1
  628. package/app/.next/static/chunks/5497-17e64e7b0e39c381.js +0 -7
  629. package/app/.next/static/chunks/6902-135c924f2deafe46.js +0 -1
  630. package/app/.next/static/chunks/7505-7bc93937f92f9117.js +0 -1
  631. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-bf20f79627d23594.js +0 -1
  632. package/app/.next/static/chunks/app/(dashboard)/dashboard/employees/page-d04ec4821a34b406.js +0 -9
  633. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-604b484002105441.js +0 -1
  634. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-6b33d4bc3f549542.js +0 -1
  635. package/app/.next/static/chunks/app/(dashboard)/layout-82da2bc12172481a.js +0 -1
  636. package/app/.next/static/chunks/app/_global-error/page-604b484002105441.js +0 -1
  637. package/app/.next/static/chunks/app/api/auth/login/route-604b484002105441.js +0 -1
  638. package/app/.next/static/chunks/app/api/auth/logout/route-604b484002105441.js +0 -1
  639. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-604b484002105441.js +0 -1
  640. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-604b484002105441.js +0 -1
  641. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-604b484002105441.js +0 -1
  642. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-604b484002105441.js +0 -1
  643. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-604b484002105441.js +0 -1
  644. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-604b484002105441.js +0 -1
  645. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-604b484002105441.js +0 -1
  646. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-604b484002105441.js +0 -1
  647. package/app/.next/static/chunks/app/api/cloud/auth/route-604b484002105441.js +0 -1
  648. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-604b484002105441.js +0 -1
  649. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-604b484002105441.js +0 -1
  650. package/app/.next/static/chunks/app/api/cloud/models/alias/route-604b484002105441.js +0 -1
  651. package/app/.next/static/chunks/app/api/combos/[id]/route-604b484002105441.js +0 -1
  652. package/app/.next/static/chunks/app/api/combos/route-604b484002105441.js +0 -1
  653. package/app/.next/static/chunks/app/api/employees/[keyId]/stats/route-604b484002105441.js +0 -1
  654. package/app/.next/static/chunks/app/api/employees/stats/route-604b484002105441.js +0 -1
  655. package/app/.next/static/chunks/app/api/init/route-604b484002105441.js +0 -1
  656. package/app/.next/static/chunks/app/api/keys/[id]/route-604b484002105441.js +0 -1
  657. package/app/.next/static/chunks/app/api/keys/route-604b484002105441.js +0 -1
  658. package/app/.next/static/chunks/app/api/locale/route-604b484002105441.js +0 -1
  659. package/app/.next/static/chunks/app/api/models/alias/route-604b484002105441.js +0 -1
  660. package/app/.next/static/chunks/app/api/models/availability/route-604b484002105441.js +0 -1
  661. package/app/.next/static/chunks/app/api/models/route-604b484002105441.js +0 -1
  662. package/app/.next/static/chunks/app/api/models/test/route-604b484002105441.js +0 -1
  663. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-604b484002105441.js +0 -1
  664. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-604b484002105441.js +0 -1
  665. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-604b484002105441.js +0 -1
  666. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-604b484002105441.js +0 -1
  667. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-604b484002105441.js +0 -1
  668. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-604b484002105441.js +0 -1
  669. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-604b484002105441.js +0 -1
  670. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-604b484002105441.js +0 -1
  671. package/app/.next/static/chunks/app/api/pricing/route-604b484002105441.js +0 -1
  672. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-604b484002105441.js +0 -1
  673. package/app/.next/static/chunks/app/api/provider-nodes/route-604b484002105441.js +0 -1
  674. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-604b484002105441.js +0 -1
  675. package/app/.next/static/chunks/app/api/providers/[id]/models/route-604b484002105441.js +0 -1
  676. package/app/.next/static/chunks/app/api/providers/[id]/route-604b484002105441.js +0 -1
  677. package/app/.next/static/chunks/app/api/providers/[id]/test/route-604b484002105441.js +0 -1
  678. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-604b484002105441.js +0 -1
  679. package/app/.next/static/chunks/app/api/providers/client/route-604b484002105441.js +0 -1
  680. package/app/.next/static/chunks/app/api/providers/route-604b484002105441.js +0 -1
  681. package/app/.next/static/chunks/app/api/providers/test-batch/route-604b484002105441.js +0 -1
  682. package/app/.next/static/chunks/app/api/providers/validate/route-604b484002105441.js +0 -1
  683. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-604b484002105441.js +0 -1
  684. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-604b484002105441.js +0 -1
  685. package/app/.next/static/chunks/app/api/proxy-pools/route-604b484002105441.js +0 -1
  686. package/app/.next/static/chunks/app/api/settings/database/route-604b484002105441.js +0 -1
  687. package/app/.next/static/chunks/app/api/settings/proxy-test/route-604b484002105441.js +0 -1
  688. package/app/.next/static/chunks/app/api/settings/require-login/route-604b484002105441.js +0 -1
  689. package/app/.next/static/chunks/app/api/settings/route-604b484002105441.js +0 -1
  690. package/app/.next/static/chunks/app/api/shutdown/route-604b484002105441.js +0 -1
  691. package/app/.next/static/chunks/app/api/tags/route-604b484002105441.js +0 -1
  692. package/app/.next/static/chunks/app/api/translator/console-logs/route-604b484002105441.js +0 -1
  693. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-604b484002105441.js +0 -1
  694. package/app/.next/static/chunks/app/api/translator/load/route-604b484002105441.js +0 -1
  695. package/app/.next/static/chunks/app/api/translator/save/route-604b484002105441.js +0 -1
  696. package/app/.next/static/chunks/app/api/translator/send/route-604b484002105441.js +0 -1
  697. package/app/.next/static/chunks/app/api/translator/translate/route-604b484002105441.js +0 -1
  698. package/app/.next/static/chunks/app/api/tunnel/disable/route-604b484002105441.js +0 -1
  699. package/app/.next/static/chunks/app/api/tunnel/enable/route-604b484002105441.js +0 -1
  700. package/app/.next/static/chunks/app/api/tunnel/status/route-604b484002105441.js +0 -1
  701. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-604b484002105441.js +0 -1
  702. package/app/.next/static/chunks/app/api/usage/chart/route-604b484002105441.js +0 -1
  703. package/app/.next/static/chunks/app/api/usage/history/route-604b484002105441.js +0 -1
  704. package/app/.next/static/chunks/app/api/usage/logs/route-604b484002105441.js +0 -1
  705. package/app/.next/static/chunks/app/api/usage/providers/route-604b484002105441.js +0 -1
  706. package/app/.next/static/chunks/app/api/usage/request-details/[id]/download/route-604b484002105441.js +0 -1
  707. package/app/.next/static/chunks/app/api/usage/request-details/[id]/route-604b484002105441.js +0 -1
  708. package/app/.next/static/chunks/app/api/usage/request-details/route-604b484002105441.js +0 -1
  709. package/app/.next/static/chunks/app/api/usage/request-logs/route-604b484002105441.js +0 -1
  710. package/app/.next/static/chunks/app/api/usage/stats/route-604b484002105441.js +0 -1
  711. package/app/.next/static/chunks/app/api/usage/stream/route-604b484002105441.js +0 -1
  712. package/app/.next/static/chunks/app/api/v1/api/chat/route-604b484002105441.js +0 -1
  713. package/app/.next/static/chunks/app/api/v1/chat/completions/route-604b484002105441.js +0 -1
  714. package/app/.next/static/chunks/app/api/v1/embeddings/route-604b484002105441.js +0 -1
  715. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-604b484002105441.js +0 -1
  716. package/app/.next/static/chunks/app/api/v1/messages/route-604b484002105441.js +0 -1
  717. package/app/.next/static/chunks/app/api/v1/models/route-604b484002105441.js +0 -1
  718. package/app/.next/static/chunks/app/api/v1/responses/route-604b484002105441.js +0 -1
  719. package/app/.next/static/chunks/app/api/v1/route-604b484002105441.js +0 -1
  720. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-604b484002105441.js +0 -1
  721. package/app/.next/static/chunks/app/api/v1beta/models/route-604b484002105441.js +0 -1
  722. package/app/.next/static/chunks/app/api/v1internal/route-604b484002105441.js +0 -1
  723. package/app/.next/static/chunks/app/api/version/route-604b484002105441.js +0 -1
  724. package/app/.next/static/chunks/app/layout-c7a4b30f6157755d.js +0 -1
  725. package/app/.next/static/chunks/app/manifest.webmanifest/route-604b484002105441.js +0 -1
  726. package/app/.next/static/chunks/app/page-604b484002105441.js +0 -1
  727. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-604b484002105441.js +0 -1
  728. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-604b484002105441.js +0 -1
  729. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-604b484002105441.js +0 -1
  730. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-604b484002105441.js +0 -1
  731. package/app/.next/static/css/61a8dca49b7d0d45.css +0 -1
  732. /package/app/.next/static/{NE40wwY-97u2w_r9iMzIM → fnUmDHie_XiGTj2DnZpYB}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- self.__BUILD_MANIFEST=function(e,t,a,s){return{__rewrites:{afterFiles:[{has:e,source:"/v1internal\\:streamGenerateContent",destination:t},{has:e,source:"/v1internal\\:generateContent",destination:t},{has:e,source:"/v1/v1/:path*",destination:a},{has:e,source:"/v1/v1",destination:s},{has:e,source:"/codex/:path*",destination:"/api/v1/responses"},{has:e,source:"/v1/:path*",destination:a},{has:e,source:"/v1",destination:s}],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:95,errorRate:1e-4,numBits:1822,numHashes:14,bitArray:[0,0,0,0,0,1,0,1,1,0,1,1,1,1,0,1,0,0,0,1,1,0,0,0,1,0,1,0,0,1,1,1,0,0,0,0,1,0,1,1,0,0,1,0,1,0,1,0,1,1,1,1,1,0,1,1,0,0,0,0,1,1,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1,1,0,1,0,0,1,0,1,1,1,1,0,0,0,0,0,1,1,0,1,0,0,1,1,0,0,0,1,1,1,0,1,1,0,1,1,1,0,0,1,1,0,1,1,1,0,0,1,0,1,1,0,0,1,1,0,1,1,1,1,1,1,1,0,0,1,0,1,1,0,1,0,0,1,1,0,1,0,0,1,1,1,0,1,0,1,1,0,1,1,0,0,1,1,0,1,1,0,1,0,1,0,0,0,1,0,1,1,0,0,1,0,0,1,0,0,1,1,1,0,1,0,1,1,0,1,0,0,0,1,1,0,0,1,0,0,1,1,1,1,1,0,0,0,1,1,1,0,1,1,1,1,0,0,1,1,1,0,1,0,1,0,0,1,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,0,1,1,1,0,1,1,0,0,1,1,0,0,1,0,0,1,1,1,0,0,1,1,1,0,1,1,0,1,1,0,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,1,0,1,0,1,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,0,0,0,1,0,0,1,0,1,1,0,1,0,1,1,1,1,0,1,1,0,1,1,1,1,0,0,0,0,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,1,1,1,0,1,1,0,1,1,0,1,0,0,0,0,1,1,0,0,0,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,1,0,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,0,1,0,0,1,1,1,0,0,1,1,1,1,1,0,1,0,1,1,1,1,0,1,1,0,1,1,1,1,0,0,0,0,0,0,0,1,0,1,1,1,0,0,1,1,0,1,0,0,1,0,0,0,1,1,1,1,1,1,0,1,1,0,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,1,0,0,1,1,1,1,1,0,0,1,0,0,1,1,0,0,1,1,1,1,0,0,1,0,0,0,1,1,1,1,0,0,1,1,1,1,1,1,0,1,1,0,0,0,0,0,1,1,0,0,0,1,1,1,0,1,1,0,1,1,0,0,0,0,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,0,0,1,1,1,0,0,0,1,0,0,1,1,0,1,0,1,1,1,1,0,0,1,0,0,0,0,0,1,0,1,0,0,1,0,0,0,0,0,1,0,1,0,0,1,0,0,0,0,1,1,1,1,0,0,0,1,0,1,0,0,0,1,0,0,0,1,1,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,0,1,0,1,1,1,0,0,1,0,0,1,0,0,1,0,1,0,0,0,1,1,0,0,0,0,1,1,0,0,0,1,0,1,0,1,1,1,0,0,1,1,0,0,0,0,0,1,1,1,0,0,1,0,0,1,0,1,0,1,0,1,1,0,1,0,0,1,0,1,0,1,1,1,0,1,0,1,1,1,0,1,0,0,0,1,0,1,1,0,1,1,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,1,1,1,1,0,1,0,1,0,1,1,0,0,1,1,1,0,1,0,0,0,1,1,0,0,1,1,0,1,1,1,0,0,1,1,1,1,1,0,0,1,1,1,1,1,0,1,1,1,0,1,0,0,0,1,1,0,0,1,1,1,1,0,1,1,1,0,0,1,1,0,1,0,0,0,1,0,0,0,0,1,1,1,1,1,0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,0,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,1,0,0,0,1,0,0,1,1,1,0,0,0,0,0,1,1,1,0,1,0,1,0,0,1,0,0,1,1,0,1,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,1,1,1,0,0,0,1,0,0,1,1,1,0,1,0,1,1,0,1,1,0,1,0,0,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,1,1,0,0,0,1,1,1,0,1,0,1,1,0,0,1,1,0,1,1,1,0,1,0,1,1,0,0,1,0,0,1,1,0,0,0,1,1,1,1,0,0,0,1,0,0,1,0,1,1,0,0,1,0,0,1,0,1,0,0,0,1,1,1,1,1,0,1,0,1,0,0,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,0,1,1,0,1,0,0,1,0,0,1,1,0,1,0,0,0,1,0,1,1,0,1,1,0,0,1,1,0,0,1,1,1,1,0,0,0,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,0,1,0,0,0,1,1,0,0,0,0,1,1,1,0,0,0,1,0,1,1,0,0,1,1,1,0,0,0,1,1,0,1,1,1,1,1,1,0,0,1,0,1,0,1,1,0,1,1,1,0,0,1,1,0,0,0,1,0,1,0,1,1,1,1,1,0,1,1,0,1,1,1,0,0,0,0,1,0,0,0,0,1,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,0,0,1,0,1,1,1,0,0,1,1,0,0,1,1,0,0,1,0,0,1,0,0,0,1,1,1,1,1,0,0,0,0,1,1,0,1,0,0,1,0,0,0,0,0,1,0,1,0,0,1,0,1,1,1,0,1,1,0,0,0,1,1,1,0,0,1,0,0,1,1,0,1,0,0,0,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,1,0,1,1,0,1,1,1,0,1,1,1,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,0,0,1,1,1,1,1,0,1,1,1,1,1,0,1,0,0,1,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,1,0,1,0,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,0,1,1,1,1,0,0,1,0,0,0,1,0,0,1,1,1,0,1,1,1,0,1,0,1,1,1,0,1,1,0,1,1,1,0,0,1,1,0,1,1,1,0,0,0,1,1,0,0,1,0,0,0,1,1,0,1,0,1,0,0,0,1,1,1,0,0,1,1,1,1,1,0,1,1,1,0,1,0,0,0,0,1,0,0,1,0,1,1,0,0,0,1,1,1,1,1,0,1,0,0,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,0,1,1,1,0,0,1,0,0,1,1,1,1,0,1,1,0,0,1,1,0,1,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,0,1,0,1,0,0,1,1,1,1,1,1,1,1,0,1,1,1,1,0,1,0,1,0,1,1,0,1,0,1,0,0,1,1,1,0,1,1,0,1,0,1,1,1,1,1,1,1,1,1,1,0,1]},__routerFilterDynamic:{numItems:12,errorRate:1e-4,numBits:231,numHashes:14,bitArray:[1,0,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,0,1,1,0,1,1,1,1,0,0,0,0,0,1,1,0,0,0,1,1,1,1,1,1,0,1,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,1,0,0,0,1,1,1,0,1,0,1,0,1,1,0,1,0,0,1,1,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,1,0,0,0,0,1,1,0,1,0,1,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,1,1,0,1,0,1,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,1,0,1,1,1,1,0,0,1,0,0,1,1,1,1,1,1,0,1,0,1,0,0,0,1,1,1,1,1,0,1,0,0,1,1,0,0,1,0,0,0,1,1,0,0,0,0,0,0,1,0,0,1,0,0,1,1,1,1,0,1,0,1,0,1,0,0,0,1,1,1,0,1,1,1]},sortedPages:["/_app"]}}(void 0,"/api/v1internal","/api/v1/:path*","/api/v1"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1321],{21110:(e,i,a)=>{a.d(i,{ThemeProvider:()=>r});var n=a(95155),o=a(12115),t=a(90085);function r({children:e}){let{initTheme:i}=(0,t.A)();return(0,o.useEffect)(()=>{i()},[i]),(0,n.jsx)(n.Fragment,{children:e})}},28777:(e,i,a)=>{a.d(i,{KC:()=>n.KC,Xg:()=>n.Xg});var n=a(45564);Object.entries(a(52679).Q2).filter(([,e])=>e.passthroughModels).map(([e])=>e),Object.entries(n.vq).flatMap(([e,i])=>i.map(i=>({provider:e,model:i.id,name:i.name})))},45564:(e,i,a)=>{a.d(i,{Xg:()=>l,vq:()=>m,KC:()=>d});var n=a(54642);let o={"Anthropic-Version":"2023-06-01","Anthropic-Beta":"claude-code-20250219,interleaved-thinking-2025-05-14"},t="https://api.kimi.com/coding/v1/messages",r={claude:{baseUrl:"https://api.anthropic.com/v1/messages",format:"claude",headers:{"Anthropic-Version":"2023-06-01","Anthropic-Beta":"claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14,context-management-2025-06-27,prompt-caching-scope-2026-01-05","Anthropic-Dangerous-Direct-Browser-Access":"true","User-Agent":"claude-cli/2.1.63 (external, cli)","X-App":"cli","X-Stainless-Helper-Method":"stream","X-Stainless-Retry-Count":"0","X-Stainless-Runtime-Version":"v24.3.0","X-Stainless-Package-Version":"0.74.0","X-Stainless-Runtime":"node","X-Stainless-Lang":"js","X-Stainless-Arch":function(){switch((0,n.arch)()){case"x64":return"x64";case"arm64":return"arm64";case"ia32":return"x86";default:return`other::${(0,n.arch)()}`}}(),"X-Stainless-Os":function(){switch((0,n.platform)()){case"darwin":return"MacOS";case"win32":return"Windows";case"linux":return"Linux";case"freebsd":return"FreeBSD";default:return`Other::${(0,n.platform)()}`}}(),"X-Stainless-Timeout":"600"},clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",tokenUrl:"https://api.anthropic.com/v1/oauth/token"},gemini:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",format:"gemini",clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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"},"gemini-cli":{baseUrl:"https://cloudcode-pa.googleapis.com/v1internal",format:"gemini-cli",clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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"},codex:{baseUrl:"https://chatgpt.com/backend-api/codex/responses",format:"openai-responses",headers:{originator:"codex-cli","User-Agent":"codex-cli/1.0.18 (macOS; arm64)"},clientId:"app_EMoamEEZ73f0CkXaXp7hrann",clientSecret:"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",tokenUrl:"https://auth.openai.com/oauth/token"},qwen:{baseUrl:"https://portal.qwen.ai/v1/chat/completions",format:"openai",headers:{"User-Agent":"google-api-nodejs-client/9.15.1","X-Goog-Api-Client":"gl-node/22.17.0"},clientId:"f0304373b74a44d2b584a3fb70ca9e56",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",authUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code"},iflow:{baseUrl:"https://apis.iflow.cn/v1/chat/completions",format:"openai",headers:{"User-Agent":"iFlow-Cli"},clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",tokenUrl:"https://iflow.cn/oauth/token",authUrl:"https://iflow.cn/oauth"},antigravity:{baseUrls:["https://daily-cloudcode-pa.googleapis.com","https://daily-cloudcode-pa.sandbox.googleapis.com"],format:"antigravity",headers:{"User-Agent":`antigravity/1.107.0 ${(0,n.platform)()}/${(0,n.arch)()}`},clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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"},openrouter:{baseUrl:"https://openrouter.ai/api/v1/chat/completions",format:"openai",headers:{"HTTP-Referer":"https://endpoint-proxy.local","X-Title":"Endpoint Proxy"}},openai:{baseUrl:"https://api.openai.com/v1/chat/completions",format:"openai"},glm:{baseUrl:"https://api.z.ai/api/anthropic/v1/messages",format:"claude",headers:{...o}},"glm-cn":{baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",format:"openai",headers:{}},kimi:{baseUrl:t,format:"claude",headers:{...o}},minimax:{baseUrl:"https://api.minimax.io/anthropic/v1/messages",format:"claude",headers:{...o}},"minimax-cn":{baseUrl:"https://api.minimaxi.com/anthropic/v1/messages",format:"claude",headers:{...o}},alicode:{baseUrl:"https://coding.dashscope.aliyuncs.com/v1/chat/completions",format:"openai",headers:{}},"alicode-intl":{baseUrl:"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions",format:"openai",headers:{}},github:{baseUrl:"https://api.githubcopilot.com/chat/completions",responsesUrl:"https://api.githubcopilot.com/responses",format:"openai",headers:{"copilot-integration-id":"vscode-chat","editor-version":"vscode/1.110.0","editor-plugin-version":"copilot-chat/0.38.0","user-agent":"GitHubCopilotChat/0.38.0","openai-intent":"conversation-panel","x-github-api-version":"2025-04-01","x-vscode-user-agent-library-version":"electron-fetch","X-Initiator":"user",Accept:"application/json","Content-Type":"application/json"}},kiro:{baseUrl:"https://codewhisperer.us-east-1.amazonaws.com/generateAssistantResponse",format:"kiro",headers:{"Content-Type":"application/json",Accept:"application/vnd.amazon.eventstream","X-Amz-Target":"AmazonCodeWhispererStreamingService.GenerateAssistantResponse","User-Agent":"AWS-SDK-JS/3.0.0 kiro-ide/1.0.0","X-Amz-User-Agent":"aws-sdk-js/3.0.0 kiro-ide/1.0.0"},tokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",authUrl:"https://prod.us-east-1.auth.desktop.kiro.dev"},cursor:{baseUrl:"https://api2.cursor.sh",chatPath:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",format:"cursor",headers:{"connect-accept-encoding":"gzip","connect-protocol-version":"1","Content-Type":"application/connect+proto","User-Agent":"connect-es/1.6.1"},clientVersion:"1.1.3"},"kimi-coding":{baseUrl:t,format:"claude",headers:{...o},clientId:"17e5f671-d194-4dfb-9706-5516cb48c098",tokenUrl:"https://auth.kimi.com/api/oauth/token",refreshUrl:"https://auth.kimi.com/api/oauth/token"},kilocode:{baseUrl:"https://api.kilo.ai/api/openrouter/chat/completions",format:"openai",headers:{}},cline:{baseUrl:"https://api.cline.bot/api/v1/chat/completions",format:"openai",headers:{"HTTP-Referer":"https://cline.bot","X-Title":"Cline"},tokenUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},nvidia:{baseUrl:"https://integrate.api.nvidia.com/v1/chat/completions",format:"openai"},anthropic:{baseUrl:"https://api.anthropic.com/v1/messages",format:"claude",headers:{...o}},deepseek:{baseUrl:"https://api.deepseek.com/chat/completions",format:"openai"},groq:{baseUrl:"https://api.groq.com/openai/v1/chat/completions",format:"openai"},xai:{baseUrl:"https://api.x.ai/v1/chat/completions",format:"openai"},mistral:{baseUrl:"https://api.mistral.ai/v1/chat/completions",format:"openai"},perplexity:{baseUrl:"https://api.perplexity.ai/chat/completions",format:"openai"},together:{baseUrl:"https://api.together.xyz/v1/chat/completions",format:"openai"},fireworks:{baseUrl:"https://api.fireworks.ai/inference/v1/chat/completions",format:"openai"},cerebras:{baseUrl:"https://api.cerebras.ai/v1/chat/completions",format:"openai"},cohere:{baseUrl:"https://api.cohere.ai/v1/chat/completions",format:"openai"},nebius:{baseUrl:"https://api.studio.nebius.ai/v1/chat/completions",format:"openai"},siliconflow:{baseUrl:"https://api.siliconflow.cn/v1/chat/completions",format:"openai"},hyperbolic:{baseUrl:"https://api.hyperbolic.xyz/v1/chat/completions",format:"openai"},deepgram:{baseUrl:"https://api.deepgram.com/v1/listen",format:"openai"},assemblyai:{baseUrl:"https://api.assemblyai.com/v1/audio/transcriptions",format:"openai"},nanobanana:{baseUrl:"https://api.nanobananaapi.ai/v1/chat/completions",format:"openai"},chutes:{baseUrl:"https://llm.chutes.ai/v1/chat/completions",format:"openai"},ollama:{baseUrl:"https://ollama.com/api/chat",format:"ollama"},"ollama-local":{baseUrl:"http://localhost:11434/api/chat",format:"ollama"},vertex:{baseUrl:"https://aiplatform.googleapis.com",format:"gemini"},"vertex-partner":{baseUrl:"https://aiplatform.googleapis.com",format:"openai"}},m={cc:[{id:"claude-opus-4-6",name:"Claude Opus 4.6"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4-5-20251101",name:"Claude 4.5 Opus"},{id:"claude-sonnet-4-5-20250929",name:"Claude 4.5 Sonnet"},{id:"claude-haiku-4-5-20251001",name:"Claude 4.5 Haiku"}],cx:[{id:"gpt-5.4",name:"GPT 5.4"},{id:"gpt-5.3-codex",name:"GPT 5.3 Codex"},{id:"gpt-5.3-codex-xhigh",name:"GPT 5.3 Codex (xHigh)"},{id:"gpt-5.3-codex-high",name:"GPT 5.3 Codex (High)"},{id:"gpt-5.3-codex-low",name:"GPT 5.3 Codex (Low)"},{id:"gpt-5.3-codex-none",name:"GPT 5.3 Codex (None)"},{id:"gpt-5.3-codex-spark",name:"GPT 5.3 Codex Spark"},{id:"gpt-5.1-codex-mini",name:"GPT 5.1 Codex Mini"},{id:"gpt-5.1-codex-mini-high",name:"GPT 5.1 Codex Mini (High)"},{id:"gpt-5.2-codex",name:"GPT 5.2 Codex"},{id:"gpt-5.2",name:"GPT 5.2"},{id:"gpt-5.1-codex-max",name:"GPT 5.1 Codex Max"},{id:"gpt-5.1-codex",name:"GPT 5.1 Codex"},{id:"gpt-5.1",name:"GPT 5.1"},{id:"gpt-5-codex",name:"GPT 5 Codex"},{id:"gpt-5-codex-mini",name:"GPT 5 Codex Mini"}],gc:[{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro Preview"}],qw:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"qwen3-coder-flash",name:"Qwen3 Coder Flash"},{id:"vision-model",name:"Qwen3 Vision Model"},{id:"coder-model",name:"Qwen3.5 Coder Model"}],if:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"qwen3-max",name:"Qwen3 Max"},{id:"qwen3-vl-plus",name:"Qwen3 VL Plus"},{id:"qwen3-max-preview",name:"Qwen3 Max Preview"},{id:"qwen3-235b",name:"Qwen3 235B A22B"},{id:"qwen3-235b-a22b-instruct",name:"Qwen3 235B A22B Instruct"},{id:"qwen3-235b-a22b-thinking-2507",name:"Qwen3 235B A22B Thinking"},{id:"qwen3-32b",name:"Qwen3 32B"},{id:"kimi-k2",name:"Kimi K2"},{id:"deepseek-v3.2",name:"DeepSeek V3.2 Exp"},{id:"deepseek-v3.1",name:"DeepSeek V3.1 Terminus"},{id:"deepseek-v3",name:"DeepSeek V3 671B"},{id:"deepseek-r1",name:"DeepSeek R1"},{id:"glm-4.7",name:"GLM 4.7"},{id:"iflow-rome-30ba3b",name:"iFlow ROME"}],ag:[{id:"gemini-3.1-pro-high",name:"Gemini 3 Pro High"},{id:"gemini-3.1-pro-low",name:"Gemini 3 Pro Low"},{id:"gemini-3-flash",name:"Gemini 3 Flash"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking"},{id:"gpt-oss-120b-medium",name:"GPT OSS 120B Medium"}],gh:[{id:"gpt-3.5-turbo",name:"GPT-3.5 Turbo"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o mini"},{id:"gpt-4.1",name:"GPT-4.1"},{id:"gpt-5",name:"GPT-5"},{id:"gpt-5-mini",name:"GPT-5 Mini"},{id:"gpt-5-codex",name:"GPT-5 Codex"},{id:"gpt-5.1",name:"GPT-5.1"},{id:"gpt-5.1-codex",name:"GPT-5.1 Codex"},{id:"gpt-5.1-codex-mini",name:"GPT-5.1 Codex Mini"},{id:"gpt-5.1-codex-max",name:"GPT-5.1 Codex Max"},{id:"gpt-5.2",name:"GPT-5.2"},{id:"gpt-5.2-codex",name:"GPT-5.2 Codex"},{id:"gpt-5.3-codex",name:"GPT-5.3 Codex"},{id:"gpt-5.4",name:"GPT-5.4"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5"},{id:"claude-opus-4.1",name:"Claude Opus 4.1"},{id:"claude-opus-4.5",name:"Claude Opus 4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4.6",name:"Claude Opus 4.6"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro"},{id:"grok-code-fast-1",name:"Grok Code Fast 1"},{id:"oswe-vscode-prime",name:"Raptor Mini"}],kr:[{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5"},{id:"deepseek-3.2",name:"DeepSeek 3.2"},{id:"deepseek-3.1",name:"DeepSeek 3.1"},{id:"qwen3-coder-next",name:"Qwen3 Coder Next"}],cu:[{id:"default",name:"Auto (Server Picks)"},{id:"claude-4.5-opus-high-thinking",name:"Claude 4.5 Opus High Thinking"},{id:"claude-4.5-opus-high",name:"Claude 4.5 Opus High"},{id:"claude-4.5-sonnet-thinking",name:"Claude 4.5 Sonnet Thinking"},{id:"claude-4.5-sonnet",name:"Claude 4.5 Sonnet"},{id:"claude-4.5-haiku",name:"Claude 4.5 Haiku"},{id:"claude-4.5-opus",name:"Claude 4.5 Opus"},{id:"gpt-5.2-codex",name:"GPT 5.2 Codex"},{id:"claude-4.6-opus-max",name:"Claude 4.6 Opus Max"},{id:"claude-4.6-sonnet-medium-thinking",name:"Claude 4.6 Sonnet Medium Thinking"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gpt-5.2",name:"GPT 5.2"},{id:"gpt-5.3-codex",name:"GPT 5.3 Codex"}],kmc:[{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"kimi-k2.5-thinking",name:"Kimi K2.5 Thinking"},{id:"kimi-latest",name:"Kimi Latest"}],kc:[{id:"anthropic/claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"anthropic/claude-opus-4-20250514",name:"Claude Opus 4"},{id:"google/gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"google/gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"openai/gpt-4.1",name:"GPT-4.1"},{id:"openai/o3",name:"o3"},{id:"deepseek/deepseek-chat",name:"DeepSeek Chat"},{id:"deepseek/deepseek-reasoner",name:"DeepSeek Reasoner"}],cl:[{id:"anthropic/claude-sonnet-4.6",name:"Claude Sonnet 4.6"},{id:"anthropic/claude-opus-4.6",name:"Claude Opus 4.6"},{id:"openai/gpt-5.3-codex",name:"GPT-5.3 Codex"},{id:"openai/gpt-5.4",name:"GPT-5.4"},{id:"google/gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview"},{id:"google/gemini-3.1-flash-lite-preview",name:"Gemini 3.1 Flash Lite Preview"},{id:"kwaipilot/kat-coder-pro",name:"KAT Coder Pro"}],openai:[{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-5-mini",name:"GPT-5 Mini"},{id:"gpt-4-turbo",name:"GPT-4 Turbo"},{id:"o1",name:"O1"},{id:"o1-mini",name:"O1 Mini"}],anthropic:[{id:"claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"claude-opus-4-20250514",name:"Claude Opus 4"},{id:"claude-3-5-sonnet-20241022",name:"Claude 3.5 Sonnet"}],gemini:[{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview"},{id:"gemini-3.1-flash-lite-preview",name:"Gemini 3.1 Flash Lite Preview"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro Preview"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite"},{id:"gemini-embedding-001",name:"Gemini Embedding 001",type:"embedding"},{id:"text-embedding-005",name:"Text Embedding 005",type:"embedding"},{id:"text-embedding-004",name:"Text Embedding 004 (Legacy)",type:"embedding"}],openrouter:[{id:"auto",name:"Auto (Best Available)"}],glm:[{id:"glm-5",name:"GLM 5"},{id:"glm-4.7",name:"GLM 4.7"},{id:"glm-4.6v",name:"GLM 4.6V (Vision)"}],"glm-cn":[{id:"glm-5",name:"GLM 5"},{id:"glm-4.7",name:"GLM-4.7"},{id:"glm-4.6",name:"GLM-4.6"},{id:"glm-4.5-air",name:"GLM-4.5-Air"}],kimi:[{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"kimi-k2.5-thinking",name:"Kimi K2.5 Thinking"},{id:"kimi-latest",name:"Kimi Latest"}],minimax:[{id:"MiniMax-M2.7",name:"MiniMax M2.7"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"MiniMax-M2.1",name:"MiniMax M2.1"}],"minimax-cn":[{id:"MiniMax-M2.7",name:"MiniMax M2.7"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"MiniMax-M2.1",name:"MiniMax M2.1"}],alicode:[{id:"qwen3.5-plus",name:"Qwen3.5 Plus"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"glm-5",name:"GLM 5"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"qwen3-max-2026-01-23",name:"Qwen3 Max"},{id:"qwen3-coder-next",name:"Qwen3 Coder Next"},{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"glm-4.7",name:"GLM 4.7"}],"alicode-intl":[{id:"qwen3.5-plus",name:"Qwen3.5 Plus"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"glm-5",name:"GLM 5"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"qwen3-coder-next",name:"Qwen3 Coder Next"},{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"glm-4.7",name:"GLM 4.7"}],deepseek:[{id:"deepseek-chat",name:"DeepSeek V3.2 Chat"},{id:"deepseek-reasoner",name:"DeepSeek V3.2 Reasoner"}],groq:[{id:"llama-3.3-70b-versatile",name:"Llama 3.3 70B"},{id:"meta-llama/llama-4-maverick-17b-128e-instruct",name:"Llama 4 Maverick"},{id:"qwen/qwen3-32b",name:"Qwen3 32B"},{id:"openai/gpt-oss-120b",name:"GPT-OSS 120B"}],xai:[{id:"grok-4",name:"Grok 4"},{id:"grok-4-fast-reasoning",name:"Grok 4 Fast Reasoning"},{id:"grok-code-fast-1",name:"Grok Code Fast"},{id:"grok-3",name:"Grok 3"}],mistral:[{id:"mistral-large-latest",name:"Mistral Large 3"},{id:"codestral-latest",name:"Codestral"},{id:"mistral-medium-latest",name:"Mistral Medium 3"}],perplexity:[{id:"sonar-pro",name:"Sonar Pro"},{id:"sonar",name:"Sonar"}],together:[{id:"meta-llama/Llama-3.3-70B-Instruct-Turbo",name:"Llama 3.3 70B Turbo"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"Qwen/Qwen3-235B-A22B",name:"Qwen3 235B"},{id:"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",name:"Llama 4 Maverick"}],fireworks:[{id:"accounts/fireworks/models/deepseek-v3p1",name:"DeepSeek V3.1"},{id:"accounts/fireworks/models/llama-v3p3-70b-instruct",name:"Llama 3.3 70B"},{id:"accounts/fireworks/models/qwen3-235b-a22b",name:"Qwen3 235B"}],cerebras:[{id:"gpt-oss-120b",name:"GPT OSS 120B"},{id:"zai-glm-4.7",name:"ZAI GLM 4.7"},{id:"llama-3.3-70b",name:"Llama 3.3 70B"},{id:"llama-4-scout-17b-16e-instruct",name:"Llama 4 Scout"},{id:"qwen-3-235b-a22b-instruct-2507",name:"Qwen3 235B A22B"},{id:"qwen-3-32b",name:"Qwen3 32B"}],cohere:[{id:"command-r-plus-08-2024",name:"Command R+ (Aug 2024)"},{id:"command-r-08-2024",name:"Command R (Aug 2024)"},{id:"command-a-03-2025",name:"Command A (Mar 2025)"}],nvidia:[{id:"moonshotai/kimi-k2.5",name:"Kimi K2.5"},{id:"z-ai/glm4.7",name:"GLM 4.7"},{id:"deepseek-ai/deepseek-v3.2",name:"DeepSeek V3.2"},{id:"nvidia/llama-3.3-70b-instruct",name:"Llama 3.3 70B"},{id:"meta/llama-4-maverick-17b-128e-instruct",name:"Llama 4 Maverick"},{id:"deepseek/deepseek-r1",name:"DeepSeek R1"}],nebius:[{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama 3.3 70B Instruct"}],siliconflow:[{id:"deepseek-ai/DeepSeek-V3.2",name:"DeepSeek V3.2"},{id:"deepseek-ai/DeepSeek-V3.1",name:"DeepSeek V3.1"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"Qwen/Qwen3-235B-A22B-Instruct-2507",name:"Qwen3 235B"},{id:"Qwen/Qwen3-Coder-480B-A35B-Instruct",name:"Qwen3 Coder 480B"},{id:"Qwen/Qwen3-32B",name:"Qwen3 32B"},{id:"moonshotai/Kimi-K2.5",name:"Kimi K2.5"},{id:"zai-org/GLM-4.7",name:"GLM 4.7"},{id:"openai/gpt-oss-120b",name:"GPT OSS 120B"},{id:"baidu/ERNIE-4.5-300B-A47B",name:"ERNIE 4.5 300B"}],hyperbolic:[{id:"Qwen/QwQ-32B",name:"QwQ 32B"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"deepseek-ai/DeepSeek-V3",name:"DeepSeek V3"},{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama 3.3 70B"},{id:"meta-llama/Llama-3.2-3B-Instruct",name:"Llama 3.2 3B"},{id:"Qwen/Qwen2.5-72B-Instruct",name:"Qwen 2.5 72B"},{id:"Qwen/Qwen2.5-Coder-32B-Instruct",name:"Qwen 2.5 Coder 32B"},{id:"NousResearch/Hermes-3-Llama-3.1-70B",name:"Hermes 3 70B"}],ollama:[{id:"gpt-oss:120b",name:"GPT OSS 120B"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"glm-5",name:"GLM 5"},{id:"minimax-m2.5",name:"MiniMax M2.5"},{id:"glm-4.7-flash",name:"GLM 4.7 Flash"},{id:"qwen3.5",name:"Qwen3.5"}],vertex:[{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview"},{id:"gemini-3.1-flash-lite-preview",name:"Gemini 3.1 Flash Lite Preview"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"}],"vertex-partner":[{id:"deepseek-ai/deepseek-v3.2-maas",name:"DeepSeek V3.2 (Vertex)"},{id:"qwen/qwen3-next-80b-a3b-thinking-maas",name:"Qwen3 Next 80B Thinking (Vertex)"},{id:"qwen/qwen3-next-80b-a3b-instruct-maas",name:"Qwen3 Next 80B Instruct (Vertex)"},{id:"zai-org/glm-5-maas",name:"GLM-5 (Vertex)"}]},s={claude:"cc",codex:"cx","gemini-cli":"gc",qwen:"qw",iflow:"if",antigravity:"ag",github:"gh",kiro:"kr",cursor:"cu","kimi-coding":"kmc",kilocode:"kc",cline:"cl",vertex:"vertex","vertex-partner":"vertex-partner"},l=Object.fromEntries(Object.keys(r).map(e=>[e,s[e]||e]));function d(e){return m[l[e]||e]||[]}},52679:(e,i,a)=>{a.d(i,{DI:()=>m,IS:()=>n,JH:()=>r,MA:()=>c,Q2:()=>d,fg:()=>t,gb:()=>l,mq:()=>s,wG:()=>h,wb:()=>u,zN:()=>o,zt:()=>p});let n={iflow:{id:"iflow",alias:"if",name:"iFlow AI",icon:"water_drop",color:"#6366F1"},qwen:{id:"qwen",alias:"qw",name:"Qwen Code",icon:"psychology",color:"#10B981"},"gemini-cli":{id:"gemini-cli",alias:"gc",name:"Gemini CLI",icon:"terminal",color:"#4285F4"},kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35"}},o={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#079A8B"},antigravity:{id:"antigravity",alias:"ag",name:"Antigravity",icon:"rocket_launch",color:"#F59E0B"},codex:{id:"codex",alias:"cx",name:"OpenAI Codex",icon:"code",color:"#3B82F6"},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333"},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA"},kilocode:{id:"kilocode",alias:"kc",name:"Kilo Code",icon:"code",color:"#FF6B35",textIcon:"KC"},cline:{id:"cline",alias:"cl",name:"Cline",icon:"smart_toy",color:"#5B9BD5",textIcon:"CL"}},t={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#F97316",textIcon:"OR",passthroughModels:!0,website:"https://openrouter.ai"},glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn"},"glm-cn":{id:"glm-cn",alias:"glm-cn",name:"GLM (China)",icon:"code",color:"#DC2626",textIcon:"GC",website:"https://open.bigmodel.cn"},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn"},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com"},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com"},alicode:{id:"alicode",alias:"alicode",name:"Alibaba",icon:"cloud",color:"#FF6A00",textIcon:"ALi"},"alicode-intl":{id:"alicode-intl",alias:"alicode-intl",name:"Alibaba Intl",icon:"cloud",color:"#FF6A00",textIcon:"ALi"},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com"},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#079A8B",textIcon:"AN",website:"https://console.anthropic.com"},gemini:{id:"gemini",alias:"gemini",name:"Gemini",icon:"diamond",color:"#4285F4",textIcon:"GE",website:"https://ai.google.dev"},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com"},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com"},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai"},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai"},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai"},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai"},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai"},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://www.cerebras.ai"},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com"},nvidia:{id:"nvidia",alias:"nvidia",name:"NVIDIA NIM",icon:"developer_board",color:"#76B900",textIcon:"NV",website:"https://developer.nvidia.com/nim"},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com"},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com"},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz"},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com"},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com"},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana",icon:"image",color:"#FFD700",textIcon:"NB",website:"https://nanobananaapi.ai"},chutes:{id:"chutes",alias:"ch",name:"Chutes AI",icon:"water_drop",color:"#ffffffff",textIcon:"CH",website:"https://chutes.ai"},ollama:{id:"ollama",alias:"ollama",name:"Ollama Cloud",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com"},"ollama-local":{id:"ollama-local",alias:"ollama-local",name:"Ollama Local",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com"},vertex:{id:"vertex",alias:"vx",name:"Vertex AI",icon:"cloud",color:"#4285F4",textIcon:"VX",website:"https://cloud.google.com/vertex-ai"},"vertex-partner":{id:"vertex-partner",alias:"vxp",name:"Vertex Partner",icon:"cloud",color:"#34A853",textIcon:"VP",website:"https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models"}},r="openai-compatible-",m="anthropic-compatible-";function s(e){return"string"==typeof e&&e.startsWith(r)}function l(e){return"string"==typeof e&&e.startsWith(m)}let d={...n,...o,...t},c={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"}};function p(e){for(let i of Object.values(d))if(i.alias===e||i.id===e)return i;return null}function h(e){let i=d[e];return i?.alias||e}Object.values(d).reduce((e,i)=>(e[i.alias]=i.id,e),{}),Object.values(d).reduce((e,i)=>(e[i.id]=i.alias,e),{});let u=["claude","antigravity","kiro","github","codex","kimi-coding"]},73006:(e,i,a)=>{a.d(i,{FE:()=>p,Tl:()=>l,wn:()=>h});var n=a(93308);let o={},t=n.Xn,r=[];function m(){if("u"<typeof document)return n.Xn;let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${n.CL}=`)),i=e?decodeURIComponent(e.split("=")[1]):n.Xn;return(0,n.QC)(i)}async function s(e){if("en"===e){o={};return}try{let i=await fetch(`/i18n/literals/${e}.json`);o=await i.json()}catch(e){console.error("Failed to load translations:",e),o={}}}function l(e){if(!e||"string"!=typeof e)return e;let i=e.trim();return i&&"en"!==t&&o[i]||e}function d(e){if(!e.nodeValue||!e.nodeValue.trim())return;let i=e.parentElement;if(!i)return;let a=i;for(;a;){if(a.hasAttribute&&a.hasAttribute("data-i18n-skip"))return;a=a.parentElement}if(["script","style","code","pre","colgroup","table","thead","tbody","tfoot","tr","select","datalist","optgroup"].includes(i.tagName?.toLowerCase()))return;e._originalText||(e._originalText=e.nodeValue);let n=l(e._originalText);n!==e.nodeValue&&(e.nodeValue=n)}function c(e){let i;if(!e)return;let a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),n=[];for(;i=a.nextNode();)n.push(i);n.forEach(d)}async function p(){t=m(),await s(t),c(document.body),new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{e.nodeType===Node.ELEMENT_NODE?c(e):e.nodeType===Node.TEXT_NODE&&d(e)})})}).observe(document.body,{childList:!0,subtree:!0})}async function h(){t=m(),await s(t),r.forEach(e=>e()),c(document.body)}},90085:(e,i,a)=>{a.d(i,{A:()=>m});var n=a(1934),o=a(31692),t=a(90620);function r(e){let i=document.documentElement,a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"dark"===("system"===e?a:e)?i.classList.add("dark"):i.classList.remove("dark")}let m=(0,n.v)((0,o.Zr)((e,i)=>({theme:t.B2.defaultTheme,setTheme:i=>{e({theme:i}),r(i)},toggleTheme:()=>{let a="dark"===i().theme?"light":"dark";e({theme:a}),r(a)},initTheme:()=>{r(i().theme)}}),{name:t.B2.storageKey}))},90620:(e,i,a)=>{a.d(i,{Q2:()=>n.Q2,fg:()=>n.fg,vQ:()=>o,MA:()=>n.MA,UY:()=>r,zN:()=>n.zN,B2:()=>t});var n=a(52679);a(28777);let o={name:"iRouter - Server",description:"Enterprise AI Infrastructure Management",version:"0.3.60-i15"},t={storageKey:"theme",defaultTheme:"system"},r={maxLines:200,pollIntervalMs:1e3}},93308:(e,i,a)=>{a.d(i,{CL:()=>t,QC:()=>r,Xn:()=>o,YZ:()=>n});let n=["en","vi","zh-CN","zh-TW","ja","pt-BR","pt-PT","ko","es","de","fr","he","ar","ru","pl","cs","nl","tr","uk","tl","id","th","hi","bn","ur","ro","sv","it","el","hu","fi","da","no"],o="en",t="locale";function r(e){return"zh"===e||"zh-CN"===e?"zh-CN":"en"===e?"en":"vi"===e?"vi":"zh-TW"===e?"zh-TW":"ja"===e?"ja":"pt-BR"===e?"pt-BR":"pt-PT"===e?"pt-PT":"ko"===e?"ko":"es"===e?"es":"de"===e?"de":"fr"===e?"fr":"he"===e?"he":"ar"===e?"ar":"ru"===e?"ru":"pl"===e?"pl":"cs"===e?"cs":"nl"===e?"nl":"tr"===e?"tr":"uk"===e?"uk":"tl"===e?"tl":"id"===e?"id":"th"===e?"th":"hi"===e?"hi":"bn"===e?"bn":"ur"===e?"ur":"ro"===e?"ro":"sv"===e?"sv":"it"===e?"it":"el"===e?"el":"hu"===e?"hu":"fi"===e?"fi":"da"===e?"da":"no"===e?"no":o}}}]);
@@ -1,7 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5497],{98:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({label:e,options:t=[],value:s,onChange:n,placeholder:i="Select an option",error:o,hint:d,disabled:c=!1,required:m=!1,className:x,selectClassName:u,...h}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",x),children:[e&&(0,r.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,m&&(0,r.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("select",{value:s,onChange:n,disabled:c,className:(0,a.cn)("w-full py-2 px-3 pr-10 text-sm text-text-main","bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md appearance-none","focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none","transition-all disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",o?"border-red-500 focus:border-red-500 focus:ring-red-500/20":"",u),...h,children:[(0,r.jsx)("option",{value:"",disabled:!0,children:i}),t.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,r.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),o&&(0,r.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,r.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},1620:(e,t,s)=>{s.d(t,{D:()=>o});var r=s(12115),a=s(90085);function l(e){let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function n(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function i(){return!1}function o(){let{theme:e,setTheme:t,toggleTheme:s,initTheme:o}=(0,a.A)(),d=(0,r.useSyncExternalStore)(l,n,i);(0,r.useEffect)(()=>{o()},[o]),(0,r.useEffect)(()=>{if("system"!==e)return;let t=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>o();return t.addEventListener("change",s),()=>t.removeEventListener("change",s)},[e,o]);let c="dark"===e||"system"===e&&d;return{theme:e,setTheme:t,toggleTheme:s,isDark:c}}},7648:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(95155),a=s(12115),l=s(73321),n=s(65921),i=s(92622),o=s(74891);function d({children:e}){let[t,s]=(0,a.useState)(!1),c=(0,l.usePathname)(),m=(0,n.i)(e=>e.notifications),x=(0,n.i)(e=>e.removeNotification);return(0,r.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg",children:[(0,r.jsx)("div",{className:"fixed top-4 right-4 z-[80] flex w-[min(92vw,380px)] flex-col gap-2",children:m.map(e=>{var t;let s="success"===(t=e.type)?{wrapper:"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",icon:"check_circle"}:"error"===t?{wrapper:"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",icon:"error"}:"warning"===t?{wrapper:"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",icon:"warning"}:{wrapper:"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",icon:"info"};return(0,r.jsx)("div",{className:`rounded-lg border px-3 py-2 shadow-lg backdrop-blur-sm ${s.wrapper}`,children:(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-5",children:s.icon}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[e.title?(0,r.jsx)("p",{className:"text-xs font-semibold mb-0.5",children:e.title}):null,(0,r.jsx)("p",{className:"text-xs whitespace-pre-wrap break-words",children:e.message})]}),e.dismissible?(0,r.jsx)("button",{type:"button",onClick:()=>x(e.id),className:"text-current/70 hover:text-current","aria-label":"Dismiss notification",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})}):null]})},e.id)})}),t&&(0,r.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 lg:hidden",onClick:()=>s(!1)}),(0,r.jsx)("div",{className:"hidden lg:flex",children:(0,r.jsx)(i.default,{})}),(0,r.jsx)("div",{className:`fixed inset-y-0 left-0 z-50 transform lg:hidden transition-transform duration-300 ease-in-out ${t?"translate-x-0":"-translate-x-full"}`,children:(0,r.jsx)(i.default,{onClose:()=>s(!1)})}),(0,r.jsxs)("main",{className:"flex flex-col flex-1 h-full min-w-0 relative transition-colors duration-300",children:[(0,r.jsx)(o.default,{onMenuClick:()=>s(!0)},c),(0,r.jsx)("div",{className:`flex-1 overflow-y-auto custom-scrollbar ${"/dashboard/basic-chat"===c?"":"p-6 lg:p-10"} ${"/dashboard/basic-chat"===c?"flex flex-col overflow-hidden":""}`,children:(0,r.jsx)("div",{className:`${"/dashboard/basic-chat"===c?"flex-1 w-full h-full flex flex-col":"max-w-7xl mx-auto"}`,children:e})})]})]})}},10124:(e,t,s)=>{s.d(t,{A:()=>b});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(1728),o=s(90639),d=s(28408),c=s(32539),m=s(59656),x=s(58021),u=s(54736),h=s(84588);let p=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),f=e=>`$${(e||0).toFixed(2)}`;function b({period:e="7d",from:t,to:s}){let[l,n]=(0,a.useState)([]),[g,j]=(0,a.useState)(!0),[y,v]=(0,a.useState)("tokens"),N=(0,a.useCallback)(async(r=!1)=>{r||j(!0);try{let r;r=t&&s?`from=${encodeURIComponent(t)}&to=${encodeURIComponent(s)}`:`period=${e}`;let a=await fetch(`/api/usage/chart?${r}`);if(a.ok){let e=await a.json();n(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{r||j(!1)}},[e,t,s]);(0,a.useEffect)(()=>{N();let e=setInterval(()=>{N(!0)},2e4);return()=>clearInterval(e)},[N]);let w=l.some(e=>e.tokens>0||e.cost>0);return(0,r.jsxs)(h.default,{className:"p-4 flex flex-col gap-3 h-full",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between shrink-0",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Usage Trend"}),(0,r.jsxs)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border",children:[(0,r.jsx)("button",{onClick:()=>v("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===y?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"}),(0,r.jsx)("button",{onClick:()=>v("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===y?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),g?(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):w?(0,r.jsx)("div",{className:"flex-1 min-h-0 w-full",children:(0,r.jsx)(i.u,{width:"100%",height:"100%",children:(0,r.jsxs)(o.Q,{data:l,margin:{top:4,right:8,left:10,bottom:0},children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,r.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,r.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,r.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,r.jsx)(d.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,r.jsx)(c.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,r.jsx)(m.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===y?p:f,width:75}),(0,r.jsx)(x.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px",color:"var(--color-text)"},itemStyle:{color:"var(--color-text)"},formatter:(e,t)=>"tokens"===t?[p(e),"Tokens"]:[f(e),"Cost"]}),"tokens"===y?(0,r.jsx)(u.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,r.jsx)(u.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})})}):(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}b.propTypes={period:n().string}},11059:(e,t,s)=>{s.d(t,{C:()=>a});var r=s(12115);function a(e=2e3){let[t,s]=(0,r.useState)(null),l=(0,r.useRef)(null);return{copied:t,copy:(0,r.useCallback)((t,r="default")=>{navigator.clipboard.writeText(t),s(r),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{s(null)},e)},[e])}}},11910:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({label:e,type:t="text",placeholder:s,value:n,onChange:i,error:o,hint:d,icon:c,disabled:m=!1,required:x=!1,className:u,inputClassName:h,...p}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",u),children:[e&&(0,r.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,x&&(0,r.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,r.jsxs)("div",{className:"relative",children:[c&&(0,r.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:c})}),(0,r.jsx)("input",{type:t,placeholder:s,value:n,onChange:i,disabled:m,className:(0,a.cn)("w-full py-2 px-3 text-sm text-text-main","bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md","placeholder-text-muted/60","focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none","transition-all shadow-inner disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",c&&"pl-10",o?"border-red-500 focus:border-red-500 focus:ring-red-500/20":"",h),...p})]}),o&&(0,r.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,r.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},21931:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(95155),a=s(12115),l=s(47650),n=s(93308),i=s(73006);let o=e=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"}})[e]||{name:e,flag:"\uD83C\uDF10"};function d({className:e=""}){let[t,s]=(0,a.useState)("en"),[c,m]=(0,a.useState)(!1),[x,u]=(0,a.useState)(!1),h=(0,a.useRef)(null);(0,a.useEffect)(()=>{s(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${n.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,n.QC)(t)}())},[]),(0,a.useEffect)(()=>{function e(e){h.current&&!h.current.contains(e.target)&&u(!1)}if(x)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[x]);let p=async e=>{if(e!==t&&!c){m(!0),u(!1);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:e})}),await (0,i.wn)(),s(e)}catch(e){console.error("Failed to set locale:",e)}finally{m(!1)}}};return(0,r.jsxs)("div",{className:e,children:[(0,r.jsxs)("button",{onClick:()=>u(!x),disabled:c,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,r.jsx)("span",{className:"text-xl",children:o(t).flag}),(0,r.jsx)("span",{className:"text-sm font-medium",children:o(t).name}),(0,r.jsx)("span",{className:"material-symbols-outlined text-base",children:x?"expand_less":"expand_more"})]}),x&&(0,l.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>u(!1)}),(0,r.jsxs)("div",{ref:h,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,r.jsx)("button",{onClick:()=>u(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,r.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:n.YZ.map(e=>{let s=t===e,a=o(e);return(0,r.jsxs)("button",{onClick:()=>p(e),disabled:c,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${s?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${c?"opacity-70 cursor-wait":""}`,title:a.name,children:[(0,r.jsx)("span",{className:"text-2xl",children:a.flag}),(0,r.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:a.name}),s&&(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},e)})})})]})]}),document.body)]})}},23615:(e,t,s)=>{s.d(t,{default:()=>n});var r=s(95155),a=s(12115),l=s(84588);function n(){let[e,t]=(0,a.useState)([]),[s,n]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!0);(0,a.useEffect)(()=>{d()},[]),(0,a.useEffect)(()=>{let e;return i&&(e=setInterval(()=>{d(!1)},3e3)),()=>clearInterval(e)},[i]);let d=async(e=!0)=>{e&&n(!0);try{let e=await fetch("/api/usage/request-logs");if(e.ok){let s=await e.json();t(s)}}catch(e){console.error("Failed to fetch logs:",e)}finally{e&&n(!1)}};return(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"Request Logs"}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:(0,r.jsxs)("label",{className:"text-sm font-medium text-text-muted flex items-center gap-2 cursor-pointer",children:[(0,r.jsx)("span",{children:"Auto Refresh (3s)"}),(0,r.jsx)("div",{onClick:()=>o(!i),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${i?"bg-primary":"bg-bg-subtle border border-border"}`,children:(0,r.jsx)("span",{className:`inline-block h-3 w-3 transform rounded-full bg-white transition-transform ${i?"translate-x-5":"translate-x-1"}`})})]})})]}),(0,r.jsx)(l.default,{className:"overflow-hidden bg-black/5 dark:bg-black/20",children:(0,r.jsx)("div",{className:"p-0 overflow-x-auto max-h-[600px] overflow-y-auto font-mono text-xs",children:s&&0===e.length?(0,r.jsx)("div",{className:"p-8 text-center text-text-muted",children:"Loading logs..."}):0===e.length?(0,r.jsx)("div",{className:"p-8 text-center text-text-muted",children:"No logs recorded yet."}):(0,r.jsxs)("table",{className:"w-full text-left border-collapse whitespace-nowrap",children:[(0,r.jsx)("thead",{className:"sticky top-0 bg-bg-subtle border-b border-border z-10",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"DateTime"}),(0,r.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Model"}),(0,r.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Provider"}),(0,r.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Account"}),(0,r.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"In"}),(0,r.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Out"}),(0,r.jsx)("th",{className:"px-3 py-2",children:"Status"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=e.split(" | ");if(s.length<7)return null;let a=s[6],l=a.includes("PENDING"),n=a.includes("FAILED"),i=a.includes("OK");return(0,r.jsxs)("tr",{className:`hover:bg-primary/5 transition-colors ${l?"bg-primary/5":""}`,children:[(0,r.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-text-muted",children:s[0]}),(0,r.jsx)("td",{className:"px-3 py-1.5 border-r border-border font-medium",children:s[1]}),(0,r.jsx)("td",{className:"px-3 py-1.5 border-r border-border",children:(0,r.jsx)("span",{className:"px-1.5 py-0.5 rounded bg-bg-subtle border border-border text-[10px] uppercase font-bold",children:s[2]})}),(0,r.jsx)("td",{className:"px-3 py-1.5 border-r border-border truncate max-w-[150px]",title:s[3],children:s[3]}),(0,r.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-primary",children:s[4]}),(0,r.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-success",children:s[5]}),(0,r.jsx)("td",{className:`px-3 py-1.5 font-bold ${i?"text-success":n?"text-error":"text-primary animate-pulse"}`,children:a})]},t)})})]})})}),(0,r.jsx)("div",{className:"text-[10px] text-text-muted italic",children:"Logs are saved to log.txt in the application data directory."})]})}},23936:(e,t,s)=>{s.d(t,{default:()=>o});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(35497);function o({isOpen:e,onSuccess:t,onClose:s}){let[l,n]=(0,a.useState)(""),[d,c]=(0,a.useState)(!1),[m,x]=(0,a.useState)(null),[u,h]=(0,a.useState)(!1),p=async()=>{if(!l.trim())return void x("Please paste your cookie");c(!0),x(null);try{let e=await fetch("/api/oauth/iflow/cookie",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cookie:l.trim()})}),s=await e.json();if(!e.ok)throw Error(s.error||"Authentication failed");h(!0),setTimeout(()=>{t?.(),f()},1500)}catch(e){x(e.message)}finally{c(!1)}},f=()=>{n(""),x(null),h(!1),s?.()};return(0,r.jsx)(i.aF,{isOpen:e,onClose:f,title:"iFlow Cookie Authentication",children:(0,r.jsx)("div",{className:"space-y-4",children:u?(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)("div",{className:"text-6xl mb-4",children:"✅"}),(0,r.jsx)("p",{className:"text-lg font-medium text-text-primary",children:"Authentication Successful!"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mt-2",children:"Fresh API key obtained"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:["To get a fresh API key, paste your browser cookie from"," ",(0,r.jsx)("a",{href:"https://platform.iflow.cn",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"platform.iflow.cn"})]}),(0,r.jsxs)("div",{className:"bg-surface-secondary p-3 rounded-lg text-xs space-y-2",children:[(0,r.jsx)("p",{className:"font-medium text-text-primary",children:"How to get cookie:"}),(0,r.jsxs)("ol",{className:"list-decimal list-inside space-y-1 text-text-muted",children:[(0,r.jsx)("li",{children:"Open platform.iflow.cn in your browser"}),(0,r.jsx)("li",{children:"Login to your account"}),(0,r.jsx)("li",{children:"Open DevTools (F12) → Application/Storage → Cookies"}),(0,r.jsx)("li",{children:"Copy the entire cookie string (must include BXAuth)"}),(0,r.jsx)("li",{children:"Paste it below"})]})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-text-primary",children:"Cookie String"}),(0,r.jsx)("textarea",{value:l,onChange:e=>n(e.target.value),placeholder:"BXAuth=xxx; ...",className:"w-full px-3 py-2 bg-surface-secondary border border-border rounded-lg text-sm text-text-primary placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-primary resize-none",rows:4,disabled:d})]}),m&&(0,r.jsx)("div",{className:"p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,r.jsx)("p",{className:"text-sm text-error",children:m})}),(0,r.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,r.jsx)(i.$n,{variant:"secondary",onClick:f,disabled:d,fullWidth:!0,children:"Cancel"}),(0,r.jsx)(i.$n,{onClick:p,loading:d,fullWidth:!0,children:"Authenticate"})]})]})})})}o.propTypes={isOpen:n().bool.isRequired,onSuccess:n().func,onClose:n().func}},25086:(e,t,s)=>{s.d(t,{CardSkeleton:()=>o,PageLoading:()=>n,Skeleton:()=>i,Spinner:()=>l,default:()=>d});var r=s(95155),a=s(31474);function l({size:e="md",className:t}){return(0,r.jsx)("span",{className:(0,a.cn)("material-symbols-outlined animate-spin text-primary",{sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"}[e],t),children:"progress_activity"})}function n({message:e="Loading..."}){return(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg",children:[(0,r.jsx)(l,{size:"xl"}),(0,r.jsx)("p",{className:"mt-4 text-text-muted",children:e})]})}function i({className:e,...t}){return(0,r.jsx)("div",{className:(0,a.cn)("animate-pulse rounded-lg bg-border",e),...t})}function o(){return(0,r.jsxs)("div",{className:"p-6 rounded-xl border border-border bg-surface",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)(i,{className:"h-4 w-24"}),(0,r.jsx)(i,{className:"size-10 rounded-lg"})]}),(0,r.jsx)(i,{className:"h-8 w-16 mb-2"}),(0,r.jsx)(i,{className:"h-3 w-20"})]})}function d({type:e="spinner",...t}){switch(e){case"page":return(0,r.jsx)(n,{...t});case"skeleton":return(0,r.jsx)(i,{...t});case"card":return(0,r.jsx)(o,{...t});default:return(0,r.jsx)(l,{...t})}}},28067:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({options:e=[],value:t,onChange:s,size:n="md",className:i}){let o={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,r.jsx)("div",{className:(0,a.cn)("inline-flex items-center p-1 rounded-lg","bg-black/5 dark:bg-white/5",i),children:e.map(e=>(0,r.jsxs)("button",{onClick:()=>s(e.value),className:(0,a.cn)("px-4 rounded-md font-medium transition-all",o[n],t===e.value?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},28815:(e,t,s)=>{s.d(t,{default:()=>i});var r=s(95155),a=s(12115),l=s(81127),n=s(92542);function i({isOpen:e,onClose:t,title:s="Manual Configuration",configs:o=[]}){let[d,c]=(0,a.useState)(null),m=async(e,t)=>{try{await navigator.clipboard.writeText(e),c(t),setTimeout(()=>c(null),2e3)}catch(e){console.log("Failed to copy:",e)}};return(0,r.jsx)(l.default,{isOpen:e,onClose:t,title:s,size:"xl",children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:o.map((e,t)=>(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.filename}),(0,r.jsxs)(n.default,{variant:"ghost",size:"sm",onClick:()=>m(e.content,t),children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:d===t?"check":"content_copy"}),d===t?"Copied!":"Copy"]})]}),(0,r.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:e.content})]},t))})})}},30815:(e,t,s)=>{s.d(t,{default:()=>o});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(35497);function o({isOpen:e,onSuccess:t,onClose:s}){let[l,n]=(0,a.useState)(""),[d,c]=(0,a.useState)(""),[m,x]=(0,a.useState)(null),[u,h]=(0,a.useState)(!1),[p,f]=(0,a.useState)(!1),[b,g]=(0,a.useState)(!1),[j,y]=(0,a.useState)(!1),v=async()=>{f(!0),x(null),g(!1),y(!1);try{let e=await fetch("/api/oauth/cursor/auto-import"),t=await e.json();t.found?(n(t.accessToken),c(t.machineId),g(!0)):t.windowsManual?y(!0):x(t.error||"Could not auto-detect tokens")}catch(e){x("Failed to auto-detect tokens")}finally{f(!1)}};(0,a.useEffect)(()=>{e&&v()},[e]);let N=async()=>{if(!l.trim())return void x("Please enter an access token");if(!d.trim())return void x("Please enter a machine ID");h(!0),x(null);try{let e=await fetch("/api/oauth/cursor/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:l.trim(),machineId:d.trim()})}),r=await e.json();if(!e.ok)throw Error(r.error||"Import failed");t?.(),s()}catch(e){x(e.message)}finally{h(!1)}};return(0,r.jsx)(i.aF,{isOpen:e,title:"Connect Cursor IDE",onClose:s,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[p&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting tokens..."}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Cursor IDE database"})]}),!p&&(0,r.jsxs)(r.Fragment,{children:[b&&(0,r.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,r.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Tokens auto-detected from Cursor IDE successfully!"})]})}),j&&(0,r.jsxs)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800 flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,r.jsx)("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:"Could not read Cursor database automatically."})]}),(0,r.jsxs)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:["Run this command in your terminal, then click ",(0,r.jsx)("strong",{children:"Retry"}),":"]}),(0,r.jsx)("pre",{className:"text-xs bg-black/10 dark:bg-white/10 rounded p-2 font-mono select-all",children:"npm i better-sqlite3 -g"}),(0,r.jsx)(i.$n,{onClick:v,variant:"outline",fullWidth:!0,children:"Retry"})]}),!b&&!j&&!m&&(0,r.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,r.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Cursor IDE not detected. Please paste your tokens manually."})]})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Access Token ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("textarea",{value:l,onChange:e=>n(e.target.value),placeholder:"Access token will be auto-filled...",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Machine ID ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(i.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"Machine ID will be auto-filled...",className:"font-mono text-sm"})]}),m&&(0,r.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,r.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:m})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:N,fullWidth:!0,disabled:u||!l.trim()||!d.trim(),children:u?"Importing...":"Import Token"}),(0,r.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}o.propTypes={isOpen:n().bool.isRequired,onSuccess:n().func,onClose:n().func.isRequired}},31474:(e,t,s)=>{s.d(t,{cn:()=>r});function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},33041:(e,t,s)=>{s.d(t,{default:()=>h});var r=s(95155),a=s(12115),l=s(1934),n=s(31692);let i=(0,l.v)((0,n.Zr)(e=>({preset:"last7",from:null,to:null,setDateRange:({preset:t,from:s,to:r})=>{e({preset:t,from:s,to:r})}}),{name:"9router-date-range"}));function o(e){let t=new Date(e);return t.setHours(0,0,0,0),t}function d(e){let t=new Date(e);return t.setHours(23,59,59,999),t}function c(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}let m=["January","February","March","April","May","June","July","August","September","October","November","December"];function x(e){return e?`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`:""}function u({month:e,year:t,rangeFrom:s,rangeTo:l,hoverDate:n,onSelect:i,onHover:x}){let h=o(new Date),p=(0,a.useMemo)(()=>{let s=new Date(t,e,1).getDay(),r=new Date(t,e+1,0).getDate(),a=[];for(let e=0;e<s;e++)a.push(null);for(let s=1;s<=r;s++)a.push(new Date(t,e,s));return a},[e,t]),f=l||n;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"text-center text-sm font-semibold mb-2 text-text",children:[m[e]," ",t]}),(0,r.jsxs)("div",{className:"grid grid-cols-7 text-center text-[11px]",style:{columnGap:"12px",rowGap:"4px"},children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(e=>(0,r.jsx)("div",{className:"py-1 text-text-muted font-medium",children:e},e)),p.map((e,t)=>{if(!e)return(0,r.jsx)("div",{},`e${t}`);let a=c(e,h),l=s&&c(e,s),n=f&&c(e,f),m=s&&f&&e>=o(s)&&e<=d(f),u=e>h,p="relative w-7 h-7 flex items-center justify-center rounded-full text-xs transition-all cursor-pointer select-none ";return u?p+="text-text-muted/30 cursor-not-allowed ":l||n?p+="bg-primary text-white font-bold shadow-sm ":m?p+="text-primary font-semibold ":a?p+="ring-1 ring-primary/40 text-primary font-semibold ":p+="text-text hover:bg-bg-hover ",(0,r.jsx)("div",{className:p,onClick:()=>!u&&i(e),onMouseEnter:()=>!u&&x(e),children:e.getDate()},t)})]})]})}function h({onChange:e,defaultPreset:t="last7",className:s=""}){let l=(0,a.useMemo)(()=>{let e,t,s,r,a,l,n,i,c;return(s=new Date(t=o(e=new Date))).setDate(s.getDate()-1),r=new Date(t.getFullYear(),t.getMonth(),1),a=new Date(t.getFullYear(),t.getMonth()-1,1),l=new Date(t.getFullYear(),t.getMonth(),0),(n=new Date(t)).setDate(n.getDate()-6),(i=new Date(t)).setDate(i.getDate()-29),(c=new Date(t)).setDate(c.getDate()-59),[{key:"today",label:"Today",from:t,to:d(e)},{key:"yesterday",label:"Yesterday",from:s,to:d(s)},{key:"last7",label:"Last 7 Days",from:n,to:d(e)},{key:"last30",label:"Last 30 Days",from:i,to:d(e)},{key:"last60",label:"Last 60 Days",from:c,to:d(e)},{key:"currentMonth",label:"Current Month",from:r,to:d(e)},{key:"lastMonth",label:"Last Month",from:a,to:d(l)}]},[]),n=i(e=>e.setDateRange),c=(0,a.useMemo)(()=>{try{let e=localStorage.getItem("9router-date-range");if(e){let t=JSON.parse(e),s=t?.state;if(s?.preset&&s?.from&&s?.to){if("custom"===s.preset)return{key:"custom",from:new Date(s.from),to:new Date(s.to)};let e=l.find(e=>e.key===s.preset);if(e)return{key:e.key,from:e.from,to:e.to}}}}catch{}let e=l.find(e=>e.key===t)||l[2];return{key:e.key,from:e.from,to:e.to}},[]),[p,f]=(0,a.useState)(!1),[b,g]=(0,a.useState)("right-0");(0,a.useEffect)(()=>{if(p&&z.current){let e=z.current.getBoundingClientRect(),t=window.innerWidth-e.left,s=e.right;t>=320?g("left-0"):s>=320?g("right-0"):g(t>s?"left-0":"right-0")}},[p]);let[j,y]=(0,a.useState)(c.key),[v,N]=(0,a.useState)(c.from),[w,k]=(0,a.useState)(c.to),C=new Date,[S,T]=(0,a.useState)(C.getMonth()),[M,$]=(0,a.useState)(C.getFullYear()),[R,E]=(0,a.useState)("idle"),[I,D]=(0,a.useState)(null),[O,L]=(0,a.useState)(null),z=(0,a.useRef)(null);(0,a.useEffect)(()=>{function e(e){z.current&&!z.current.contains(e.target)&&(f(!1),E("idle"))}return p&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[p]),(0,a.useEffect)(()=>{e?.({from:c.from.toISOString(),to:c.to.toISOString(),preset:c.key})},[]);let P=(0,a.useCallback)(t=>{y(t.key),N(t.from),k(t.to),E("idle"),f(!1);let s={from:t.from.toISOString(),to:t.to.toISOString(),preset:t.key};n(s),e?.(s)},[e,n]),_=(0,a.useCallback)(t=>{if("idle"===R)D(t),E("pickingEnd"),L(null);else{let s=I,r=t;s>r&&([s,r]=[r,s]),s=o(s),r=d(r),N(s),k(r),y("custom"),E("idle"),D(null),L(null),f(!1);let a={from:s.toISOString(),to:r.toISOString(),preset:"custom"};n(a),e?.(a)}},[R,I,e,n]),q=(0,a.useMemo)(()=>{let e=S+1,t=M;return e>11&&(e=0,t++),{month:e,year:t}},[S,M]),F=(0,a.useMemo)(()=>{if("custom"!==j){let e=l.find(e=>e.key===j);return e?.label||"Select Range"}return`${x(v)} – ${x(w)}`},[j,v,w,l]);return(0,r.jsxs)("div",{ref:z,className:`relative inline-block ${s}`,children:[(0,r.jsxs)("button",{onClick:()=>f(e=>!e),className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border border-border bg-bg-subtle text-sm font-medium text-text hover:bg-bg-hover transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"calendar_month"}),(0,r.jsx)("span",{children:F}),(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px] text-text-muted transition-transform ${p?"rotate-180":""}`,children:"expand_more"})]}),p&&(0,r.jsxs)("div",{className:`absolute ${b} top-full mt-2 z-50 bg-bg border border-border rounded-xl shadow-xl overflow-hidden max-w-[calc(100vw-1rem)] w-max`,style:{minWidth:"max-content"},children:[(0,r.jsxs)("div",{className:"p-2 border-b border-border",children:[(0,r.jsx)("div",{className:"text-[10px] font-semibold text-text-muted uppercase tracking-wider px-2 py-1",children:"Quick Select"}),(0,r.jsx)("div",{className:"grid grid-cols-2 gap-1",children:l.map(e=>(0,r.jsx)("button",{onClick:()=>P(e),className:`px-2.5 py-1.5 rounded-md text-xs font-medium transition-colors text-left ${j===e.key?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:e.label},e.key))})]}),(0,r.jsxs)("div",{className:"p-3 border-t border-border",children:[(0,r.jsx)("div",{className:"text-[10px] text-text-muted text-center mb-2",children:"idle"===R?"Or select custom range":"Click to select end date"}),(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsx)("button",{onClick:()=>{0===S?(T(11),$(e=>e-1)):T(e=>e-1)},className:"p-1 rounded-md hover:bg-bg-hover transition-colors text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,r.jsxs)("span",{className:"text-xs font-medium text-text-muted",children:[m[S].slice(0,3)," ",M," — ",m[q.month].slice(0,3)," ",q.year]}),(0,r.jsx)("button",{onClick:()=>{new Date(M,S+1,1)>new Date(C.getFullYear(),C.getMonth(),1)||(11===S?(T(0),$(e=>e+1)):T(e=>e+1))},className:"p-1 rounded-md hover:bg-bg-hover transition-colors text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})})]}),(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row items-center sm:items-start",style:{gap:"20px"},children:[(0,r.jsx)(u,{month:S,year:M,rangeFrom:"pickingEnd"===R?I:v,rangeTo:"pickingEnd"===R?null:w,hoverDate:"pickingEnd"===R?O:null,onSelect:_,onHover:L}),(0,r.jsx)("div",{className:"hidden sm:block shrink-0 mx-1 self-stretch",style:{width:"1px",background:"var(--color-border)"}}),(0,r.jsx)("div",{className:"sm:hidden w-full",style:{height:"1px",background:"var(--color-border)"}}),(0,r.jsx)(u,{month:q.month,year:q.year,rangeFrom:"pickingEnd"===R?I:v,rangeTo:"pickingEnd"===R?null:w,hoverDate:"pickingEnd"===R?O:null,onSelect:_,onHover:L})]}),v&&w&&"idle"===R&&(0,r.jsxs)("div",{className:"mt-2 text-center text-[11px] text-text-muted",children:[x(v)," – ",x(w)]})]})]})]})}},35497:(e,t,s)=>{s.d(t,{Ex:()=>d.default,$n:()=>r.default,Zp:()=>n.default,Qv:()=>o.CardSkeleton,G9:()=>j.default,vE:()=>y.default,pd:()=>a.default,Mh:()=>g.default,c5:()=>f.default,uR:()=>h.default,aF:()=>i.default,rq:()=>u.default,LF:()=>x.default,gM:()=>b.default,Iz:()=>v.default,l6:()=>l.default,UW:()=>m.default,lM:()=>c.default,m_:()=>N.default,jK:()=>p.default});var r=s(92542),a=s(11910),l=s(98),n=s(84588),i=s(81127),o=s(25086);s(56319);var d=s(56061),c=s(98542),m=s(38587);s(21110),s(92622),s(74891),s(92173);var x=s(90882),u=s(72908),h=s(28815),p=s(93927),f=s(21931),b=s(23615);s(61500);var g=s(62899);s(94230);var j=s(30815),y=s(23936),v=s(28067),N=s(97677);s(33041),s(7648),s(91450)},38587:(e,t,s)=>{s.d(t,{default:()=>n});var r=s(95155),a=s(1620),l=s(31474);function n({className:e,variant:t="default"}){let{theme:s,toggleTheme:i,isDark:o}=(0,a.D)(),d={default:(0,l.cn)("flex items-center justify-center size-10 rounded-full","text-text-muted","hover:bg-black/5","hover:text-text-main","transition-colors"),card:(0,l.cn)("flex items-center justify-center size-11 rounded-full","bg-surface/60","hover:bg-surface","border border-border","backdrop-blur-md shadow-sm hover:shadow-md","text-text-muted-light hover:text-primary","hover:text-primary","transition-all group")};return(0,r.jsx)("button",{onClick:i,className:(0,l.cn)(d[t],e),"aria-label":`Switch to ${o?"light":"dark"} mode`,title:`Switch to ${o?"light":"dark"} mode`,children:(0,r.jsx)("span",{className:(0,l.cn)("material-symbols-outlined text-[22px]","card"===t&&"transition-transform duration-300 group-hover:rotate-12"),children:o?"light_mode":"dark_mode"})})}},56061:(e,t,s)=>{s.d(t,{default:()=>i});var r=s(95155),a=s(31474);let l={default:"bg-black/5 dark:bg-white/10 text-text-muted",primary:"bg-primary/10 text-primary",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400"},n={sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function i({children:e,variant:t="default",size:s="md",dot:o=!1,icon:d,className:c}){return(0,r.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold",l[t],n[s],c),children:[o&&(0,r.jsx)("span",{className:(0,a.cn)("size-1.5 rounded-full","success"===t&&"bg-green-500","warning"===t&&"bg-yellow-500","error"===t&&"bg-red-500","info"===t&&"bg-blue-500","primary"===t&&"bg-primary","default"===t&&"bg-gray-500")}),d&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:d}),e]})}},56319:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({src:e,alt:t="Avatar",name:s,size:n="md",className:i}){let o={xs:"size-6 text-xs",sm:"size-8 text-sm",md:"size-10 text-base",lg:"size-12 text-lg",xl:"size-16 text-xl"};return e?(0,r.jsx)("div",{className:(0,a.cn)("rounded-full bg-cover bg-center bg-no-repeat","ring-2 ring-white dark:ring-surface-dark shadow-sm",o[n],i),style:{backgroundImage:`url(${e})`},role:"img","aria-label":t}):(0,r.jsx)("div",{className:(0,a.cn)("rounded-full flex items-center justify-center font-semibold text-white","ring-2 ring-white dark:ring-surface-dark shadow-sm",o[n],(e=>{if(!e)return"bg-primary";let t=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],s=e.charCodeAt(0)%t.length;return t[s]})(s),i),role:"img","aria-label":t,children:(e=>{if(!e)return"?";let t=e.split(" ");return t.length>=2?`${t[0][0]}${t[1][0]}`.toUpperCase():e.substring(0,2).toUpperCase()})(s)})}},57250:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l);function i({src:e,alt:t,size:s=32,className:l="",fallbackText:n="?",fallbackColor:o}){let[d,c]=(0,a.useState)(!1);return!e||d?(0,r.jsx)("span",{className:`inline-flex items-center justify-center font-bold rounded-lg ${l}`.trim(),style:{width:s,height:s,color:o,fontSize:Math.max(10,Math.floor(.38*s))},children:n}):(0,r.jsx)("img",{src:e,alt:t,width:s,height:s,className:l,onError:()=>c(!0)})}i.propTypes={src:n().string,alt:n().string,size:n().number,className:n().string,fallbackText:n().string,fallbackColor:n().string}},61500:(e,t,s)=>{s.d(t,{default:()=>o});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(35497);function o({isOpen:e,onMethodSelect:t,onClose:s}){let[l,n]=(0,a.useState)(null),[d,c]=(0,a.useState)(""),[m,x]=(0,a.useState)("us-east-1"),[u,h]=(0,a.useState)(""),[p,f]=(0,a.useState)(null),[b,g]=(0,a.useState)(!1),[j,y]=(0,a.useState)(!1),[v,N]=(0,a.useState)(!1);(0,a.useEffect)(()=>{"import"===l&&e&&(async()=>{y(!0),f(null),N(!1);try{let e=await fetch("/api/oauth/kiro/auto-import"),t=await e.json();t.found?(h(t.refreshToken),N(!0)):f(t.error||"Could not auto-detect token")}catch(e){f("Failed to auto-detect token")}finally{y(!1)}})()},[l,e]);let w=e=>{n(e),f(null)},k=()=>{n(null),f(null)},C=async()=>{if(!u.trim())return void f("Please enter a refresh token");g(!0),f(null);try{let e=await fetch("/api/oauth/kiro/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:u.trim()})}),s=await e.json();if(!e.ok)throw Error(s.error||"Import failed");t("import")}catch(e){f(e.message)}finally{g(!1)}},S=e=>{t("social",{provider:e})};return(0,r.jsx)(i.aF,{isOpen:e,title:"Connect Kiro",onClose:s,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[!l&&(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Choose your authentication method:"}),(0,r.jsx)("button",{onClick:()=>t("builder-id"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"shield"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"AWS Builder ID"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Recommended for most users. Free AWS account required."})]})]})}),(0,r.jsx)("button",{onClick:()=>w("idc"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"business"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"AWS IAM Identity Center"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"For enterprise users with custom AWS IAM Identity Center."})]})]})}),(0,r.jsx)("button",{onClick:()=>w("social-google"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"account_circle"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"Google Account"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your Google account (manual callback)."})]})]})}),(0,r.jsx)("button",{onClick:()=>w("social-github"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"code"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"GitHub Account"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your GitHub account (manual callback)."})]})]})}),(0,r.jsx)("button",{onClick:()=>w("import"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"file_upload"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"Import Token"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Paste refresh token from Kiro IDE."})]})]})})]}),"idc"===l&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["IDC Start URL ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(i.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"https://your-org.awsapps.com/start",className:"font-mono text-sm"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Your organization's AWS IAM Identity Center URL"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,r.jsx)(i.pd,{value:m,onChange:e=>x(e.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for your Identity Center (default: us-east-1)"})]}),p&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:p}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:()=>{d.trim()?t("idc",{startUrl:d.trim(),region:m}):f("Please enter your IDC start URL")},fullWidth:!0,children:"Continue"}),(0,r.jsx)(i.$n,{onClick:k,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-google"===l&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,r.jsxs)("div",{className:"flex-1 text-sm",children:[(0,r.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,r.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:()=>S("google"),fullWidth:!0,children:"Continue with Google"}),(0,r.jsx)(i.$n,{onClick:k,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-github"===l&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,r.jsxs)("div",{className:"flex-1 text-sm",children:[(0,r.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,r.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:()=>S("github"),fullWidth:!0,children:"Continue with GitHub"}),(0,r.jsx)(i.$n,{onClick:k,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"import"===l&&(0,r.jsxs)("div",{className:"space-y-4",children:[j&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting token..."}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from AWS SSO cache"})]}),!j&&(0,r.jsxs)(r.Fragment,{children:[v&&(0,r.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,r.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Token auto-detected from Kiro IDE successfully!"})]})}),!v&&!p&&(0,r.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,r.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Kiro IDE not detected. Please paste your refresh token manually."})]})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Refresh Token ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(i.pd,{value:u,onChange:e=>h(e.target.value),placeholder:"Token will be auto-filled...",className:"font-mono text-sm"})]}),p&&(0,r.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,r.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:p})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:C,fullWidth:!0,disabled:b||!u.trim(),children:b?"Importing...":"Import Token"}),(0,r.jsx)(i.$n,{onClick:k,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})]})})}o.propTypes={isOpen:n().bool.isRequired,onMethodSelect:n().func.isRequired,onClose:n().func.isRequired}},62899:(e,t,s)=>{s.d(t,{default:()=>c});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(90882),o=s(61500),d=s(94230);function c({isOpen:e,providerInfo:t,onSuccess:s,onClose:l}){let[n,m]=(0,a.useState)(null),[x,u]=(0,a.useState)(null),[h,p]=(0,a.useState)(null),f=(0,a.useCallback)((e,t)=>{"builder-id"===e?m("builder-id"):"idc"===e?(m("idc"),p(t)):"social"===e?(m("social"),u(t.provider)):"import"===e&&s?.()},[s]),b=()=>{m(null),u(null),p(null)};return n?"builder-id"===n||"idc"===n?(0,r.jsx)(i.default,{isOpen:e,provider:"kiro",providerInfo:t,onSuccess:()=>{m(null),p(null),s?.(),l?.()},onClose:b,idcConfig:h}):"social"===n&&x?(0,r.jsx)(d.default,{isOpen:e,provider:x,onSuccess:()=>{m(null),u(null),s?.(),l?.()},onClose:b}):null:(0,r.jsx)(o.default,{isOpen:e,onMethodSelect:f,onClose:l})}c.propTypes={isOpen:n().bool.isRequired,providerInfo:n().shape({name:n().string}),onSuccess:n().func,onClose:n().func.isRequired}},65921:(e,t,s)=>{s.d(t,{i:()=>l});var r=s(1934);let a=0,l=(0,r.v)((e,t)=>({notifications:[],addNotification:s=>{let r=++a,l={id:r,type:s.type||"info",message:s.message,title:s.title||null,duration:s.duration??5e3,dismissible:s.dismissible??!0,createdAt:Date.now()};return e(e=>({notifications:[...e.notifications,l]})),l.duration>0&&setTimeout(()=>t().removeNotification(r),l.duration),r},removeNotification:t=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==t)}))},clearAll:()=>e({notifications:[]}),success:(e,s)=>t().addNotification({type:"success",message:e,title:s}),error:(e,s)=>t().addNotification({type:"error",message:e,title:s,duration:8e3}),warning:(e,s)=>t().addNotification({type:"warning",message:e,title:s}),info:(e,s)=>t().addNotification({type:"info",message:e,title:s})}))},72908:(e,t,s)=>{s.d(t,{default:()=>m});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(81127),o=s(28777),d=s(52679);let c=[...Object.keys(d.zN),...Object.keys(d.fg)];function m({isOpen:e,onClose:t,onSelect:s,selectedModel:l,activeProviders:n=[],title:x="Select Model",modelAliases:u={}}){let[h,p]=(0,a.useState)(""),[f,b]=(0,a.useState)([]),[g,j]=(0,a.useState)([]),y=async()=>{try{let e=await fetch("/api/combos");if(!e.ok)throw Error(`Failed to fetch combos: ${e.status}`);let t=await e.json();b(t.combos||[])}catch(e){console.error("Error fetching combos:",e),b([])}};(0,a.useEffect)(()=>{e&&y()},[e]);let v=async()=>{try{let e=await fetch("/api/provider-nodes");if(!e.ok)throw Error(`Failed to fetch provider nodes: ${e.status}`);let t=await e.json();j(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),j([])}};(0,a.useEffect)(()=>{e&&v()},[e]);let N=(0,a.useMemo)(()=>({...d.zN,...d.fg}),[]),w=(0,a.useMemo)(()=>{let e={};return[...new Set([...n.map(e=>e.provider)])].sort((e,t)=>{let s=c.indexOf(e),r=c.indexOf(t);return(-1===s?999:s)-(-1===r?999:r)}).forEach(t=>{let s=o.Xg[t]||t,r=N[t]||{name:t,color:"#666"},a=(0,d.mq)(t)||(0,d.gb)(t);if(r.passthroughModels){let a=Object.entries(u).filter(([,e])=>e.startsWith(`${s}/`)).map(([e,t])=>({id:t.replace(`${s}/`,""),name:e,value:t}));if(a.length>0){let l=g.find(e=>e.id===t),n=l?.name||r.name;e[t]={name:n,alias:s,color:r.color,models:a}}}else if(a){let s=n.find(e=>e.provider===t),a=g.find(e=>e.id===t),l=s?.name||a?.name||r.name,i=s?.providerSpecificData?.prefix||a?.prefix||t,o=Object.entries(u).filter(([,e])=>e.startsWith(`${t}/`)).map(([e,s])=>({id:s.replace(`${t}/`,""),name:e,value:`${i}/${s.replace(`${t}/`,"")}`})),d=o.length>0?o:[{id:`__placeholder__${t}`,name:`${i}/model-id`,value:`${i}/model-id`,isPlaceholder:!0}];e[t]={name:l,alias:i,color:r.color,models:d,isCustom:!0,hasModels:o.length>0}}else{let a=(0,o.KC)(t),l=new Set(a.map(e=>e.id)),n=Object.entries(u).filter(([e,t])=>t.startsWith(`${s}/`)&&e===t.replace(`${s}/`,"")&&!l.has(t.replace(`${s}/`,""))).map(([,e])=>{let t=e.replace(`${s}/`,"");return{id:t,name:t,value:e,isCustom:!0}}),i=[...a.map(e=>({id:e.id,name:e.name,value:`${s}/${e.id}`})),...n];i.length>0&&(e[t]={name:r.name,alias:s,color:r.color,models:i})}}),e},[n,u,N,g]),k=(0,a.useMemo)(()=>{if(!h.trim())return f;let e=h.toLowerCase();return f.filter(t=>t.name.toLowerCase().includes(e))},[f,h]),C=(0,a.useMemo)(()=>{if(!h.trim())return w;let e=h.toLowerCase(),t={};return Object.entries(w).forEach(([s,r])=>{let a=r.models.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)),l=r.name.toLowerCase().includes(e);(a.length>0||l)&&(t[s]={...r,models:a})}),t},[w,h]),S=e=>{s(e),t(),p("")};return(0,r.jsxs)(i.default,{isOpen:e,onClose:()=>{t(),p("")},title:x,size:"md",className:"p-4!",children:[(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,r.jsx)("input",{type:"text",placeholder:"Search...",value:h,onChange:e=>p(e.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,r.jsxs)("div",{className:"max-h-[300px] overflow-y-auto space-y-3",children:[k.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",k.length,")"]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:k.map(e=>{let t=l===e.name;return(0,r.jsx)("button",{onClick:()=>S({id:e.name,name:e.name,value:e.name}),className:`
2
- px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer
3
- ${t?"bg-primary text-white border-primary":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
4
- `,children:e.name},e.id)})})]}),Object.entries(C).map(([e,t])=>(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,r.jsx)("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:t.color}}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:t.name}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",t.models.length,")"]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.models.map(e=>{let t=l===e.value,s=e.isPlaceholder;return(0,r.jsx)("button",{onClick:()=>S(e),title:s?"Select to pre-fill, then edit model ID in the input":void 0,className:`
5
- px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer
6
- ${s?"border-dashed border-border text-text-muted hover:border-primary/50 hover:text-primary bg-surface italic":t?"bg-primary text-white border-primary":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
7
- `,children:s?(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"edit"}),e.name]}):e.isCustom?(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[e.name,(0,r.jsx)("span",{className:"text-[9px] opacity-60 font-normal",children:"custom"})]}):e.name},e.id)})})]},e)),0===Object.keys(C).length&&0===k.length&&(0,r.jsxs)("div",{className:"text-center py-4 text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-2xl mb-1 block",children:"search_off"}),(0,r.jsx)("p",{className:"text-xs",children:"No models found"})]})]})]})}m.propTypes={isOpen:n().bool.isRequired,onClose:n().func.isRequired,onSelect:n().func.isRequired,selectedModel:n().string,activeProviders:n().arrayOf(n().shape({provider:n().string.isRequired})),title:n().string,modelAliases:n().object}},74891:(e,t,s)=>{s.d(t,{default:()=>h});var r=s(95155),a=s(73321),l=s(12115),n=s(98500),i=s.n(n),o=s(14051),d=s.n(o),c=s(57250),m=s(35497),x=s(90620),u=s(73006);function h({onMenuClick:e,showMenuButton:t=!0}){let s=(0,a.usePathname)(),n=(0,a.useRouter)(),{title:o,description:d,breadcrumbs:p}=(0,l.useMemo)(()=>(e=>{if(!e)return{title:"",description:"",breadcrumbs:[]};let t=e.match(/\/providers\/([^/]+)$/);if(t){let e=t[1],s=x.zN[e]||x.fg[e];if(s)return{title:s.name,description:"",breadcrumbs:[{label:"Providers",href:"/dashboard/providers"},{label:s.name,image:`/providers/${s.id}.png`}]}}return e.includes("/providers")?{title:"Providers",description:"Manage your AI provider connections",breadcrumbs:[]}:e.includes("/combos")?{title:"Combos",description:"Model combos with fallback",breadcrumbs:[]}:e.includes("/usage")?{title:"Usage & Analytics",description:"Monitor your API usage, token consumption, and request logs",breadcrumbs:[]}:e.includes("/mitm")?{title:"MITM Proxy",description:"Intercept CLI tool traffic and route through 9Router",breadcrumbs:[]}:e.includes("/cli-tools")?{title:"CLI Tools",description:"Configure CLI tools",breadcrumbs:[]}:e.includes("/endpoint")?{title:"Endpoint",description:"API endpoint configuration",breadcrumbs:[]}:e.includes("/profile")?{title:"Settings",description:"Manage your preferences",breadcrumbs:[]}:e.includes("/translator")?{title:"Translator",description:"Debug translation flow between formats",breadcrumbs:[]}:e.includes("/console-log")?{title:"Console Log",description:"Live server console output",breadcrumbs:[]}:"/dashboard"===e?{title:"Endpoint",description:"API endpoint configuration",breadcrumbs:[]}:{title:"",description:"",breadcrumbs:[]}})(s),[s]),f=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(n.push("/login"),n.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,r.jsxs)("header",{className:"flex items-center justify-between px-8 py-5 border-b border-black/5 dark:border-white/5 bg-bg/80 backdrop-blur-xl z-10 sticky top-0",children:[(0,r.jsx)("div",{className:"flex items-center gap-3 lg:hidden",children:t&&(0,r.jsx)("button",{onClick:e,className:"text-text-main hover:text-primary transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:"menu"})})}),(0,r.jsx)("div",{className:"hidden lg:flex flex-col",children:p.length>0?(0,r.jsx)("div",{className:"flex items-center gap-2",children:p.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[t>0&&(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-base",children:"chevron_right"}),e.href?(0,r.jsx)(i(),{href:e.href,className:"text-text-muted hover:text-primary transition-colors",children:e.label}):(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[e.image&&(0,r.jsx)(c.A,{src:e.image,alt:e.label,size:28,className:"object-contain rounded max-w-[28px] max-h-[28px]",fallbackText:e.label.slice(0,2).toUpperCase()}),(0,r.jsx)("h1",{className:"text-2xl font-semibold text-text-main tracking-tight",children:(0,u.Tl)(e.label)})]})]},`${e.label}-${e.href||"current"}`))}):o?(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold text-text-main tracking-tight",children:(0,u.Tl)(o)}),d&&(0,r.jsx)("p",{className:"text-sm text-text-muted",children:(0,u.Tl)(d)})]}):null}),(0,r.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,r.jsx)(m.c5,{}),(0,r.jsx)(m.UW,{}),(0,r.jsx)("button",{onClick:f,className:"flex items-center justify-center p-2 rounded-lg text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-all",title:"Logout",children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:"logout"})})]})]})}h.propTypes={onMenuClick:d().func,showMenuButton:d().bool}},81127:(e,t,s)=>{s.d(t,{ConfirmModal:()=>o,default:()=>i});var r=s(95155),a=s(12115),l=s(31474),n=s(92542);function i({isOpen:e,onClose:t,title:s,children:n,footer:o,size:d="md",closeOnOverlay:c=!0,showCloseButton:m=!0,className:x}){return((0,a.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,a.useEffect)(()=>{let s=s=>{"Escape"===s.key&&e&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),e)?(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:c?t:void 0}),(0,r.jsxs)("div",{className:(0,l.cn)("relative w-full bg-surface","border border-black/10 dark:border-white/10","rounded-xl shadow-2xl","animate-in fade-in zoom-in-95 duration-200",{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-4xl"}[d],x),children:[(s||m)&&(0,r.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-black/5 dark:border-white/5",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mr-4",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"})]}),s&&(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})]}),m&&(0,r.jsx)("button",{onClick:t,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"p-6 max-h-[calc(80vh-140px)] overflow-y-auto",children:n}),o&&(0,r.jsx)("div",{className:"flex items-center justify-end gap-3 p-6 border-t border-black/5 dark:border-white/5",children:o})]})]}):null}function o({isOpen:e,onClose:t,onConfirm:s,title:a="Confirm",message:l,confirmText:d="Confirm",cancelText:c="Cancel",variant:m="danger",loading:x=!1}){return(0,r.jsx)(i,{isOpen:e,onClose:t,title:a,size:"sm",footer:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.default,{variant:"ghost",onClick:t,disabled:x,children:c}),(0,r.jsx)(n.default,{variant:m,onClick:s,loading:x,children:d})]}),children:(0,r.jsx)("p",{className:"text-text-muted",children:l})})}},84588:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({children:e,title:t,subtitle:s,icon:n,action:i,padding:o="md",hover:d=!1,className:c,...m}){return(0,r.jsxs)("div",{className:(0,a.cn)("bg-surface","border border-black/5 dark:border-white/5","rounded-lg shadow-sm",d&&"hover:shadow-md hover:border-primary/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[o],c),...m,children:[(t||i)&&(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[n&&(0,r.jsx)("div",{className:"p-2 rounded-lg bg-bg text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:n})}),(0,r.jsxs)("div",{children:[t&&(0,r.jsx)("h3",{className:"text-text-main font-semibold",children:t}),s&&(0,r.jsx)("p",{className:"text-sm text-text-muted",children:s})]})]}),i]}),e]})}l.Section=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-4 rounded-lg","bg-black/[0.02] dark:bg-white/[0.02]","border border-black/5 dark:border-white/5",t),...s,children:e})},l.Row=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-black/5 dark:border-white/5 last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]",t),...s,children:e})},l.ListItem=function({children:e,actions:t,className:s,...l}){return(0,r.jsxs)("div",{className:(0,a.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]","transition-colors",s),...l,children:[(0,r.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,r.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},90882:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(35497),o=s(11059);function d({isOpen:e,provider:t,providerInfo:s,onSuccess:l,onClose:n}){let[c,m]=(0,a.useState)("waiting"),[x,u]=(0,a.useState)(null),[h,p]=(0,a.useState)(""),[f,b]=(0,a.useState)(null),[g,j]=(0,a.useState)(!1),[y,v]=(0,a.useState)(null),[N,w]=(0,a.useState)(!1),k=(0,a.useRef)(null),C=(0,a.useRef)(!1),{copied:S,copy:T}=(0,o.C)(),[M,$]=(0,a.useState)(!1),[R,E]=(0,a.useState)("/callback?code=..."),I=(0,a.useRef)(!1);(0,a.useEffect)(()=>{$("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname),E(`${window.location.origin}/callback?code=...`)},[]);let D=(0,a.useCallback)(async(e,s)=>{if(x)try{let r=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,redirectUri:x.redirectUri,codeVerifier:x.codeVerifier,state:s})}),a=await r.json();if(!r.ok)throw Error(a.error);m("success"),l?.()}catch(e){b(e.message),m("error")}},[x,t,l]),O=(0,a.useCallback)(async(e,s,r,a)=>{C.current=!1,w(!0);for(let n=0;n<60;n++){if(C.current){console.log("[OAuthModal] Polling aborted"),w(!1);return}if(await new Promise(e=>setTimeout(e,1e3*r)),C.current){console.log("[OAuthModal] Polling aborted after sleep"),w(!1);return}try{let n=await fetch(`/api/oauth/${t}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:e,codeVerifier:s,extraData:a})}),i=await n.json();if(i.success){C.current=!0,m("success"),w(!1),l?.();return}if("expired_token"===i.error||"access_denied"===i.error)throw Error(i.errorDescription||i.error);"slow_down"===i.error&&(r=Math.min(r+5,30))}catch(e){b(e.message),m("error"),w(!1);return}}b("Authorization timeout"),m("error"),w(!1)},[t,l]),L=(0,a.useCallback)(async()=>{if(t)try{let e;if(b(null),["github","qwen","kiro","kimi-coding","kilocode"].includes(t)){j(!0),m("waiting");let e=await fetch(`/api/oauth/${t}/device-code`),s=await e.json();if(!e.ok)throw Error(s.error);v(s);let r=s.verification_uri_complete||s.verification_uri;r&&window.open(r,"_blank");let a="kiro"===t?{_clientId:s._clientId,_clientSecret:s._clientSecret}:null;O(s.device_code,s.codeVerifier,s.interval||5,a);return}if("codex"===t)e="http://localhost:1455/auth/callback";else{let t=window.location.port||("https:"===window.location.protocol?"443":"80");e=`http://localhost:${t}/callback`}let s=await fetch(`/api/oauth/${t}/authorize?redirect_uri=${encodeURIComponent(e)}`),r=await s.json();if(!s.ok)throw Error(r.error);u({...r,redirectUri:e}),"codex"!==t&&M?(m("waiting"),k.current=window.open(r.authUrl,"oauth_popup","width=600,height=700"),k.current||m("input")):(m("input"),window.open(r.authUrl,"_blank"))}catch(e){b(e.message),m("error")}},[t,M,O]);(0,a.useEffect)(()=>{e&&t?(u(null),p(""),b(null),j(!1),v(null),w(!1),C.current=!1,L()):e||(C.current=!0)},[e,t,L]),(0,a.useEffect)(()=>{let e;if(!x)return;I.current=!1;let t=async e=>{if(I.current)return;let{code:t,state:s,error:r,errorDescription:a}=e;if(r){I.current=!0,b(a||r),m("error");return}t&&(I.current=!0,await D(t,s))},s=e=>{let s=e.origin.includes("localhost")||e.origin.includes("127.0.0.1"),r=e.origin===window.location.origin;(s||r)&&e.data?.type==="oauth_callback"&&t(e.data.data)};window.addEventListener("message",s);try{(e=new BroadcastChannel("oauth_callback")).onmessage=e=>t(e.data)}catch(e){console.log("BroadcastChannel not supported")}let r=e=>{if("oauth_callback"===e.key&&e.newValue)try{let s=JSON.parse(e.newValue);t(s),localStorage.removeItem("oauth_callback")}catch(e){console.log("Failed to parse localStorage data")}};window.addEventListener("storage",r);try{let e=localStorage.getItem("oauth_callback");if(e){let s=JSON.parse(e);s.timestamp&&Date.now()-s.timestamp<3e4&&t(s),localStorage.removeItem("oauth_callback")}}catch{}return()=>{window.removeEventListener("message",s),window.removeEventListener("storage",r),e&&e.close()}},[x,D]);let z=async()=>{try{b(null);let e=new URL(h),t=e.searchParams.get("code"),s=e.searchParams.get("state"),r=e.searchParams.get("error");if(r)throw Error(e.searchParams.get("error_description")||r);if(!t)throw Error("No authorization code found in URL");await D(t,s)}catch(e){b(e.message),m("error")}},P=(0,a.useCallback)(()=>{n()},[n]);return t&&s?(0,r.jsx)(i.aF,{isOpen:e,title:`Connect ${s.name}`,onClose:P,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:["waiting"===c&&!g&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Waiting for Authorization"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Complete the authorization in the popup window."}),(0,r.jsx)(i.$n,{variant:"ghost",onClick:()=>m("input"),children:"Popup blocked? Enter URL manually"})]}),"waiting"===c&&g&&y&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"text-center py-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Visit the URL below and enter the code:"}),(0,r.jsxs)("div",{className:"bg-sidebar p-4 rounded-lg mb-4",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Verification URL"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("code",{className:"flex-1 text-sm break-all",children:y.verification_uri}),(0,r.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"verify_url"===S?"check":"content_copy",onClick:()=>T(y.verification_uri,"verify_url")})]})]}),(0,r.jsxs)("div",{className:"bg-primary/10 p-4 rounded-lg",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Your Code"}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("p",{className:"text-2xl font-mono font-bold text-primary",children:y.user_code}),(0,r.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"user_code"===S?"check":"content_copy",onClick:()=>T(y.user_code,"user_code")})]})]})]}),N&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),"Waiting for authorization..."]})]}),"input"===c&&!g&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.pd,{value:x?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,r.jsx)(i.$n,{variant:"secondary",icon:"auth_url"===S?"check":"content_copy",onClick:()=>T(x?.authUrl,"auth_url"),children:"Copy"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser."}),(0,r.jsx)(i.pd,{value:h,onChange:e=>p(e.target.value),placeholder:R,className:"font-mono text-xs"})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:z,fullWidth:!0,disabled:!h,children:"Connect"}),(0,r.jsx)(i.$n,{onClick:P,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===c&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your ",s.name," account has been connected."]}),(0,r.jsx)(i.$n,{onClick:P,fullWidth:!0,children:"Done"})]}),"error"===c&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,r.jsx)("p",{className:"text-sm text-red-600 mb-4",children:f}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:L,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,r.jsx)(i.$n,{onClick:P,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}d.propTypes={isOpen:n().bool.isRequired,provider:n().string,providerInfo:n().shape({name:n().string}),onSuccess:n().func,onClose:n().func.isRequired}},91450:(e,t,s)=>{s.d(t,{default:()=>i});var r=s(95155),a=s(14051),l=s.n(a),n=s(38587);function i({children:e}){return(0,r.jsxs)("div",{className:"min-h-screen flex flex-col relative bg-bg transition-colors duration-500 overflow-x-hidden selection:bg-primary/20 selection:text-primary",children:[(0,r.jsx)("div",{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-primary/5 dark:bg-primary/5 rounded-full blur-[100px] pointer-events-none z-0"}),(0,r.jsx)("div",{className:"fixed bottom-0 right-0 w-[600px] h-[600px] bg-orange-200/20 dark:bg-orange-900/10 rounded-full blur-[120px] pointer-events-none z-0 translate-y-1/3 translate-x-1/3"}),(0,r.jsx)("div",{className:"absolute top-6 right-6 z-20",children:(0,r.jsx)(n.default,{variant:"card"})}),(0,r.jsx)("main",{className:"flex-1 flex flex-col items-center justify-center p-4 sm:p-6 z-10 w-full h-full",children:e})]})}i.propTypes={children:l().node.isRequired}},92173:(e,t,s)=>{s.d(t,{default:()=>c});var r=s(95155),a=s(98500),l=s.n(a),n=s(90620);let i=[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"},{label:"Changelog",href:"#"}],o=[{label:"Documentation",href:"#"},{label:"API Reference",href:"#"},{label:"Help Center",href:"#"}],d=[{label:"About",href:"#"},{label:"Blog",href:"#"},{label:"Contact",href:"#"}];function c(){return(0,r.jsx)("footer",{className:"bg-bg border-t border-border pt-16 pb-12",children:(0,r.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-10 mb-12",children:[(0,r.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,r.jsx)("div",{className:"size-6 text-primary",children:(0,r.jsx)("svg",{className:"w-full h-full",fill:"currentColor",viewBox:"0 0 48 48",children:(0,r.jsx)("path",{clipRule:"evenodd",d:"M12.0799 24L4 19.2479L9.95537 8.75216L18.04 13.4961L18.0446 4H29.9554L29.96 13.4961L38.0446 8.75216L44 19.2479L35.92 24L44 28.7521L38.0446 39.2479L29.96 34.5039L29.9554 44H18.0446L18.04 34.5039L9.95537 39.2479L4 28.7521L12.0799 24Z",fillRule:"evenodd"})})}),(0,r.jsx)("span",{className:"text-xl font-bold text-text-main",children:n.vQ.name})]}),(0,r.jsx)("p",{className:"text-text-muted mb-6 max-w-sm font-light",children:"The unified interface for modern AI infrastructure. Secure, observable, and scalable."}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"Twitter",children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"})})}),(0,r.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"GitHub",children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"})})})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Product"}),(0,r.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:i.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(l(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Resources"}),(0,r.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:o.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(l(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Company"}),(0,r.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:d.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(l(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]})]}),(0,r.jsxs)("div",{className:"border-t border-border pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:["\xa9 ",new Date().getFullYear()," ",n.vQ.name," Inc. All rights reserved."]}),(0,r.jsxs)("div",{className:"flex gap-6 text-sm text-text-muted",children:[(0,r.jsx)(l(),{href:"#",className:"hover:text-primary transition-colors",children:"Privacy Policy"}),(0,r.jsx)(l(),{href:"#",className:"hover:text-primary transition-colors",children:"Terms of Service"})]})]})]})})}},92542:(e,t,s)=>{s.d(t,{default:()=>i});var r=s(95155),a=s(31474);let l={primary:"bg-gradient-to-b from-primary to-primary-hover text-white shadow-sm",secondary:"bg-white dark:bg-white/10 border border-black/10 dark:border-white/10 text-text-main hover:bg-black/5 dark:hover:bg-white/5",outline:"border border-black/15 dark:border-white/15 text-text-main hover:bg-black/5",ghost:"text-text-muted hover:bg-black/5 dark:hover:bg-white/5 hover:text-text-main",danger:"bg-red-500 text-white hover:bg-red-600 shadow-sm"},n={sm:"h-7 px-3 text-xs rounded-md",md:"h-9 px-4 text-sm rounded-lg",lg:"h-11 px-6 text-sm rounded-lg"};function i({children:e,variant:t="primary",size:s="md",icon:o,iconRight:d,disabled:c=!1,loading:m=!1,fullWidth:x=!1,className:u,...h}){return(0,r.jsxs)("button",{className:(0,a.cn)("inline-flex items-center justify-center gap-2 font-medium transition-all duration-200 cursor-pointer","active:scale-[0.99] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100",l[t],n[s],x&&"w-full",u),disabled:c||m,...h,children:[m?(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}):o?(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:o}):null,e,d&&!m&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:d})]})}},92622:(e,t,s)=>{s.d(t,{default:()=>b});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(98500),o=s.n(i),d=s(73321),c=s(31474),m=s(90620),x=s(92542),u=s(81127);let h=[{href:"/dashboard/employees",label:"E Dashboard",icon:"badge"},{href:"/dashboard/endpoint",label:"Endpoint",icon:"api"},{href:"/dashboard/providers",label:"Providers",icon:"dns"},{href:"/dashboard/proxy-pools",label:"Proxy Pools",icon:"lan"},{href:"/dashboard/combos",label:"Combos",icon:"layers"},{href:"/dashboard/usage",label:"Usage",icon:"bar_chart"},{href:"/dashboard/employees?tab=quota",label:"Quota Checker",icon:"data_usage"},{href:"/dashboard/mitm",label:"MITM",icon:"security"},{href:"/dashboard/cli-tools",label:"CLI Tools",icon:"terminal"}],p=[{href:"/dashboard/console-log",label:"Console Log",icon:"terminal"}],f=[{href:"/dashboard/profile",label:"Settings",icon:"settings"}];function b({onClose:e}){let t=(0,d.usePathname)(),[s,l]=(0,a.useState)(!1),[n,i]=(0,a.useState)(!1),[g,j]=(0,a.useState)(!1),[y,v]=(0,a.useState)(null),[N,w]=(0,a.useState)(!1),[k,C]=(0,a.useState)(!1);(0,a.useEffect)(()=>{"true"===localStorage.getItem("sidebarCollapsed")&&C(!0)},[]),(0,a.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{e.enableTranslator&&w(!0)}).catch(()=>{})},[]),(0,a.useEffect)(()=>{fetch("/api/version").then(e=>e.json()).then(e=>{e.hasUpdate&&v(e)}).catch(()=>{})},[]);let S=e=>"/dashboard/endpoint"===e?"/dashboard"===t||t.startsWith("/dashboard/endpoint"):t.startsWith(e),T=async()=>{i(!0);try{await fetch("/api/shutdown",{method:"POST"})}catch(e){}i(!1),l(!1),j(!0)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("aside",{className:(0,c.cn)("flex flex-col border-r border-black/5 dark:border-white/5 bg-vibrancy backdrop-blur-xl transition-[width] duration-300 min-h-full relative overflow-hidden",k?"w-[72px]":"w-72"),children:[(0,r.jsx)("button",{onClick:()=>{C(e=>{let t=!e;return localStorage.setItem("sidebarCollapsed",String(t)),t})},className:(0,c.cn)("absolute z-10 p-1.5 rounded-lg text-text-muted hover:bg-surface/50 hover:text-text-main transition-all hidden lg:flex items-center justify-center bg-bg/80 backdrop-blur-md border border-black/5 dark:border-white/5 shadow-sm",k?"top-4 left-1/2 -translate-x-1/2":"top-4 right-4"),title:k?"Expand sidebar":"Collapse sidebar",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:k?"keyboard_double_arrow_right":"keyboard_double_arrow_left"})}),(0,r.jsxs)("div",{className:(0,c.cn)("flex items-center gap-2 transition-all duration-300",k?"px-0 h-0 pt-0 pb-0 opacity-0 overflow-hidden":"px-6 pt-5 pb-2 opacity-100"),children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56] shrink-0"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E] shrink-0"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F] shrink-0"})]}),(0,r.jsxs)("div",{className:(0,c.cn)("py-4 flex flex-col gap-2 transition-all duration-300",k?"px-0 items-center mt-[52px]":"px-6"),children:[(0,r.jsxs)(o(),{href:"/dashboard",className:(0,c.cn)("flex items-center",k?"justify-center":"gap-3"),children:[(0,r.jsx)("img",{src:"/favicon.svg",alt:"iRouter",className:"size-9 rounded shrink-0"}),!k&&(0,r.jsxs)("div",{className:"flex flex-col whitespace-nowrap overflow-hidden opacity-100 transition-opacity duration-300",children:[(0,r.jsx)("h1",{className:"text-lg font-semibold tracking-tight text-text-main",children:m.vQ.name}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["v",m.vQ.version]})]})]}),y&&!k&&(0,r.jsxs)("div",{className:"flex flex-col gap-0.5 whitespace-nowrap overflow-hidden opacity-100 transition-opacity duration-300",children:[(0,r.jsxs)("span",{className:"text-xs font-semibold text-green-600 dark:text-amber-500",children:["↑ New version available: v",y.latestVersion]}),(0,r.jsx)("code",{className:"text-[10px] text-green-600/80 dark:text-amber-400/70 font-mono select-all overflow-hidden text-ellipsis",children:"npm install -g 9router@latest"})]})]}),(0,r.jsxs)("nav",{className:(0,c.cn)("flex-1 py-4 space-y-1 overflow-y-auto custom-scrollbar",k?"px-2":"px-4"),children:[h.map(t=>(0,r.jsxs)(o(),{href:t.href,onClick:e,title:k?t.label:void 0,className:(0,c.cn)("flex items-center py-2.5 rounded-lg transition-all group",k?"px-0 justify-center":"gap-3 px-4",S(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface/50 hover:text-text-main"),children:[(0,r.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px] shrink-0",S(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),!k&&(0,r.jsx)("span",{className:"text-sm font-medium whitespace-nowrap overflow-hidden text-ellipsis",children:t.label})]},t.href)),(0,r.jsxs)("div",{className:(0,c.cn)("pt-4 mt-2",k?"border-t border-black/5 dark:border-white/5 mx-2":"mx-1"),children:[!k&&(0,r.jsx)("p",{className:"px-3 text-xs font-semibold text-text-muted/60 uppercase tracking-wider mb-2",children:"Debug"}),N&&(0,r.jsxs)(o(),{href:"/dashboard/translator",onClick:e,title:k?"Translator":void 0,className:(0,c.cn)("flex items-center py-2.5 rounded-lg transition-all group",k?"px-0 justify-center":"gap-3 px-3",S("/dashboard/translator")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface/50 hover:text-text-main"),children:[(0,r.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px] shrink-0",S("/dashboard/translator")?"fill-1":"group-hover:text-primary transition-colors"),children:"translate"}),!k&&(0,r.jsx)("span",{className:"text-sm font-medium whitespace-nowrap overflow-hidden text-ellipsis",children:"Translator"})]}),p.map(t=>(0,r.jsxs)(o(),{href:t.href,onClick:e,title:k?t.label:void 0,className:(0,c.cn)("flex items-center py-2.5 rounded-lg transition-all group",k?"px-0 justify-center":"gap-3 px-3",S(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface/50 hover:text-text-main"),children:[(0,r.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px] shrink-0",S(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),!k&&(0,r.jsx)("span",{className:"text-sm font-medium whitespace-nowrap overflow-hidden text-ellipsis",children:t.label})]},t.href))]}),(0,r.jsxs)("div",{className:(0,c.cn)("pt-4 mt-2",k?"border-t border-black/5 dark:border-white/5 mx-2":"mx-1"),children:[!k&&(0,r.jsx)("p",{className:"px-3 text-xs font-semibold text-text-muted/60 uppercase tracking-wider mb-2",children:"System"}),f.map(t=>(0,r.jsxs)(o(),{href:t.href,onClick:e,title:k?t.label:void 0,className:(0,c.cn)("flex items-center py-2.5 rounded-lg transition-all group",k?"px-0 justify-center":"gap-3 px-3",S(t.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface/50 hover:text-text-main"),children:[(0,r.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px] shrink-0",S(t.href)?"fill-1":"group-hover:text-primary transition-colors"),children:t.icon}),!k&&(0,r.jsx)("span",{className:"text-sm font-medium whitespace-nowrap overflow-hidden text-ellipsis",children:t.label})]},t.href))]})]}),(0,r.jsxs)("div",{className:(0,c.cn)("p-3 border-t border-black/5 dark:border-white/5",k?"px-2":"p-3"),children:[!k&&(0,r.jsxs)("div",{className:"flex items-start gap-2 p-2 rounded-lg bg-surface/50 mb-2 overflow-hidden transition-all duration-300",children:[(0,r.jsx)("div",{className:"flex items-center justify-center size-6 rounded-md bg-blue-500/10 text-blue-500 shrink-0 mt-0.5",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"info"})}),(0,r.jsx)("div",{className:"flex flex-col",children:(0,r.jsx)("span",{className:"text-xs font-medium text-text-main leading-relaxed",children:"Service is running in terminal. You can close this web page. Shutdown will stop the service."})})]}),(0,r.jsx)(x.default,{variant:"outline",fullWidth:!k,icon:"power_settings_new",onClick:()=>l(!0),className:(0,c.cn)("text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300 transition-all",k?"p-2 w-full flex flex-col items-center justify-center aspect-square shadow-sm [&_span]:!mr-0 [&_span]:!text-[20px]":"shadow-sm"),title:k?"Shutdown":void 0,children:!k&&"Shutdown"})]})]}),(0,r.jsx)(u.ConfirmModal,{isOpen:s,onClose:()=>l(!1),onConfirm:T,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:n}),g&&(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"text-center p-8",children:[(0,r.jsx)("div",{className:"flex items-center justify-center size-16 rounded-full bg-red-500/20 text-red-500 mx-auto mb-4",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"power_off"})}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:"Server Disconnected"}),(0,r.jsx)("p",{className:"text-text-muted mb-6",children:"The proxy server has been stopped."}),(0,r.jsx)(x.default,{variant:"secondary",onClick:()=>globalThis.location.reload(),children:"Reload Page"})]})})]})}b.propTypes={onClose:n().func}},93927:(e,t,s)=>{s.d(t,{default:()=>z});var r=s(95155),a=s(12115),l=s(73321),n=s(56061),i=s(84588),o=s(14051),d=s.n(o);let c=e=>new Intl.NumberFormat().format(e||0);function m({stats:e}){let t;return(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,r.jsxs)(i.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,r.jsx)("span",{className:"text-2xl font-bold",children:c(e.totalRequests)})]}),(0,r.jsxs)(i.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,r.jsx)("span",{className:"text-2xl font-bold text-primary",children:c(e.totalPromptTokens)})]}),(0,r.jsxs)(i.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,r.jsx)("span",{className:"text-2xl font-bold text-success",children:c(e.totalCompletionTokens)})]}),(0,r.jsxs)(i.default,{className:"px-4 py-3 flex flex-col gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,r.jsxs)("span",{className:"text-2xl font-bold text-warning",children:["~",(t=e.totalCost,`$${(t||0).toFixed(2)}`)]}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}m.propTypes={stats:d().object.isRequired};let x=e=>new Intl.NumberFormat().format(e||0),u=e=>`$${(e||0).toFixed(2)}`;function h(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function p({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,r.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,r.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function f({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":x(e.promptTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":x(e.completionTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:x(e.totalTokens)})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":u(e.inputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":u(e.outputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:u(e.totalCost||e.cost)})]})}function b({title:e,columns:t,groupedData:s,tableType:l,sortBy:n,sortOrder:o,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:x,renderSummaryCells:u,emptyMessage:h}){let[g,j]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&j(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,a.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...g]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[g,m]);let y=(0,a.useCallback)(e=>{j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),v=(0,a.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),N=t.length+v.length;return(0,r.jsxs)(i.default,{className:"overflow-hidden",children:[(0,r.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,r.jsx)("h3",{className:"font-semibold",children:e})}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,r.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,r.jsxs)("tr",{children:[t.map(e=>(0,r.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(l,e.field),children:[e.label," ",(0,r.jsx)(p,{field:e.field,currentSort:n,currentOrder:o})]},e.field)),v.map(e=>(0,r.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(l,e.field),children:[e.label," ",(0,r.jsx)(p,{field:e.field,currentSort:n,currentOrder:o})]},e.field))]})}),(0,r.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>y(e.groupKey),children:[(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${g.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,r.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),u(e),(0,r.jsx)(f,{item:e.summary,viewMode:c,isSummary:!0})]}),g.has(e.groupKey)&&e.items.map(e=>(0,r.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[x(e),(0,r.jsx)(f,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:N,className:"px-6 py-8 text-center text-text-muted",children:h})})]})]})})]})}p.propTypes={field:d().string.isRequired,currentSort:d().string.isRequired,currentOrder:d().string.isRequired},f.propTypes={item:d().object.isRequired,viewMode:d().string.isRequired,isSummary:d().bool},b.propTypes={title:d().string.isRequired,columns:d().arrayOf(d().shape({field:d().string.isRequired,label:d().string.isRequired,align:d().string})).isRequired,groupedData:d().array.isRequired,tableType:d().string.isRequired,sortBy:d().string.isRequired,sortOrder:d().string.isRequired,onToggleSort:d().func.isRequired,viewMode:d().string.isRequired,storageKey:d().string.isRequired,renderDetailCells:d().func.isRequired,renderSummaryCells:d().func.isRequired,emptyMessage:d().string.isRequired};var g=s(81750),j=s(6793);s(53255);var y=s(52679);function v({data:e}){let{label:t,color:s,imageUrl:l,textIcon:n,active:i}=e,[o,d]=(0,a.useState)(!1);return(0,r.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 rounded-lg border-2 transition-all duration-300 bg-bg",style:{borderColor:i?s:"var(--color-border)",boxShadow:i?`0 0 16px ${s}40`:"none",minWidth:"150px"},children:[(0,r.jsx)(g.h7,{type:"target",position:j.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(g.h7,{type:"target",position:j.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(g.h7,{type:"target",position:j.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(g.h7,{type:"target",position:j.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center shrink-0",style:{backgroundColor:`${s}15`},children:o?(0,r.jsx)("span",{className:"text-sm font-bold",style:{color:s},children:n}):(0,r.jsx)("img",{src:l,alt:t,className:"w-6 h-6 rounded-sm object-contain",onError:()=>d(!0)})}),(0,r.jsx)("span",{className:"text-base font-medium truncate",style:{color:i?s:"var(--color-text)"},children:t}),i&&(0,r.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:s}}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:s}})]})]})}function N({data:e}){return(0,r.jsxs)("div",{className:"flex items-center justify-center px-5 py-3 rounded-xl border-2 border-primary bg-primary/5 shadow-md min-w-[130px]",children:[(0,r.jsx)(g.h7,{type:"source",position:j.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(g.h7,{type:"source",position:j.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(g.h7,{type:"source",position:j.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(g.h7,{type:"source",position:j.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("img",{src:"/favicon.svg",alt:"iRouter",className:"w-6 h-6 mr-2"}),(0,r.jsx)("span",{className:"text-sm font-bold text-primary",children:"iRouter"}),e.activeCount>0&&(0,r.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-primary text-white text-xs font-bold",children:e.activeCount})]})}v.propTypes={data:d().object.isRequired},N.propTypes={data:d().object.isRequired};let w={provider:v,router:N};function k({providers:e=[],activeRequests:t=[],lastProvider:s="",errorProvider:l=""}){let n=(0,a.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),i=s?.toLowerCase()||"",o=l?.toLowerCase()||"",d=(0,a.useMemo)(()=>new Set(n?n.split(","):[]),[n]),c=(0,a.useMemo)(()=>new Set(i?[i]:[]),[i]),m=(0,a.useMemo)(()=>new Set(o?[o]:[]),[o]),{nodes:x,edges:u}=(0,a.useMemo)(()=>(function(e,t,s,r){let a=e.length,l=Math.max(320,204*a/(2*Math.PI)),n=Math.max(200,.55*l);if(0===a)return{nodes:[{id:"router",type:"router",position:{x:0,y:0},data:{activeCount:0},draggable:!1}],edges:[]};let i=[],o=[];return i.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,d)=>{var c,m;let x,u,h=(c=e.provider,y.Q2[c]||{color:"#6b7280",name:c}),p=t.has(e.provider?.toLowerCase()),f=!p&&s.has(e.provider?.toLowerCase()),b=!p&&r.has(e.provider?.toLowerCase()),g=`provider-${e.provider}`,j={label:(h.name!==e.provider?h.name:null)||e.name||e.provider,color:h.color||"#6b7280",imageUrl:(m=e.provider,`/providers/${m}.png`),textIcon:h.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:p},v=-Math.PI/2+2*Math.PI*d/a,N=l*Math.cos(v),w=n*Math.sin(v);Math.abs(v+Math.PI/2)<Math.PI/4||Math.abs(v-3*Math.PI/2)<Math.PI/4?(x="top",u="bottom"):Math.abs(v-Math.PI/2)<Math.PI/4?(x="bottom",u="top"):N>0?(x="right",u="left"):(x="left",u="right"),i.push({id:g,type:"provider",position:{x:N-90,y:w-15},data:j,draggable:!1}),o.push({id:`e-${g}`,source:"router",sourceHandle:x,target:g,targetHandle:u,animated:p,style:(h.color,b?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:p?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:f?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:i,edges:o}})(e,d,c,m),[e,n,i,o]),h=(0,a.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),p=(0,a.useRef)(null),f=(0,a.useCallback)(e=>{p.current=e,setTimeout(()=>e.fitView({padding:.3}),50)},[]);return(0,r.jsx)("div",{className:"w-full rounded-lg border border-border bg-bg-subtle/30",style:{height:480},children:0===e.length?(0,r.jsx)("div",{className:"h-full flex items-center justify-center text-text-muted text-sm",children:"No providers connected"}):(0,r.jsx)(g.Gc,{nodes:x,edges:u,nodeTypes:w,fitView:!0,fitViewOptions:{padding:.3},onInit:f,proOptions:{hideAttribution:!0},panOnDrag:!1,zoomOnScroll:!1,zoomOnPinch:!1,zoomOnDoubleClick:!1,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1},h)})}k.propTypes={providers:d().arrayOf(d().shape({id:d().string,provider:d().string,name:d().string})),activeRequests:d().arrayOf(d().shape({provider:d().string,model:d().string,account:d().string})),lastProvider:d().string,errorProvider:d().string};var C=s(10124);function S({timestamp:e}){let t,[,s]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=setInterval(()=>s(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,r.jsx)(r.Fragment,{children:(t=Math.floor((Date.now()-new Date(e))/1e3))<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`})}function T({requests:e=[]}){return(0,r.jsxs)(i.default,{className:"flex flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,r.jsx)("div",{className:"px-1 py-2 border-b border-border shrink-0",children:(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"})}),e.length?(0,r.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,r.jsxs)("table",{className:"w-full text-xs border-collapse",children:[(0,r.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,r.jsxs)("tr",{className:"border-b border-border",children:[(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,r.jsx)("th",{className:"py-1.5 pl-3 text-left font-semibold text-text-muted",children:"API Key"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=!e.status||"ok"===e.status||"success"===e.status;return(0,r.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("td",{className:"py-1.5",children:(0,r.jsx)("span",{className:`block w-1.5 h-1.5 rounded-full ${s?"bg-success":"bg-error"}`})}),(0,r.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[120px]",title:e.model,children:e.model}),(0,r.jsx)("td",{className:"py-1.5 pl-3 truncate max-w-[100px] text-secondary",title:e.keyName,children:e.keyName||"—"}),(0,r.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,r.jsxs)("span",{className:"text-primary",children:[x(e.promptTokens),"↑"]})," ",(0,r.jsxs)("span",{className:"text-success",children:[x(e.completionTokens),"↓"]})]}),(0,r.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,r.jsx)(S,{timestamp:e.timestamp})})]},t)})})]})}):(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No requests yet."})]})}function M(e,t={},s,r){return Object.entries(e||{}).map(([e,s])=>{let r=(s.promptTokens||0)+(s.completionTokens||0),a=s.cost||0,l=r>0?(s.promptTokens||0)*(a/r):0,n=r>0?(s.completionTokens||0)*(a/r):0;return{...s,key:e,totalTokens:r,totalCost:a,inputCost:l,outputCost:n,pending:t[e]||0}}).sort((e,t)=>{let a=e[s],l=t[s];return("string"==typeof a&&(a=a.toLowerCase()),"string"==typeof l&&(l=l.toLowerCase()),a<l)?"asc"===r?-1:1:a>l?"asc"===r?1:-1:0})}function $(e,t){if(!Array.isArray(e))return[];let s={};return e.forEach(e=>{let r=function(e,t){switch(t){case"rawModel":return e.rawModel||"Unknown Model";case"accountName":return e.accountName||`Account ${e.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return e.keyName||"Unknown Key";case"endpoint":return e.endpoint||"Unknown Endpoint";default:return e[t]||"Unknown"}}(e,t);s[r]||(s[r]={groupKey:r,summary:{requests:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,inputCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let a=s[r].summary;a.requests+=e.requests||0,a.promptTokens+=e.promptTokens||0,a.completionTokens+=e.completionTokens||0,a.totalTokens+=e.totalTokens||0,a.cost+=e.cost||0,a.inputCost+=e.inputCost||0,a.outputCost+=e.outputCost||0,a.pending+=e.pending||0,e.lastUsed&&(!a.lastUsed||new Date(e.lastUsed)>new Date(a.lastUsed))&&(a.lastUsed=e.lastUsed),s[r].items.push(e)}),Object.values(s)}let R=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],E=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],I=[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],D=[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],O=[{value:"model",label:"Usage by Model"},{value:"account",label:"Usage by Account"},{value:"apiKey",label:"Usage by API Key"},{value:"endpoint",label:"Usage by Endpoint"}],L=[{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function z(){let e=(0,l.useRouter)(),t=(0,l.useSearchParams)(),s=t.get("sortBy")||"rawModel",i=t.get("sortOrder")||"asc",[o,d]=(0,a.useState)(null),[c,u]=(0,a.useState)(!0),[p,f]=(0,a.useState)(!1),[g,j]=(0,a.useState)("model"),[y,v]=(0,a.useState)([]),[N,w]=(0,a.useState)("7d");(0,a.useEffect)(()=>{fetch("/api/providers").then(e=>e.ok?e.json():null).then(e=>{if(!e?.connections)return;let t=new Set;v(e.connections.filter(e=>!t.has(e.provider)&&(t.add(e.provider),!0)))}).catch(()=>{})},[]),(0,a.useEffect)(()=>{o?f(!0):u(!0),fetch(`/api/usage/stats?period=${N}`).then(e=>e.ok?e.json():null).then(e=>{e&&d(t=>({...t,...e}))}).catch(()=>{}).finally(()=>{u(!1),f(!1)})},[N]),(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);d(e=>e?{...e,activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending}:t),u(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>u(!1),()=>e.close()},[]);let S=(0,a.useCallback)((s,r)=>{let a=new URLSearchParams(t.toString());a.get("sortBy")===r?a.set("sortOrder","asc"===a.get("sortOrder")?"desc":"asc"):(a.set("sortBy",r),a.set("sortOrder","asc")),e.replace(`?${a.toString()}`,{scroll:!1})},[t,e]),z=(0,a.useMemo)(()=>{if(!o)return null;switch(g){case"model":{let e=o.pending?.byModel||{};return{columns:R,groupedData:$(M(o.byModel,e,s,i),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(n.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"account":{let e={};return o?.pending?.byAccount&&Object.entries(o.byAccount||{}).forEach(([t,s])=>{let r=o.pending.byAccount[s.connectionId];if(r){let a=s.provider?`${s.rawModel} (${s.provider})`:s.rawModel;e[t]=r[a]||0}}),{columns:E,groupedData:$(M(o.byAccount,e,s,i),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.accountName||`Account ${e.connectionId?.slice(0,8)}...`}),(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(n.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"apiKey":return{columns:I,groupedData:$(M(o.byApiKey,{},s,i),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(n.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})};default:return{columns:D,groupedData:$(M(o.byEndpoint,{},s,i),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(n.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:x(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}},[o,g,s,i]);if(!o&&!c)return(0,r.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let P=(0,r.jsx)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})});return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 self-end",children:[(0,r.jsx)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border",children:L.map(e=>(0,r.jsx)("button",{onClick:()=>w(e.value),disabled:p,className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${N===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:e.label},e.value))}),p&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),c?P:(0,r.jsx)(m,{stats:o}),c?P:(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] gap-2 items-stretch",children:[(0,r.jsx)(k,{providers:y,activeRequests:o.activeRequests||[],lastProvider:o.recentRequests?.[0]?.provider||"",errorProvider:o.errorProvider||""}),(0,r.jsx)(T,{requests:o.recentRequests||[]})]}),c?P:(0,r.jsx)(C.A,{period:N}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-between",children:(0,r.jsx)("select",{value:g,onChange:e=>j(e.target.value),className:"px-3 py-1.5 rounded-lg border border-border bg-bg-subtle text-sm font-medium text-text focus:outline-none focus:ring-2 focus:ring-primary/50",children:O.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})}),c?P:z&&(0,r.jsx)(b,{title:"",columns:z.columns,groupedData:z.groupedData,tableType:g,sortBy:s,sortOrder:i,onToggleSort:S,storageKey:z.storageKey,renderSummaryCells:z.renderSummaryCells,renderDetailCells:z.renderDetailCells,emptyMessage:z.emptyMessage})]})]})}},94230:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(95155),a=s(12115),l=s(14051),n=s.n(l),i=s(35497),o=s(11059);function d({isOpen:e,provider:t,onSuccess:s,onClose:l}){let[n,c]=(0,a.useState)("loading"),[m,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(null),[p,f]=(0,a.useState)(""),[b,g]=(0,a.useState)(null),{copied:j,copy:y}=(0,o.C)();(0,a.useEffect)(()=>{e&&t&&(async()=>{try{g(null),c("loading");let e=await fetch(`/api/oauth/kiro/social-authorize?provider=${t}`),s=await e.json();if(!e.ok)throw Error(s.error);h(s),x(s.authUrl),c("input"),window.open(s.authUrl,"_blank")}catch(e){g(e.message),c("error")}})()},[e,t]);let v=async()=>{try{let e;g(null);try{e=new URL(p)}catch(e){throw Error("Invalid callback URL format")}let r=e.searchParams.get("code");e.searchParams.get("state");let a=e.searchParams.get("error");if(a)throw Error(e.searchParams.get("error_description")||a);if(!r)throw Error("No authorization code found in URL");let l=await fetch("/api/oauth/kiro/social-exchange",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:r,codeVerifier:u.codeVerifier,provider:t})}),n=await l.json();if(!l.ok)throw Error(n.error);c("success"),s?.()}catch(e){g(e.message),c("error")}},N="google"===t?"Google":"GitHub";return(0,r.jsx)(i.aF,{isOpen:e,title:`Connect Kiro via ${N}`,onClose:l,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:["loading"===n&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Initializing..."}),(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:["Setting up ",N," authentication"]})]}),"input"===n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.pd,{value:m,readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,r.jsx)(i.$n,{variant:"secondary",icon:"auth_url"===j?"check":"content_copy",onClick:()=>y(m,"auth_url"),children:"Copy"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser address bar."}),(0,r.jsx)(i.pd,{value:p,onChange:e=>f(e.target.value),placeholder:"kiro://kiro.kiroAgent/authenticate-success?code=...",className:"font-mono text-xs"})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!p,children:"Connect"}),(0,r.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===n&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your Kiro account via ",N," has been connected."]}),(0,r.jsx)(i.$n,{onClick:l,fullWidth:!0,children:"Done"})]}),"error"===n&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,r.jsx)("p",{className:"text-sm text-red-600 mb-4",children:b}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:()=>c("input"),variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,r.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}d.propTypes={isOpen:n().bool.isRequired,provider:n().oneOf(["google","github"]).isRequired,onSuccess:n().func,onClose:n().func.isRequired}},97677:(e,t,s)=>{s.d(t,{default:()=>a});var r=s(95155);function a({text:e,children:t,position:s="top"}){return(0,r.jsxs)("div",{className:"relative inline-flex group",children:[t,(0,r.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-1.5",bottom:"top-full left-1/2 -translate-x-1/2 mt-1.5",left:"right-full top-1/2 -translate-y-1/2 mr-1.5",right:"left-full top-1/2 -translate-y-1/2 ml-1.5"}[s]} z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug bg-gray-900 text-white opacity-0 group-hover:opacity-100 transition-opacity duration-150 whitespace-normal`,children:e})]})}},98542:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({checked:e=!1,onChange:t,label:s,description:n,disabled:i=!1,size:o="md",className:d}){let c={sm:{track:"w-8 h-4",thumb:"size-3",translate:"translate-x-4"},md:{track:"w-11 h-6",thumb:"size-5",translate:"translate-x-5"},lg:{track:"w-14 h-7",thumb:"size-6",translate:"translate-x-7"}};return(0,r.jsxs)("div",{className:(0,a.cn)("flex items-center gap-3",i&&"opacity-50 cursor-not-allowed",d),children:[(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:i,onClick:()=>{!i&&t&&t(!e)},className:(0,a.cn)("relative inline-flex shrink-0 cursor-pointer rounded-full","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-1 focus:ring-primary/30",e?"bg-primary":"bg-black/10 dark:bg-white/20",c[o].track,i&&"cursor-not-allowed"),children:(0,r.jsx)("span",{className:(0,a.cn)("pointer-events-none inline-block rounded-full bg-white shadow-sm","transform transition duration-200 ease-in-out",e?c[o].translate:"translate-x-0.5",c[o].thumb,"mt-0.5")})}),(s||n)&&(0,r.jsxs)("div",{className:"flex flex-col",children:[s&&(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:s}),n&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:n})]})]})}}}]);