9router 0.3.79 → 0.3.80

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 (241) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +3 -3
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  5. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  6. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  18. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  19. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  21. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  22. package/app/.next/server/app/_global-error.html +1 -1
  23. package/app/.next/server/app/_global-error.rsc +1 -1
  24. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  25. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  26. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  27. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  28. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  29. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  30. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  31. package/app/.next/server/app/_not-found.html +1 -1
  32. package/app/.next/server/app/_not-found.rsc +3 -3
  33. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  34. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  35. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  36. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  37. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  38. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  39. package/app/.next/server/app/api/provider-nodes/route.js +1 -1
  40. package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
  41. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  42. package/app/.next/server/app/api/usage/providers/route.js +1 -1
  43. package/app/.next/server/app/api/v1/models/route.js +1 -1
  44. package/app/.next/server/app/api/v1beta/models/route.js +1 -1
  45. package/app/.next/server/app/api/version/route.js +1 -1
  46. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  47. package/app/.next/server/app/callback.html +1 -1
  48. package/app/.next/server/app/callback.rsc +3 -3
  49. package/app/.next/server/app/callback.segments/_full.segment.rsc +3 -3
  50. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  51. package/app/.next/server/app/callback.segments/_index.segment.rsc +3 -3
  52. package/app/.next/server/app/callback.segments/_tree.segment.rsc +1 -1
  53. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  54. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  55. package/app/.next/server/app/dashboard/basic-chat.html +1 -1
  56. package/app/.next/server/app/dashboard/basic-chat.rsc +5 -5
  57. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  58. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  59. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  60. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  61. package/app/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  62. package/app/.next/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  63. package/app/.next/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  64. package/app/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  65. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  66. package/app/.next/server/app/dashboard/cli-tools.rsc +5 -5
  67. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  68. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  69. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  70. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  71. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  72. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  73. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  74. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  75. package/app/.next/server/app/dashboard/combos.html +1 -1
  76. package/app/.next/server/app/dashboard/combos.rsc +5 -5
  77. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  78. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  79. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  80. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  81. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  82. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  83. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  84. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  85. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  86. package/app/.next/server/app/dashboard/endpoint.rsc +5 -5
  87. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  88. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  89. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  90. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  91. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  92. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  93. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  94. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  95. package/app/.next/server/app/dashboard/mitm.html +1 -1
  96. package/app/.next/server/app/dashboard/mitm.rsc +5 -5
  97. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  98. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  99. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  100. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  101. package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  102. package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  103. package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  104. package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  105. package/app/.next/server/app/dashboard/profile.html +1 -1
  106. package/app/.next/server/app/dashboard/profile.rsc +5 -5
  107. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  108. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  109. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  110. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  111. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  112. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  113. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  114. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  115. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  116. package/app/.next/server/app/dashboard/providers/new.rsc +5 -5
  117. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  118. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  119. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  120. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  121. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  122. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  123. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  124. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  125. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  126. package/app/.next/server/app/dashboard/providers.html +1 -1
  127. package/app/.next/server/app/dashboard/providers.rsc +5 -5
  128. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  129. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  130. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  131. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  132. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  133. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  134. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  135. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  136. package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
  137. package/app/.next/server/app/dashboard/proxy-pools.rsc +5 -5
  138. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  139. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  140. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  141. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  142. package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  143. package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  144. package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  145. package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  146. package/app/.next/server/app/dashboard/quota.html +2 -2
  147. package/app/.next/server/app/dashboard/quota.rsc +6 -6
  148. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  149. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  150. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  151. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  152. package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  153. package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  154. package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  155. package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  156. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  157. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  158. package/app/.next/server/app/dashboard/settings/pricing.rsc +3 -3
  159. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  160. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  161. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  162. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  163. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  164. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  165. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  166. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  167. package/app/.next/server/app/dashboard/translator.html +1 -1
  168. package/app/.next/server/app/dashboard/translator.rsc +5 -5
  169. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  170. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  171. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  172. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  173. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  174. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  175. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  176. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  177. package/app/.next/server/app/dashboard/usage.html +1 -1
  178. package/app/.next/server/app/dashboard/usage.rsc +5 -5
  179. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  180. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  181. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  182. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  183. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  184. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  185. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  186. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  187. package/app/.next/server/app/dashboard.html +1 -1
  188. package/app/.next/server/app/dashboard.rsc +5 -5
  189. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  190. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  191. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  192. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +5 -5
  193. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  194. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +3 -3
  195. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  196. package/app/.next/server/app/index.html +1 -1
  197. package/app/.next/server/app/index.rsc +3 -3
  198. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  199. package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
  200. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  201. package/app/.next/server/app/index.segments/_index.segment.rsc +3 -3
  202. package/app/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  203. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  204. package/app/.next/server/app/landing.html +1 -1
  205. package/app/.next/server/app/landing.rsc +3 -3
  206. package/app/.next/server/app/landing.segments/_full.segment.rsc +3 -3
  207. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  208. package/app/.next/server/app/landing.segments/_index.segment.rsc +3 -3
  209. package/app/.next/server/app/landing.segments/_tree.segment.rsc +1 -1
  210. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  211. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  212. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  213. package/app/.next/server/app/login.html +1 -1
  214. package/app/.next/server/app/login.rsc +4 -4
  215. package/app/.next/server/app/login.segments/_full.segment.rsc +4 -4
  216. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  217. package/app/.next/server/app/login.segments/_index.segment.rsc +3 -3
  218. package/app/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  219. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  220. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  221. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  222. package/app/.next/server/app-paths-manifest.json +3 -3
  223. package/app/.next/server/chunks/2049.js +1 -1
  224. package/app/.next/server/chunks/242.js +1 -1
  225. package/app/.next/server/chunks/3437.js +1 -1
  226. package/app/.next/server/chunks/450.js +1 -1
  227. package/app/.next/server/chunks/4891.js +1 -1
  228. package/app/.next/server/chunks/6379.js +1 -1
  229. package/app/.next/server/chunks/8202.js +2 -2
  230. package/app/.next/server/chunks/9489.js +1 -1
  231. package/app/.next/server/middleware-build-manifest.js +1 -1
  232. package/app/.next/server/pages/404.html +1 -1
  233. package/app/.next/server/pages/500.html +1 -1
  234. package/app/.next/static/chunks/{4156-95873d034d9be208.js → 4156-1395e387d697cca5.js} +1 -1
  235. package/app/.next/static/chunks/505-78126d6f6fa7e59d.js +1 -0
  236. package/app/package.json +1 -1
  237. package/app/src/mitm/server.js +1 -1
  238. package/package.json +1 -1
  239. package/app/.next/static/chunks/505-5dea9cf33d2883b7.js +0 -1
  240. /package/app/.next/static/{_1cT7G6qqsI_sqV4bRUa6 → TKSQZPcNIY3jeiaaAFmNE}/_buildManifest.js +0 -0
  241. /package/app/.next/static/{_1cT7G6qqsI_sqV4bRUa6 → TKSQZPcNIY3jeiaaAFmNE}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/e4af272ccee01ff0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/5ed5a95fa0b29325.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/081a0afca5a9bd20.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-86e40ea2022f394c.js"/><script src="/_next/static/chunks/c7879cf7-255d52e3eda24cb7.js" async=""></script><script src="/_next/static/chunks/5158-4b48a3595c794bbc.js" async=""></script><script src="/_next/static/chunks/main-app-2c8be355ba1c4e93.js" async=""></script><script src="/_next/static/chunks/c6123951-462cab681f34bf85.js" async=""></script><script src="/_next/static/chunks/2599-ef3aca3d4fdaa96d.js" async=""></script><script src="/_next/static/chunks/505-5dea9cf33d2883b7.js" async=""></script><script src="/_next/static/chunks/4156-95873d034d9be208.js" async=""></script><script src="/_next/static/chunks/app/(dashboard)/layout-28cec0ea8271c92a.js" async=""></script><script src="/_next/static/chunks/app/layout-c47481f46f5ae72b.js" async=""></script><link rel="preload" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&amp;display=swap" as="style"/><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/><title>404: This page could not be found.</title><meta name="theme-color" content="#0a0a0a"/><title>9Router - AI Infrastructure Management</title><meta name="description" content="One endpoint for all your AI providers. Manage keys, monitor usage, and scale effortlessly."/><link rel="manifest" href="/manifest.webmanifest"/><link rel="icon" href="/favicon.ico?603d046c9a6fdfbb" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/favicon.svg"/><link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&amp;display=swap" rel="stylesheet"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_f367f3 font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-86e40ea2022f394c.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[98814,[\"4335\",\"static/chunks/c6123951-462cab681f34bf85.js\",\"2599\",\"static/chunks/2599-ef3aca3d4fdaa96d.js\",\"505\",\"static/chunks/505-5dea9cf33d2883b7.js\",\"4156\",\"static/chunks/4156-95873d034d9be208.js\",\"9305\",\"static/chunks/app/(dashboard)/layout-28cec0ea8271c92a.js\"],\"ThemeProvider\"]\n3:I[70339,[\"505\",\"static/chunks/505-5dea9cf33d2883b7.js\",\"7177\",\"static/chunks/app/layout-c47481f46f5ae72b.js\"],\"RuntimeI18nProvider\"]\n4:I[91133,[],\"\"]\n5:I[4297,[],\"\"]\n6:I[31872,[],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[31872,[],\"ViewportBoundary\"]\nc:I[31872,[],\"MetadataBoundary\"]\ne:I[57567,[],\"default\",1]\n:HL[\"/_next/static/media/e4af272ccee01ff0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/5ed5a95fa0b29325.css\",\"style\"]\n:HL[\"/_next/static/css/081a0afca5a9bd20.css\",\"style\"]\n:HL[\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200\u0026display=swap\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/5ed5a95fa0b29325.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/081a0afca5a9bd20.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://fonts.googleapis.com\"}],[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://fonts.gstatic.com\",\"crossOrigin\":\"anonymous\"}],[\"$\",\"link\",null,{\"href\":\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200\u0026display=swap\",\"rel\":\"stylesheet\"}]]}],[\"$\",\"body\",null,{\"className\":\"__variable_f367f3 font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"_1cT7G6qqsI_sqV4bRUa6\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#0a0a0a\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[12569,[],\"IconMark\"]\n8:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"9Router - AI Infrastructure Management\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"One endpoint for all your AI providers. Manage keys, monitor usage, and scale effortlessly.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?603d046c9a6fdfbb\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.svg\"}],[\"$\",\"$L10\",\"5\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/e4af272ccee01ff0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/5ed5a95fa0b29325.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/081a0afca5a9bd20.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-86e40ea2022f394c.js"/><script src="/_next/static/chunks/c7879cf7-255d52e3eda24cb7.js" async=""></script><script src="/_next/static/chunks/5158-4b48a3595c794bbc.js" async=""></script><script src="/_next/static/chunks/main-app-2c8be355ba1c4e93.js" async=""></script><script src="/_next/static/chunks/c6123951-462cab681f34bf85.js" async=""></script><script src="/_next/static/chunks/2599-ef3aca3d4fdaa96d.js" async=""></script><script src="/_next/static/chunks/505-78126d6f6fa7e59d.js" async=""></script><script src="/_next/static/chunks/4156-1395e387d697cca5.js" async=""></script><script src="/_next/static/chunks/app/(dashboard)/layout-28cec0ea8271c92a.js" async=""></script><script src="/_next/static/chunks/app/layout-c47481f46f5ae72b.js" async=""></script><link rel="preload" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&amp;display=swap" as="style"/><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/><title>404: This page could not be found.</title><meta name="theme-color" content="#0a0a0a"/><title>9Router - AI Infrastructure Management</title><meta name="description" content="One endpoint for all your AI providers. Manage keys, monitor usage, and scale effortlessly."/><link rel="manifest" href="/manifest.webmanifest"/><link rel="icon" href="/favicon.ico?603d046c9a6fdfbb" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/favicon.svg"/><link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&amp;display=swap" rel="stylesheet"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_f367f3 font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-86e40ea2022f394c.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[98814,[\"4335\",\"static/chunks/c6123951-462cab681f34bf85.js\",\"2599\",\"static/chunks/2599-ef3aca3d4fdaa96d.js\",\"505\",\"static/chunks/505-78126d6f6fa7e59d.js\",\"4156\",\"static/chunks/4156-1395e387d697cca5.js\",\"9305\",\"static/chunks/app/(dashboard)/layout-28cec0ea8271c92a.js\"],\"ThemeProvider\"]\n3:I[70339,[\"505\",\"static/chunks/505-78126d6f6fa7e59d.js\",\"7177\",\"static/chunks/app/layout-c47481f46f5ae72b.js\"],\"RuntimeI18nProvider\"]\n4:I[91133,[],\"\"]\n5:I[4297,[],\"\"]\n6:I[31872,[],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[31872,[],\"ViewportBoundary\"]\nc:I[31872,[],\"MetadataBoundary\"]\ne:I[57567,[],\"default\",1]\n:HL[\"/_next/static/media/e4af272ccee01ff0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/5ed5a95fa0b29325.css\",\"style\"]\n:HL[\"/_next/static/css/081a0afca5a9bd20.css\",\"style\"]\n:HL[\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200\u0026display=swap\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/5ed5a95fa0b29325.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/081a0afca5a9bd20.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://fonts.googleapis.com\"}],[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://fonts.gstatic.com\",\"crossOrigin\":\"anonymous\"}],[\"$\",\"link\",null,{\"href\":\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200\u0026display=swap\",\"rel\":\"stylesheet\"}]]}],[\"$\",\"body\",null,{\"className\":\"__variable_f367f3 font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"TKSQZPcNIY3jeiaaAFmNE\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#0a0a0a\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[12569,[],\"IconMark\"]\n8:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"9Router - AI Infrastructure Management\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"One endpoint for all your AI providers. Manage keys, monitor usage, and scale effortlessly.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?603d046c9a6fdfbb\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.svg\"}],[\"$\",\"$L10\",\"5\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-86e40ea2022f394c.js"/><script src="/_next/static/chunks/c7879cf7-255d52e3eda24cb7.js" async=""></script><script src="/_next/static/chunks/5158-4b48a3595c794bbc.js" async=""></script><script src="/_next/static/chunks/main-app-2c8be355ba1c4e93.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-86e40ea2022f394c.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[91133,[],\"\"]\n3:I[4297,[],\"\"]\n4:I[31872,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[31872,[],\"ViewportBoundary\"]\na:I[31872,[],\"MetadataBoundary\"]\nc:I[57567,[],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"_1cT7G6qqsI_sqV4bRUa6\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-86e40ea2022f394c.js"/><script src="/_next/static/chunks/c7879cf7-255d52e3eda24cb7.js" async=""></script><script src="/_next/static/chunks/5158-4b48a3595c794bbc.js" async=""></script><script src="/_next/static/chunks/main-app-2c8be355ba1c4e93.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-86e40ea2022f394c.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[91133,[],\"\"]\n3:I[4297,[],\"\"]\n4:I[31872,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[31872,[],\"ViewportBoundary\"]\na:I[31872,[],\"MetadataBoundary\"]\nc:I[57567,[],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"TKSQZPcNIY3jeiaaAFmNE\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4156],{292:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({children:e,title:t,subtitle:s,icon:i,action:n,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||n)&&(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[i&&(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:i})}),(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})]})]}),n]}),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})]})}},1755:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({options:e=[],value:t,onChange:s,size:i="md",className:n}){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",n),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[i],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))})}},3242:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(86447),i=s.n(l),n=s(74156),o=s(96459);function d({isOpen:e,provider:t,providerInfo:s,onSuccess:l,onClose:i,oauthMeta:c}){let[m,x]=(0,a.useState)("waiting"),[u,h]=(0,a.useState)(null),[p,f]=(0,a.useState)(""),[b,g]=(0,a.useState)(null),[j,y]=(0,a.useState)(!1),[v,N]=(0,a.useState)(null),[k,w]=(0,a.useState)(!1),C=(0,a.useRef)(null),S=(0,a.useRef)(!1),{copied:T,copy:R}=(0,o.C)(),[$,I]=(0,a.useState)(!1),[P,M]=(0,a.useState)("/callback?code=..."),O=(0,a.useRef)(!1);(0,a.useEffect)(()=>{I("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname),M(`${window.location.origin}/callback?code=...`)},[]);let E=(0,a.useCallback)(async(e,s)=>{if(u)try{let r=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,redirectUri:u.redirectUri,codeVerifier:u.codeVerifier,state:s,...c?{meta:c}:{}})}),a=await r.json();if(!r.ok)throw Error(a.error);x("success"),l?.()}catch(e){g(e.message),x("error")}},[u,t,l]),L=(0,a.useCallback)(async(e,s,r,a)=>{S.current=!1,w(!0);for(let i=0;i<60;i++){if(S.current){console.log("[OAuthModal] Polling aborted"),w(!1);return}if(await new Promise(e=>setTimeout(e,1e3*r)),S.current){console.log("[OAuthModal] Polling aborted after sleep"),w(!1);return}try{let i=await fetch(`/api/oauth/${t}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:e,codeVerifier:s,extraData:a})}),n=await i.json();if(n.success){S.current=!0,x("success"),w(!1),l?.();return}if("expired_token"===n.error||"access_denied"===n.error)throw Error(n.errorDescription||n.error);"slow_down"===n.error&&(r=Math.min(r+5,30))}catch(e){g(e.message),x("error"),w(!1);return}}g("Authorization timeout"),x("error"),w(!1)},[t,l]),A=(0,a.useCallback)(async()=>{if(t)try{let e;if(g(null),["github","qwen","kiro","kimi-coding","kilocode","codebuddy"].includes(t)){y(!0),x("waiting");let e=await fetch(`/api/oauth/${t}/device-code`),s=await e.json();if(!e.ok)throw Error(s.error);N(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;L(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=new URL(`/api/oauth/${t}/authorize`,window.location.origin);s.searchParams.set("redirect_uri",e),c&&Object.entries(c).forEach(([e,t])=>{t&&s.searchParams.set(e,t)});let r=await fetch(s.toString()),a=await r.json();if(!r.ok)throw Error(a.error);h({...a,redirectUri:e}),"codex"!==t&&$?(x("waiting"),C.current=window.open(a.authUrl,"oauth_popup","width=600,height=700"),C.current||x("input")):(x("input"),window.open(a.authUrl,"_blank"))}catch(e){g(e.message),x("error")}},[t,$,L]);(0,a.useEffect)(()=>{e&&t?(h(null),f(""),g(null),y(!1),N(null),w(!1),S.current=!1,A()):e||(S.current=!0)},[e,t,A]),(0,a.useEffect)(()=>{let e;if(!u)return;O.current=!1;let t=async e=>{if(O.current)return;let{code:t,state:s,error:r,errorDescription:a}=e;if(r){O.current=!0,g(a||r),x("error");return}t&&(O.current=!0,await E(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()}},[u,E]);let z=async()=>{try{g(null);let e=new URL(p),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 E(t,s)}catch(e){g(e.message),x("error")}},_=(0,a.useCallback)(()=>{i()},[i]);return t&&s?(0,r.jsx)(n.aF,{isOpen:e,title:`Connect ${s.name}`,onClose:_,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:["waiting"===m&&!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:"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)(n.$n,{variant:"ghost",onClick:()=>x("input"),children:"Popup blocked? Enter URL manually"})]}),"waiting"===m&&j&&v&&(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:v.verification_uri}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"verify_url"===T?"check":"content_copy",onClick:()=>R(v.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:v.user_code}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"user_code"===T?"check":"content_copy",onClick:()=>R(v.user_code,"user_code")})]})]})]}),k&&(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"===m&&!j&&(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)(n.pd,{value:u?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,r.jsx)(n.$n,{variant:"secondary",icon:"auth_url"===T?"check":"content_copy",onClick:()=>R(u?.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)(n.pd,{value:p,onChange:e=>f(e.target.value),placeholder:P,className:"font-mono text-xs"})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(n.$n,{onClick:z,fullWidth:!0,disabled:!p,children:"Connect"}),(0,r.jsx)(n.$n,{onClick:_,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===m&&(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)(n.$n,{onClick:_,fullWidth:!0,children:"Done"})]}),"error"===m&&(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)(n.$n,{onClick:A,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,r.jsx)(n.$n,{onClick:_,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}d.propTypes={isOpen:i().bool.isRequired,provider:i().string,providerInfo:i().shape({name:i().string}),onSuccess:i().func,onClose:i().func.isRequired,oauthMeta:i().object}},3412:(e,t,s)=>{s.d(t,{default:()=>B});var r=s(73365),a=s(1521),l=s(29717),i=s(35045),n=s(292),o=s(86447),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)(n.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)(n.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)(n.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)(n.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:i,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)(n.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:i,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:i,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(70842),j=s(36629);s(97621);var y=s(82495);function v({data:e}){let{label:t,color:s,imageUrl:l,textIcon:i,active:n}=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:n?s:"var(--color-border)",boxShadow:n?`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:i}):(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:n?s:"var(--color-text)"},children:t}),n&&(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:"9Router",className:"w-6 h-6 mr-2"}),(0,r.jsx)("span",{className:"text-sm font-bold text-primary",children:"9Router"}),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 k={provider:v,router:N};function w({providers:e=[],activeRequests:t=[],lastProvider:s="",errorProvider:l=""}){let i=(0,a.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),n=s?.toLowerCase()||"",o=l?.toLowerCase()||"",d=(0,a.useMemo)(()=>new Set(i?i.split(","):[]),[i]),c=(0,a.useMemo)(()=>new Set(n?[n]:[]),[n]),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)),i=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 n=[],o=[];return n.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),k=i*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"),n.push({id:g,type:"provider",position:{x:N-90,y:k-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:n,edges:o}})(e,d,c,m),[e,i,n,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:k,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)})}w.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(71220),S=s(51142),T=s(35692),R=s(39719),$=s(94580),I=s(38147),P=s(80900);let M=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),O=e=>`$${(e||0).toFixed(4)}`;function E({period:e="7d"}){let[t,s]=(0,a.useState)([]),[l,i]=(0,a.useState)(!0),[o,d]=(0,a.useState)("tokens"),c=(0,a.useCallback)(async()=>{i(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();s(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{i(!1)}},[e]);(0,a.useEffect)(()=>{c()},[c]);let m=t.some(e=>e.tokens>0||e.cost>0);return(0,r.jsxs)(n.default,{className:"p-4 flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border self-start",children:[(0,r.jsx)("button",{onClick:()=>d("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===o?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,r.jsx)("button",{onClick:()=>d("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===o?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),l?(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):m?(0,r.jsx)(C.u,{width:"100%",height:200,children:(0,r.jsxs)(S.Q,{data:t,margin:{top:4,right:8,left:0,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)(T.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,r.jsx)(R.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,r.jsx)($.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===o?M:O,width:50}),(0,r.jsx)(I.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[M(e),"Tokens"]:[O(e),"Cost"]}),"tokens"===o?(0,r.jsx)(P.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,r.jsx)(P.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function L({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 A({requests:e=[]}){return(0,r.jsxs)(n.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 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.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)(L,{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 z(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,i=r>0?(s.completionTokens||0)*(a/r):0;return{...s,key:e,totalTokens:r,totalCost:a,inputCost:l,outputCost:i,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)}E.propTypes={period:d().string};let F=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],q=[{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"}],U=[{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"}],W=[{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"}],K=[{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function B(){let e=(0,l.useRouter)(),t=(0,l.useSearchParams)(),s=t.get("sortBy")||"rawModel",n=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)("costs"),[N,k]=(0,a.useState)([]),[C,S]=(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;k(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=${C}`).then(e=>e.ok?e.json():null).then(e=>{e&&d(t=>({...t,...e}))}).catch(()=>{}).finally(()=>{u(!1),f(!1)})},[C]),(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);d(e=>({...e||{},activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending})),u(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>u(!1),()=>e.close()},[]);let T=(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]),R=(0,a.useMemo)(()=>{if(!o)return null;switch(g){case"model":{let e=o.pending?.byModel||{};return{columns:F,groupedData:_(z(o.byModel,e,s,n),"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)(i.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:q,groupedData:_(z(o.byAccount,e,s,n),"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)(i.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:U,groupedData:_(z(o.byApiKey,{},s,n),"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)(i.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:_(z(o.byEndpoint,{},s,n),"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)(i.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,n]);if(!o&&!c)return(0,r.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let $=(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:K.map(e=>(0,r.jsx)("button",{onClick:()=>S(e.value),disabled:p,className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${C===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?$:(0,r.jsx)(m,{stats:o}),c?$:(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] gap-2 items-stretch",children:[(0,r.jsx)(w,{providers:N,activeRequests:o.activeRequests||[],lastProvider:o.recentRequests?.[0]?.provider||"",errorProvider:o.errorProvider||""}),(0,r.jsx)(A,{requests:o.recentRequests||[]})]}),c?$:(0,r.jsx)(E,{period:C}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("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:W.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(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("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===y?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(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"})]})]}),c?$:R&&(0,r.jsx)(b,{title:"",columns:R.columns,groupedData:R.groupedData,tableType:g,sortBy:s,sortOrder:n,onToggleSort:T,viewMode:y,storageKey:R.storageKey,renderSummaryCells:R.renderSummaryCells,renderDetailCells:R.renderDetailCells,emptyMessage:R.emptyMessage})]})]})}},5671:(e,t,s)=>{s.d(t,{default:()=>n});var r=s(73365),a=s(1521),l=s(66911),i=s(38230);function n({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)(i.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))})})}},12003:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(98196),i=s(55348),n=s(84502);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(`${i.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,i.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,n.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-xs font-medium uppercase",children:t.split("-")[0]})]}),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:i.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)]})}},13048:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(29717),i=s(14793),n=s(56550),o=s(51123);function d({children:e}){let[t,s]=(0,a.useState)(!1),c=(0,l.usePathname)(),m=(0,i.i)(e=>e.notifications),x=(0,i.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)(n.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)(n.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})})]})]})}},13333:(e,t,s)=>{s.d(t,{default:()=>a});var r=s(73365);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})]})}},14406:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({checked:e=!1,onChange:t,label:s,description:i,disabled:n=!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",n&&"opacity-50 cursor-not-allowed",d),children:[(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:n,onClick:()=>{!n&&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,n&&"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||i)&&(0,r.jsxs)("div",{className:"flex flex-col",children:[s&&(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:s}),i&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:i})]})]})}},14793:(e,t,s)=>{s.d(t,{i:()=>l});var r=s(2074);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})}))},24372:(e,t,s)=>{s.d(t,{default:()=>x});var r=s(73365),a=s(1521),l=s(86447),i=s.n(l),n=s(66911),o=s(69633),d=s(82495);let c=[...Object.keys(d.zN),...Object.keys(d.IS),...Object.keys(d.nJ),...Object.keys(d.fg)],m=Object.keys(d.IS).filter(e=>d.IS[e].noAuth);function x({isOpen:e,onClose:t,onSelect:s,selectedModel:l,activeProviders:i=[],title:u="Select Model",modelAliases:h={}}){let[p,f]=(0,a.useState)(""),[b,g]=(0,a.useState)([]),[j,y]=(0,a.useState)([]),v=async()=>{try{let e=await fetch("/api/combos");if(!e.ok)throw Error(`Failed to fetch combos: ${e.status}`);let t=await e.json();g(t.combos||[])}catch(e){console.error("Error fetching combos:",e),g([])}};(0,a.useEffect)(()=>{e&&v()},[e]);let N=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();y(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),y([])}};(0,a.useEffect)(()=>{e&&N()},[e]);let k=(0,a.useMemo)(()=>({...d.zN,...d.IS,...d.nJ,...d.fg}),[]),w=(0,a.useMemo)(()=>{let e={};return[...new Set([...i.map(e=>e.provider),...m])].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=k[t]||{name:t,color:"#666"},a=(0,d.mq)(t)||(0,d.gb)(t);if(r.passthroughModels){let a=Object.entries(h).filter(([,e])=>e.startsWith(`${s}/`)).map(([e,t])=>({id:t.replace(`${s}/`,""),name:e,value:t}));if(a.length>0){let l=j.find(e=>e.id===t),i=l?.name||r.name;e[t]={name:i,alias:s,color:r.color,models:a}}}else if(a){let s=i.find(e=>e.provider===t),a=j.find(e=>e.id===t),l=s?.name||a?.name||r.name,n=s?.providerSpecificData?.prefix||a?.prefix||t,o=Object.entries(h).filter(([,e])=>e.startsWith(`${t}/`)).map(([e,s])=>({id:s.replace(`${t}/`,""),name:e,value:`${n}/${s.replace(`${t}/`,"")}`})),d=o.length>0?o:[{id:`__placeholder__${t}`,name:`${n}/model-id`,value:`${n}/model-id`,isPlaceholder:!0}];e[t]={name:l,alias:n,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)),i=a.length>0,n=Object.entries(h).filter(([e,t])=>t.startsWith(`${s}/`)&&(!i||e===t.replace(`${s}/`,""))&&!l.has(t.replace(`${s}/`,""))).map(([e,t])=>({id:t.replace(`${s}/`,""),name:e,value:t,isCustom:!0})),d=[...a.map(e=>({id:e.id,name:e.name,value:`${s}/${e.id}`})),...n];d.length>0&&(e[t]={name:r.name,alias:s,color:r.color,models:d})}}),e},[i,h,k,j]),C=(0,a.useMemo)(()=>{if(!p.trim())return b;let e=p.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,p]),S=(0,a.useMemo)(()=>{if(!p.trim())return w;let e=p.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,p]),T=e=>{s(e),t(),f("")};return(0,r.jsxs)(n.default,{isOpen:e,onClose:()=>{t(),f("")},title:u,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:p,onChange:e=>f(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:[C.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:["(",C.length,")"]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:C.map(e=>{let t=l===e.name;return(0,r.jsx)("button",{onClick:()=>T({id:e.name,name:e.name,value:e.name}),className:`
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4156],{292:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({children:e,title:t,subtitle:s,icon:i,action:n,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||n)&&(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[i&&(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:i})}),(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})]})]}),n]}),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})]})}},1755:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({options:e=[],value:t,onChange:s,size:i="md",className:n}){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",n),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[i],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))})}},3242:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(86447),i=s.n(l),n=s(74156),o=s(96459);function d({isOpen:e,provider:t,providerInfo:s,onSuccess:l,onClose:i,oauthMeta:c}){let[m,x]=(0,a.useState)("waiting"),[u,h]=(0,a.useState)(null),[p,f]=(0,a.useState)(""),[b,g]=(0,a.useState)(null),[j,y]=(0,a.useState)(!1),[v,N]=(0,a.useState)(null),[k,w]=(0,a.useState)(!1),C=(0,a.useRef)(null),S=(0,a.useRef)(!1),{copied:T,copy:R}=(0,o.C)(),[$,I]=(0,a.useState)(!1),[O,P]=(0,a.useState)("/callback?code=..."),M=(0,a.useRef)(!1);(0,a.useEffect)(()=>{I("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname),P(`${window.location.origin}/callback?code=...`)},[]);let E=(0,a.useCallback)(async(e,s)=>{if(u)try{let r=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,redirectUri:u.redirectUri,codeVerifier:u.codeVerifier,state:s,...c?{meta:c}:{}})}),a=await r.json();if(!r.ok)throw Error(a.error);x("success"),l?.()}catch(e){g(e.message),x("error")}},[u,t,l]),L=(0,a.useCallback)(async(e,s,r,a)=>{S.current=!1,w(!0);for(let i=0;i<60;i++){if(S.current){console.log("[OAuthModal] Polling aborted"),w(!1);return}if(await new Promise(e=>setTimeout(e,1e3*r)),S.current){console.log("[OAuthModal] Polling aborted after sleep"),w(!1);return}try{let i=await fetch(`/api/oauth/${t}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:e,codeVerifier:s,extraData:a})}),n=await i.json();if(n.success){S.current=!0,x("success"),w(!1),l?.();return}if("expired_token"===n.error||"access_denied"===n.error)throw Error(n.errorDescription||n.error);"slow_down"===n.error&&(r=Math.min(r+5,30))}catch(e){g(e.message),x("error"),w(!1);return}}g("Authorization timeout"),x("error"),w(!1)},[t,l]),A=(0,a.useCallback)(async()=>{if(t)try{let e;if(g(null),["github","qwen","kiro","kimi-coding","kilocode","codebuddy"].includes(t)){y(!0),x("waiting");let e=await fetch(`/api/oauth/${t}/device-code`),s=await e.json();if(!e.ok)throw Error(s.error);N(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;L(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=new URL(`/api/oauth/${t}/authorize`,window.location.origin);s.searchParams.set("redirect_uri",e),c&&Object.entries(c).forEach(([e,t])=>{t&&s.searchParams.set(e,t)});let r=await fetch(s.toString()),a=await r.json();if(!r.ok)throw Error(a.error);h({...a,redirectUri:e}),"codex"!==t&&$?(x("waiting"),C.current=window.open(a.authUrl,"oauth_popup","width=600,height=700"),C.current||x("input")):(x("input"),window.open(a.authUrl,"_blank"))}catch(e){g(e.message),x("error")}},[t,$,L]);(0,a.useEffect)(()=>{e&&t?(h(null),f(""),g(null),y(!1),N(null),w(!1),S.current=!1,A()):e||(S.current=!0)},[e,t,A]),(0,a.useEffect)(()=>{let e;if(!u)return;M.current=!1;let t=async e=>{if(M.current)return;let{code:t,state:s,error:r,errorDescription:a}=e;if(r){M.current=!0,g(a||r),x("error");return}t&&(M.current=!0,await E(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()}},[u,E]);let z=async()=>{try{g(null);let e=new URL(p),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 E(t,s)}catch(e){g(e.message),x("error")}},_=(0,a.useCallback)(()=>{i()},[i]);return t&&s?(0,r.jsx)(n.aF,{isOpen:e,title:`Connect ${s.name}`,onClose:_,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:["waiting"===m&&!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:"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)(n.$n,{variant:"ghost",onClick:()=>x("input"),children:"Popup blocked? Enter URL manually"})]}),"waiting"===m&&j&&v&&(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:v.verification_uri}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"verify_url"===T?"check":"content_copy",onClick:()=>R(v.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:v.user_code}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"user_code"===T?"check":"content_copy",onClick:()=>R(v.user_code,"user_code")})]})]})]}),k&&(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"===m&&!j&&(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)(n.pd,{value:u?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,r.jsx)(n.$n,{variant:"secondary",icon:"auth_url"===T?"check":"content_copy",onClick:()=>R(u?.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)(n.pd,{value:p,onChange:e=>f(e.target.value),placeholder:O,className:"font-mono text-xs"})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(n.$n,{onClick:z,fullWidth:!0,disabled:!p,children:"Connect"}),(0,r.jsx)(n.$n,{onClick:_,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===m&&(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)(n.$n,{onClick:_,fullWidth:!0,children:"Done"})]}),"error"===m&&(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)(n.$n,{onClick:A,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,r.jsx)(n.$n,{onClick:_,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}d.propTypes={isOpen:i().bool.isRequired,provider:i().string,providerInfo:i().shape({name:i().string}),onSuccess:i().func,onClose:i().func.isRequired,oauthMeta:i().object}},3412:(e,t,s)=>{s.d(t,{default:()=>B});var r=s(73365),a=s(1521),l=s(29717),i=s(82495),n=s(35045),o=s(292),d=s(86447),c=s.n(d);let m=e=>new Intl.NumberFormat().format(e||0);function x({stats:e}){let t;return(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,r.jsxs)(o.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:m(e.totalRequests)})]}),(0,r.jsxs)(o.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:m(e.totalPromptTokens)})]}),(0,r.jsxs)(o.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:m(e.totalCompletionTokens)})]}),(0,r.jsxs)(o.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"})]})]})}x.propTypes={stats:c().object.isRequired};let u=e=>new Intl.NumberFormat().format(e||0),h=e=>`$${(e||0).toFixed(2)}`;function p(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 f({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 b({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?"—":u(e.promptTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":u(e.completionTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:u(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?"—":h(e.inputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":h(e.outputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:h(e.totalCost||e.cost)})]})}function g({title:e,columns:t,groupedData:s,tableType:l,sortBy:i,sortOrder:n,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:x,renderSummaryCells:u,emptyMessage:h}){let[p,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([...p]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[p,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)(o.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)(f,{field:e.field,currentSort:i,currentOrder:n})]},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)(f,{field:e.field,currentSort:i,currentOrder:n})]},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 ${p.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)(b,{item:e.summary,viewMode:c,isSummary:!0})]}),p.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)(b,{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})})]})]})})]})}f.propTypes={field:c().string.isRequired,currentSort:c().string.isRequired,currentOrder:c().string.isRequired},b.propTypes={item:c().object.isRequired,viewMode:c().string.isRequired,isSummary:c().bool},g.propTypes={title:c().string.isRequired,columns:c().arrayOf(c().shape({field:c().string.isRequired,label:c().string.isRequired,align:c().string})).isRequired,groupedData:c().array.isRequired,tableType:c().string.isRequired,sortBy:c().string.isRequired,sortOrder:c().string.isRequired,onToggleSort:c().func.isRequired,viewMode:c().string.isRequired,storageKey:c().string.isRequired,renderDetailCells:c().func.isRequired,renderSummaryCells:c().func.isRequired,emptyMessage:c().string.isRequired};var j=s(70842),y=s(36629);function v({data:e}){let{label:t,color:s,imageUrl:l,textIcon:i,active:n}=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:n?s:"var(--color-border)",boxShadow:n?`0 0 16px ${s}40`:"none",minWidth:"150px"},children:[(0,r.jsx)(j.h7,{type:"target",position:y.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.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:i}):(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:n?s:"var(--color-text)"},children:t}),n&&(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)(j.h7,{type:"source",position:y.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("img",{src:"/favicon.svg",alt:"9Router",className:"w-6 h-6 mr-2"}),(0,r.jsx)("span",{className:"text-sm font-bold text-primary",children:"9Router"}),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})]})}s(97621),v.propTypes={data:c().object.isRequired},N.propTypes={data:c().object.isRequired};let k={provider:v,router:N};function w({providers:e=[],activeRequests:t=[],lastProvider:s="",errorProvider:l=""}){let n=(0,a.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),o=s?.toLowerCase()||"",d=l?.toLowerCase()||"",c=(0,a.useMemo)(()=>new Set(n?n.split(","):[]),[n]),m=(0,a.useMemo)(()=>new Set(o?[o]:[]),[o]),x=(0,a.useMemo)(()=>new Set(d?[d]:[]),[d]),{nodes:u,edges:h}=(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 o=[],d=[];return o.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,c)=>{var m,x;let u,h,p=(m=e.provider,i.Q2[m]||{color:"#6b7280",name:m}),f=t.has(e.provider?.toLowerCase()),b=!f&&s.has(e.provider?.toLowerCase()),g=!f&&r.has(e.provider?.toLowerCase()),j=`provider-${e.provider}`,y={label:(p.name!==e.provider?p.name:null)||e.name||e.provider,color:p.color||"#6b7280",imageUrl:(x=e.provider,`/providers/${x}.png`),textIcon:p.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:f},v=-Math.PI/2+2*Math.PI*c/a,N=l*Math.cos(v),k=n*Math.sin(v);Math.abs(v+Math.PI/2)<Math.PI/4||Math.abs(v-3*Math.PI/2)<Math.PI/4?(u="top",h="bottom"):Math.abs(v-Math.PI/2)<Math.PI/4?(u="bottom",h="top"):N>0?(u="right",h="left"):(u="left",h="right"),o.push({id:j,type:"provider",position:{x:N-90,y:k-15},data:y,draggable:!1}),d.push({id:`e-${j}`,source:"router",sourceHandle:u,target:j,targetHandle:h,animated:f,style:(p.color,g?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:f?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:b?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:o,edges:d}})(e,c,m,x),[e,n,o,d]),p=(0,a.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),f=(0,a.useRef)(null),b=(0,a.useCallback)(e=>{f.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)(j.Gc,{nodes:u,edges:h,nodeTypes:k,fitView:!0,fitViewOptions:{padding:.3},onInit:b,proOptions:{hideAttribution:!0},panOnDrag:!1,zoomOnScroll:!1,zoomOnPinch:!1,zoomOnDoubleClick:!1,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1},p)})}w.propTypes={providers:c().arrayOf(c().shape({id:c().string,provider:c().string,name:c().string})),activeRequests:c().arrayOf(c().shape({provider:c().string,model:c().string,account:c().string})),lastProvider:c().string,errorProvider:c().string};var C=s(71220),S=s(51142),T=s(35692),R=s(39719),$=s(94580),I=s(38147),O=s(80900);let P=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),M=e=>`$${(e||0).toFixed(4)}`;function E({period:e="7d"}){let[t,s]=(0,a.useState)([]),[l,i]=(0,a.useState)(!0),[n,d]=(0,a.useState)("tokens"),c=(0,a.useCallback)(async()=>{i(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();s(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{i(!1)}},[e]);(0,a.useEffect)(()=>{c()},[c]);let m=t.some(e=>e.tokens>0||e.cost>0);return(0,r.jsxs)(o.default,{className:"p-4 flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 bg-bg-subtle rounded-lg p-1 border border-border self-start",children:[(0,r.jsx)("button",{onClick:()=>d("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===n?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,r.jsx)("button",{onClick:()=>d("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===n?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),l?(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):m?(0,r.jsx)(C.u,{width:"100%",height:200,children:(0,r.jsxs)(S.Q,{data:t,margin:{top:4,right:8,left:0,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)(T.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,r.jsx)(R.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,r.jsx)($.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===n?P:M,width:50}),(0,r.jsx)(I.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[P(e),"Tokens"]:[M(e),"Cost"]}),"tokens"===n?(0,r.jsx)(O.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,r.jsx)(O.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function L({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 A({requests:e=[]}){return(0,r.jsxs)(o.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 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.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,r.jsxs)("span",{className:"text-primary",children:[u(e.promptTokens),"↑"]})," ",(0,r.jsxs)("span",{className:"text-success",children:[u(e.completionTokens),"↓"]})]}),(0,r.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,r.jsx)(L,{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 z(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,i=r>0?(s.completionTokens||0)*(a/r):0;return{...s,key:e,totalTokens:r,totalCost:a,inputCost:l,outputCost:i,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)}E.propTypes={period:c().string};let F=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],q=[{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"}],U=[{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"}],W=[{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"}],K=[{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function B(){let e=(0,l.useRouter)(),t=(0,l.useSearchParams)(),s=t.get("sortBy")||"rawModel",o=t.get("sortOrder")||"asc",[d,c]=(0,a.useState)(null),[m,h]=(0,a.useState)(!0),[f,b]=(0,a.useState)(!1),[j,y]=(0,a.useState)("model"),[v,N]=(0,a.useState)("costs"),[k,C]=(0,a.useState)([]),[S,T]=(0,a.useState)("7d");(0,a.useEffect)(()=>{fetch("/api/providers").then(e=>e.ok?e.json():null).then(e=>{let t=new Set;C([...(e?.connections||[]).filter(e=>!t.has(e.provider)&&(t.add(e.provider),!0)),...Object.values(i.IS).filter(e=>e.noAuth&&!t.has(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{})},[]),(0,a.useEffect)(()=>{d?b(!0):h(!0),fetch(`/api/usage/stats?period=${S}`).then(e=>e.ok?e.json():null).then(e=>{e&&c(t=>({...t,...e}))}).catch(()=>{}).finally(()=>{h(!1),b(!1)})},[S]),(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);c(e=>({...e||{},activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending})),h(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>h(!1),()=>e.close()},[]);let R=(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]),$=(0,a.useMemo)(()=>{if(!d)return null;switch(j){case"model":{let e=d.pending?.byModel||{};return{columns:F,groupedData:_(z(d.byModel,e,s,o),"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:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(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:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(e.lastUsed)})]})}}case"account":{let e={};return d?.pending?.byAccount&&Object.entries(d.byAccount||{}).forEach(([t,s])=>{let r=d.pending.byAccount[s.connectionId];if(r){let a=s.provider?`${s.rawModel} (${s.provider})`:s.rawModel;e[t]=r[a]||0}}),{columns:q,groupedData:_(z(d.byAccount,e,s,o),"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:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(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:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(e.lastUsed)})]})}}case"apiKey":return{columns:U,groupedData:_(z(d.byApiKey,{},s,o),"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:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(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:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(e.lastUsed)})]})};default:return{columns:D,groupedData:_(z(d.byEndpoint,{},s,o),"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:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(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:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:p(e.lastUsed)})]})}}},[d,j,s,o]);if(!d&&!m)return(0,r.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let I=(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:K.map(e=>(0,r.jsx)("button",{onClick:()=>T(e.value),disabled:f,className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${S===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:e.label},e.value))}),f&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),m?I:(0,r.jsx)(x,{stats:d}),m?I:(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] gap-2 items-stretch",children:[(0,r.jsx)(w,{providers:k,activeRequests:d.activeRequests||[],lastProvider:d.recentRequests?.[0]?.provider||"",errorProvider:d.errorProvider||""}),(0,r.jsx)(A,{requests:d.recentRequests||[]})]}),m?I:(0,r.jsx)(E,{period:S}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("select",{value:j,onChange:e=>y(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:W.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(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:()=>N("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===v?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,r.jsx)("button",{onClick:()=>N("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===v?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),m?I:$&&(0,r.jsx)(g,{title:"",columns:$.columns,groupedData:$.groupedData,tableType:j,sortBy:s,sortOrder:o,onToggleSort:R,viewMode:v,storageKey:$.storageKey,renderSummaryCells:$.renderSummaryCells,renderDetailCells:$.renderDetailCells,emptyMessage:$.emptyMessage})]})]})}},5671:(e,t,s)=>{s.d(t,{default:()=>n});var r=s(73365),a=s(1521),l=s(66911),i=s(38230);function n({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)(i.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))})})}},12003:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(98196),i=s(55348),n=s(84502);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(`${i.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,i.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,n.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-xs font-medium uppercase",children:t.split("-")[0]})]}),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:i.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)]})}},13048:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(29717),i=s(14793),n=s(56550),o=s(51123);function d({children:e}){let[t,s]=(0,a.useState)(!1),c=(0,l.usePathname)(),m=(0,i.i)(e=>e.notifications),x=(0,i.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)(n.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)(n.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})})]})]})}},13333:(e,t,s)=>{s.d(t,{default:()=>a});var r=s(73365);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})]})}},14406:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({checked:e=!1,onChange:t,label:s,description:i,disabled:n=!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",n&&"opacity-50 cursor-not-allowed",d),children:[(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:n,onClick:()=>{!n&&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,n&&"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||i)&&(0,r.jsxs)("div",{className:"flex flex-col",children:[s&&(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:s}),i&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:i})]})]})}},14793:(e,t,s)=>{s.d(t,{i:()=>l});var r=s(2074);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})}))},24372:(e,t,s)=>{s.d(t,{default:()=>x});var r=s(73365),a=s(1521),l=s(86447),i=s.n(l),n=s(66911),o=s(69633),d=s(82495);let c=[...Object.keys(d.zN),...Object.keys(d.IS),...Object.keys(d.nJ),...Object.keys(d.fg)],m=Object.keys(d.IS).filter(e=>d.IS[e].noAuth);function x({isOpen:e,onClose:t,onSelect:s,selectedModel:l,activeProviders:i=[],title:u="Select Model",modelAliases:h={}}){let[p,f]=(0,a.useState)(""),[b,g]=(0,a.useState)([]),[j,y]=(0,a.useState)([]),v=async()=>{try{let e=await fetch("/api/combos");if(!e.ok)throw Error(`Failed to fetch combos: ${e.status}`);let t=await e.json();g(t.combos||[])}catch(e){console.error("Error fetching combos:",e),g([])}};(0,a.useEffect)(()=>{e&&v()},[e]);let N=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();y(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),y([])}};(0,a.useEffect)(()=>{e&&N()},[e]);let k=(0,a.useMemo)(()=>({...d.zN,...d.IS,...d.nJ,...d.fg}),[]),w=(0,a.useMemo)(()=>{let e={};return[...new Set([...i.map(e=>e.provider),...m])].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=k[t]||{name:t,color:"#666"},a=(0,d.mq)(t)||(0,d.gb)(t);if(r.passthroughModels){let a=Object.entries(h).filter(([,e])=>e.startsWith(`${s}/`)).map(([e,t])=>({id:t.replace(`${s}/`,""),name:e,value:t}));if(a.length>0){let l=j.find(e=>e.id===t),i=l?.name||r.name;e[t]={name:i,alias:s,color:r.color,models:a}}}else if(a){let s=i.find(e=>e.provider===t),a=j.find(e=>e.id===t),l=s?.name||a?.name||r.name,n=s?.providerSpecificData?.prefix||a?.prefix||t,o=Object.entries(h).filter(([,e])=>e.startsWith(`${t}/`)).map(([e,s])=>({id:s.replace(`${t}/`,""),name:e,value:`${n}/${s.replace(`${t}/`,"")}`})),d=o.length>0?o:[{id:`__placeholder__${t}`,name:`${n}/model-id`,value:`${n}/model-id`,isPlaceholder:!0}];e[t]={name:l,alias:n,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)),i=a.length>0,n=Object.entries(h).filter(([e,t])=>t.startsWith(`${s}/`)&&(!i||e===t.replace(`${s}/`,""))&&!l.has(t.replace(`${s}/`,""))).map(([e,t])=>({id:t.replace(`${s}/`,""),name:e,value:t,isCustom:!0})),d=[...a.map(e=>({id:e.id,name:e.name,value:`${s}/${e.id}`})),...n];d.length>0&&(e[t]={name:r.name,alias:s,color:r.color,models:d})}}),e},[i,h,k,j]),C=(0,a.useMemo)(()=>{if(!p.trim())return b;let e=p.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,p]),S=(0,a.useMemo)(()=>{if(!p.trim())return w;let e=p.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,p]),T=e=>{s(e),t(),f("")};return(0,r.jsxs)(n.default,{isOpen:e,onClose:()=>{t(),f("")},title:u,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:p,onChange:e=>f(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:[C.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:["(",C.length,")"]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:C.map(e=>{let t=l===e.name;return(0,r.jsx)("button",{onClick:()=>T({id:e.name,name:e.name,value:e.name}),className:`
2
2
  px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer
3
3
  ${t?"bg-primary text-white border-primary":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
4
4
  `,children:e.name},e.id)})})]}),Object.entries(S).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:()=>T(e),title:s?"Select to pre-fill, then edit model ID in the input":void 0,className:`
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[505],{43202:(e,i,a)=>{a.d(i,{Q2:()=>n.Q2,fg:()=>n.fg,vQ:()=>t,MA:()=>n.MA,UY:()=>r,zN:()=>n.zN,B2:()=>o});var n=a(82495);a(69633);let t={name:"Endpoint Proxy",description:"AI Infrastructure Management",version:"0.3.80"},o={storageKey:"theme",defaultTheme:"system"},r={maxLines:200,pollIntervalMs:1e3}},55348:(e,i,a)=>{a.d(i,{CL:()=>o,QC:()=>r,Xn:()=>t,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"],t="en",o="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":t}},69633:(e,i,a)=>{a.d(i,{KC:()=>n.KC,Xg:()=>n.Xg});var n=a(94718);Object.entries(a(82495).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})))},82495:(e,i,a)=>{a.d(i,{DI:()=>d,IS:()=>n,JH:()=>m,MA:()=>h,Q2:()=>p,fg:()=>r,gb:()=>c,mq:()=>l,nJ:()=>t,o5:()=>b,rj:()=>s,wG:()=>g,wb:()=>f,zN:()=>o,zt:()=>u});let n={kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35"},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",deprecated:!0,deprecationNotice:"Google has tightened Gemini CLI abuse detection and restricted Pro models to paid accounts (Mar 25, 2026). Using this provider may violate ToS and risk account bans."},iflow:{id:"iflow",alias:"if",name:"iFlow AI",icon:"water_drop",color:"#6366F1"},opencode:{id:"opencode",alias:"oc",name:"OpenCode",icon:"terminal",color:"#E87040",textIcon:"OC",noAuth:!0}},t={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#F97316",textIcon:"OR",website:"https://openrouter.ai",notice:{text:"Free tier: 27+ free models, no credit card needed, 200 req/day. After $10 credit: 1,000 req/day.",apiKeyUrl:"https://openrouter.ai/settings/keys"},modelsFetcher:{url:"https://openrouter.ai/api/v1/models",type:"openrouter-free"}},nvidia:{id:"nvidia",alias:"nvidia",name:"NVIDIA NIM",icon:"developer_board",color:"#76B900",textIcon:"NV",website:"https://developer.nvidia.com/nim",notice:{text:"Free access for NVIDIA Developer Program members (prototyping & testing).",apiKeyUrl:"https://build.nvidia.com/settings/api-keys"}},ollama:{id:"ollama",alias:"ollama",name:"Ollama Cloud",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com",notice:{text:"Free tier: light usage, 1 cloud model at a time (limits reset every 5h & 7d). Pro $20/mo \xb7 Max $100/mo.",apiKeyUrl:"https://ollama.com/settings/keys"}},vertex:{id:"vertex",alias:"vx",name:"Vertex AI",icon:"cloud",color:"#4285F4",textIcon:"VX",website:"https://cloud.google.com/vertex-ai",notice:{text:"New Google Cloud accounts get $300 free credits. Requires GCP project + Service Account with Vertex AI API enabled.",apiKeyUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts"}}},o={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#D97757"},antigravity:{id:"antigravity",alias:"ag",name:"Antigravity",icon:"rocket_launch",color:"#F59E0B",deprecated:!0,deprecationNotice:"Antigravity has tightened abuse detection and restricted model access. Using this provider may violate ToS and risk account bans."},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"}},r={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",serviceKinds:["llm","embedding","tts"]},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com",serviceKinds:["llm"]},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"},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",serviceKinds:["stt"]},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com",serviceKinds:["stt"]},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana",icon:"image",color:"#FFD700",textIcon:"NB",website:"https://nanobananaapi.ai",serviceKinds:["image"]},elevenlabs:{id:"elevenlabs",alias:"el",name:"ElevenLabs",icon:"record_voice_over",color:"#6C47FF",textIcon:"EL",website:"https://elevenlabs.io",serviceKinds:["tts"]},cartesia:{id:"cartesia",alias:"cartesia",name:"Cartesia",icon:"spatial_audio",color:"#FF4F8B",textIcon:"CA",website:"https://cartesia.ai",serviceKinds:["tts"]},playht:{id:"playht",alias:"playht",name:"PlayHT",icon:"play_circle",color:"#00B4D8",textIcon:"PH",website:"https://play.ht",serviceKinds:["tts"]},sdwebui:{id:"sdwebui",alias:"sdwebui",name:"SD WebUI",icon:"brush",color:"#FF7043",textIcon:"SD",website:"https://github.com/AUTOMATIC1111/stable-diffusion-webui",serviceKinds:["image"]},comfyui:{id:"comfyui",alias:"comfyui",name:"ComfyUI",icon:"account_tree",color:"#4CAF50",textIcon:"CF",website:"https://github.com/comfyanonymous/ComfyUI",serviceKinds:["image"]},huggingface:{id:"huggingface",alias:"hf",name:"HuggingFace",icon:"face",color:"#FFD21E",textIcon:"HF",website:"https://huggingface.co",serviceKinds:["embedding","image","tts"]},chutes:{id:"chutes",alias:"ch",name:"Chutes AI",icon:"water_drop",color:"#ffffffff",textIcon:"CH",website:"https://chutes.ai"},"ollama-local":{id:"ollama-local",alias:"ollama-local",name:"Ollama Local",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com"},"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"}},s=[{id:"embedding",label:"Embedding",icon:"data_array",endpoint:{method:"POST",path:"/v1/embeddings"}},{id:"image",label:"Image",icon:"image",endpoint:{method:"POST",path:"/v1/images/generations"}},{id:"tts",label:"TTS",icon:"record_voice_over",endpoint:{method:"POST",path:"/v1/audio/speech"}},{id:"stt",label:"STT",icon:"mic",endpoint:{method:"POST",path:"/v1/audio/transcriptions"}},{id:"video",label:"Video",icon:"movie",endpoint:{method:"POST",path:"/v1/video/generations"}},{id:"music",label:"Music",icon:"music_note",endpoint:{method:"POST",path:"/v1/audio/music"}}],m="openai-compatible-",d="anthropic-compatible-";function l(e){return"string"==typeof e&&e.startsWith(m)}function c(e){return"string"==typeof e&&e.startsWith(d)}let p={...n,...t,...o,...r},h={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"}};function u(e){for(let i of Object.values(p))if(i.alias===e||i.id===e)return i;return null}function g(e){let i=p[e];return i?.alias||e}function b(e){return Object.values(p).filter(i=>(i.serviceKinds??["llm"]).includes(e))}Object.values(p).reduce((e,i)=>(e[i.alias]=i.id,e),{}),Object.values(p).reduce((e,i)=>(e[i.id]=i.alias,e),{});let f=["claude","antigravity","kiro","github","codex","kimi-coding"]},83789:(e,i,a)=>{a.d(i,{A:()=>s});var n=a(2074),t=a(11472),o=a(43202);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 s=(0,n.v)((0,t.Zr)((e,i)=>({theme:o.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:o.B2.storageKey}))},84502:(e,i,a)=>{a.d(i,{FE:()=>p,Tl:()=>d,wn:()=>h});var n=a(55348);let t={},o=n.Xn,r=[];function s(){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 m(e){if("en"===e){t={};return}try{let i=await fetch(`/i18n/literals/${e}.json`);t=await i.json()}catch(e){console.error("Failed to load translations:",e),t={}}}function d(e){if(!e||"string"!=typeof e)return e;let i=e.trim();return i&&"en"!==o&&t[i]||e}function l(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=d(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(l)}async function p(){o=s(),await m(o),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&&l(e)})})}).observe(document.body,{childList:!0,subtree:!0})}async function h(){o=s(),await m(o),r.forEach(e=>e()),c(document.body)}},94718:(e,i,a)=>{a.d(i,{Xg:()=>l,vq:()=>m,KC:()=>c});var n=a(390),t=a(89651);let o={"Anthropic-Version":"2023-06-01","Anthropic-Beta":"claude-code-20250219,interleaved-thinking-2025-05-14"},r="https://api.kimi.com/coding/v1/messages",s={claude:{baseUrl:"https://api.anthropic.com/v1/messages",format:"claude",retry:{429:0},headers:{"Anthropic-Version":"2023-06-01","Anthropic-Beta":"claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,context-management-2025-06-27,prompt-caching-scope-2026-01-05,advanced-tool-use-2025-11-20,effort-2025-11-24,structured-outputs-2025-12-15,fast-mode-2026-02-01,redact-thinking-2026-02-12,token-efficient-tools-2026-03-28","Anthropic-Dangerous-Direct-Browser-Access":"true","User-Agent":"claude-cli/2.1.92 (external, sdk-cli)","X-App":"cli","X-Stainless-Helper-Method":"stream","X-Stainless-Retry-Count":"0","X-Stainless-Runtime-Version":"v24.14.0","X-Stainless-Package-Version":"0.80.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",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"},qoder:{baseUrl:"https://api.qoder.com/v1/chat/completions",format:"openai",headers:{"User-Agent":"Qoder-Cli"},clientId:t.env.QODER_OAUTH_CLIENT_ID||"10009311001",clientSecret:t.env.QODER_OAUTH_CLIENT_SECRET||"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",tokenUrl:"https://api.qoder.com/oauth/token",authUrl:"https://qoder.com/oauth/authorize"},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:r,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"},clientId:"Iv1.b507a08c87ecfe98"},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:r,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:{}},opencode:{baseUrl:"http://localhost:4096/v1/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:"vertex"},"vertex-partner":{baseUrl:"https://aiplatform.googleapis.com",format:"openai"},gitlab:{baseUrl:"https://gitlab.com/api/v4/chat/completions",format:"openai"},codebuddy:{baseUrl:"https://copilot.tencent.com/v1/chat/completions",format:"openai"},opencode:{baseUrl:"https://opencode.ai",format:"openai",headers:{"x-opencode-client":"desktop"}}},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",thinking:!1},{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",strip:["image","audio"]},{id:"deepseek-3.1",name:"DeepSeek 3.1",strip:["image","audio"]},{id:"qwen3-coder-next",name:"Qwen3 Coder Next",strip:["image","audio"]}],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"}],oc:[{id:"nemotron-3-super-free",name:"Nemotron 3 Super"},{id:"qwen3.6-plus-free",name:"Qwen 3.6 Plus"},{id:"minimax-m2.5-free",name:"MiniMax M2.5",targetFormat:"claude"}],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-5.4",name:"GPT-5.4"},{id:"gpt-5.4-mini",name:"GPT-5.4 Mini"},{id:"gpt-5.4-nano",name:"GPT-5.4 Nano"},{id:"gpt-5.2",name:"GPT-5.2"},{id:"gpt-5.1",name:"GPT-5.1"},{id:"gpt-5",name:"GPT-5"},{id:"gpt-5-mini",name:"GPT-5 Mini"},{id:"gpt-5-nano",name:"GPT-5 Nano"},{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o Mini"},{id:"gpt-4-turbo",name:"GPT-4 Turbo"},{id:"gpt-4.1",name:"GPT-4.1"},{id:"gpt-4.1-mini",name:"GPT-4.1 Mini"},{id:"gpt-4.1-nano",name:"GPT-4.1 Nano"},{id:"o3",name:"O3"},{id:"o3-mini",name:"O3 Mini"},{id:"o3-pro",name:"O3 Pro"},{id:"o4-mini",name:"O4 Mini"},{id:"o1",name:"O1"},{id:"o1-mini",name:"O1 Mini"},{id:"text-embedding-3-large",name:"Text Embedding 3 Large",type:"embedding"},{id:"text-embedding-3-small",name:"Text Embedding 3 Small",type:"embedding"},{id:"text-embedding-ada-002",name:"Text Embedding Ada 002",type:"embedding"},{id:"tts-1",name:"TTS-1",type:"tts"},{id:"tts-1-hd",name:"TTS-1 HD",type:"tts"},{id:"gpt-4o-mini-tts",name:"GPT-4o Mini TTS",type:"tts"}],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.1-flash-image-preview",name:"Gemini 3.1 Flash Image 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-2.0-flash",name:"Gemini 2.0 Flash"},{id:"gemini-2.0-flash-lite",name:"Gemini 2.0 Flash Lite"},{id:"gemini-embedding-2-preview",name:"Gemini Embedding 2 Preview",type:"embedding"},{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:[],glm:[{id:"glm-5.1",name:"GLM 5.1"},{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.1",name:"GLM 5.1"},{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"}],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)"}]},d={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",opencode:"oc",vertex:"vertex","vertex-partner":"vertex-partner"},l=Object.fromEntries(Object.keys(s).map(e=>[e,d[e]||e]));function c(e){return m[l[e]||e]||[]}},98814:(e,i,a)=>{a.d(i,{ThemeProvider:()=>r});var n=a(73365),t=a(1521),o=a(83789);function r({children:e}){let{initTheme:i}=(0,o.A)();return(0,t.useEffect)(()=>{i()},[i]),(0,n.jsx)(n.Fragment,{children:e})}}}]);
package/app/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "9router-app",
3
- "version": "0.3.79",
3
+ "version": "0.3.80",
4
4
  "description": "9Router web dashboard",
5
5
  "private": true,
6
6
  "scripts": {