@yina-npm/openrouterx 0.4.19 → 0.4.21

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 (581) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +6 -3
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/routes-manifest.json +18 -0
  5. package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page.js +2 -2
  6. package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page.js.nft.json +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page_client-reference-manifest.js +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/admin/users/page.js +2 -2
  9. package/app/.next/server/app/(dashboard)/dashboard/admin/users/page.js.nft.json +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/admin/users/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  12. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  15. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  18. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  19. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  21. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  22. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  24. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  25. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +17 -17
  27. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  28. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  30. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  31. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  32. package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  33. package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  34. package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  35. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  36. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  37. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  38. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  39. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  40. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  41. package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
  42. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  43. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  44. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  45. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  46. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  47. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  48. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  49. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  50. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  51. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  52. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  53. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  54. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  55. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  56. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  57. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  58. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  59. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  60. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  61. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  62. package/app/.next/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  63. package/app/.next/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  64. package/app/.next/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  65. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  66. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  67. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  68. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  69. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  70. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  71. package/app/.next/server/app/(dashboard)/dashboard/user/page.js +3 -3
  72. package/app/.next/server/app/(dashboard)/dashboard/user/page.js.nft.json +1 -1
  73. package/app/.next/server/app/(dashboard)/dashboard/user/page_client-reference-manifest.js +1 -1
  74. package/app/.next/server/app/_global-error/page.js +3 -3
  75. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  76. package/app/.next/server/app/_global-error.html +1 -1
  77. package/app/.next/server/app/_global-error.rsc +1 -1
  78. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  79. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  80. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  81. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  82. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  83. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  84. package/app/.next/server/app/_not-found/page.js +2 -2
  85. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  86. package/app/.next/server/app/_not-found.html +1 -1
  87. package/app/.next/server/app/_not-found.rsc +4 -4
  88. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
  89. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  90. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
  91. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  92. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  93. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  94. package/app/.next/server/app/api/auth/login/route.js +1 -1
  95. package/app/.next/server/app/api/auth/logout/route.js +1 -1
  96. package/app/.next/server/app/api/auth/me/route.js +1 -1
  97. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  98. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  99. package/app/.next/server/app/api/cli-tools/claude-settings/route.js +1 -1
  100. package/app/.next/server/app/api/cli-tools/codex-settings/route.js +2 -2
  101. package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  102. package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -0
  103. package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -0
  104. package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route_client-reference-manifest.js +1 -0
  105. package/app/.next/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  106. package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
  107. package/app/.next/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  108. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  109. package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  110. package/app/.next/server/app/api/cloud/auth/route.js +1 -1
  111. package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
  112. package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
  113. package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
  114. package/app/.next/server/app/api/combos/[id]/route.js +1 -1
  115. package/app/.next/server/app/api/combos/route.js +1 -1
  116. package/app/.next/server/app/api/health/route.js +1 -1
  117. package/app/.next/server/app/api/init/route.js +1 -1
  118. package/app/.next/server/app/api/keys/[id]/route.js +1 -1
  119. package/app/.next/server/app/api/keys/route.js +1 -1
  120. package/app/.next/server/app/api/locale/route.js +1 -1
  121. package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  122. package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  123. package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  124. package/app/.next/server/app/api/media-providers/tts/voices/route.js +1 -1
  125. package/app/.next/server/app/api/models/alias/route.js +1 -1
  126. package/app/.next/server/app/api/models/availability/route.js +1 -1
  127. package/app/.next/server/app/api/models/custom/route.js +1 -1
  128. package/app/.next/server/app/api/models/disabled/route.js +1 -1
  129. package/app/.next/server/app/api/models/route.js +1 -1
  130. package/app/.next/server/app/api/models/test/route.js +1 -1
  131. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  132. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  133. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  134. package/app/.next/server/app/api/oauth/gitlab/pat/route.js +1 -1
  135. package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
  136. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  137. package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
  138. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  139. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  140. package/app/.next/server/app/api/pricing/route.js +1 -1
  141. package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
  142. package/app/.next/server/app/api/provider-nodes/route.js +1 -1
  143. package/app/.next/server/app/api/provider-nodes/route.js.nft.json +1 -1
  144. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  145. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  146. package/app/.next/server/app/api/providers/[id]/route.js +1 -1
  147. package/app/.next/server/app/api/providers/[id]/route.js.nft.json +1 -1
  148. package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
  149. package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
  150. package/app/.next/server/app/api/providers/client/route.js +1 -1
  151. package/app/.next/server/app/api/providers/kilo/free-models/route.js +1 -1
  152. package/app/.next/server/app/api/providers/route.js +1 -1
  153. package/app/.next/server/app/api/providers/suggested-models/route.js +1 -1
  154. package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
  155. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  156. package/app/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
  157. package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  158. package/app/.next/server/app/api/proxy-pools/route.js +1 -1
  159. package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  160. package/app/.next/server/app/api/settings/database/route.js +1 -1
  161. package/app/.next/server/app/api/settings/proxy-test/route.js +1 -1
  162. package/app/.next/server/app/api/settings/require-login/route.js +1 -1
  163. package/app/.next/server/app/api/settings/route.js +1 -1
  164. package/app/.next/server/app/api/shutdown/route.js +1 -1
  165. package/app/.next/server/app/api/tags/route.js +1 -1
  166. package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
  167. package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
  168. package/app/.next/server/app/api/translator/load/route.js +1 -1
  169. package/app/.next/server/app/api/translator/save/route.js +1 -1
  170. package/app/.next/server/app/api/translator/send/route.js +1 -1
  171. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  172. package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
  173. package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
  174. package/app/.next/server/app/api/tunnel/status/route.js +1 -1
  175. package/app/.next/server/app/api/tunnel/tailscale-check/route.js +1 -1
  176. package/app/.next/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  177. package/app/.next/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  178. package/app/.next/server/app/api/tunnel/tailscale-install/route.js +3 -3
  179. package/app/.next/server/app/api/tunnel/tailscale-login/route.js +1 -1
  180. package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
  181. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  182. package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  183. package/app/.next/server/app/api/usage/api-keys/route.js +1 -1
  184. package/app/.next/server/app/api/usage/chart/route.js +1 -1
  185. package/app/.next/server/app/api/usage/history/route.js +1 -1
  186. package/app/.next/server/app/api/usage/logs/route.js +1 -1
  187. package/app/.next/server/app/api/usage/providers/route.js +1 -1
  188. package/app/.next/server/app/api/usage/request-details/route.js +1 -1
  189. package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
  190. package/app/.next/server/app/api/usage/stats/route.js +1 -1
  191. package/app/.next/server/app/api/usage/stream/route.js +2 -2
  192. package/app/.next/server/app/api/users/[id]/route.js +1 -1
  193. package/app/.next/server/app/api/users/route.js +1 -1
  194. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  195. package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
  196. package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
  197. package/app/.next/server/app/api/v1/audio/voices/route.js +1 -0
  198. package/app/.next/server/app/api/v1/audio/voices/route.js.nft.json +1 -0
  199. package/app/.next/server/app/api/v1/audio/voices/route_client-reference-manifest.js +1 -0
  200. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  201. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  202. package/app/.next/server/app/api/v1/images/generations/route.js +2 -2
  203. package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
  204. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  205. package/app/.next/server/app/api/v1/models/[kind]/route.js +1 -1
  206. package/app/.next/server/app/api/v1/models/info/route.js +1 -0
  207. package/app/.next/server/app/api/v1/models/info/route.js.nft.json +1 -0
  208. package/app/.next/server/app/api/v1/models/info/route_client-reference-manifest.js +1 -0
  209. package/app/.next/server/app/api/v1/models/route.js +1 -1
  210. package/app/.next/server/app/api/v1/responses/compact/route.js +1 -1
  211. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  212. package/app/.next/server/app/api/v1/route.js +1 -1
  213. package/app/.next/server/app/api/v1/search/route.js +1 -1
  214. package/app/.next/server/app/api/v1/web/fetch/route.js +1 -1
  215. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  216. package/app/.next/server/app/api/v1beta/models/route.js +1 -1
  217. package/app/.next/server/app/api/version/route.js +1 -1
  218. package/app/.next/server/app/api/version/update/route.js +1 -1
  219. package/app/.next/server/app/callback/page.js +2 -2
  220. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  221. package/app/.next/server/app/callback.html +1 -1
  222. package/app/.next/server/app/callback.rsc +4 -4
  223. package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
  224. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  225. package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
  226. package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
  227. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  228. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  229. package/app/.next/server/app/dashboard/settings/pricing/page.js +2 -2
  230. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  231. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  232. package/app/.next/server/app/dashboard/settings/pricing.rsc +4 -4
  233. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  234. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  235. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  236. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  237. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  238. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  239. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  240. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  241. package/app/.next/server/app/favicon.ico/route.js +1 -1
  242. package/app/.next/server/app/index.html +1 -1
  243. package/app/.next/server/app/index.rsc +4 -4
  244. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  245. package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
  246. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  247. package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
  248. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  249. package/app/.next/server/app/landing/page.js +2 -2
  250. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  251. package/app/.next/server/app/landing.html +1 -1
  252. package/app/.next/server/app/landing.rsc +4 -4
  253. package/app/.next/server/app/landing.segments/_full.segment.rsc +4 -4
  254. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  255. package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
  256. package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
  257. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  258. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  259. package/app/.next/server/app/login/page.js +2 -2
  260. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  261. package/app/.next/server/app/login.html +1 -1
  262. package/app/.next/server/app/login.rsc +5 -5
  263. package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
  264. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  265. package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
  266. package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  267. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  268. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  269. package/app/.next/server/app/manifest.webmanifest/route.js +2 -2
  270. package/app/.next/server/app/page.js +2 -2
  271. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  272. package/app/.next/server/app-paths-manifest.json +6 -3
  273. package/app/.next/server/chunks/2343.js +1 -1
  274. package/app/.next/server/chunks/3855.js +1 -1
  275. package/app/.next/server/chunks/3913.js +1 -1
  276. package/app/.next/server/chunks/412.js +6 -6
  277. package/app/.next/server/chunks/4122.js +1 -1
  278. package/app/.next/server/chunks/4989.js +1 -1
  279. package/app/.next/server/chunks/5627.js +2 -2
  280. package/app/.next/server/chunks/5681.js +1 -1
  281. package/app/.next/server/chunks/6182.js +3 -3
  282. package/app/.next/server/chunks/6774.js +1 -0
  283. package/app/.next/server/chunks/7595.js +1 -1
  284. package/app/.next/server/chunks/7937.js +4 -4
  285. package/app/.next/server/chunks/9489.js +1 -1
  286. package/app/.next/server/chunks/9547.js +23 -0
  287. package/app/.next/server/chunks/9718.js +1 -1
  288. package/app/.next/server/middleware-build-manifest.js +1 -1
  289. package/app/.next/server/middleware.js +1 -1
  290. package/app/.next/server/pages/404.html +1 -1
  291. package/app/.next/server/pages/500.html +1 -1
  292. package/app/.next/server/server-reference-manifest.js +1 -1
  293. package/app/.next/server/server-reference-manifest.json +1 -1
  294. package/app/.next/static/2TCKT7FIN7PE7ZJ20oAeb/_buildManifest.js +1 -0
  295. package/app/.next/static/chunks/1321-b84130cd27e8b78c.js +1 -0
  296. package/app/.next/static/chunks/1a258343-5938f676ed376386.js +1 -0
  297. package/app/.next/static/chunks/2336-5b3617dc05c223ff.js +23 -0
  298. package/app/.next/static/chunks/5497-a2d728c63029180e.js +7 -0
  299. package/app/.next/static/chunks/app/(dashboard)/dashboard/admin/users/page-15091159f6d63fb7.js +1 -0
  300. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-ba226c8b3c01dd8d.js → page-bd677c182bc2aae9.js} +1 -1
  301. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/{page-cee4e0a7455b73ca.js → page-32b908ea6b23f583.js} +1 -1
  302. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-eb5193b550d3e8de.js +59 -0
  303. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-7cf63e1a3a8adecd.js +1 -0
  304. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-28a10e3cb86b9581.js → page-82cfc464b5e01f4f.js} +2 -2
  305. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-eefae72167c9579c.js → page-1862080d556d8e9e.js} +1 -1
  306. package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/{page-99260106103e6a4e.js → page-4473f52ad379b661.js} +1 -1
  307. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-0dc79ccb25aab919.js +1 -0
  308. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-a0419a964a084f76.js +1 -0
  309. package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-e03634044afafb6e.js +1 -0
  310. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-d1c369e2c3fb727b.js +1 -0
  311. package/app/.next/static/chunks/app/(dashboard)/dashboard/user/{page-e9ab0043e9b15204.js → page-cb9bce72dd4d0df2.js} +2 -2
  312. package/app/.next/static/chunks/app/(dashboard)/layout-7ea5a7abc543b04d.js +1 -0
  313. package/app/.next/static/chunks/app/_global-error/page-d1c369e2c3fb727b.js +1 -0
  314. package/app/.next/static/chunks/app/api/auth/login/route-d1c369e2c3fb727b.js +1 -0
  315. package/app/.next/static/chunks/app/api/auth/logout/route-d1c369e2c3fb727b.js +1 -0
  316. package/app/.next/static/chunks/app/api/auth/me/route-d1c369e2c3fb727b.js +1 -0
  317. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-d1c369e2c3fb727b.js +1 -0
  318. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-d1c369e2c3fb727b.js +1 -0
  319. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-d1c369e2c3fb727b.js +1 -0
  320. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-d1c369e2c3fb727b.js +1 -0
  321. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-d1c369e2c3fb727b.js +1 -0
  322. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-d1c369e2c3fb727b.js +1 -0
  323. package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-d1c369e2c3fb727b.js +1 -0
  324. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-d1c369e2c3fb727b.js +1 -0
  325. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-d1c369e2c3fb727b.js +1 -0
  326. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-d1c369e2c3fb727b.js +1 -0
  327. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-d1c369e2c3fb727b.js +1 -0
  328. package/app/.next/static/chunks/app/api/cloud/auth/route-d1c369e2c3fb727b.js +1 -0
  329. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-d1c369e2c3fb727b.js +1 -0
  330. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-d1c369e2c3fb727b.js +1 -0
  331. package/app/.next/static/chunks/app/api/cloud/models/alias/route-d1c369e2c3fb727b.js +1 -0
  332. package/app/.next/static/chunks/app/api/combos/[id]/route-d1c369e2c3fb727b.js +1 -0
  333. package/app/.next/static/chunks/app/api/combos/route-d1c369e2c3fb727b.js +1 -0
  334. package/app/.next/static/chunks/app/api/health/route-d1c369e2c3fb727b.js +1 -0
  335. package/app/.next/static/chunks/app/api/init/route-d1c369e2c3fb727b.js +1 -0
  336. package/app/.next/static/chunks/app/api/keys/[id]/route-d1c369e2c3fb727b.js +1 -0
  337. package/app/.next/static/chunks/app/api/keys/route-d1c369e2c3fb727b.js +1 -0
  338. package/app/.next/static/chunks/app/api/locale/route-d1c369e2c3fb727b.js +1 -0
  339. package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-d1c369e2c3fb727b.js +1 -0
  340. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-d1c369e2c3fb727b.js +1 -0
  341. package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-d1c369e2c3fb727b.js +1 -0
  342. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-d1c369e2c3fb727b.js +1 -0
  343. package/app/.next/static/chunks/app/api/models/alias/route-d1c369e2c3fb727b.js +1 -0
  344. package/app/.next/static/chunks/app/api/models/availability/route-d1c369e2c3fb727b.js +1 -0
  345. package/app/.next/static/chunks/app/api/models/custom/route-d1c369e2c3fb727b.js +1 -0
  346. package/app/.next/static/chunks/app/api/models/disabled/route-d1c369e2c3fb727b.js +1 -0
  347. package/app/.next/static/chunks/app/api/models/route-d1c369e2c3fb727b.js +1 -0
  348. package/app/.next/static/chunks/app/api/models/test/route-d1c369e2c3fb727b.js +1 -0
  349. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-d1c369e2c3fb727b.js +1 -0
  350. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-d1c369e2c3fb727b.js +1 -0
  351. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-d1c369e2c3fb727b.js +1 -0
  352. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-d1c369e2c3fb727b.js +1 -0
  353. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-d1c369e2c3fb727b.js +1 -0
  354. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-d1c369e2c3fb727b.js +1 -0
  355. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-d1c369e2c3fb727b.js +1 -0
  356. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-d1c369e2c3fb727b.js +1 -0
  357. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-d1c369e2c3fb727b.js +1 -0
  358. package/app/.next/static/chunks/app/api/pricing/route-d1c369e2c3fb727b.js +1 -0
  359. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-d1c369e2c3fb727b.js +1 -0
  360. package/app/.next/static/chunks/app/api/provider-nodes/route-d1c369e2c3fb727b.js +1 -0
  361. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-d1c369e2c3fb727b.js +1 -0
  362. package/app/.next/static/chunks/app/api/providers/[id]/models/route-d1c369e2c3fb727b.js +1 -0
  363. package/app/.next/static/chunks/app/api/providers/[id]/route-d1c369e2c3fb727b.js +1 -0
  364. package/app/.next/static/chunks/app/api/providers/[id]/test/route-d1c369e2c3fb727b.js +1 -0
  365. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-d1c369e2c3fb727b.js +1 -0
  366. package/app/.next/static/chunks/app/api/providers/client/route-d1c369e2c3fb727b.js +1 -0
  367. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-d1c369e2c3fb727b.js +1 -0
  368. package/app/.next/static/chunks/app/api/providers/route-d1c369e2c3fb727b.js +1 -0
  369. package/app/.next/static/chunks/app/api/providers/suggested-models/route-d1c369e2c3fb727b.js +1 -0
  370. package/app/.next/static/chunks/app/api/providers/test-batch/route-d1c369e2c3fb727b.js +1 -0
  371. package/app/.next/static/chunks/app/api/providers/validate/route-d1c369e2c3fb727b.js +1 -0
  372. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-d1c369e2c3fb727b.js +1 -0
  373. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-d1c369e2c3fb727b.js +1 -0
  374. package/app/.next/static/chunks/app/api/proxy-pools/route-d1c369e2c3fb727b.js +1 -0
  375. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-d1c369e2c3fb727b.js +1 -0
  376. package/app/.next/static/chunks/app/api/settings/database/route-d1c369e2c3fb727b.js +1 -0
  377. package/app/.next/static/chunks/app/api/settings/proxy-test/route-d1c369e2c3fb727b.js +1 -0
  378. package/app/.next/static/chunks/app/api/settings/require-login/route-d1c369e2c3fb727b.js +1 -0
  379. package/app/.next/static/chunks/app/api/settings/route-d1c369e2c3fb727b.js +1 -0
  380. package/app/.next/static/chunks/app/api/shutdown/route-d1c369e2c3fb727b.js +1 -0
  381. package/app/.next/static/chunks/app/api/tags/route-d1c369e2c3fb727b.js +1 -0
  382. package/app/.next/static/chunks/app/api/translator/console-logs/route-d1c369e2c3fb727b.js +1 -0
  383. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-d1c369e2c3fb727b.js +1 -0
  384. package/app/.next/static/chunks/app/api/translator/load/route-d1c369e2c3fb727b.js +1 -0
  385. package/app/.next/static/chunks/app/api/translator/save/route-d1c369e2c3fb727b.js +1 -0
  386. package/app/.next/static/chunks/app/api/translator/send/route-d1c369e2c3fb727b.js +1 -0
  387. package/app/.next/static/chunks/app/api/translator/translate/route-d1c369e2c3fb727b.js +1 -0
  388. package/app/.next/static/chunks/app/api/tunnel/disable/route-d1c369e2c3fb727b.js +1 -0
  389. package/app/.next/static/chunks/app/api/tunnel/enable/route-d1c369e2c3fb727b.js +1 -0
  390. package/app/.next/static/chunks/app/api/tunnel/status/route-d1c369e2c3fb727b.js +1 -0
  391. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-d1c369e2c3fb727b.js +1 -0
  392. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-d1c369e2c3fb727b.js +1 -0
  393. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-d1c369e2c3fb727b.js +1 -0
  394. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-d1c369e2c3fb727b.js +1 -0
  395. package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-d1c369e2c3fb727b.js +1 -0
  396. package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-d1c369e2c3fb727b.js +1 -0
  397. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-d1c369e2c3fb727b.js +1 -0
  398. package/app/.next/static/chunks/app/api/usage/api-keys/route-d1c369e2c3fb727b.js +1 -0
  399. package/app/.next/static/chunks/app/api/usage/chart/route-d1c369e2c3fb727b.js +1 -0
  400. package/app/.next/static/chunks/app/api/usage/history/route-d1c369e2c3fb727b.js +1 -0
  401. package/app/.next/static/chunks/app/api/usage/logs/route-d1c369e2c3fb727b.js +1 -0
  402. package/app/.next/static/chunks/app/api/usage/providers/route-d1c369e2c3fb727b.js +1 -0
  403. package/app/.next/static/chunks/app/api/usage/request-details/route-d1c369e2c3fb727b.js +1 -0
  404. package/app/.next/static/chunks/app/api/usage/request-logs/route-d1c369e2c3fb727b.js +1 -0
  405. package/app/.next/static/chunks/app/api/usage/stats/route-d1c369e2c3fb727b.js +1 -0
  406. package/app/.next/static/chunks/app/api/usage/stream/route-d1c369e2c3fb727b.js +1 -0
  407. package/app/.next/static/chunks/app/api/users/[id]/route-d1c369e2c3fb727b.js +1 -0
  408. package/app/.next/static/chunks/app/api/users/route-d1c369e2c3fb727b.js +1 -0
  409. package/app/.next/static/chunks/app/api/v1/api/chat/route-d1c369e2c3fb727b.js +1 -0
  410. package/app/.next/static/chunks/app/api/v1/audio/speech/route-d1c369e2c3fb727b.js +1 -0
  411. package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-d1c369e2c3fb727b.js +1 -0
  412. package/app/.next/static/chunks/app/api/v1/audio/voices/route-d1c369e2c3fb727b.js +1 -0
  413. package/app/.next/static/chunks/app/api/v1/chat/completions/route-d1c369e2c3fb727b.js +1 -0
  414. package/app/.next/static/chunks/app/api/v1/embeddings/route-d1c369e2c3fb727b.js +1 -0
  415. package/app/.next/static/chunks/app/api/v1/images/generations/route-d1c369e2c3fb727b.js +1 -0
  416. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-d1c369e2c3fb727b.js +1 -0
  417. package/app/.next/static/chunks/app/api/v1/messages/route-d1c369e2c3fb727b.js +1 -0
  418. package/app/.next/static/chunks/app/api/v1/models/[kind]/route-d1c369e2c3fb727b.js +1 -0
  419. package/app/.next/static/chunks/app/api/v1/models/info/route-d1c369e2c3fb727b.js +1 -0
  420. package/app/.next/static/chunks/app/api/v1/models/route-d1c369e2c3fb727b.js +1 -0
  421. package/app/.next/static/chunks/app/api/v1/responses/compact/route-d1c369e2c3fb727b.js +1 -0
  422. package/app/.next/static/chunks/app/api/v1/responses/route-d1c369e2c3fb727b.js +1 -0
  423. package/app/.next/static/chunks/app/api/v1/route-d1c369e2c3fb727b.js +1 -0
  424. package/app/.next/static/chunks/app/api/v1/search/route-d1c369e2c3fb727b.js +1 -0
  425. package/app/.next/static/chunks/app/api/v1/web/fetch/route-d1c369e2c3fb727b.js +1 -0
  426. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-d1c369e2c3fb727b.js +1 -0
  427. package/app/.next/static/chunks/app/api/v1beta/models/route-d1c369e2c3fb727b.js +1 -0
  428. package/app/.next/static/chunks/app/api/version/route-d1c369e2c3fb727b.js +1 -0
  429. package/app/.next/static/chunks/app/api/version/update/route-d1c369e2c3fb727b.js +1 -0
  430. package/app/.next/static/chunks/app/manifest.webmanifest/route-d1c369e2c3fb727b.js +1 -0
  431. package/app/.next/static/chunks/app/page-d1c369e2c3fb727b.js +1 -0
  432. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-d1c369e2c3fb727b.js +1 -0
  433. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-d1c369e2c3fb727b.js +1 -0
  434. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-d1c369e2c3fb727b.js +1 -0
  435. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-d1c369e2c3fb727b.js +1 -0
  436. package/app/.next/static/css/48caf49054c81db9.css +1 -0
  437. package/app/package.json +1 -1
  438. package/app/src/lib/updater/updater.js +6 -2
  439. package/app/src/mitm/dns/dnsConfig.js +1 -1
  440. package/app/src/mitm/handlers/kiro.js +385 -6
  441. package/app/src/mitm/manager.js +12 -3
  442. package/app/src/mitm/paths.js +7 -3
  443. package/cli.js +4 -3
  444. package/package.json +1 -1
  445. package/app/.next/server/chunks/1256.js +0 -1
  446. package/app/.next/server/chunks/2238.js +0 -23
  447. package/app/.next/static/NtU3O4mCJYjlmlBWGF7gX/_buildManifest.js +0 -1
  448. package/app/.next/static/chunks/1321-7e9aeddc67afb663.js +0 -1
  449. package/app/.next/static/chunks/1a258343-4878413fb430abba.js +0 -1
  450. package/app/.next/static/chunks/4295-fbaece639df900b6.js +0 -23
  451. package/app/.next/static/chunks/5497-54ae9c6ec04c2fb1.js +0 -7
  452. package/app/.next/static/chunks/app/(dashboard)/dashboard/admin/users/page-c8e5a4b31bc18425.js +0 -1
  453. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-e8660483a85aed9d.js +0 -59
  454. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-9ff3dee6ea964428.js +0 -1
  455. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-08a8f17b396ac1f4.js +0 -1
  456. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-7dac10f6360f52df.js +0 -1
  457. package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-52fbe722ba5c5393.js +0 -1
  458. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-badb7034e478a358.js +0 -1
  459. package/app/.next/static/chunks/app/(dashboard)/layout-d368218e0e87c124.js +0 -1
  460. package/app/.next/static/chunks/app/_global-error/page-badb7034e478a358.js +0 -1
  461. package/app/.next/static/chunks/app/api/auth/login/route-badb7034e478a358.js +0 -1
  462. package/app/.next/static/chunks/app/api/auth/logout/route-badb7034e478a358.js +0 -1
  463. package/app/.next/static/chunks/app/api/auth/me/route-badb7034e478a358.js +0 -1
  464. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-badb7034e478a358.js +0 -1
  465. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-badb7034e478a358.js +0 -1
  466. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-badb7034e478a358.js +0 -1
  467. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-badb7034e478a358.js +0 -1
  468. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-badb7034e478a358.js +0 -1
  469. package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-badb7034e478a358.js +0 -1
  470. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-badb7034e478a358.js +0 -1
  471. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-badb7034e478a358.js +0 -1
  472. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-badb7034e478a358.js +0 -1
  473. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-badb7034e478a358.js +0 -1
  474. package/app/.next/static/chunks/app/api/cloud/auth/route-badb7034e478a358.js +0 -1
  475. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-badb7034e478a358.js +0 -1
  476. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-badb7034e478a358.js +0 -1
  477. package/app/.next/static/chunks/app/api/cloud/models/alias/route-badb7034e478a358.js +0 -1
  478. package/app/.next/static/chunks/app/api/combos/[id]/route-badb7034e478a358.js +0 -1
  479. package/app/.next/static/chunks/app/api/combos/route-badb7034e478a358.js +0 -1
  480. package/app/.next/static/chunks/app/api/health/route-badb7034e478a358.js +0 -1
  481. package/app/.next/static/chunks/app/api/init/route-badb7034e478a358.js +0 -1
  482. package/app/.next/static/chunks/app/api/keys/[id]/route-badb7034e478a358.js +0 -1
  483. package/app/.next/static/chunks/app/api/keys/route-badb7034e478a358.js +0 -1
  484. package/app/.next/static/chunks/app/api/locale/route-badb7034e478a358.js +0 -1
  485. package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-badb7034e478a358.js +0 -1
  486. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-badb7034e478a358.js +0 -1
  487. package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-badb7034e478a358.js +0 -1
  488. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-badb7034e478a358.js +0 -1
  489. package/app/.next/static/chunks/app/api/models/alias/route-badb7034e478a358.js +0 -1
  490. package/app/.next/static/chunks/app/api/models/availability/route-badb7034e478a358.js +0 -1
  491. package/app/.next/static/chunks/app/api/models/custom/route-badb7034e478a358.js +0 -1
  492. package/app/.next/static/chunks/app/api/models/disabled/route-badb7034e478a358.js +0 -1
  493. package/app/.next/static/chunks/app/api/models/route-badb7034e478a358.js +0 -1
  494. package/app/.next/static/chunks/app/api/models/test/route-badb7034e478a358.js +0 -1
  495. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-badb7034e478a358.js +0 -1
  496. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-badb7034e478a358.js +0 -1
  497. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-badb7034e478a358.js +0 -1
  498. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-badb7034e478a358.js +0 -1
  499. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-badb7034e478a358.js +0 -1
  500. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-badb7034e478a358.js +0 -1
  501. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-badb7034e478a358.js +0 -1
  502. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-badb7034e478a358.js +0 -1
  503. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-badb7034e478a358.js +0 -1
  504. package/app/.next/static/chunks/app/api/pricing/route-badb7034e478a358.js +0 -1
  505. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-badb7034e478a358.js +0 -1
  506. package/app/.next/static/chunks/app/api/provider-nodes/route-badb7034e478a358.js +0 -1
  507. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-badb7034e478a358.js +0 -1
  508. package/app/.next/static/chunks/app/api/providers/[id]/models/route-badb7034e478a358.js +0 -1
  509. package/app/.next/static/chunks/app/api/providers/[id]/route-badb7034e478a358.js +0 -1
  510. package/app/.next/static/chunks/app/api/providers/[id]/test/route-badb7034e478a358.js +0 -1
  511. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-badb7034e478a358.js +0 -1
  512. package/app/.next/static/chunks/app/api/providers/client/route-badb7034e478a358.js +0 -1
  513. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-badb7034e478a358.js +0 -1
  514. package/app/.next/static/chunks/app/api/providers/route-badb7034e478a358.js +0 -1
  515. package/app/.next/static/chunks/app/api/providers/suggested-models/route-badb7034e478a358.js +0 -1
  516. package/app/.next/static/chunks/app/api/providers/test-batch/route-badb7034e478a358.js +0 -1
  517. package/app/.next/static/chunks/app/api/providers/validate/route-badb7034e478a358.js +0 -1
  518. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-badb7034e478a358.js +0 -1
  519. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-badb7034e478a358.js +0 -1
  520. package/app/.next/static/chunks/app/api/proxy-pools/route-badb7034e478a358.js +0 -1
  521. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-badb7034e478a358.js +0 -1
  522. package/app/.next/static/chunks/app/api/settings/database/route-badb7034e478a358.js +0 -1
  523. package/app/.next/static/chunks/app/api/settings/proxy-test/route-badb7034e478a358.js +0 -1
  524. package/app/.next/static/chunks/app/api/settings/require-login/route-badb7034e478a358.js +0 -1
  525. package/app/.next/static/chunks/app/api/settings/route-badb7034e478a358.js +0 -1
  526. package/app/.next/static/chunks/app/api/shutdown/route-badb7034e478a358.js +0 -1
  527. package/app/.next/static/chunks/app/api/tags/route-badb7034e478a358.js +0 -1
  528. package/app/.next/static/chunks/app/api/translator/console-logs/route-badb7034e478a358.js +0 -1
  529. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-badb7034e478a358.js +0 -1
  530. package/app/.next/static/chunks/app/api/translator/load/route-badb7034e478a358.js +0 -1
  531. package/app/.next/static/chunks/app/api/translator/save/route-badb7034e478a358.js +0 -1
  532. package/app/.next/static/chunks/app/api/translator/send/route-badb7034e478a358.js +0 -1
  533. package/app/.next/static/chunks/app/api/translator/translate/route-badb7034e478a358.js +0 -1
  534. package/app/.next/static/chunks/app/api/tunnel/disable/route-badb7034e478a358.js +0 -1
  535. package/app/.next/static/chunks/app/api/tunnel/enable/route-badb7034e478a358.js +0 -1
  536. package/app/.next/static/chunks/app/api/tunnel/status/route-badb7034e478a358.js +0 -1
  537. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-badb7034e478a358.js +0 -1
  538. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-badb7034e478a358.js +0 -1
  539. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-badb7034e478a358.js +0 -1
  540. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-badb7034e478a358.js +0 -1
  541. package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-badb7034e478a358.js +0 -1
  542. package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-badb7034e478a358.js +0 -1
  543. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-badb7034e478a358.js +0 -1
  544. package/app/.next/static/chunks/app/api/usage/api-keys/route-badb7034e478a358.js +0 -1
  545. package/app/.next/static/chunks/app/api/usage/chart/route-badb7034e478a358.js +0 -1
  546. package/app/.next/static/chunks/app/api/usage/history/route-badb7034e478a358.js +0 -1
  547. package/app/.next/static/chunks/app/api/usage/logs/route-badb7034e478a358.js +0 -1
  548. package/app/.next/static/chunks/app/api/usage/providers/route-badb7034e478a358.js +0 -1
  549. package/app/.next/static/chunks/app/api/usage/request-details/route-badb7034e478a358.js +0 -1
  550. package/app/.next/static/chunks/app/api/usage/request-logs/route-badb7034e478a358.js +0 -1
  551. package/app/.next/static/chunks/app/api/usage/stats/route-badb7034e478a358.js +0 -1
  552. package/app/.next/static/chunks/app/api/usage/stream/route-badb7034e478a358.js +0 -1
  553. package/app/.next/static/chunks/app/api/users/[id]/route-badb7034e478a358.js +0 -1
  554. package/app/.next/static/chunks/app/api/users/route-badb7034e478a358.js +0 -1
  555. package/app/.next/static/chunks/app/api/v1/api/chat/route-badb7034e478a358.js +0 -1
  556. package/app/.next/static/chunks/app/api/v1/audio/speech/route-badb7034e478a358.js +0 -1
  557. package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-badb7034e478a358.js +0 -1
  558. package/app/.next/static/chunks/app/api/v1/chat/completions/route-badb7034e478a358.js +0 -1
  559. package/app/.next/static/chunks/app/api/v1/embeddings/route-badb7034e478a358.js +0 -1
  560. package/app/.next/static/chunks/app/api/v1/images/generations/route-badb7034e478a358.js +0 -1
  561. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-badb7034e478a358.js +0 -1
  562. package/app/.next/static/chunks/app/api/v1/messages/route-badb7034e478a358.js +0 -1
  563. package/app/.next/static/chunks/app/api/v1/models/[kind]/route-badb7034e478a358.js +0 -1
  564. package/app/.next/static/chunks/app/api/v1/models/route-badb7034e478a358.js +0 -1
  565. package/app/.next/static/chunks/app/api/v1/responses/compact/route-badb7034e478a358.js +0 -1
  566. package/app/.next/static/chunks/app/api/v1/responses/route-badb7034e478a358.js +0 -1
  567. package/app/.next/static/chunks/app/api/v1/route-badb7034e478a358.js +0 -1
  568. package/app/.next/static/chunks/app/api/v1/search/route-badb7034e478a358.js +0 -1
  569. package/app/.next/static/chunks/app/api/v1/web/fetch/route-badb7034e478a358.js +0 -1
  570. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-badb7034e478a358.js +0 -1
  571. package/app/.next/static/chunks/app/api/v1beta/models/route-badb7034e478a358.js +0 -1
  572. package/app/.next/static/chunks/app/api/version/route-badb7034e478a358.js +0 -1
  573. package/app/.next/static/chunks/app/api/version/update/route-badb7034e478a358.js +0 -1
  574. package/app/.next/static/chunks/app/manifest.webmanifest/route-badb7034e478a358.js +0 -1
  575. package/app/.next/static/chunks/app/page-badb7034e478a358.js +0 -1
  576. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-badb7034e478a358.js +0 -1
  577. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-badb7034e478a358.js +0 -1
  578. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-badb7034e478a358.js +0 -1
  579. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-badb7034e478a358.js +0 -1
  580. package/app/.next/static/css/326fa3d6432d4810.css +0 -1
  581. /package/app/.next/static/{NtU3O4mCJYjlmlBWGF7gX → 2TCKT7FIN7PE7ZJ20oAeb}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{17721:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>C});var i=s(95155),a=s(12115),l=s(73321),r=s(98500),o=s.n(r),n=s(5772),d=s(35497),c=s(52679),p=s(28777),m=s(11059);let x=new Map;async function u(e){if(!e?.url||!e?.type)return[];let t=x.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let i=(await s.json()).data??[];return x.set(e.url,{data:i,expiresAt:Date.now()+6e5}),i}catch{return[]}}var h=s(14051),f=s.n(h);function y({model:e,fullModel:t,displayModel:s,alias:a,copied:l,onCopy:r,testStatus:o,isCustom:n,isFree:d,onDeleteAlias:c,onTest:p,isTesting:m,onDisable:x}){let u="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,i.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:u?{color:u}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,i.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:s||t}),e.name&&(0,i.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),p&&(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:p,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:m?"Testing...":"Test"})]}),(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:l===`model-${e.id}`?"check":"content_copy"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:l===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,i.jsx)("button",{onClick:c,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):x?(0,i.jsx)("button",{onClick:x,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function g({modelId:e,fullModel:t,copied:s,onCopy:a,onDeleteAlias:l,onTest:r,testStatus:o,isTesting:n}){let d="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,i.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,i.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,i.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:()=>a(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:r,disabled:n,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:n?{animation:"spin 1s linear infinite"}:void 0,children:n?"progress_activity":"science"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:n?"Testing...":"Test"})]})]})]}),(0,i.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function b({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:l,onCopy:r,onSetAlias:o,onDeleteAlias:n,connections:c,isAnthropic:p}){let[m,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(!1),[f,y]=(0,a.useState)(!1),[v,j]=(0,a.useState)(null),[w,N]=(0,a.useState)({}),k=async t=>{if(!v){j(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),i=await s.json();N(e=>({...e,[t]:i.ok?"ok":"error"}))}catch{N(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),S=i=>{let a,l=`${e}/${i}`;if(Object.values(s).includes(l))return null;let r=(a=i.split("/"))[a.length-1];if(!s[r])return r;let o=`${t}-${r}`;return s[o]?null:o},A=async()=>{if(!m.trim()||u)return;let t=m.trim(),s=S(t);if(!s)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await o(t,s,e),x("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},$=async()=>{if(f)return;let t=c.find(e=>!1!==e.isActive);if(t){y(!0);try{let s=await fetch(`/api/providers/${t.id}/models`),i=await s.json();if(!s.ok)return void alert(i.error||"Failed to import models");let a=i.models||[];if(0===a.length)return void alert("No models returned from /models.");let l=0;for(let t of a){let s=t.id||t.name||t.model;if(!s)continue;let i=S(s);i&&(await o(s,i,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{y(!1)}}},P=c.some(e=>!1!==e.isActive);return(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",p?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,i.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,i.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,i.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,i.jsx)("input",{id:"new-compatible-model-input",type:"text",value:m,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&A(),placeholder:p?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,i.jsx)(d.$n,{size:"sm",icon:"add",onClick:A,disabled:!m.trim()||u,children:u?"Adding...":"Add"}),(0,i.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:$,disabled:!P||f,children:f?"Importing...":"Import from /models"})]}),!P&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,i.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({modelId:e,fullModel:s,alias:a})=>(0,i.jsx)(g,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>n(a),onTest:c.length>0?()=>k(e):void 0,testStatus:w[e],isTesting:v===e},s))})]})}function v({until:e}){let[t,s]=(0,a.useState)("");return((0,a.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let i=Math.floor(t/1e3);if(i<60)s(`${i}s`);else if(i<3600)s(`${Math.floor(i/60)}m ${i%60}s`);else{let e=Math.floor(i/3600),t=Math.floor(i%3600/60);s(`${e}h ${t}m`)}};t();let i=setInterval(t,1e3);return()=>clearInterval(i)},[e]),t)?(0,i.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function j({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:o,onMoveDown:n,onToggleActive:c,onUpdateProxy:p,onEdit:m,onDelete:x}){let[u,h]=(0,a.useState)(!1),[f,y]=(0,a.useState)(!1),g=(0,a.useRef)(null),b=new Map((t||[]).map(e=>[e.id,e])),w=e.providerSpecificData?.proxyPoolId||null,N=w?b.get(w):null,k=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!w||k,S=N?`Pool: ${N.name}`:w?`Pool: ${w} (inactive/missing)`:k?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A="";if(N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);A=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{A=t}}let $=N?.noProxy||e.providerSpecificData?.connectionNoProxy||"",P="default";N?.isActive===!0?P="success":(w||k)&&(P="error"),(0,a.useEffect)(()=>{if(!u)return;let e=e=>{g.current&&!g.current.contains(e.target)&&h(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[u]);let T=async e=>{y(!0);try{await p("__none__"===e?null:e)}finally{y(!1),h(!1)}},O=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),E=s?O(e.email)?e.email:O(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name,[I,R]=(0,a.useState)(!1),U=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,a.useEffect)(()=>{let t=()=>{R(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=U?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[U]);let _="unavailable"!==e.testStatus||I?e.testStatus:"active";return(0,i.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,i.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,i.jsx)("button",{onClick:o,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,i.jsx)("button",{onClick:n,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:s?"lock":"key"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:E}),(0,i.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,i.jsx)(d.Ex,{variant:!1===e.isActive?"default":"active"===_||"success"===_?"success":"error"===_||"expired"===_||"unavailable"===_?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":_||"Unknown"}),C&&(0,i.jsx)(d.Ex,{variant:P,size:"sm",children:"Proxy"}),I&&!1!==e.isActive&&(0,i.jsx)(v,{until:U}),e.lastError&&!1!==e.isActive&&(0,i.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]})]}),C&&(0,i.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,i.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:S,children:S}),A&&(0,i.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:A}),$&&(0,i.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:$,children:["no_proxy: ",$]})]})]})]}),(0,i.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,i.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,i.jsxs)("div",{className:"relative",ref:g,children:[(0,i.jsxs)("button",{onClick:()=>h(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:f,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:f?"progress_activity":"lan"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),u&&(0,i.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,i.jsx)("button",{onClick:()=>T("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,i.jsx)("button",{onClick:()=>T(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,i.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,i.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,i.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}function w({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:o,authHint:n,website:c,proxyPools:p,onSave:m,onClose:x}){let u="__none__",h="ollama-local"===t,f="cookie"===o,y=f?"Cookie Value":"API Key",g=f?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":"",b="azure"===t,v="cloudflare-ai"===t,[j,N]=(0,a.useState)({name:"",apiKey:"",priority:1,proxyPoolId:u,ollamaHostUrl:""}),[k,C]=(0,a.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[S,A]=(0,a.useState)({accountId:""}),[$,P]=(0,a.useState)(!1),[T,O]=(0,a.useState)(null),[E,I]=(0,a.useState)(!1),R=h?"Ollama Local":f?`${s||t} Cookie`:"Production Key";(0,a.useEffect)(()=>{e&&(N({name:l?R:"",apiKey:"",priority:1,proxyPoolId:u,ollamaHostUrl:""}),C({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),A({accountId:""}),P(!1),O(null),I(!1))},[R,l,e]);let U=()=>h&&j.ollamaHostUrl.trim()?{baseUrl:j.ollamaHostUrl.trim()}:b?{azureEndpoint:k.azureEndpoint,apiVersion:k.apiVersion,deployment:k.deployment,organization:k.organization}:v?{accountId:S.accountId}:void 0,_=async()=>{P(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:j.apiKey,providerSpecificData:U()})}),s=await e.json();O(s.valid?"success":"failed")}catch{O("failed")}finally{P(!1)}},D=async()=>{if(!t||!h&&!j.apiKey)return;let e=j.name.trim()||R;I(!0);try{let s=!1;try{P(!0),O(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:j.apiKey,providerSpecificData:U()})});s=!!(await e.json()).valid,O(s?"success":"failed")}catch{O("failed")}finally{P(!1)}await m({name:e,apiKey:j.apiKey,priority:j.priority,proxyPoolId:j.proxyPoolId===u?null:j.proxyPoolId,testStatus:s?"active":"unknown",providerSpecificData:U()})}finally{I(!1)}};return t?(0,i.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${y}`,onClose:x,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(d.pd,{label:"Name",value:j.name,onChange:e=>N({...j,name:e.target.value}),placeholder:R}),h&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(d.pd,{label:"Ollama Host URL",value:j.ollamaHostUrl,onChange:e=>N({...j,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(d.$n,{onClick:_,disabled:$||E,variant:"secondary",children:$?"Checking...":"Check"})})]}),!h&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(d.pd,{label:y,type:f?"text":"password",value:j.apiKey,onChange:e=>N({...j,apiKey:e.target.value}),placeholder:g,className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(d.$n,{onClick:_,disabled:!j.apiKey||$||E,variant:"secondary",children:$?"Checking...":"Check"})})]}),f&&n&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:[n,c&&(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsxs)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",c.replace(/^https?:\/\//,"")]})]})]}),h&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,i.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,i.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),T&&(0,i.jsx)(d.Ex,{variant:"success"===T?"success":"error",children:"success"===T?"Valid":"Invalid"}),l&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:r?`Validation checks ${s||"Anthropic Compatible"} by verifying the API key.`:`Validation checks ${s||"OpenAI Compatible"} via /models on your base URL.`}),v&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,i.jsx)(d.pd,{label:"Account ID",value:S.accountId,onChange:e=>A({...S,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,i.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),b&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)(d.pd,{label:"Azure Endpoint",value:k.azureEndpoint,onChange:e=>C({...k,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,i.jsx)(d.pd,{label:"Deployment Name",value:k.deployment,onChange:e=>C({...k,deployment:e.target.value}),placeholder:"gpt-4"}),(0,i.jsx)(d.pd,{label:"API Version",value:k.apiVersion,onChange:e=>C({...k,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,i.jsx)(d.pd,{label:"Organization",value:k.organization,onChange:e=>C({...k,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,i.jsx)(d.pd,{label:"Priority",type:"number",value:j.priority,onChange:e=>N({...j,priority:Number.parseInt(e.target.value)||1})}),(0,i.jsx)(d.l6,{label:"Proxy Pool",value:j.proxyPoolId,onChange:e=>N({...j,proxyPoolId:e.target.value}),options:[{value:u,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(d.$n,{onClick:D,fullWidth:!0,disabled:E||!h&&!j.apiKey||b&&(!k.azureEndpoint||!k.deployment||!k.organization)||v&&!S.accountId,children:E?"Saving...":"Save"}),(0,i.jsx)(d.$n,{onClick:x,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function N({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[o,n]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,p]=(0,a.useState)(!1),[m,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(""),[f,y]=(0,a.useState)(!1),[g,b]=(0,a.useState)(null);(0,a.useEffect)(()=>{t&&n({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(o.name.trim()&&o.prefix.trim()&&o.baseUrl.trim()){p(!0);try{let e={name:o.name,prefix:o.prefix,baseUrl:o.baseUrl};r||(e.apiType=o.apiType),await s(e)}finally{p(!1)}}},j=async()=>{y(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:o.baseUrl,apiKey:m,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{y(!1)}};return t?(0,i.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(d.pd,{label:"Name",value:o.name,onChange:e=>n({...o,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,i.jsx)(d.pd,{label:"Prefix",value:o.prefix,onChange:e=>n({...o,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,i.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:o.apiType,onChange:e=>n({...o,apiType:e.target.value})}),(0,i.jsx)(d.pd,{label:"Base URL",value:o.baseUrl,onChange:e=>n({...o,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>x(e.target.value),className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(d.$n,{onClick:j,disabled:!m||f||!o.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,i.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),g&&(0,i.jsx)(d.Ex,{variant:"success"===g?"success":"error",children:"success"===g?"Valid":"Invalid"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!o.name.trim()||!o.prefix.trim()||!o.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,i.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function k({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){var o;let n,[c,p]=(0,a.useState)(""),[m,x]=(0,a.useState)(null),[u,h]=(0,a.useState)(""),[f,y]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&(p(""),x(null),h(""),y(!1))},[e]);let g=(o=c.trim(),n=`${t}/`,o.startsWith(n)?o.slice(n.length):o),b=async()=>{if(g){x("testing"),h("");try{let e=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${g}`})}),s=await e.json();x(s.ok?"ok":"error"),h(s.error||"")}catch(e){x("error"),h(e.message)}}},v=async()=>{if(g&&!f){y(!0);try{await l(g)}finally{y(!1)}}};return(0,i.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)("input",{type:"text",value:c,onChange:e=>{p(e.target.value),x(null),h("")},onKeyDown:e=>{"Enter"===e.key&&b()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,i.jsx)(d.$n,{type:"button",variant:"secondary",icon:"science",loading:"testing"===m,onClick:b,disabled:!g||"testing"===m,children:"testing"===m?"Testing...":"Test"})]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,i.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:g||"model-id"})]})]}),"ok"===m&&(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===m&&(0,i.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,i.jsx)("span",{children:u||"Model not reachable"})]}),(0,i.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,i.jsx)(d.$n,{type:"button",onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,i.jsx)(d.$n,{type:"button",onClick:v,fullWidth:!0,size:"sm",disabled:!g||f,children:f?"Adding...":"Add Model"})]})]})})}function C(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[x,h]=(0,a.useState)([]),[f,g]=(0,a.useState)(!0),[v,C]=(0,a.useState)(null),[S,A]=(0,a.useState)([]),[$,P]=(0,a.useState)(!1),[T,O]=(0,a.useState)(!1),[E,I]=(0,a.useState)(!1),[R,U]=(0,a.useState)(!1),[_,D]=(0,a.useState)(!1),[q,z]=(0,a.useState)(!1),[M,L]=(0,a.useState)(null),[K,F]=(0,a.useState)({}),[J,W]=(0,a.useState)(!1),[V,H]=(0,a.useState)({}),[G,B]=(0,a.useState)(""),[Q,Z]=(0,a.useState)(null),[X,Y]=(0,a.useState)(!1),[ee,et]=(0,a.useState)([]),[es,ei]=(0,a.useState)("__none__"),[ea,el]=(0,a.useState)(!1),[er,eo]=(0,a.useState)(null),[en,ed]=(0,a.useState)(""),[ec,ep]=(0,a.useState)("auto"),[em,ex]=(0,a.useState)([]),[eu,eh]=(0,a.useState)([]),[ef,ey]=(0,a.useState)([]),{copied:eg,copy:eb}=(0,m.C)(),ev=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],ej=!!c.zN[r]||!!c.IS[r],ew=!!c.IS[r]?.noAuth,eN=(0,p.KC)(r),ek=(0,c.wG)(r),eC=(0,c.mq)(r),eS=(0,c.gb)(r),eA=eC||eS;c.Q2[r]?.thinkingConfig||c.s9.extended;let e$=eA?r:ek,eP=eA?v?.prefix||r:ek,eT="codex"===r,eO=(0,a.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e$)}`,{cache:"no-store"}),t=await e.json();e.ok&&ey(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[e$]),eE=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:e$,ids:[e]})})).ok&&await eO()}catch(e){console.log("Error disabling model:",e)}},eI=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e$)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await eO()}catch(e){console.log("Error enabling model:",e)}},eR=async e=>{if(e.length&&confirm(`Disable all ${e.length} model(s)?`))try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:e$,ids:e})})).ok&&await eO()}catch(e){console.log("Error disabling all models:",e)}},eU=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e$)}`,{method:"DELETE"})).ok&&await eO()}catch(e){console.log("Error enabling all models:",e)}},e_=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&F(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,a.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eh(e.models)}).catch(()=>{})},[r]);let eD=(0,a.useCallback)(async()=>{try{let[e,t,s,i]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),a=await e.json(),l=await t.json(),o=await s.json(),n=i.ok?await i.json():{};if(e.ok){let e=(a.connections||[]).filter(e=>e.provider===r);h(e)}s.ok&&A(o.proxyPools||[]);let d=(n.providerStrategies||{})[r]||{};eo(d.fallbackStrategy||null),ed(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1");let c=(n.providerThinking||{})[r]||{};if(ep(c.mode||"auto"),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&eA)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}C(e)}}catch(e){console.log("Error fetching connections:",e)}finally{g(!1)}},[r,eA]),eq=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(C(s.node),await eD(),D(!1))}catch(e){console.log("Error updating provider node:",e)}},ez=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),i=(s.ok?await s.json():{}).providerStrategies||{},a={};e&&(a.fallbackStrategy=e),"round-robin"===e&&""!==t&&(a.stickyRoundRobinLimit=Number(t)||3);let l={...i};0===Object.keys(a).length?delete l[r]:l[r]=a,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,a.useEffect)(()=>{(async()=>{await Promise.all([eD(),e_(),eO()])})()},[eD,e_,eO]),(0,a.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&u(e).then(ex)},[r]);let eM=async(e,t,s=ek)=>{let i=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:i,alias:t})});if(e.ok)await e_();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},eL=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await e_()}catch(e){console.log("Error deleting alias:",e)}},eK=async e=>{if(confirm("Delete this connection?"))try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&h(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}},eF=()=>{eD(),P(!1)},eJ=async e=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})})).ok&&(await eD(),I(!1))}catch(e){console.log("Error saving connection:",e)}},eW=async e=>{try{(await fetch(`/api/providers/${M.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eD(),U(!1))}catch(e){console.log("Error updating connection:",e)}},eV=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&h(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},eH=async(e,t)=>{let s=[...x];[s[e],s[t]]=[s[t],s[e]],h(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await eD()}},eG=(0,a.useMemo)(()=>new Set(x.map(e=>e.id)),[x]),eB=(0,a.useMemo)(()=>ee.filter(e=>eG.has(e)),[ee,eG]),eQ=x.filter(e=>eB.includes(e.id));x.length>0&&(eB.length,x.length);let eZ=(()=>{if(0===eQ.length)return"";let e=new Set(eQ.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let s=S.find(e=>e.id===t);return`All selected currently bound to ${s?.name||t}`}return"Selected connections have mixed proxy bindings"})(),eX=()=>{ea||z(!1)},eY=async()=>{if(0===eB.length)return;let e="__none__"===es?null:es;el(!0);try{let t=[];for(let s of eB)try{let i=await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:e})});t.push(i.ok)}catch(e){console.log("Error applying bulk proxy pool for",s,e),t.push(!1)}let s=t.filter(e=>!e).length;s>0&&alert(`Updated with ${s} failed request(s).`),await eD(),et([]),ei("__none__"),z(!1)}catch(e){console.log("Error applying bulk proxy pool:",e)}finally{el(!1)}},e0=(0,i.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/3 dark:divide-white/3",children:x.map((e,t)=>(0,i.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,i.jsx)("div",{className:"flex-1 min-w-0",children:(0,i.jsx)(j,{connection:e,proxyPools:S,isOAuth:ej,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>eH(t,t-1),onMoveDown:()=>eH(t,t+1),onToggleActive:t=>eV(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&h(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{L(e),U(!0)},onDelete:()=>eK(e.id)})})},e.id))}),e1=[{value:"__none__",label:"None"},...S.map(e=>({value:e.id,label:e.name}))],e2=0===eB.length?"Select one or more connections, then click Proxy Action.":eZ,e5=eB.length>0&&!ea,e3=(0,i.jsx)(d.aF,{isOpen:q,onClose:eX,title:`Proxy Action (${eB.length} selected)`,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(d.l6,{label:"Proxy Pool",value:es,onChange:e=>ei(e.target.value),options:e1,placeholder:"None"}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:e2}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Selecting None will unbind selected connections from proxy pool."}),(0,i.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,i.jsx)(d.$n,{onClick:eY,fullWidth:!0,disabled:!e5,children:ea?"Applying...":"Apply"}),(0,i.jsx)(d.$n,{onClick:eX,variant:"ghost",fullWidth:!0,disabled:ea,children:"Cancel"})]})]})}),e4=async e=>{if(!Q){Z(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e$}/${e}`})}),s=await t.json();H(t=>({...t,[e]:s.ok?"ok":"error"})),B(s.ok?"":s.error||"Model not reachable")}catch{H(t=>({...t,[e]:"error"})),B("Network error")}finally{Z(null)}}};return f?(0,i.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,i.jsx)(d.Qv,{}),(0,i.jsx)(d.Qv,{})]}):ev?(0,i.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsxs)(o(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,i.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${ev.color}15`},children:J?(0,i.jsx)("span",{className:"text-sm font-bold",style:{color:ev.color},children:ev.textIcon||ev.id.slice(0,2).toUpperCase()}):(0,i.jsx)(n.default,{src:eC&&ev.apiType?"responses"===ev.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":eS?"/providers/anthropic-m.png":`/providers/${ev.id}.png`,alt:ev.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>W(!0)})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,i.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:ev.name}),(ev.notice?.apiKeyUrl||ev.notice?.signupUrl||ev.website)&&(0,i.jsxs)("a",{href:ev.notice?.apiKeyUrl||ev.notice?.signupUrl||ev.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),ev.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,i.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),ev.deprecated&&(0,i.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,i.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:ev.deprecationNotice})]}),ev.notice?.text&&!ev.deprecated&&(0,i.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,i.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:ev.notice.text}),ev.notice.apiKeyUrl&&(0,i.jsx)("a",{href:ev.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),eA&&v&&(0,i.jsxs)(d.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:eS?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,i.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[eS?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",eS?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,i.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>I(!0),disabled:x.length>0,className:"w-full sm:w-auto",children:"Add"}),(0,i.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>D(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,i.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{if(confirm(`Delete this ${eS?"Anthropic":"OpenAI"} Compatible node?`))try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}},className:"w-full sm:w-auto",children:"Delete"})]})]}),x.length>0&&(0,i.jsx)("p",{className:"text-sm text-text-muted",children:"Only one connection is allowed per compatible node. Add another node if you need more connections."})]}),ew?(0,i.jsx)(d.gw,{providerId:r}):(0,i.jsxs)(d.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,i.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,i.jsx)(d.lM,{checked:"round-robin"===er,onChange:e=>{let t=e?"round-robin":null,s=e?en||"1":en;e&&!en&&ed("1"),eo(t),ez(t,s)}}),"round-robin"===er&&(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,i.jsx)("input",{type:"number",min:1,value:en,onChange:e=>{var t;ed(t=e.target.value),ez("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})})]}),0===x.length?(0,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:ej?"lock":"key"})}),(0,i.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"})]}),!eA&&(0,i.jsxs)("div",{className:"flex gap-2",children:["iflow"===r&&(0,i.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>O(!0),children:"Cookie"}),(0,i.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>ej?P(!0):I(!0),children:"iflow"===r?"OAuth":"Add Connection"})]})]}):(0,i.jsxs)(i.Fragment,{children:[e0,!eA&&(0,i.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,i.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>O(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),(0,i.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>ej?P(!0):I(!0),className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,i.jsxs)(d.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!eA&&(e=[...eN,...eu.filter(e=>!eN.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!ef.includes(e)),(0,i.jsxs)("div",{className:"flex gap-2",children:[ef.length>0&&(0,i.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:eU,children:"Active All"}),e.length>0&&(0,i.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>eR(e),children:"Disable All"})]}))]}),!!G&&(0,i.jsx)("p",{className:"text-xs text-red-500 mb-3 wrap-break-word",children:G}),(()=>{let e,t,s;if(eA)return(0,i.jsx)(b,{providerStorageAlias:e$,providerDisplayAlias:eP,modelAliases:K,copied:eg,onCopy:eb,onSetAlias:eM,onDeleteAlias:eL,connections:x,isAnthropic:eS});let a=[...eN,...eu.filter(e=>!eN.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(ef),o=a.filter(e=>!l.has(e.id)),n=a.filter(e=>l.has(e.id)),d=Object.entries(K).filter(([e,t])=>{let s=`${e$}/`;if(!t.startsWith(s))return!1;let i=t.slice(s.length);return ev.passthroughModels?!eN.some(e=>e.id===i):!eN.some(e=>e.id===i)&&e===i}).map(([e,t])=>({id:t.slice(`${e$}/`.length),alias:e,fullModel:t}));return(0,i.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,i.jsx)(y,{model:{id:e.id},fullModel:`${eP}/${e.id}`,displayModel:eT?e.id:`${eP}/${e.id}`,alias:e.alias,copied:eg,onCopy:eb,onSetAlias:()=>{},onDeleteAlias:()=>eL(e.alias),testStatus:V[e.id],onTest:x.length>0||ew?()=>e4(e.id):void 0,isTesting:Q===e.id,isCustom:!0,isFree:!1},e.id)),o.map(e=>{let t=`${e$}/${e.id}`,s=`${r}/${e.id}`,a=Object.entries(K).find(([,e])=>e===t||e===s)?.[0];return(0,i.jsx)(y,{model:e,fullModel:`${eP}/${e.id}`,displayModel:eT?e.id:`${eP}/${e.id}`,alias:a,copied:eg,onCopy:eb,onSetAlias:t=>eM(e.id,t,e$),onDeleteAlias:()=>eL(a),testStatus:V[e.id],onTest:x.length>0||ew?()=>e4(e.id):void 0,isTesting:Q===e.id,isFree:e.isFree,onDisable:()=>eE(e.id)},e.id)}),(0,i.jsxs)("button",{onClick:()=>Y(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),em.length>0&&(e=new Set(Object.values(K)),t=new Set(eN.map(e=>e.id)),0===(s=em.filter(s=>!e.has(`${e$}/${s.id}`)&&!t.has(s.id))).length?null:(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,i.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await eM(e.id,t,e$)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),n.length>0&&(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",n.length,"):"]}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,i.jsxs)("button",{onClick:()=>eI(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),e3,"kiro"===r?(0,i.jsx)(d.Mh,{isOpen:$,providerInfo:ev,onSuccess:eF,onClose:()=>P(!1)}):"cursor"===r?(0,i.jsx)(d.G9,{isOpen:$,onSuccess:eF,onClose:()=>P(!1)}):"gitlab"===r?(0,i.jsx)(d.vj,{isOpen:$,providerInfo:ev,onSuccess:eF,onClose:()=>P(!1)}):(0,i.jsx)(d.LF,{isOpen:$,provider:r,providerInfo:ev,onSuccess:eF,onClose:()=>P(!1)}),"iflow"===r&&(0,i.jsx)(d.vE,{isOpen:T,onSuccess:()=>{eD(),O(!1)},onClose:()=>O(!1)}),(0,i.jsx)(w,{isOpen:E,provider:r,providerName:ev.name,isCompatible:eA,isAnthropic:eS,authType:ev?.authType,authHint:ev?.authHint,website:ev?.website,proxyPools:S,onSave:eJ,onClose:()=>I(!1)}),(0,i.jsx)(d.wI,{isOpen:R,connection:M,proxyPools:S,onSave:eW,onClose:()=>U(!1)}),eA&&(0,i.jsx)(N,{isOpen:_,node:v,onSave:eq,onClose:()=>D(!1),isAnthropic:eS}),!eA&&(0,i.jsx)(k,{isOpen:X,providerAlias:e$,providerDisplayAlias:eP,onSave:async e=>{let t=ev?.passthroughModels?e.split("/").pop():e;await eM(e,t,e$),Y(!1)},onClose:()=>Y(!1)})]}):(0,i.jsxs)("div",{className:"text-center py-20",children:[(0,i.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,i.jsx)(o(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}y.propTypes={model:f().shape({id:f().string.isRequired}).isRequired,fullModel:f().string.isRequired,displayModel:f().string,alias:f().string,copied:f().string,onCopy:f().func.isRequired,testStatus:f().oneOf(["ok","error"]),isCustom:f().bool,isFree:f().bool,onDeleteAlias:f().func,onTest:f().func,isTesting:f().bool,onDisable:f().func},f().string.isRequired,f().string.isRequired,f().string,f().func.isRequired,f().func.isRequired,f().func,f().oneOf(["ok","error"]),f().bool,f().string.isRequired,f().object.isRequired,f().string,f().func.isRequired,f().func.isRequired,f().func.isRequired,b.propTypes={providerStorageAlias:f().string.isRequired,providerDisplayAlias:f().string.isRequired,modelAliases:f().object.isRequired,copied:f().string,onCopy:f().func.isRequired,onSetAlias:f().func.isRequired,onDeleteAlias:f().func.isRequired,connections:f().arrayOf(f().shape({id:f().string,isActive:f().bool})).isRequired,isAnthropic:f().bool},v.propTypes={until:f().string.isRequired},j.propTypes={connection:f().shape({id:f().string,name:f().string,email:f().string,displayName:f().string,modelLockUntil:f().string,testStatus:f().string,isActive:f().bool,lastError:f().string,priority:f().number,globalPriority:f().number}).isRequired,proxyPools:f().arrayOf(f().shape({id:f().string,name:f().string,proxyUrl:f().string,noProxy:f().string,isActive:f().bool})),isOAuth:f().bool.isRequired,isFirst:f().bool.isRequired,isLast:f().bool.isRequired,onMoveUp:f().func.isRequired,onMoveDown:f().func.isRequired,onToggleActive:f().func.isRequired,onUpdateProxy:f().func,onEdit:f().func.isRequired,onDelete:f().func.isRequired},w.propTypes={isOpen:f().bool.isRequired,provider:f().string,providerName:f().string,isCompatible:f().bool,isAnthropic:f().bool,authType:f().string,authHint:f().string,website:f().string,proxyPools:f().arrayOf(f().shape({id:f().string,name:f().string})),onSave:f().func.isRequired,onClose:f().func.isRequired},N.propTypes={isOpen:f().bool.isRequired,node:f().shape({id:f().string,name:f().string,prefix:f().string,apiType:f().string,baseUrl:f().string}),onSave:f().func.isRequired,onClose:f().func.isRequired,isAnthropic:f().bool},k.propTypes={isOpen:f().bool.isRequired,providerAlias:f().string.isRequired,providerDisplayAlias:f().string.isRequired,onSave:f().func.isRequired,onClose:f().func.isRequired}},53655:(e,t,s)=>{Promise.resolve().then(s.bind(s,17721))}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,8441,3794,7358],()=>e(e.s=53655)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{12572:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>N});var s=a(95155),r=a(12115),l=a(14051),i=a.n(l),n=a(35497),o=a(57250),d=a(90620),c=a(52679),p=a(98500),m=a.n(p),x=a(65921),u=a(38003);let h={available:{icon:"check_circle",color:"#22c55e",label:"Available"},cooldown:{icon:"schedule",color:"#f59e0b",label:"Cooldown"},unavailable:{icon:"error",color:"#ef4444",label:"Unavailable"},unknown:{icon:"help",color:"#6b7280",label:"Unknown"}};function f(){let[e,t]=(0,r.useState)(null),[a,l]=(0,r.useState)(!0),[i,o]=(0,r.useState)(!1),[d,c]=(0,r.useState)(null),p=(0,r.useRef)(null),m=(0,x.i)(),u=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/models/availability");if(e.ok){let a=await e.json();t(a)}}catch{}finally{l(!1)}},[]);(0,r.useEffect)(()=>{u();let e=setInterval(u,3e4);return()=>clearInterval(e)},[u]),(0,r.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&o(!1)};return i&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);let f=async(e,t)=>{c(`${e}:${t}`);try{(await fetch("/api/models/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clearCooldown",provider:e,model:t})})).ok?(m.success(`Cooldown cleared for ${t}`),await u()):m.error("Failed to clear cooldown")}catch{m.error("Failed to clear cooldown")}finally{c(null)}};if(a)return null;let b=e?.models||[],g=0===(e?.unavailableCount||b.filter(e=>"available"!==e.status).length),v={};return b.forEach(e=>{if("available"===e.status)return;let t=e.provider||"unknown";v[t]||(v[t]=[]),v[t].push(e)}),(0,s.jsx)("div",{className:"relative",ref:p,children:i&&(0,s.jsxs)("div",{className:"absolute top-full right-0 mt-2 w-80 bg-surface border border-border rounded-xl shadow-2xl z-50 overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:g?"#22c55e":"#f59e0b"},children:g?"verified":"warning"}),(0,s.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,s.jsx)("button",{onClick:u,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,s.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:g?(0,s.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,s.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(v).map(([e,t])=>(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:e}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let t=h[e.status]||h.unknown,a=d===`${e.provider}:${e.model}`;return(0,s.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:t.color},children:t.icon}),(0,s.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:e.model})]}),"cooldown"===e.status&&(0,s.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>f(e.provider,e.model),disabled:a,className:"text-[10px] px-1.5! py-0.5! ml-2",children:a?"...":"Clear"})]},`${e.provider}-${e.model}`)})})]},e))})})]})})}var b=a(68828);let g=[{value:"openai-compatible",label:"OpenAI Compatible"},{value:"anthropic-compatible",label:"Anthropic Compatible"}],v=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function y({isOpen:e,onClose:t,onImported:a,notify:l}){let[i,o]=(0,r.useState)(""),[d,c]=(0,r.useState)(null),[p,m]=(0,r.useState)(!1),[x,u]=(0,r.useState)(""),[h,f]=(0,r.useState)({type:"openai-compatible",apiType:"chat",name:"",prefix:"",baseUrl:"",connectionName:"Imported Key",apiKey:"",modelId:""}),j=()=>{o(""),c(null),m(!1),u(""),f({type:"openai-compatible",apiType:"chat",name:"",prefix:"",baseUrl:"",connectionName:"Imported Key",apiKey:"",modelId:""}),t()},N=async()=>{if(h.name.trim()&&h.prefix.trim()&&h.baseUrl.trim()){m(!0);try{let e={name:h.name.trim(),prefix:h.prefix.trim(),baseUrl:h.baseUrl.trim(),type:h.type};"openai-compatible"===h.type&&(e.apiType=h.apiType);let t=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();if(!t.ok)throw Error(s.error||"Failed to create compatible provider");let r=null;if(h.apiKey.trim()){let e=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:s.node.id,apiKey:h.apiKey.trim(),name:h.connectionName.trim()||"Imported Key",testStatus:"unknown"})}),t=await e.json();if(!e.ok)throw Error(t.error||"Compatible provider created, but API key import failed");r=t.connection}l.success("Compatible provider imported from cURL"),a?.({node:s.node,connection:r}),j()}catch(e){l.error(e.message||"Failed to import curl")}finally{m(!1)}}};return(0,s.jsx)(n.aF,{isOpen:e,title:"Import Compatible Provider From cURL",onClose:j,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Paste cURL"}),(0,s.jsx)("textarea",{value:i,onChange:e=>o(e.target.value),placeholder:'curl --request POST --url https://api.example.com/v1/chat/completions --header \'Authorization: Bearer sk-xxx\' --header \'Content-Type: application/json\' --data \'{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}\'',className:"min-h-40 w-full rounded-lg border border-border bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Supports full endpoint URLs like `/v1/chat/completions`, `/responses`, or `/v1/messages`."}),(0,s.jsx)(n.$n,{onClick:()=>{try{let e=(0,b.Sq)(i);c(e),u(""),f({type:e.type,apiType:e.apiType||"chat",name:e.defaultName,prefix:e.defaultPrefix,baseUrl:e.baseUrl,connectionName:e.defaultConnectionName,apiKey:e.apiKey,modelId:e.modelId})}catch(e){c(null),u(e.message||"Failed to parse curl")}},variant:"secondary",className:"w-full sm:w-auto",children:"Parse cURL"})]}),x&&(0,s.jsx)("p",{className:"text-sm text-red-500",children:x})]}),d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(n.Ex,{variant:"success",children:"Detected"}),(0,s.jsx)(n.Ex,{variant:"default",children:"anthropic-compatible"===h.type?"Anthropic Compatible":"OpenAI Compatible"}),"openai-compatible"===h.type&&(0,s.jsx)(n.Ex,{variant:"default",children:"responses"===h.apiType?"Responses API":"Chat Completions"})]}),(0,s.jsx)(n.l6,{label:"Provider Type",value:h.type,options:g,onChange:e=>f(t=>({...t,type:e.target.value,apiType:"anthropic-compatible"===e.target.value?"chat":t.apiType}))}),"openai-compatible"===h.type&&(0,s.jsx)(n.l6,{label:"API Type",value:h.apiType,options:v,onChange:e=>f(t=>({...t,apiType:e.target.value}))}),(0,s.jsx)(n.pd,{label:"Provider Name",value:h.name,onChange:e=>f(t=>({...t,name:e.target.value})),placeholder:"Compatible Provider"}),(0,s.jsx)(n.pd,{label:"Prefix",value:h.prefix,onChange:e=>f(t=>({...t,prefix:e.target.value})),placeholder:"oc-example"}),(0,s.jsx)(n.pd,{label:"Base URL",value:h.baseUrl,onChange:e=>f(t=>({...t,baseUrl:e.target.value})),placeholder:"https://api.example.com/v1"}),(0,s.jsx)(n.pd,{label:"Connection Name",value:h.connectionName,onChange:e=>f(t=>({...t,connectionName:e.target.value})),placeholder:"Imported Key"}),(0,s.jsx)(n.pd,{label:"API Key",type:"password",value:h.apiKey,onChange:e=>f(t=>({...t,apiKey:e.target.value})),placeholder:"Bearer token from curl"}),(0,s.jsx)(n.pd,{label:"Detected Model",value:h.modelId,onChange:e=>f(t=>({...t,modelId:e.target.value})),placeholder:"Optional"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(n.$n,{onClick:N,fullWidth:!0,disabled:!d||!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||p,children:p?"Importing...":"Create Provider"}),(0,s.jsx)(n.$n,{onClick:j,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function j(e,t,a){let r=[];if(e>0&&r.push((0,s.jsxs)(n.Ex,{variant:"success",size:"sm",dot:!0,children:[e," Connected"]},"connected")),t>0){let e=a?`${t} Error (${a})`:`${t} Error`;r.push((0,s.jsx)(n.Ex,{variant:"error",size:"sm",dot:!0,children:e},"error"))}return 0===r.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No connections"}):r}function N(){let[e,t]=(0,r.useState)([]),[a,l]=(0,r.useState)([]),[i,o]=(0,r.useState)(!0),[p,m]=(0,r.useState)(!1),[h,b]=(0,r.useState)(!1),[g,v]=(0,r.useState)(!1),[j,N]=(0,r.useState)(null),[A,U]=(0,r.useState)(null),S=(0,x.i)(),R=(0,u.C)(e=>e.query),O=(0,u.C)(e=>e.register),P=(0,u.C)(e=>e.unregister);(0,r.useEffect)(()=>(O("Search providers..."),()=>P()),[O,P]);let E=e=>!R.trim()||e.toLowerCase().includes(R.trim().toLowerCase());(0,r.useEffect)(()=>{let e=async()=>{try{let[e,a]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),s=await e.json(),r=await a.json();e.ok&&t(s.connections||[]),a.ok&&l(r.nodes||[])}catch(e){console.log("Error fetching data:",e)}finally{o(!1)}};fetch("/api/auth/me").then(e=>e.json()).then(e=>{"sub_user"===e.role&&(window.location.href="/dashboard/usage")}).catch(()=>{}),e()},[]);let $=(t,a)=>{let s=e.filter(e=>e.provider===t&&e.authType===a),r=e=>{let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"},l=s.filter(e=>{let t=r(e);return"active"===t||"success"===t}).length,i=s.filter(e=>{let t=r(e);return"error"===t||"expired"===t||"unavailable"===t}),n=i.length,o=s.length,d=o>0&&s.every(e=>!1===e.isActive),c=i.sort((e,t)=>new Date(t.lastErrorAt||0)-new Date(e.lastErrorAt||0))[0];return{connected:l,error:n,total:o,errorCode:c?function(e){if(!e)return null;let t=e.lastErrorType;if("runtime_error"===t)return"RUNTIME";if("upstream_auth_error"===t||"auth_missing"===t||"token_refresh_failed"===t||"token_expired"===t)return"AUTH";if("upstream_rate_limited"===t)return"429";if("upstream_unavailable"===t)return"5XX";if("network_error"===t)return"NET";let a=Number(e.errorCode);if(Number.isFinite(a)&&a>=400)return String(a);let s=function(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}(e.lastError);if("401"===s||"403"===s)return"AUTH";if(s&&"ERR"!==s)return s;let r=(e.lastError||"").toLowerCase();return r.includes("runtime")||r.includes("not runnable")||r.includes("not installed")?"RUNTIME":r.includes("invalid api key")||r.includes("token invalid")||r.includes("revoked")||r.includes("unauthorized")?"AUTH":"ERR"}(c):null,errorTime:c?.lastErrorAt?function(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let a=Math.floor(t/60);if(a<24)return`${a}h ago`;let s=Math.floor(a/24);return`${s}d ago`}(c.lastErrorAt):null,allDisabled:d}},q=async(a,s,r)=>{let l=e.filter(e=>e.provider===a&&e.authType===s);t(e=>e.map(e=>e.provider===a&&e.authType===s?{...e,isActive:r}:e)),await Promise.allSettled(l.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:r})})))},_=async(e,t=null)=>{if(!j){N("provider"===e?t:e),U(null);try{let a=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),s=await a.json();if(U(s),s.summary){let{passed:e,failed:t,total:a}=s.summary;0===t?S.success(`All ${a} tests passed`):S.warning(`${e}/${a} passed, ${t} failed`)}}catch(e){U({error:"Test request failed"}),S.error("Provider test failed")}finally{N(null)}}},z=a.filter(e=>"openai-compatible"===e.type).map(e=>({id:e.id,name:e.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:e.apiType})).filter(e=>E(e.name)),K=a.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>E(e.name)),D=Object.entries(d.zN).filter(([,e])=>E(e.name)),F=Object.entries(c.IS).filter(([,e])=>E(e.name)),L=Object.entries(c.nJ).filter(([,e])=>E(e.name)),M=Object.entries(d.fg).filter(([,e])=>(e.serviceKinds??["llm"]).includes("llm")&&E(e.name));if(i)return(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(n.Qv,{}),(0,s.jsx)(n.Qv,{})]});let J=D.length>0||F.length>0||L.length>0||M.length>0||z.length>0||K.length>0;return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[!J&&(0,s.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,s.jsx)("p",{className:"text-text-muted text-sm",children:"No providers match your search"})]}),D.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"OAuth Providers"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)(f,{}),(0,s.jsxs)("button",{onClick:()=>_("oauth"),disabled:!!j,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"oauth"===j?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all OAuth connections","aria-label":"Test all OAuth connections",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"oauth"===j?" animate-spin":""}`,children:"play_arrow"}),"oauth"===j?"Testing...":"Test All"]})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:D.map(([e,t])=>(0,s.jsx)(w,{providerId:e,provider:t,stats:$(e,"oauth"),authType:"oauth",onToggle:t=>q(e,"oauth",t)},e))})]}),(F.length>0||L.length>0)&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"Free Tier Providers"}),(0,s.jsxs)("button",{onClick:()=>_("free"),disabled:!!j,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"free"===j?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all Free connections","aria-label":"Test all Free provider connections",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"free"===j?" animate-spin":""}`,children:"play_arrow"}),"free"===j?"Testing...":"Test All"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:[F.map(([e,t])=>(0,s.jsx)(w,{providerId:e,provider:t,stats:$(e,"oauth"),authType:"free",onToggle:t=>q(e,"oauth",t)},e)),L.map(([e,t])=>(0,s.jsx)(C,{providerId:e,provider:t,stats:$(e,"apikey"),authType:"apikey",onToggle:t=>q(e,"apikey",t)},e))]})]}),M.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["API Key Providers"," "]}),(0,s.jsxs)("button",{onClick:()=>_("apikey"),disabled:!!j,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"apikey"===j?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all API Key connections","aria-label":"Test all API Key connections",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"apikey"===j?" animate-spin":""}`,children:"play_arrow"}),"apikey"===j?"Testing...":"Test All"]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:M.map(([e,t])=>(0,s.jsx)(C,{providerId:e,provider:t,stats:$(e,"apikey"),authType:"apikey",onToggle:t=>q(e,"apikey",t)},e))})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["API Key Compatible Providers"," "]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,s.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>v(!0),className:"w-full sm:w-auto",children:"Import cURL"}),(0,s.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>b(!0),className:"w-full sm:w-auto",children:"Add Anthropic Compatible"}),(0,s.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>m(!0),className:"w-full !bg-white !text-black hover:!bg-gray-100 sm:w-auto",children:"Add OpenAI Compatible"})]})]}),0===z.length&&0===K.length?(0,s.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"extension"}),(0,s.jsx)("p",{className:"text-text-muted text-sm",children:"No compatible providers added yet"}),(0,s.jsx)("p",{className:"text-text-muted text-xs mt-1",children:"Use the buttons above to add OpenAI or Anthropic compatible endpoints"})]}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:[...z,...K].map(e=>(0,s.jsx)(C,{providerId:e.id,provider:e,stats:$(e.id,"apikey"),authType:"compatible",onToggle:t=>q(e.id,"apikey",t)},e.id))})]}),(0,s.jsx)(k,{isOpen:p,onClose:()=>m(!1),onCreated:e=>{l(t=>[...t,e]),m(!1)}}),(0,s.jsx)(T,{isOpen:h,onClose:()=>b(!1),onCreated:e=>{l(t=>[...t,e]),b(!1)}}),(0,s.jsx)(y,{isOpen:g,onClose:()=>v(!1),notify:S,onImported:({node:e,connection:a})=>{l(t=>[...t,e]),a&&t(e=>[...e,a]),v(!1)}}),A&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>U(null),children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,s.jsxs)("div",{className:"relative bg-surface border border-border rounded-xl w-full max-w-[600px] max-h-[86vh] sm:max-h-[80vh] overflow-y-auto shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between px-5 py-3 border-b border-border bg-surface/95 backdrop-blur-sm rounded-t-xl",children:[(0,s.jsx)("h3",{className:"font-semibold",children:"Test Results"}),(0,s.jsx)("button",{onClick:()=>U(null),className:"p-1 rounded-lg hover:bg-bg text-text-muted hover:text-text-main transition-colors","aria-label":"Close test results",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,s.jsx)("div",{className:"p-5",children:(0,s.jsx)(I,{results:A})})]})]})]})}function w({providerId:e,provider:t,stats:a,authType:r,onToggle:l}){let{connected:i,error:d,errorCode:c,errorTime:p,allDisabled:x}=a,u=!!t.noAuth;return(0,s.jsx)(m(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,s.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${x?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,s.jsx)(o.A,{src:`/providers/${t.id}.png`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[32px] max-h-[32px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h3",{className:"truncate font-semibold",children:t.name}),(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:x?(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):u?(0,s.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:"Ready"}):(0,s.jsxs)(s.Fragment,{children:[j(i,d,c),p&&(0,s.jsx)("span",{className:"text-text-muted",children:p})]})})]})]}),(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a.total>0&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!x)},children:(0,s.jsx)(n.lM,{size:"sm",checked:!x,onChange:()=>{},title:x?"Enable provider":"Disable provider"})})})]})})})}function C({providerId:e,provider:t,stats:a,authType:r,onToggle:l}){let{connected:i,error:d,errorCode:p,errorTime:x,allDisabled:u}=a,h=e.startsWith(c.JH),f=e.startsWith(c.DI);return(0,s.jsx)(m(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,s.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,s.jsx)(o.A,{src:h?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":f?"/providers/anthropic-m.png":`/providers/${t.id}.png`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h3",{className:"truncate font-semibold",children:t.name}),(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:u?(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):(0,s.jsxs)(s.Fragment,{children:[j(i,d,p),h&&(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),f&&(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:"Messages"}),x&&(0,s.jsx)("span",{className:"text-text-muted",children:x})]})})]})]}),(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a.total>0&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!u)},children:(0,s.jsx)(n.lM,{size:"sm",checked:!u,onChange:()=>{},title:u?"Enable provider":"Disable provider"})})})]})})})}function k({isOpen:e,onClose:t,onCreated:a}){let[l,i]=(0,r.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[o,d]=(0,r.useState)(!1),[c,p]=(0,r.useState)(""),[m,x]=(0,r.useState)(""),[u,h]=(0,r.useState)(!1),[f,b]=(0,r.useState)(null);(0,r.useEffect)(()=>{i(e=>({...e,baseUrl:"https://api.openai.com/v1"}))},[l.apiType]);let g=async()=>{if(l.name.trim()&&l.prefix.trim()&&l.baseUrl.trim()){d(!0);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l.name,prefix:l.prefix,apiType:l.apiType,baseUrl:l.baseUrl,type:"openai-compatible"})}),t=await e.json();e.ok&&(a(t.node),i({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),p(""),b(null))}catch(e){console.log("Error creating OpenAI Compatible node:",e)}finally{d(!1)}}},v=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:l.baseUrl,apiKey:c,type:"openai-compatible",modelId:m.trim()||void 0})}),t=await e.json();t.normalizedBaseUrl&&i(e=>({...e,baseUrl:t.normalizedBaseUrl,apiType:t.inferredApiType||e.apiType})),b(t)}catch{b({valid:!1,error:"Network error"})}finally{h(!1)}};return(0,s.jsx)(n.aF,{isOpen:e,title:"Add OpenAI Compatible",onClose:t,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(n.pd,{label:"Name",value:l.name,onChange:e=>i({...l,name:e.target.value}),placeholder:"OpenAI Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,s.jsx)(n.pd,{label:"Prefix",value:l.prefix,onChange:e=>i({...l,prefix:e.target.value}),placeholder:"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,s.jsx)(n.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:l.apiType,onChange:e=>i({...l,apiType:e.target.value})}),(0,s.jsx)(n.pd,{label:"Base URL",value:l.baseUrl,onChange:e=>i({...l,baseUrl:e.target.value}),placeholder:"https://api.openai.com/v1",hint:"Use the base URL (ending in /v1) for your OpenAI-compatible API."}),(0,s.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:c,onChange:e=>p(e.target.value)}),(0,s.jsx)(n.pd,{label:"Model ID (optional)",value:m,onChange:e=>x(e.target.value),placeholder:"e.g. gpt-4, claude-3-opus",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,s.jsx)(n.$n,{onClick:v,disabled:!c||u||!l.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:u?"Checking...":"Check"}),(()=>{if(!f)return null;let{valid:e,error:t,method:a}=f;return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===a&&(0,s.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,s.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)(n.$n,{onClick:g,fullWidth:!0,disabled:!l.name.trim()||!l.prefix.trim()||!l.baseUrl.trim()||o,children:o?"Creating...":"Create"}),(0,s.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function T({isOpen:e,onClose:t,onCreated:a}){let[l,i]=(0,r.useState)({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),[o,d]=(0,r.useState)(!1),[c,p]=(0,r.useState)(""),[m,x]=(0,r.useState)(""),[u,h]=(0,r.useState)(!1),[f,b]=(0,r.useState)(null);(0,r.useEffect)(()=>{e&&(b(null),p(""),x(""))},[e]);let g=async()=>{if(l.name.trim()&&l.prefix.trim()&&l.baseUrl.trim()){d(!0);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l.name,prefix:l.prefix,baseUrl:l.baseUrl,type:"anthropic-compatible"})}),t=await e.json();e.ok&&(a(t.node),i({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),p(""),b(null))}catch(e){console.log("Error creating Anthropic Compatible node:",e)}finally{d(!1)}}},v=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:l.baseUrl,apiKey:c,type:"anthropic-compatible",modelId:m.trim()||void 0})}),t=await e.json();t.normalizedBaseUrl&&i(e=>({...e,baseUrl:t.normalizedBaseUrl})),b(t)}catch{b({valid:!1,error:"Network error"})}finally{h(!1)}};return(0,s.jsx)(n.aF,{isOpen:e,title:"Add Anthropic Compatible",onClose:t,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(n.pd,{label:"Name",value:l.name,onChange:e=>i({...l,name:e.target.value}),placeholder:"Anthropic Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,s.jsx)(n.pd,{label:"Prefix",value:l.prefix,onChange:e=>i({...l,prefix:e.target.value}),placeholder:"ac-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,s.jsx)(n.pd,{label:"Base URL",value:l.baseUrl,onChange:e=>i({...l,baseUrl:e.target.value}),placeholder:"https://api.anthropic.com/v1",hint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages."}),(0,s.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:c,onChange:e=>p(e.target.value)}),(0,s.jsx)(n.pd,{label:"Model ID (optional)",value:m,onChange:e=>x(e.target.value),placeholder:"e.g. claude-3-opus",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,s.jsx)(n.$n,{onClick:v,disabled:!c||u||!l.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:u?"Checking...":"Check"}),(()=>{if(!f)return null;let{valid:e,error:t,method:a}=f;return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===a&&(0,s.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,s.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)(n.$n,{onClick:g,fullWidth:!0,disabled:!l.name.trim()||!l.prefix.trim()||!l.baseUrl.trim()||o,children:o?"Creating...":"Create"}),(0,s.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function I({results:e}){if(e.error&&!e.results)return(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,s.jsx)("p",{className:"text-sm text-red-400",children:e.error})]});let{summary:t,mode:a}=e,r=e.results||[];return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,s.jsxs)("span",{className:"text-text-muted",children:[{oauth:"OAuth",free:"Free",apikey:"API Key",provider:"Provider",all:"All"}[a]||a," Test"]}),(0,s.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[t.passed," passed"]}),t.failed>0&&(0,s.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[t.failed," failed"]}),(0,s.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),r.map((e,t)=>(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-black/[0.03] px-3 py-2 text-xs dark:bg-white/[0.03] sm:flex-nowrap",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-emerald-500":"text-red-500"}`,children:e.valid?"check_circle":"error"}),(0,s.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,s.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,s.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,s.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[e.latencyMs,"ms"]}),(0,s.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${e.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===r.length&&(0,s.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:"No active connections found for this group."})]})}y.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onImported:i().func,notify:i().shape({success:i().func.isRequired,error:i().func.isRequired}).isRequired},w.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},C.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string,apiType:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},k.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired},T.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired},I.propTypes={results:i().shape({mode:i().string,results:i().array,summary:i().shape({total:i().number,passed:i().number,failed:i().number}),error:i().string}).isRequired}},18255:(e,t,a)=>{Promise.resolve().then(a.bind(a,12572))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=18255)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{31009:(e,t,r)=>{Promise.resolve().then(r.bind(r,84509))},84509:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f});var a=r(95155),s=r(12115),l=r(25086),n=r(57250),i=r(45564);function o(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function c({quotas:e=[],compact:t=!1}){if(!e||0===e.length)return null;let r=t?"py-1 px-1.5":"py-2 px-3",s=t?"text-[11px]":"text-sm",l=t?"text-[11px]":"text-sm",n=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:e.map((e,i)=>{let c=void 0!==e.remainingPercentage?Math.round(e.remainingPercentage):o(e.used,e.total),d=c>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:c>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},u=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0)return"-";let s=Math.ceil(a/6e4);if(s<60)return`${s}m`;let l=Math.floor(s/60),n=s%60;if(l<24)return`${l}h ${n}m`;let i=Math.floor(l/24);return`${i}d ${l%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),m=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(s.getDate()+1);let l="";l=t>=a&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${l}, ${n}`}catch{return null}}(e.resetAt);return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${r} w-[30%]`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:d.emoji}),(0,a.jsx)("span",{className:`${s} font-medium text-text-primary truncate`,children:e.name})]})}),(0,a.jsx)("td",{className:`${r} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${d.bgLight} ${0===c?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${d.bg}`,style:{width:`${Math.min(c,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]}),(0,a.jsxs)("span",{className:`font-medium ${d.text}`,children:[c,"%"]})]})]})}),(0,a.jsx)("td",{className:`${r} w-[25%]`,children:"-"!==u||m?t?(0,a.jsx)("div",{className:`${l} text-text-primary font-medium truncate`,title:m||"",children:"-"!==u?`in ${u}`:m}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==u&&(0,a.jsxs)("div",{className:`${l} text-text-primary font-medium`,children:["in ",u]}),m&&(0,a.jsx)("div",{className:`${n} text-text-muted`,children:m})]}):(0,a.jsx)("div",{className:`${l} text-text-muted italic`,children:"N/A"})})]},i)})})})})}var d=r(98542),u=r(84588),m=r(35497),x=r(52679);let h=e=>x.wb.includes(e.provider)&&("oauth"===e.authType||x.jO.includes(e.provider)),p="quotaAutoRefresh";function b({readOnly:e=!1}){let[t,r]=(0,s.useState)([]),[l,f]=(0,s.useState)({}),[g,y]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),[w,k]=(0,s.useState)(()=>{let e=window.localStorage.getItem(p);return null===e||"true"===e}),[N,$]=(0,s.useState)(null),[C,S]=(0,s.useState)(!1),[E,A]=(0,s.useState)(60),[q,T]=(0,s.useState)(!0),[P,D]=(0,s.useState)(null),[L,O]=(0,s.useState)(null),[_,I]=(0,s.useState)(!1),[z,F]=(0,s.useState)(null),[M,U]=(0,s.useState)([]),[R,Q]=(0,s.useState)("all"),[K,J]=(0,s.useState)(!1),[G,H]=(0,s.useState)(!1),[Y,B]=(0,s.useState)(!1),V=(0,s.useRef)(null),W=(0,s.useRef)(null),X=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/providers/client");if(!e.ok)throw Error("Failed to fetch connections");let t=(await e.json()).connections||[];return r(t),t}catch(e){return console.error("Error fetching connections:",e),r([]),[]}},[]),Z=(0,s.useCallback)(async(e,t)=>{y(t=>({...t,[e]:!0})),v(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=await fetch(`/api/usage/${e}`);if(!r.ok){let a=(await r.json().catch(()=>({}))).error||r.statusText;if(404===r.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===r.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,a),f(t=>({...t,[e]:{quotas:[],message:a}}));return}throw Error(`HTTP ${r.status}: ${a}`)}let a=await r.json();console.log(`[ProviderLimits] Got quota for ${t}:`,a);let s=function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,i.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,s=r.modelKey||r.name;return(e.get(a)??999)-(e.get(s)??999)})}return r}(t,a);f(t=>({...t,[e]:{quotas:s,plan:a.plan||null,message:a.message||null,raw:a}}))}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),v(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{y(t=>({...t,[e]:!1}))}},[]),ee=(0,s.useCallback)(async(e,t)=>{await Z(e,t),$(new Date)},[Z]),et=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){D(e);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&(r(t=>t.filter(t=>t.id!==e)),f(t=>{let r={...t};return delete r[e],r}),y(t=>{let r={...t};return delete r[e],r}),v(t=>{let r={...t};return delete r[e],r}))}catch(e){console.error("Error deleting connection:",e)}finally{D(null)}}},[]),er=(0,s.useCallback)(async(e,t)=>{O(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(r=>r.map(r=>r.id===e?{...r,isActive:t}:r))}catch(e){console.error("Error updating connection status:",e)}finally{O(null)}},[]),ea=(0,s.useCallback)(async e=>{if(!z?.id)return;let t=z.id,r=z.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await X(),I(!1),F(null),x.wb.includes(r)&&await Z(t,r))}catch(e){console.error("Error saving connection:",e)}},[z,X,Z]);(0,s.useEffect)(()=>{if(e)return;let t=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(e=>{!t&&e?.proxyPools&&U(e.proxyPools)}).catch(()=>{}),()=>{t=!0}},[e]);let es=(0,s.useCallback)(async()=>{if(!C){S(!0),A(60);try{let e=(await X()).filter(h);await Promise.all(e.map(e=>Z(e.id,e.provider))),$(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{S(!1)}}},[C,X,Z]);(0,s.useEffect)(()=>{(async()=>{T(!0);let e=await X();T(!1);let t=e.filter(h),r={};t.forEach(e=>{r[e.id]=!0}),y(r),await Promise.all(t.map(e=>Z(e.id,e.provider))),$(new Date)})()},[]),(0,s.useEffect)(()=>{window.localStorage.setItem(p,String(w))},[w]),(0,s.useEffect)(()=>{if(!w){V.current&&(clearInterval(V.current),V.current=null),W.current&&(clearInterval(W.current),W.current=null);return}return V.current=setInterval(()=>{es()},6e4),W.current=setInterval(()=>{A(e=>e<=1?60:e-1)},1e3),()=>{V.current&&clearInterval(V.current),W.current&&clearInterval(W.current)}},[w,es]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(V.current&&(clearInterval(V.current),V.current=null),W.current&&(clearInterval(W.current),W.current=null)):w&&(V.current=setInterval(es,6e4),W.current=setInterval(()=>{A(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[w,es]);let el=t.filter(h),en=el.filter(e=>"all"===R||e.provider===R),ei=e=>{let t=(l[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return t.length>0?Math.min(...t):1/0},eo=[...en].sort((e,t)=>{if(K){let r=ei(e)-ei(t);if(0!==r)return r}let r=x.wb.indexOf(e.provider),a=x.wb.indexOf(t.provider);return r!==a?r-a:e.provider.localeCompare(t.provider)}),ec=e=>{let t=l[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=o(e.used,e.total))},ed=(0,s.useCallback)(async(e,t)=>{if(e.length&&!Y){B(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),r(r=>r.map(r=>e.includes(r.id)?{...r,isActive:t}:r))}catch(e){console.error("Error bulk toggling connections:",e)}finally{B(!1)}}},[Y]),eu=Array.from(new Set(el.map(e=>e.provider))).sort(),em="all"===R?"All providers":R;return(eo.length,Object.values(l).filter(e=>e?.quotas?.length>0).length,Object.values(l).reduce((e,t)=>t?.quotas?e+ +!!t.quotas.some(e=>30>o(e.used,e.total)&&e.total>0):e,0),q||0!==eo.length)?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-3",children:(0,a.jsx)("h2",{className:"text-xl font-semibold text-text-primary",children:"Provider Limits"})}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>H(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":G,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===R?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(n.A,{src:`/providers/${R}.png`,alt:R,size:18,className:"size-[18px] rounded object-contain",fallbackText:R.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:em})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),G&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>H(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-black/10 bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{Q("all"),H(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===R?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===R&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:eu.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{Q(e),H(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${R===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)(n.A,{src:`/providers/${e}.png`,alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e}),R===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>J(e=>!e),className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${K?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),!e&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{ed(eo.filter(e=>(e.isActive??!0)&&ec(e)).map(e=>e.id),!1)},disabled:Y,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota (within current filter)",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{ed(eo.filter(e=>!(e.isActive??!0)&&!ec(e)).map(e=>e.id),!0)},disabled:Y,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota (within current filter)",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]})]}),(0,a.jsxs)("button",{onClick:()=>k(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:w?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${w?"text-primary":"text-text-muted"}`,children:w?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),w&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",E,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:es,disabled:C,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${C?"animate-spin":""}`,children:"refresh"})})]})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:eo.map(t=>{let r,s,i=l[t.id],o=g[t.id],m=j[t.id],x=!1===t.isActive,h=P===t.id||L===t.id;return(0,a.jsxs)(u.default,{padding:"none",className:`min-w-0 ${x?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(n.A,{src:`/providers/${t.provider}.png`,alt:t.provider,size:32,className:"object-contain",fallbackText:t.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:t.provider}),(s=(r=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))(t.email)?t.email:(r(t.name),t.name))?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:s}):null]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,a.jsx)("button",{type:"button",onClick:()=>ee(t.id,t.provider),disabled:o||h,className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",title:"Refresh quota",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${o?"animate-spin":""}`,children:"refresh"})}),!e&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",onClick:()=>{F(t),I(!0)},disabled:h,className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",title:"Edit connection",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,a.jsx)("button",{type:"button",onClick:()=>et(t.id),disabled:h,className:"p-1.5 rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",title:"Delete connection",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${P===t.id?"animate-pulse":""}`,children:"delete"})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:t.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(d.default,{size:"sm",checked:t.isActive??!0,disabled:h,onChange:e=>er(t.id,e)})})]})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:o?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):m?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:m})]}):i?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:i.message})}):(0,a.jsx)(c,{quotas:i?.quotas,compact:!0})})]},t.id)})}),!e&&(0,a.jsx)(m.wI,{isOpen:_,connection:z,proxyPools:M,onSave:ea,onClose:()=>{I(!1),F(null)}})]}):(0,a.jsx)(u.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}function f(){return(0,a.jsx)(s.Suspense,{fallback:(0,a.jsx)(l.CardSkeleton,{}),children:(0,a.jsx)(g,{})})}function g(){let[e,t]=(0,s.useState)({loading:!0,role:null,showQuotaTracker:!0});return((0,s.useEffect)(()=>{let e=!1;return fetch("/api/auth/me",{cache:"no-store"}).then(e=>e.json()).then(r=>{if(!e){if("sub_user"===r.role&&!1===r.showQuotaTracker){window.location.href="/dashboard/user";return}t({loading:!1,role:r.role||null,showQuotaTracker:!1!==r.showQuotaTracker})}}).catch(()=>{e||t({loading:!1,role:null,showQuotaTracker:!0})}),()=>{e=!0}},[]),e.loading)?(0,a.jsx)(l.CardSkeleton,{}):(0,a.jsx)(b,{readOnly:"sub_user"===e.role})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=31009)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6589],{21692:(e,t,s)=>{Promise.resolve().then(s.bind(s,50433))},50433:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),r=s(12115),n=s(98500),i=s.n(n),l=s(35497),o=s(14051),c=s.n(o);function d({model:e,fullModel:t,copied:s,onCopy:n,testStatus:i,onTest:l,isTesting:o,requestSnippet:c,onRunRequest:x}){let[m,p]=(0,r.useState)(!1),[u,h]=(0,r.useState)(!1),[f,y]=(0,r.useState)(""),[b,j]=(0,r.useState)(null),[g,N]=(0,r.useState)(null),v="ok"===i?"#22c55e":"error"===i?"#ef4444":void 0,w=async()=>{if(x&&!u){h(!0);try{let e=await x();y(e?.responseText||""),j(e?.ok===!0),N("number"==typeof e?.latencyMs?e.latencyMs:null)}catch(e){y(e?.message||"Request failed"),j(!1),N(null)}finally{h(!1)}}};return(0,a.jsxs)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===i?"border-green-500/40":"error"===i?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:v?{color:v}:void 0,children:"ok"===i?"check_circle":"error"===i?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded break-all",children:t}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),l&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:l,disabled:o,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${o?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]}),c&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>p(e=>!e),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity opacity-0 group-hover:opacity-100",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:m?"expand_less":"terminal"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:m?"Hide curl":"Show curl"})]}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>n(t,`model-${t}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${t}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${t}`?"Copied!":"Copy"})]})]}),c&&m&&(0,a.jsxs)("div",{className:"mt-3 pl-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-[10px] font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{onClick:()=>n(c,`request-${t}`),className:"flex items-center gap-1 text-[10px] text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:s===`request-${t}`?"check":"content_copy"}),s===`request-${t}`?"Copied":"Copy"]}),x&&(0,a.jsxs)("button",{onClick:w,disabled:u,className:"flex items-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-[10px] font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:u?{animation:"spin 1s linear infinite"}:void 0,children:u?"progress_activity":"play_arrow"}),u?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-[11px] font-mono text-text-main overflow-x-auto whitespace-pre wrap-break-word",children:c}),(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-[10px] font-semibold text-text-muted uppercase tracking-wider",children:["Response ",null!==g&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",g,"ms"]})]}),f&&(0,a.jsxs)("button",{onClick:()=>n(f,`response-${t}`),className:"flex items-center gap-1 text-[10px] text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:s===`response-${t}`?"check":"content_copy"}),s===`response-${t}`?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:`bg-sidebar rounded-lg px-3 py-2.5 text-[11px] font-mono overflow-x-auto whitespace-pre wrap-break-word ${!1===b?"text-red-400":"text-text-main"} opacity-80`,children:f||'{\n "message": "Response will appear here after running."\n}'})]})]})]})}d.propTypes={model:c().shape({id:c().string.isRequired,name:c().string}).isRequired,fullModel:c().string.isRequired,copied:c().string,onCopy:c().func.isRequired,testStatus:c().oneOf(["ok","error"]),onTest:c().func,isTesting:c().bool,requestSnippet:c().string,onRunRequest:c().func};var x=s(59877),m=s(11059),p=s(52679),u=s(28777);function h(e){return{model:e,stream:!1,messages:[{role:"user",content:"Hello, please introduce yourself briefly."}]}}function f(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}async function y(e){let t=await e.text();try{return f(JSON.parse(t))}catch{return t||`HTTP ${e.status}`}}function b(){let[e,t]=(0,r.useState)(null),[s,n]=(0,r.useState)([]),[i,o]=(0,r.useState)({totalRequests:0,totalPromptTokens:0,totalCompletionTokens:0,totalCost:0}),[c,b]=(0,r.useState)([]),[g,N]=(0,r.useState)([]),[v,w]=(0,r.useState)([]),[k,S]=(0,r.useState)({}),[C,T]=(0,r.useState)(""),[_,M]=(0,r.useState)(null),[A,R]=(0,r.useState)("http://localhost:20128"),[$,q]=(0,r.useState)(!0),{copied:E,copy:O}=(0,m.C)();if((0,r.useEffect)(()=>{Promise.all([fetch("/api/auth/me").then(e=>e.json()),fetch("/api/keys").then(e=>e.json()),fetch("/api/usage/stats?period=7d").then(e=>e.json()).catch(()=>({totalRequests:0,totalPromptTokens:0,totalCompletionTokens:0,totalCost:0})),fetch("/api/providers").then(e=>e.json()).catch(()=>({connections:[]})),fetch("/api/v1/models").then(e=>e.json()).catch(()=>({data:[]}))]).then(([e,s,a,r,i])=>{if("sub_user"!==e.role){window.location.href="super_admin"===e.role?"/dashboard":"/login";return}t(e),w(e.allowedProviders||[]),n(s.keys||[]),o(a),b((r.connections||[]).filter(e=>!1!==e.isActive)),N((i.data||[]).filter(e=>e?.id&&"string"==typeof e.id))}).catch(()=>{window.location.href="/login"}).finally(()=>{q(!1)})},[]),(0,r.useEffect)(()=>{window.location?.origin&&R(window.location.origin)},[]),$)return(0,a.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,a.jsx)("p",{className:"text-text-muted",children:"Loading..."})});let P=s.filter(t=>t.userId===e?.userId),I=P.find(e=>!1!==e.isActive)?.key||"",D=v.map(e=>{var t;let s,a=p.Q2[e]||{},r=a.alias||e,n=c.find(t=>t.provider===e);return{providerId:e,providerName:a.name||n?.name||e,models:(t=g.filter(e=>e.id.startsWith(`${r}/`)).map(e=>({id:e.root||e.id.slice(r.length+1),fullModel:e.id,name:e.root||e.id.slice(r.length+1)})),s=new Map((0,u.KC)(e).map(e=>e.id).map((e,t)=>[e,t])),[...t].sort((e,t)=>{let a=s.has(e.id)?s.get(e.id):Number.MAX_SAFE_INTEGER,r=s.has(t.id)?s.get(t.id):Number.MAX_SAFE_INTEGER;return a!==r?a-r:e.id.localeCompare(t.id,"en",{numeric:!0})}))}}).filter(e=>e.models.length>0),H=async e=>{if(!_){M(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e})}),s=await t.json();S(t=>({...t,[e]:s.ok?"ok":"error"})),T(s.ok?"":s.error||"Model not reachable")}catch{S(t=>({...t,[e]:"error"})),T("Network error")}finally{M(null)}}},J=async e=>{if(!I)return{ok:!1,responseText:f({error:"No active API key assigned to this sub-user."}),latencyMs:0};let t=Date.now(),s=await fetch("/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${I}`},body:JSON.stringify(h(e))});return{ok:s.ok,responseText:await y(s),latencyMs:Date.now()-t}};return(0,a.jsxs)("div",{className:"flex flex-col gap-6 max-w-4xl",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold",children:e?.displayName||e?.username||"Welcome"}),(0,a.jsxs)("p",{className:"text-sm text-text-muted mt-1",children:["Sub-user account \xb7 @",e?.username]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold uppercase text-text-muted mb-3",children:"Usage (Last 7 Days)"}),(0,a.jsx)(x.A,{stats:i})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold uppercase text-text-muted mb-3",children:"My API Keys"}),0===P.length?(0,a.jsxs)(l.Zp,{className:"p-6 text-center",children:[(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"No API keys assigned yet."}),(0,a.jsx)("p",{className:"text-text-muted text-xs mt-1",children:"Contact your administrator to get a key assigned."})]}):(0,a.jsx)("div",{className:"flex flex-col gap-3",children:P.map(e=>(0,a.jsxs)(l.Zp,{className:"p-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-9 h-9 rounded-lg bg-surface-alt flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"key"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-sm",children:e.name}),(0,a.jsxs)("p",{className:"font-mono text-xs text-text-muted",children:[e.key.slice(0,8),".......",e.key.slice(-4)]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[!1===e.isActive&&(0,a.jsx)(l.Ex,{variant:"error",size:"sm",children:"Inactive"}),e.assignedAt&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Assigned ",new Date(e.assignedAt).toLocaleDateString()]})]})]},e.id))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold uppercase text-text-muted mb-3",children:"Available Models"}),!!C&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:C}),0===D.length?(0,a.jsxs)(l.Zp,{className:"p-6 text-center",children:[(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"No models available for the providers currently enabled for this sub-user."}),(0,a.jsx)("p",{className:"text-text-muted text-xs mt-1",children:"Ask your administrator to enable one or more providers in User Management."})]}):(0,a.jsx)("div",{className:"flex flex-col gap-3",children:D.map(e=>(0,a.jsxs)(l.Zp,{className:"p-4 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)("p",{className:"font-semibold text-sm",children:e.providerName}),(0,a.jsxs)(l.Ex,{variant:"secondary",size:"sm",children:[e.models.length," models"]})]}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:e.models.map(e=>{let t;return(0,a.jsx)(d,{model:e,fullModel:e.fullModel,copied:E,onCopy:O,testStatus:k[e.fullModel],onTest:()=>H(e.fullModel),isTesting:_===e.fullModel,requestSnippet:(t={...h(e.fullModel)},`curl -X POST ${A}/v1/chat/completions \\
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6589],{21692:(e,t,s)=>{Promise.resolve().then(s.bind(s,50433))},50433:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),r=s(12115),i=s(98500),n=s.n(i),l=s(35497),o=s(14051),c=s.n(o);function d({model:e,fullModel:t,copied:s,onCopy:i,testStatus:n,onTest:l,isTesting:o,requestSnippet:c,onRunRequest:x}){let[m,p]=(0,r.useState)(!1),[u,h]=(0,r.useState)(!1),[f,y]=(0,r.useState)(""),[b,j]=(0,r.useState)(null),[g,N]=(0,r.useState)(null),v="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0,w=async()=>{if(x&&!u){h(!0);try{let e=await x();y(e?.responseText||""),j(e?.ok===!0),N("number"==typeof e?.latencyMs?e.latencyMs:null)}catch(e){y(e?.message||"Request failed"),j(!1),N(null)}finally{h(!1)}}};return(0,a.jsxs)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:v?{color:v}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded break-all",children:t}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),l&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:l,disabled:o,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${o?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]}),c&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>p(e=>!e),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity opacity-0 group-hover:opacity-100",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:m?"expand_less":"terminal"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:m?"Hide curl":"Show curl"})]}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${t}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${t}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${t}`?"Copied!":"Copy"})]})]}),c&&m&&(0,a.jsxs)("div",{className:"mt-3 pl-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-[10px] font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{onClick:()=>i(c,`request-${t}`),className:"flex items-center gap-1 text-[10px] text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:s===`request-${t}`?"check":"content_copy"}),s===`request-${t}`?"Copied":"Copy"]}),x&&(0,a.jsxs)("button",{onClick:w,disabled:u,className:"flex items-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-[10px] font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:u?{animation:"spin 1s linear infinite"}:void 0,children:u?"progress_activity":"play_arrow"}),u?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-[11px] font-mono text-text-main overflow-x-auto whitespace-pre wrap-break-word",children:c}),(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-[10px] font-semibold text-text-muted uppercase tracking-wider",children:["Response ",null!==g&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",g,"ms"]})]}),f&&(0,a.jsxs)("button",{onClick:()=>i(f,`response-${t}`),className:"flex items-center gap-1 text-[10px] text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:s===`response-${t}`?"check":"content_copy"}),s===`response-${t}`?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:`bg-sidebar rounded-lg px-3 py-2.5 text-[11px] font-mono overflow-x-auto whitespace-pre wrap-break-word ${!1===b?"text-red-400":"text-text-main"} opacity-80`,children:f||'{\n "message": "Response will appear here after running."\n}'})]})]})]})}d.propTypes={model:c().shape({id:c().string.isRequired,name:c().string}).isRequired,fullModel:c().string.isRequired,copied:c().string,onCopy:c().func.isRequired,testStatus:c().oneOf(["ok","error"]),onTest:c().func,isTesting:c().bool,requestSnippet:c().string,onRunRequest:c().func};var x=s(59877),m=s(11059),p=s(52679),u=s(28777);function h(e){return{model:e,stream:!1,messages:[{role:"user",content:"Hello, please introduce yourself briefly."}]}}function f(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}async function y(e){let t=await e.text();try{return f(JSON.parse(t))}catch{return t||`HTTP ${e.status}`}}function b(){let[e,t]=(0,r.useState)(null),[s,i]=(0,r.useState)([]),[n,o]=(0,r.useState)({totalRequests:0,totalPromptTokens:0,totalCompletionTokens:0,totalCost:0}),[c,b]=(0,r.useState)([]),[g,N]=(0,r.useState)([]),[v,w]=(0,r.useState)([]),[k,S]=(0,r.useState)({}),[C,T]=(0,r.useState)(""),[_,M]=(0,r.useState)(null),[A,R]=(0,r.useState)("http://localhost:20128"),[q,$]=(0,r.useState)(!0),{copied:E,copy:O}=(0,m.C)();if((0,r.useEffect)(()=>{Promise.all([fetch("/api/auth/me").then(e=>e.json()),fetch("/api/keys").then(e=>e.json()),fetch("/api/usage/stats?period=7d").then(e=>e.json()).catch(()=>({totalRequests:0,totalPromptTokens:0,totalCompletionTokens:0,totalCost:0})),fetch("/api/providers").then(e=>e.json()).catch(()=>({connections:[]})),fetch("/api/v1/models").then(e=>e.json()).catch(()=>({data:[]}))]).then(([e,s,a,r,n])=>{if("sub_user"!==e.role){window.location.href="super_admin"===e.role?"/dashboard":"/login";return}t(e),w(e.allowedProviders||[]),i(s.keys||[]),o(a),b((r.connections||[]).filter(e=>!1!==e.isActive)),N((n.data||[]).filter(e=>e?.id&&"string"==typeof e.id))}).catch(()=>{window.location.href="/login"}).finally(()=>{$(!1)})},[]),(0,r.useEffect)(()=>{window.location?.origin&&R(window.location.origin)},[]),q)return(0,a.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,a.jsx)("p",{className:"text-text-muted",children:"Loading..."})});let P=s.filter(t=>t.userId===e?.userId),I=P.find(e=>!1!==e.isActive)?.key||"",D=e?.showQuotaTracker!==!1&&c.some(e=>p.wb.includes(e.provider)&&("oauth"===e.authType||p.jO.includes(e.provider))),H=v.map(e=>{var t;let s,a=p.Q2[e]||{},r=a.alias||e,i=c.find(t=>t.provider===e);return{providerId:e,providerName:a.name||i?.name||e,models:(t=g.filter(e=>e.id.startsWith(`${r}/`)).map(e=>({id:e.root||e.id.slice(r.length+1),fullModel:e.id,name:e.root||e.id.slice(r.length+1)})),s=new Map((0,u.KC)(e).map(e=>e.id).map((e,t)=>[e,t])),[...t].sort((e,t)=>{let a=s.has(e.id)?s.get(e.id):Number.MAX_SAFE_INTEGER,r=s.has(t.id)?s.get(t.id):Number.MAX_SAFE_INTEGER;return a!==r?a-r:e.id.localeCompare(t.id,"en",{numeric:!0})}))}}).filter(e=>e.models.length>0),J=async e=>{if(!_){M(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e})}),s=await t.json();S(t=>({...t,[e]:s.ok?"ok":"error"})),T(s.ok?"":s.error||"Model not reachable")}catch{S(t=>({...t,[e]:"error"})),T("Network error")}finally{M(null)}}},Z=async e=>{if(!I)return{ok:!1,responseText:f({error:"No active API key assigned to this sub-user."}),latencyMs:0};let t=Date.now(),s=await fetch("/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${I}`},body:JSON.stringify(h(e))});return{ok:s.ok,responseText:await y(s),latencyMs:Date.now()-t}};return(0,a.jsxs)("div",{className:"flex flex-col gap-6 max-w-4xl",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold",children:e?.displayName||e?.username||"Welcome"}),(0,a.jsxs)("p",{className:"text-sm text-text-muted mt-1",children:["Sub-user account \xb7 @",e?.username]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold uppercase text-text-muted mb-3",children:"Usage (Last 7 Days)"}),(0,a.jsx)(x.A,{stats:n})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold uppercase text-text-muted mb-3",children:"My API Keys"}),0===P.length?(0,a.jsxs)(l.Zp,{className:"p-6 text-center",children:[(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"No API keys assigned yet."}),(0,a.jsx)("p",{className:"text-text-muted text-xs mt-1",children:"Contact your administrator to get a key assigned."})]}):(0,a.jsx)("div",{className:"flex flex-col gap-3",children:P.map(e=>(0,a.jsxs)(l.Zp,{className:"p-4 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-9 h-9 rounded-lg bg-surface-alt flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"key"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-sm",children:e.name}),(0,a.jsxs)("p",{className:"font-mono text-xs text-text-muted",children:[e.key.slice(0,8),".......",e.key.slice(-4)]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[!1===e.isActive&&(0,a.jsx)(l.Ex,{variant:"error",size:"sm",children:"Inactive"}),e.assignedAt&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Assigned ",new Date(e.assignedAt).toLocaleDateString()]})]})]},e.id))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold uppercase text-text-muted mb-3",children:"Available Models"}),!!C&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:C}),0===H.length?(0,a.jsxs)(l.Zp,{className:"p-6 text-center",children:[(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"No models available for the providers currently enabled for this sub-user."}),(0,a.jsx)("p",{className:"text-text-muted text-xs mt-1",children:"Ask your administrator to enable one or more providers in User Management."})]}):(0,a.jsx)("div",{className:"flex flex-col gap-3",children:H.map(e=>(0,a.jsxs)(l.Zp,{className:"p-4 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)("p",{className:"font-semibold text-sm",children:e.providerName}),(0,a.jsxs)(l.Ex,{variant:"secondary",size:"sm",children:[e.models.length," models"]})]}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:e.models.map(e=>{let t;return(0,a.jsx)(d,{model:e,fullModel:e.fullModel,copied:E,onCopy:O,testStatus:k[e.fullModel],onTest:()=>J(e.fullModel),isTesting:_===e.fullModel,requestSnippet:(t={...h(e.fullModel)},`curl -X POST ${A}/v1/chat/completions \\
2
2
  -H "Content-Type: application/json" \\
3
3
  -H "Authorization: Bearer ${I||"YOUR_KEY"}" \\
4
- -d '${JSON.stringify(t)}'`),onRunRequest:()=>J(e.fullModel)},e.fullModel)})})]},e.providerId))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold uppercase text-text-muted mb-3",children:"Quick Access"}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3",children:(0,a.jsx)(j,{href:"/dashboard/usage",icon:"analytics",label:"Usage & Logs",desc:"View your request history"})})]})]})}function j({href:e,icon:t,label:s,desc:r}){return(0,a.jsx)(i(),{href:e,children:(0,a.jsxs)(l.Zp,{className:"p-4 flex items-center gap-3 hover:border-primary transition-colors cursor-pointer",children:[(0,a.jsx)("div",{className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:t})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-sm",children:s}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:r})]})]})})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=21692)),_N_E=e.O()}]);
4
+ -d '${JSON.stringify(t)}'`),onRunRequest:()=>Z(e.fullModel)},e.fullModel)})})]},e.providerId))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold uppercase text-text-muted mb-3",children:"Quick Access"}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,a.jsx)(j,{href:"/dashboard/usage",icon:"analytics",label:"Usage & Logs",desc:"View your request history"}),D&&(0,a.jsx)(j,{href:"/dashboard/quota",icon:"data_usage",label:"Quota Tracker",desc:"View quota for your allowed providers"})]})]})]})}function j({href:e,icon:t,label:s,desc:r}){return(0,a.jsx)(n(),{href:e,children:(0,a.jsxs)(l.Zp,{className:"p-4 flex items-center gap-3 hover:border-primary transition-colors cursor-pointer",children:[(0,a.jsx)("div",{className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:t})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-sm",children:s}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:r})]})]})})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=21692)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9305],{6134:(e,s,n)=>{Promise.resolve().then(n.bind(n,96748)),Promise.resolve().then(n.bind(n,98572)),Promise.resolve().then(n.bind(n,56319)),Promise.resolve().then(n.bind(n,56061)),Promise.resolve().then(n.bind(n,92542)),Promise.resolve().then(n.bind(n,84588)),Promise.resolve().then(n.bind(n,40197)),Promise.resolve().then(n.bind(n,45455)),Promise.resolve().then(n.bind(n,30815)),Promise.resolve().then(n.bind(n,73579)),Promise.resolve().then(n.bind(n,92173)),Promise.resolve().then(n.bind(n,95088)),Promise.resolve().then(n.bind(n,74891)),Promise.resolve().then(n.bind(n,80752)),Promise.resolve().then(n.bind(n,23936)),Promise.resolve().then(n.bind(n,11910)),Promise.resolve().then(n.bind(n,61500)),Promise.resolve().then(n.bind(n,62899)),Promise.resolve().then(n.bind(n,94230)),Promise.resolve().then(n.bind(n,21931)),Promise.resolve().then(n.bind(n,91450)),Promise.resolve().then(n.bind(n,7648)),Promise.resolve().then(n.bind(n,25086)),Promise.resolve().then(n.bind(n,28815)),Promise.resolve().then(n.bind(n,81127)),Promise.resolve().then(n.bind(n,72908)),Promise.resolve().then(n.bind(n,36548)),Promise.resolve().then(n.bind(n,4823)),Promise.resolve().then(n.bind(n,90882)),Promise.resolve().then(n.bind(n,51825)),Promise.resolve().then(n.bind(n,23615)),Promise.resolve().then(n.bind(n,28067)),Promise.resolve().then(n.bind(n,98)),Promise.resolve().then(n.bind(n,92622)),Promise.resolve().then(n.bind(n,21110)),Promise.resolve().then(n.bind(n,38587)),Promise.resolve().then(n.bind(n,98542)),Promise.resolve().then(n.bind(n,97677)),Promise.resolve().then(n.bind(n,23132)),Promise.resolve().then(n.bind(n,95892))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=6134)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,318,335,387,501,543,552,675,747,748,907,931,992,997,1070,1088,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1910,1946,1949,2121,2198,2284,2296,2525,2772,2785,2797,2919,2922,3025,3038,3079,3102,3397,3472,3507,3528,3549,3562,3568,3883,3888,4010,4245,4286,4422,4444,4656,4896,4993,5018,5079,5107,5177,5211,5226,5377,5466,5685,5745,5922,6100,6107,6268,6319,6479,6529,6580,6594,6619,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7442,7445,7508,7520,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8673,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);