zevairouter 1.0.145 → 1.0.147

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 (338) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +9 -9
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  33. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  34. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  35. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  36. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  37. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  38. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  39. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  40. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  41. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  42. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  43. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  44. package/cli/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  45. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  46. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  47. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  48. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  49. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  50. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  51. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  53. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  54. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  55. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  56. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  57. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  58. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  59. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  61. package/cli/app/.next-cli-build/server/app/callback.rsc +4 -4
  62. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  63. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  64. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  65. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  66. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  67. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  68. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  69. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +6 -6
  70. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  71. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  72. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  73. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  74. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +6 -6
  75. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  76. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +4 -4
  77. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +2 -2
  78. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  79. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  80. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  81. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  82. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  83. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  84. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  85. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  86. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  87. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  88. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  89. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  90. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  91. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  92. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  93. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  94. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  95. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  96. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  97. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  98. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  99. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  100. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  101. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  102. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  103. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  104. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  105. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  106. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  107. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  108. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  109. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +6 -6
  110. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  111. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  112. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  113. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  114. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +6 -6
  115. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  116. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +4 -4
  117. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +2 -2
  118. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  119. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  120. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  121. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  122. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  123. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  124. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  125. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  126. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  127. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  128. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  129. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  130. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  131. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  132. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  133. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  134. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  135. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  136. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  137. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  138. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  139. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  140. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  141. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  142. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  143. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  144. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  145. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  146. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  147. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  148. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  149. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  150. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +6 -6
  151. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  152. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
  153. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  154. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  155. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +6 -6
  156. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
  157. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +4 -4
  158. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +2 -2
  159. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  160. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  161. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  162. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  163. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  164. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  165. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  166. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  167. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  168. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  169. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  170. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  171. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  172. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  173. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  174. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  175. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  176. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  177. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  178. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  179. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  180. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  181. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  182. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  183. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  184. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  185. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  186. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  187. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  188. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  189. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  190. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  191. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  192. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  193. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  194. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  195. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  196. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  197. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  198. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  199. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  200. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  201. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  202. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  203. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  204. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  205. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  206. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  207. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  208. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  209. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  210. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  211. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  212. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  213. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  214. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  215. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  216. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  217. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  218. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  219. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  220. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  221. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  222. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  223. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  224. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  225. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  226. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  227. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  228. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  229. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  230. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  231. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  232. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  233. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  234. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  235. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  236. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  237. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  238. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  239. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  240. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  241. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  242. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  243. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  244. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  245. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  246. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  247. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  248. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  249. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  250. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  251. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  252. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  253. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  254. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  255. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  256. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  257. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  258. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  259. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  260. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  261. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  262. package/cli/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  263. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  264. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  265. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  266. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  267. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  268. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  269. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  270. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  271. package/cli/app/.next-cli-build/server/app/index.rsc +4 -4
  272. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  273. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  274. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  275. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  276. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  277. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  278. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  279. package/cli/app/.next-cli-build/server/app/landing.rsc +5 -5
  280. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  281. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  282. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  283. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  284. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  285. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  286. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  287. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  288. package/cli/app/.next-cli-build/server/app/login.rsc +5 -5
  289. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  290. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  291. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  292. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  293. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  294. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  295. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  296. package/cli/app/.next-cli-build/server/app-paths-manifest.json +9 -9
  297. package/cli/app/.next-cli-build/server/chunks/3155.js +1 -1
  298. package/cli/app/.next-cli-build/server/chunks/412.js +2 -2
  299. package/cli/app/.next-cli-build/server/chunks/4746.js +1 -1
  300. package/cli/app/.next-cli-build/server/chunks/5307.js +1 -1
  301. package/cli/app/.next-cli-build/server/chunks/5469.js +1 -1
  302. package/cli/app/.next-cli-build/server/chunks/8242.js +2 -2
  303. package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
  304. package/cli/app/.next-cli-build/server/chunks/9621.js +1 -1
  305. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  306. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  307. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  308. package/cli/app/.next-cli-build/static/chunks/523-176a0660a9383518.js +3 -0
  309. package/cli/app/.next-cli-build/static/chunks/5497-8d0ec2995dc0a392.js +7 -0
  310. package/cli/app/.next-cli-build/static/chunks/{620-b21eb963d0189283.js → 620-375754e53341e85b.js} +1 -1
  311. package/cli/app/.next-cli-build/static/chunks/9126-7d5476f17beddfb0.js +1 -0
  312. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-2468e6ba8d1efeec.js +1 -0
  313. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-579bf915396efc69.js +1 -0
  314. package/cli/app/.next-cli-build/static/css/87ffa46afc2273f4.css +1 -0
  315. package/cli/app/CHANGELOG.md +17 -0
  316. package/cli/app/package.json +1 -1
  317. package/cli/package.json +1 -1
  318. package/package.json +1 -1
  319. package/src/app/(dashboard)/dashboard/basic-chat/BasicChatPageClient.js +91 -38
  320. package/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js +45 -38
  321. package/src/app/(dashboard)/dashboard/providers/page.js +199 -173
  322. package/src/app/(dashboard)/dashboard/usage/components/OverviewCards.js +11 -17
  323. package/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/QuotaTable.js +15 -9
  324. package/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/index.js +188 -120
  325. package/src/app/(dashboard)/dashboard/usage/components/ProviderTopology.js +149 -24
  326. package/src/shared/components/Header.js +4 -4
  327. package/src/shared/components/HeaderLanguage.js +2 -1
  328. package/src/shared/components/HeaderMenu.js +2 -1
  329. package/src/shared/components/Toggle.js +28 -12
  330. package/src/shared/components/UsageStats.js +3 -3
  331. package/cli/app/.next-cli-build/static/chunks/523-078802482e95c757.js +0 -3
  332. package/cli/app/.next-cli-build/static/chunks/5497-276ef7bcaaa911b7.js +0 -7
  333. package/cli/app/.next-cli-build/static/chunks/9126-9e1755f122b943cd.js +0 -1
  334. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-2cedde97aaf3c729.js +0 -1
  335. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-6050ac2547c62b54.js +0 -1
  336. package/cli/app/.next-cli-build/static/css/b912482d9fc0b2ed.css +0 -1
  337. /package/cli/app/.next-cli-build/static/{x2eyEbk18Mgl67fqRmEFx → y-U4C09T7DItXT7CZZV41}/_buildManifest.js +0 -0
  338. /package/cli/app/.next-cli-build/static/{x2eyEbk18Mgl67fqRmEFx → y-U4C09T7DItXT7CZZV41}/_ssgManifest.js +0 -0
@@ -1,2 +1,2 @@
1
1
  (()=>{var a={};a.id=8460,a.ids=[8460],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},7066:a=>{"use strict";a.exports=require("node:tty")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:a=>{"use strict";a.exports=require("dns")},16585:(a,b,c)=>{Promise.resolve().then(c.bind(c,61742))},16698:a=>{"use strict";a.exports=require("node:async_hooks")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},44030:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/firda/zevairouter/src/app/(dashboard)/dashboard/providers/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/firda/zevairouter/src/app/(dashboard)/dashboard/providers/page.js","default")},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57075:a=>{"use strict";a.exports=require("node:stream")},57212:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(14965),o=c(63747),p=c(24235),q=c(23938),r=c(261),s=c(66758),t=c(77243),u=c(26713),v=c(37527),w=c(22820),x=c(88216),y=c(47929),z=c(79551),A=c(71797),B=c(89125),C=c(86439),D=c(77068),E=c(27269),F=c(37525),G=c(61287),H=c(81494),I=c(70722),J=c(70753),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,44030)),"/Users/firda/zevairouter/src/app/(dashboard)/dashboard/providers/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,8127)),"/Users/firda/zevairouter/src/app/(dashboard)/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,50385)),"/Users/firda/zevairouter/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/providers/page",pathname:"/dashboard/providers",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next-cli-build",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/(dashboard)/dashboard/providers/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(95726).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
2
- see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},57975:a=>{"use strict";a.exports=require("node:util")},58500:a=>{"use strict";a.exports=require("node:timers/promises")},61742:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>s});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412),i=c(72738),j=c(12020),k=c(96919),l=c(2116),m=c.n(l),n=c(41371),o=c(37365);let p={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 q(){let[a,b]=(0,e.useState)(null),[c,f]=(0,e.useState)(!0),[g,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)(null),l=(0,e.useRef)(null),m=(0,n.i)(),o=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/availability");if(a.ok){let c=await a.json();b(c)}}catch{}finally{f(!1)}},[]),q=async(a,b)=>{k(`${a}:${b}`);try{(await fetch("/api/models/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clearCooldown",provider:a,model:b})})).ok?(m.success(`Cooldown cleared for ${b}`),await o()):m.error("Failed to clear cooldown")}catch{m.error("Failed to clear cooldown")}finally{k(null)}};if(c)return null;let r=a?.models||[],s=0===(a?.unavailableCount||r.filter(a=>"available"!==a.status).length),t={};return r.forEach(a=>{if("available"===a.status)return;let b=a.provider||"unknown";t[b]||(t[b]=[]),t[b].push(a)}),(0,d.jsx)("div",{className:"relative",ref:l,children:g&&(0,d.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,d.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:s?"#22c55e":"#f59e0b"},children:s?"verified":"warning"}),(0,d.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,d.jsx)("button",{onClick:o,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,d.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:s?(0,d.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,d.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(t).map(([a,b])=>(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:a}),(0,d.jsx)("div",{className:"flex flex-col gap-1",children:b.map(a=>{let b=p[a.status]||p.unknown,c=j===`${a.provider}:${a.model}`;return(0,d.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:b.color},children:b.icon}),(0,d.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:a.model})]}),"cooldown"===a.status&&(0,d.jsx)(h.$n,{size:"sm",variant:"ghost",onClick:()=>q(a.provider,a.model),disabled:c,className:"text-[10px] px-1.5! py-0.5! ml-2",children:c?"...":"Clear"})]},`${a.provider}-${a.model}`)})})]},a))})})]})})}function r(a,b,c){let e=[];if(a>0&&e.push((0,d.jsxs)(h.Ex,{variant:"success",size:"sm",dot:!0,children:[a," Connected"]},"connected")),b>0){let a=c?`${b} Error (${c})`:`${b} Error`;e.push((0,d.jsx)(h.Ex,{variant:"error",size:"sm",dot:!0,children:a},"error"))}return 0===e.length?(0,d.jsx)("span",{className:"text-text-muted",children:"No connections"}):e}function s(){let a,b,[c,f]=(0,e.useState)([]),[g,i]=(0,e.useState)([]),[l,m]=(0,e.useState)(!0),[p,r]=(0,e.useState)(""),[s,z]=(0,e.useState)(1),[A,B]=(0,e.useState)(20),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(null),[I,J]=(0,e.useState)(null),K=(0,n.i)(),L=(0,o.C)(a=>a.query);(0,o.C)(a=>a.register),(0,o.C)(a=>a.unregister);let M=a=>!L.trim()||a.toLowerCase().includes(L.trim().toLowerCase()),N=(0,e.useMemo)(()=>{let a=new Map;for(let b of c){let c=b.provider||b.id;a.has(c)||a.set(c,[]),a.get(c).push(b)}return a},[c]),O=c.length,P=(0,e.useMemo)(()=>c.filter(a=>!1!==a.isActive).length,[c]),Q=N.size,R=Math.max(0,O-P),S=O>0?Math.round(P/O*100):0,T=(a,b)=>{let c=Array.isArray(b)?b:[b],d=(N.get(a)||[]).filter(a=>c.includes(a.authType)),e=d.filter(a=>{let b,c=(b=Object.entries(a).some(([a,b])=>a.startsWith("modelLock_")&&b&&new Date(b).getTime()>Date.now()),"unavailable"!==a.testStatus||b?a.testStatus:"active");return"error"===c||"expired"===c||"unavailable"===c}),f=d.length>0?d.length:0,g=d.length>0?0:e.length,h=d.length,i=h>0&&d.every(a=>!1===a.isActive),j=e.sort((a,b)=>new Date(b.lastErrorAt||0)-new Date(a.lastErrorAt||0))[0];return{connected:f,error:g,total:h,errorCode:j?function(a){if(!a)return null;let b=a.lastErrorType;if("runtime_error"===b)return"RUNTIME";if("upstream_auth_error"===b||"auth_missing"===b||"token_refresh_failed"===b||"token_expired"===b)return"AUTH";if("upstream_rate_limited"===b)return"429";if("upstream_unavailable"===b)return"5XX";if("network_error"===b)return"NET";let c=Number(a.errorCode);if(Number.isFinite(c)&&c>=400)return String(c);let d=function(a){if(!a)return null;let b=a.match(/\b([45]\d{2})\b/);return b?b[1]:"ERR"}(a.lastError);if("401"===d||"403"===d)return"AUTH";if(d&&"ERR"!==d)return d;let e=(a.lastError||"").toLowerCase();return e.includes("runtime")||e.includes("not runnable")||e.includes("not installed")?"RUNTIME":e.includes("invalid api key")||e.includes("token invalid")||e.includes("revoked")||e.includes("unauthorized")?"AUTH":"ERR"}(j):null,errorTime:j?.lastErrorAt?function(a){if(!a)return"";let b=Math.floor((Date.now()-new Date(a).getTime())/6e4);if(b<1)return"just now";if(b<60)return`${b}m ago`;let c=Math.floor(b/60);if(c<24)return`${c}h ago`;let d=Math.floor(c/24);return`${d}d ago`}(j.lastErrorAt):null,allDisabled:i}},U=async(a,b,d)=>{let e=c.filter(c=>c.provider===a&&c.authType===b);f(c=>c.map(c=>c.provider===a&&c.authType===b?{...c,isActive:d}:c)),await Promise.allSettled(e.map(a=>fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:d})})))},V=async(a,b=null)=>{if(!G){H("provider"===a?b:a),J(null);try{let c=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:a,providerId:b})}),d=await c.json();if(J(d),d.summary){let{passed:a,failed:b,total:c}=d.summary;0===b?K.success(`All ${c} tests passed`):K.warning(`${a}/${c} passed, ${b} failed`)}}catch(a){J({error:"Test request failed"}),K.error("Provider test failed")}finally{H(null)}}},W=g.filter(a=>"openai-compatible"===a.type).map(a=>({id:a.id,name:a.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:a.apiType})).filter(a=>M(a.name)),X=g.filter(a=>"anthropic-compatible"===a.type).map(a=>({id:a.id,name:a.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(a=>M(a.name)),Y=Object.entries(j.zN).filter(([,a])=>!a.hidden&&M(a.name)),Z=Object.entries(k.IS).filter(([,a])=>!a.hidden&&M(a.name)),$=Object.entries(k.nJ).filter(([,a])=>!a.hidden&&M(a.name)),_=(a=Object.entries(j.fg).filter(([,a])=>!a.hidden&&(a.serviceKinds??["llm"]).includes("llm")&&M(a.name)),b="apikey",[...a].sort(([a,c],[d,e])=>{let f=T(a,b),g=T(d,b),h=+(f.connected>0),i=+(g.connected>0);return h!==i?i-h:(c.name||"").localeCompare(e.name||"")})),aa=Math.min(s,Math.max(1,Math.ceil(_.length/A))),ab=_.slice((aa-1)*A,aa*A);if(l)return(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(h.Qv,{}),(0,d.jsx)(h.Qv,{})]});let ac=Y.length>0||Z.length>0||$.length>0||_.length>0||W.length>0||X.length>0;return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0 lg:gap-7",children:[O>0&&(0,d.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-primary/15 bg-surface/85 shadow-[0_20px_45px_-38px_rgba(229,106,74,0.8)] backdrop-blur-sm",children:[(0,d.jsxs)("div",{className:"grid grid-cols-2 divide-x divide-y divide-border-subtle sm:grid-cols-4 sm:divide-y-0",children:[(0,d.jsxs)("div",{className:"col-span-2 flex items-center gap-3 px-4 py-3.5 sm:col-span-1",children:[(0,d.jsx)("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined",style:{fontSize:20},children:"dns"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.12em] text-text-muted",children:"Connection health"}),(0,d.jsxs)("p",{className:"mt-0.5 text-sm font-semibold text-text-main",children:[S,"% active"]})]})]}),(0,d.jsxs)("div",{className:"px-4 py-3.5",children:[(0,d.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.1em] text-text-muted",children:"Connections"}),(0,d.jsx)("p",{className:"mt-1 text-xl font-bold tracking-tight text-text-main",children:O})]}),(0,d.jsxs)("div",{className:"px-4 py-3.5",children:[(0,d.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.1em] text-text-muted",children:"Active"}),(0,d.jsxs)("div",{className:"mt-1 flex items-baseline gap-2",children:[(0,d.jsx)("p",{className:"text-xl font-bold tracking-tight text-success",children:P}),R>0&&(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:[R," paused"]})]})]}),(0,d.jsxs)("div",{className:"px-4 py-3.5",children:[(0,d.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.1em] text-text-muted",children:"Providers"}),(0,d.jsx)("p",{className:"mt-1 text-xl font-bold tracking-tight text-info",children:Q})]})]}),O>=100&&(0,d.jsxs)("div",{className:"flex items-center gap-2 border-t border-border-subtle bg-surface-2/35 px-4 py-2 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[15px] text-primary",children:"filter_alt"}),"Open a provider to search and filter its paginated connections."]})]}),p&&(0,d.jsx)("div",{className:"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:p}),!ac&&(0,d.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,d.jsx)("p",{className:"text-text-muted text-sm",children:"No providers match your search"})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(t,{icon:"extension",title:"Custom Providers",description:"OpenAI and Anthropic-compatible endpoints",children:(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,d.jsx)(h.$n,{size:"sm",icon:"add",onClick:()=>F(!0),className:"w-full sm:w-auto",children:"Add Anthropic Compatible"}),(0,d.jsx)(h.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>D(!0),className:"w-full !bg-white !text-black hover:!bg-gray-100 sm:w-auto",children:"Add OpenAI Compatible"})]})}),0===W.length&&0===X.length?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-xl border border-dashed border-border bg-surface/45 px-4 py-3 text-text-muted",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-2 text-[18px]",children:"add_link"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium text-text-main",children:"No custom endpoints yet"}),(0,d.jsx)("p",{className:"mt-0.5 text-xs",children:"Add an OpenAI or Anthropic-compatible endpoint when you need one."})]})]}):(0,d.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:[...W,...X].map(a=>(0,d.jsx)(v,{providerId:a.id,provider:a,stats:T(a.id,"apikey"),authType:"compatible",onToggle:b=>U(a.id,"apikey",b)},a.id))})]}),Y.length>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(t,{icon:"passkey",title:"OAuth Providers",description:"Connect existing provider accounts securely",children:(0,d.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,d.jsx)(q,{}),(0,d.jsxs)("button",{onClick:()=>V("oauth"),disabled:!!G,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"===G?"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,d.jsx)("span",{className:`material-symbols-outlined text-[14px]${"oauth"===G?" animate-spin":""}`,children:"play_arrow"}),"oauth"===G?"Testing...":"Test All"]})]})}),(0,d.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:Y.map(([a,b])=>(0,d.jsx)(u,{providerId:a,provider:b,stats:T(a,"oauth"),authType:"oauth",onToggle:b=>U(a,"oauth",b)},a))})]}),(Z.length>0||$.length>0)&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(t,{icon:"savings",title:"Free Tier Providers",description:"Ready-to-use and free-tier routing options",children:(0,d.jsxs)("button",{onClick:()=>V("free"),disabled:!!G,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"===G?"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,d.jsx)("span",{className:`material-symbols-outlined text-[14px]${"free"===G?" animate-spin":""}`,children:"play_arrow"}),"free"===G?"Testing...":"Test All"]})}),(0,d.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:[Z.map(([a,b])=>{let c=Array.isArray(b?.authModes)&&b.authModes.includes("apikey");return(0,d.jsx)(u,{providerId:a,provider:b,stats:T(a,c?["oauth","apikey"]:"oauth"),authType:"free",onToggle:b=>U(a,c?"apikey":"oauth",b)},a)}),$.map(([a,b])=>(0,d.jsx)(v,{providerId:a,provider:b,stats:T(a,"apikey"),authType:"apikey",onToggle:b=>U(a,"apikey",b)},a))]})]}),_.length>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(t,{icon:"key",title:"API Key Providers",description:"Bring your own provider credentials",children:(0,d.jsxs)("button",{onClick:()=>V("apikey"),disabled:!!G,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"===G?"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,d.jsx)("span",{className:`material-symbols-outlined text-[14px]${"apikey"===G?" animate-spin":""}`,children:"play_arrow"}),"apikey"===G?"Testing...":"Test All"]})}),(0,d.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:ab.map(([a,b])=>(0,d.jsx)(v,{providerId:a,provider:b,stats:T(a,"apikey"),authType:"apikey",onToggle:b=>U(a,"apikey",b)},a))}),_.length>0&&(0,d.jsx)(h.dK,{currentPage:aa,pageSize:A,totalItems:_.length,onPageChange:z,onPageSizeChange:a=>{B(a),z(1)}})]}),(0,d.jsx)(w,{isOpen:C,onClose:()=>D(!1),onCreated:a=>{i(b=>[...b,a]),D(!1)}}),(0,d.jsx)(x,{isOpen:E,onClose:()=>F(!1),onCreated:a=>{i(b=>[...b,a]),F(!1)}}),I&&(0,d.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>J(null),children:[(0,d.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,d.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:a=>a.stopPropagation(),children:[(0,d.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,d.jsx)("h3",{className:"font-semibold",children:"Test Results"}),(0,d.jsx)("button",{onClick:()=>J(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,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,d.jsx)("div",{className:"p-5",children:(0,d.jsx)(y,{results:I})})]})]})]})}function t({icon:a,title:b,description:c,children:e}){return(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined flex size-10 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-[20px] text-primary ring-1 ring-primary/15",children:a}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold leading-tight sm:text-xl",children:b}),(0,d.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:c})]})]}),e]})}function u({providerId:a,provider:b,stats:c,authType:e,onToggle:f}){let{connected:g,error:j,errorCode:k,allDisabled:l}=c,n=!!b.noAuth,o=!l&&(g>0||n);return(0,d.jsx)(m(),{href:`/dashboard/providers/${a}`,className:"group min-w-0",children:(0,d.jsxs)(h.Zp,{padding:"none",className:`relative h-[82px] min-h-[82px] cursor-pointer overflow-hidden transition-[border-color,box-shadow,opacity] sm:h-[94px] sm:min-h-[94px] ${o?"border-success/25 bg-linear-to-br from-success/[0.045] to-transparent":"group-hover:border-primary/25"} ${l?"opacity-55":""}`,children:[o&&(0,d.jsx)("span",{className:"absolute inset-y-3 left-0 w-0.5 rounded-r-full bg-success"}),(0,d.jsxs)("div",{className:"flex h-full min-w-0 items-center justify-between gap-3 p-3.5",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl ring-1 ring-black/[0.04] dark:ring-white/[0.06]",style:{backgroundColor:`${b.color?.length>7?b.color:b.color+"15"}`},children:(0,d.jsx)(i.A,{src:`/providers/${b.id}.png`,alt:"",size:30,className:"max-h-[32px] max-w-[32px] rounded-lg object-contain",fallbackText:b.textIcon||b.id.slice(0,2).toUpperCase(),fallbackColor:b.color})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:b.name}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 overflow-hidden whitespace-nowrap text-xs",children:[(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium text-text-muted",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:`size-1.5 rounded-full ${{free:"bg-green-500",oauth:"bg-blue-500",apikey:"bg-amber-500",compatible:"bg-orange-500"}[e]||"bg-text-muted"}`}),{free:"Free",oauth:"OAuth",apikey:"API Key",compatible:"Compatible"}[e]||"Provider"]}),l?(0,d.jsx)(h.Ex,{variant:"default",size:"sm",children:(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):n?(0,d.jsx)(h.Ex,{variant:"success",size:"sm",dot:!0,children:"Ready"}):(0,d.jsx)(d.Fragment,{children:r(g,j,k)})]})]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[c.total>0&&(0,d.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:a=>{a.preventDefault(),a.stopPropagation(),f(!!l)},children:(0,d.jsx)(h.lM,{size:"sm",checked:!l,onChange:()=>{},title:l?"Enable provider":"Disable provider"})}),(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[18px] text-text-subtle transition-[transform,color] group-hover:translate-x-0.5 group-hover:text-primary",children:"chevron_right"})]})]})]})})}function v({providerId:a,provider:b,stats:c,authType:e,onToggle:f}){let{connected:g,error:j,errorCode:l,allDisabled:n}=c,o=!n&&g>0,p=a.startsWith(k.JH),q=a.startsWith(k.DI);return(0,d.jsx)(m(),{href:`/dashboard/providers/${a}`,className:"group min-w-0",children:(0,d.jsxs)(h.Zp,{padding:"none",className:`relative h-[82px] min-h-[82px] cursor-pointer overflow-hidden transition-[border-color,box-shadow,opacity] sm:h-[94px] sm:min-h-[94px] ${o?"border-success/25 bg-linear-to-br from-success/[0.045] to-transparent":"group-hover:border-primary/25"} ${n?"opacity-55":""}`,children:[o&&(0,d.jsx)("span",{className:"absolute inset-y-3 left-0 w-0.5 rounded-r-full bg-success"}),(0,d.jsxs)("div",{className:"flex h-full min-w-0 items-center justify-between gap-3 p-3.5",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl ring-1 ring-black/[0.04] dark:ring-white/[0.06]",style:{backgroundColor:`${b.color?.length>7?b.color:b.color+"15"}`},children:(0,d.jsx)(i.A,{src:"featherless"===b.id?null:p?"responses"===b.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":q?"/providers/anthropic-m.png":`/providers/${b.id}.png`,alt:"",size:30,className:"max-h-[32px] max-w-[32px] rounded-lg object-contain",fallbackText:b.textIcon||b.id.slice(0,2).toUpperCase(),fallbackColor:b.color})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:b.name}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 overflow-hidden whitespace-nowrap text-xs",children:[(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium text-text-muted",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:`size-1.5 rounded-full ${{free:"bg-green-500",oauth:"bg-blue-500",apikey:"bg-amber-500",compatible:"bg-orange-500"}[e]||"bg-text-muted"}`}),{free:"Free",oauth:"OAuth",apikey:"API Key",compatible:"Compatible"}[e]||"Provider"]}),n?(0,d.jsx)(h.Ex,{variant:"default",size:"sm",children:(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):(0,d.jsxs)(d.Fragment,{children:[r(g,j,l),p&&(0,d.jsx)(h.Ex,{variant:"default",size:"sm",children:"responses"===b.apiType?"Responses":"Chat"}),q&&(0,d.jsx)(h.Ex,{variant:"default",size:"sm",children:"Messages"})]})]})]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[c.total>0&&(0,d.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:a=>{a.preventDefault(),a.stopPropagation(),f(!!n)},children:(0,d.jsx)(h.lM,{size:"sm",checked:!n,onChange:()=>{},title:n?"Enable provider":"Disable provider"})}),(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[18px] text-text-subtle transition-[transform,color] group-hover:translate-x-0.5 group-hover:text-primary",children:"chevron_right"})]})]})]})})}function w({isOpen:a,onClose:b,onCreated:c}){let[f,g]=(0,e.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(null),s=async()=>{if(f.name.trim()&&f.prefix.trim()&&f.baseUrl.trim()){j(!0);try{let a=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:f.name,prefix:f.prefix,apiType:f.apiType,baseUrl:f.baseUrl,type:"openai-compatible"})}),b=await a.json();a.ok&&(c(b.node),g({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),l(""),r(null))}catch(a){console.log("Error creating OpenAI Compatible node:",a)}finally{j(!1)}}},t=async()=>{p(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:f.baseUrl,apiKey:k,type:"openai-compatible",modelId:m.trim()||void 0})}),b=await a.json();r(b)}catch{r({valid:!1,error:"Network error"})}finally{p(!1)}};return(0,d.jsx)(h.aF,{isOpen:a,title:"Add OpenAI Compatible",onClose:b,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(h.pd,{label:"Name",value:f.name,onChange:a=>g({...f,name:a.target.value}),placeholder:"OpenAI Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,d.jsx)(h.pd,{label:"Prefix",value:f.prefix,onChange:a=>g({...f,prefix:a.target.value}),placeholder:"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,d.jsx)(h.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:f.apiType,onChange:a=>g({...f,apiType:a.target.value})}),(0,d.jsx)(h.pd,{label:"Base URL",value:f.baseUrl,onChange:a=>g({...f,baseUrl:a.target.value}),placeholder:"https://api.openai.com/v1",hint:"Use the base URL (ending in /v1) for your OpenAI-compatible API."}),(0,d.jsx)(h.pd,{label:"API Key (for Check)",type:"password",value:k,onChange:a=>l(a.target.value)}),(0,d.jsx)(h.pd,{label:"Model ID (optional)",value:m,onChange:a=>n(a.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,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,d.jsx)(h.$n,{onClick:t,disabled:!k||o||!f.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:o?"Checking...":"Check"}),(()=>{if(!q)return null;let{valid:a,error:b,method:c}=q;return a?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.Ex,{variant:"success",children:"Valid"}),"chat"===c&&(0,d.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)(h.Ex,{variant:"error",children:"Invalid"}),b&&(0,d.jsx)("span",{className:"text-sm text-red-500",children:b})]})})()]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,d.jsx)(h.$n,{onClick:s,fullWidth:!0,disabled:!f.name.trim()||!f.prefix.trim()||!f.baseUrl.trim()||i,children:i?"Creating...":"Create"}),(0,d.jsx)(h.$n,{onClick:b,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function x({isOpen:a,onClose:b,onCreated:c}){let[f,g]=(0,e.useState)({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(null),s=async()=>{if(f.name.trim()&&f.prefix.trim()&&f.baseUrl.trim()){j(!0);try{let a=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:f.name,prefix:f.prefix,baseUrl:f.baseUrl,type:"anthropic-compatible"})}),b=await a.json();a.ok&&(c(b.node),g({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),l(""),r(null))}catch(a){console.log("Error creating Anthropic Compatible node:",a)}finally{j(!1)}}},t=async()=>{p(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:f.baseUrl,apiKey:k,type:"anthropic-compatible",modelId:m.trim()||void 0})}),b=await a.json();r(b)}catch{r({valid:!1,error:"Network error"})}finally{p(!1)}};return(0,d.jsx)(h.aF,{isOpen:a,title:"Add Anthropic Compatible",onClose:b,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(h.pd,{label:"Name",value:f.name,onChange:a=>g({...f,name:a.target.value}),placeholder:"Anthropic Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,d.jsx)(h.pd,{label:"Prefix",value:f.prefix,onChange:a=>g({...f,prefix:a.target.value}),placeholder:"ac-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,d.jsx)(h.pd,{label:"Base URL",value:f.baseUrl,onChange:a=>g({...f,baseUrl:a.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,d.jsx)(h.pd,{label:"API Key (for Check)",type:"password",value:k,onChange:a=>l(a.target.value)}),(0,d.jsx)(h.pd,{label:"Model ID (optional)",value:m,onChange:a=>n(a.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,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,d.jsx)(h.$n,{onClick:t,disabled:!k||o||!f.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:o?"Checking...":"Check"}),(()=>{if(!q)return null;let{valid:a,error:b,method:c}=q;return a?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.Ex,{variant:"success",children:"Valid"}),"chat"===c&&(0,d.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)(h.Ex,{variant:"error",children:"Invalid"}),b&&(0,d.jsx)("span",{className:"text-sm text-red-500",children:b})]})})()]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,d.jsx)(h.$n,{onClick:s,fullWidth:!0,disabled:!f.name.trim()||!f.prefix.trim()||!f.baseUrl.trim()||i,children:i?"Creating...":"Create"}),(0,d.jsx)(h.$n,{onClick:b,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function y({results:a}){if(a.error&&!a.results)return(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,d.jsx)("p",{className:"text-sm text-red-400",children:a.error})]});let{summary:b,mode:c}=a,e=a.results||[];return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[b&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,d.jsxs)("span",{className:"text-text-muted",children:[{oauth:"OAuth",free:"Free",apikey:"API Key",provider:"Provider",all:"All"}[c]||c," Test"]}),(0,d.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[b.passed," passed"]}),b.failed>0&&(0,d.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[b.failed," failed"]}),(0,d.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[b.total," tested"]})]}),e.map((a,b)=>(0,d.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,d.jsx)("span",{className:`material-symbols-outlined text-[16px] ${a.valid?"text-emerald-500":"text-red-500"}`,children:a.valid?"check_circle":"error"}),(0,d.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,d.jsx)("span",{className:"block truncate font-medium sm:inline",children:a.connectionName}),(0,d.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",a.provider,")"]})]}),void 0!==a.latencyMs&&(0,d.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[a.latencyMs,"ms"]}),(0,d.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${a.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:a.valid?"OK":a.diagnosis?.type||"ERROR"})]},a.connectionId||b)),0===e.length&&(0,d.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:"No active connections found for this group."})]})}t.propTypes={icon:g().string.isRequired,title:g().string.isRequired,description:g().string.isRequired,children:g().node},u.propTypes={providerId:g().string.isRequired,provider:g().shape({id:g().string.isRequired,name:g().string.isRequired,color:g().string,textIcon:g().string}).isRequired,stats:g().shape({connected:g().number,error:g().number,errorCode:g().string,errorTime:g().string,total:g().number,allDisabled:g().bool}).isRequired,authType:g().string,onToggle:g().func},v.propTypes={providerId:g().string.isRequired,provider:g().shape({id:g().string.isRequired,name:g().string.isRequired,color:g().string,textIcon:g().string,apiType:g().string}).isRequired,stats:g().shape({connected:g().number,error:g().number,errorCode:g().string,errorTime:g().string,total:g().number,allDisabled:g().bool}).isRequired,authType:g().string,onToggle:g().func},w.propTypes={isOpen:g().bool.isRequired,onClose:g().func.isRequired,onCreated:g().func.isRequired},x.propTypes={isOpen:g().bool.isRequired,onClose:g().func.isRequired,onCreated:g().func.isRequired},y.propTypes={results:g().shape({mode:g().string,results:g().array,summary:g().shape({total:g().number,passed:g().number,failed:g().number}),error:g().string}).isRequired}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},73814:(a,b,c)=>{Promise.resolve().then(c.bind(c,44030))},74075:a=>{"use strict";a.exports=require("zlib")},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},83997:a=>{"use strict";a.exports=require("tty")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7774,5433,1818,319,9071,5189,601,5024,4404,5681,9609,8590,3155,3110,318,8895,7239,6457,1188,9621,412,9372],()=>b(b.s=57212));module.exports=c})();
2
+ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},57975:a=>{"use strict";a.exports=require("node:util")},58500:a=>{"use strict";a.exports=require("node:timers/promises")},61742:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>t});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412),i=c(72738),j=c(12020),k=c(96919),l=c(2116),m=c.n(l),n=c(41371),o=c(37365);let p={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 q(){let[a,b]=(0,e.useState)(null),[c,f]=(0,e.useState)(!0),[g,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)(null),l=(0,e.useRef)(null),m=(0,n.i)(),o=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/availability");if(a.ok){let c=await a.json();b(c)}}catch{}finally{f(!1)}},[]),q=async(a,b)=>{k(`${a}:${b}`);try{(await fetch("/api/models/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clearCooldown",provider:a,model:b})})).ok?(m.success(`Cooldown cleared for ${b}`),await o()):m.error("Failed to clear cooldown")}catch{m.error("Failed to clear cooldown")}finally{k(null)}};if(c)return null;let r=a?.models||[],s=0===(a?.unavailableCount||r.filter(a=>"available"!==a.status).length),t={};return r.forEach(a=>{if("available"===a.status)return;let b=a.provider||"unknown";t[b]||(t[b]=[]),t[b].push(a)}),(0,d.jsx)("div",{className:"relative",ref:l,children:g&&(0,d.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,d.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:s?"#22c55e":"#f59e0b"},children:s?"verified":"warning"}),(0,d.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,d.jsx)("button",{onClick:o,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,d.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:s?(0,d.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,d.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(t).map(([a,b])=>(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:a}),(0,d.jsx)("div",{className:"flex flex-col gap-1",children:b.map(a=>{let b=p[a.status]||p.unknown,c=j===`${a.provider}:${a.model}`;return(0,d.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:b.color},children:b.icon}),(0,d.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:a.model})]}),"cooldown"===a.status&&(0,d.jsx)(h.$n,{size:"sm",variant:"ghost",onClick:()=>q(a.provider,a.model),disabled:c,className:"text-[10px] px-1.5! py-0.5! ml-2",children:c?"...":"Clear"})]},`${a.provider}-${a.model}`)})})]},a))})})]})})}function r(a,b,c){if(a>0)return(0,d.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-[11px] font-medium text-success",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-success"}),a," connected"]});if(b>0){let a=c?`${b} Error (${c})`:`${b} Error`;return(0,d.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-[11px] font-medium text-error",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-error"}),a]})}return(0,d.jsx)("span",{className:"text-[11px] text-text-muted",children:"No connections"})}let s=[{value:"all",label:"All"},{value:"connected",label:"Connected"},{value:"ready",label:"Ready"},{value:"setup",label:"Needs setup"}];function t(){let a,b,[c,f]=(0,e.useState)([]),[g,i]=(0,e.useState)([]),[l,m]=(0,e.useState)(!0),[p,r]=(0,e.useState)(""),[t,A]=(0,e.useState)(1),[B,C]=(0,e.useState)(20),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(null),[J,K]=(0,e.useState)(null),[L,M]=(0,e.useState)("all"),[N,O]=(0,e.useState)({custom:!1,oauth:!1,free:!0,apikey:!0}),P=(0,n.i)(),Q=(0,o.C)(a=>a.query);(0,o.C)(a=>a.register),(0,o.C)(a=>a.unregister);let R=a=>!Q.trim()||a.toLowerCase().includes(Q.trim().toLowerCase()),S=(0,e.useMemo)(()=>{let a=new Map;for(let b of c){let c=b.provider||b.id;a.has(c)||a.set(c,[]),a.get(c).push(b)}return a},[c]),T=c.length,U=(0,e.useMemo)(()=>c.filter(a=>!1!==a.isActive).length,[c]),V=S.size,W=Math.max(0,T-U),X=T>0?Math.round(U/T*100):0,Y=(a,b)=>{let c=Array.isArray(b)?b:[b],d=(S.get(a)||[]).filter(a=>c.includes(a.authType)),e=d.filter(a=>{let b,c=(b=Object.entries(a).some(([a,b])=>a.startsWith("modelLock_")&&b&&new Date(b).getTime()>Date.now()),"unavailable"!==a.testStatus||b?a.testStatus:"active");return"error"===c||"expired"===c||"unavailable"===c}),f=d.length>0?d.length:0,g=d.length>0?0:e.length,h=d.length,i=h>0&&d.every(a=>!1===a.isActive),j=e.sort((a,b)=>new Date(b.lastErrorAt||0)-new Date(a.lastErrorAt||0))[0];return{connected:f,error:g,total:h,errorCode:j?function(a){if(!a)return null;let b=a.lastErrorType;if("runtime_error"===b)return"RUNTIME";if("upstream_auth_error"===b||"auth_missing"===b||"token_refresh_failed"===b||"token_expired"===b)return"AUTH";if("upstream_rate_limited"===b)return"429";if("upstream_unavailable"===b)return"5XX";if("network_error"===b)return"NET";let c=Number(a.errorCode);if(Number.isFinite(c)&&c>=400)return String(c);let d=function(a){if(!a)return null;let b=a.match(/\b([45]\d{2})\b/);return b?b[1]:"ERR"}(a.lastError);if("401"===d||"403"===d)return"AUTH";if(d&&"ERR"!==d)return d;let e=(a.lastError||"").toLowerCase();return e.includes("runtime")||e.includes("not runnable")||e.includes("not installed")?"RUNTIME":e.includes("invalid api key")||e.includes("token invalid")||e.includes("revoked")||e.includes("unauthorized")?"AUTH":"ERR"}(j):null,errorTime:j?.lastErrorAt?function(a){if(!a)return"";let b=Math.floor((Date.now()-new Date(a).getTime())/6e4);if(b<1)return"just now";if(b<60)return`${b}m ago`;let c=Math.floor(b/60);if(c<24)return`${c}h ago`;let d=Math.floor(c/24);return`${d}d ago`}(j.lastErrorAt):null,allDisabled:i}},Z=(a,b,c)=>{if("all"===L)return!0;let d=Y(a,c);return"connected"===L?d.connected>0:"ready"===L?0===d.connected&&!0===b.noAuth:0===d.connected&&!0!==b.noAuth},$=a=>{O(b=>({...b,[a]:!b[a]}))},_=async(a,b,d)=>{let e=c.filter(c=>c.provider===a&&c.authType===b);f(c=>c.map(c=>c.provider===a&&c.authType===b?{...c,isActive:d}:c)),await Promise.allSettled(e.map(a=>fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:d})})))},aa=async(a,b=null)=>{if(!H){I("provider"===a?b:a),K(null);try{let c=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:a,providerId:b})}),d=await c.json();if(K(d),d.summary){let{passed:a,failed:b,total:c}=d.summary;0===b?P.success(`All ${c} tests passed`):P.warning(`${a}/${c} passed, ${b} failed`)}}catch(a){K({error:"Test request failed"}),P.error("Provider test failed")}finally{I(null)}}},ab=g.filter(a=>"openai-compatible"===a.type).map(a=>({id:a.id,name:a.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:a.apiType})).filter(a=>R(a.name)&&Z(a.id,a,"apikey")),ac=g.filter(a=>"anthropic-compatible"===a.type).map(a=>({id:a.id,name:a.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(a=>R(a.name)&&Z(a.id,a,"apikey")),ad=Object.entries(j.zN).filter(([a,b])=>!b.hidden&&R(b.name)&&Z(a,b,"oauth")),ae=Object.entries(k.IS).filter(([a,b])=>{let c=Array.isArray(b?.authModes)&&b.authModes.includes("apikey");return!b.hidden&&R(b.name)&&Z(a,b,c?["oauth","apikey"]:"oauth")}),af=Object.entries(k.nJ).filter(([a,b])=>!b.hidden&&R(b.name)&&Z(a,b,"apikey")),ag=(a=Object.entries(j.fg).filter(([a,b])=>!b.hidden&&(b.serviceKinds??["llm"]).includes("llm")&&R(b.name)&&Z(a,b,"apikey")),b="apikey",[...a].sort(([a,c],[d,e])=>{let f=Y(a,b),g=Y(d,b),h=+(f.connected>0),i=+(g.connected>0);return h!==i?i-h:(c.name||"").localeCompare(e.name||"")})),ah=Math.min(t,Math.max(1,Math.ceil(ag.length/B))),ai=ag.slice((ah-1)*B,ah*B);if(l)return(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(h.Qv,{}),(0,d.jsx)(h.Qv,{})]});let aj=ad.length>0||ae.length>0||af.length>0||ag.length>0||ab.length>0||ac.length>0,ak=ab.length>0||ac.length>0||"all"===L&&!Q.trim();return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[T>0&&(0,d.jsx)("div",{className:"overflow-hidden rounded-xl border border-border bg-surface/80 shadow-sm",children:(0,d.jsxs)("div",{className:"grid grid-cols-3 divide-x divide-y divide-border-subtle sm:grid-cols-4 sm:divide-y-0",children:[(0,d.jsxs)("div",{className:"col-span-3 flex items-center gap-3 px-4 py-3 sm:col-span-1",children:[(0,d.jsx)("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/[0.08] text-primary",children:(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined",style:{fontSize:18},children:"dns"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Connection health"}),(0,d.jsxs)("p",{className:"mt-0.5 text-sm font-semibold tabular-nums text-text-main",children:[X,"% active"]})]})]}),(0,d.jsxs)("div",{className:"px-4 py-3",children:[(0,d.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Connections"}),(0,d.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-text-main",children:T})]}),(0,d.jsxs)("div",{className:"px-4 py-3",children:[(0,d.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Active"}),(0,d.jsxs)("div",{className:"mt-0.5 flex items-baseline gap-2",children:[(0,d.jsx)("p",{className:"text-lg font-semibold tabular-nums text-success",children:U}),W>0&&(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:[W," paused"]})]})]}),(0,d.jsxs)("div",{className:"px-4 py-3",children:[(0,d.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Providers"}),(0,d.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-info",children:V})]})]})}),p&&(0,d.jsx)("div",{className:"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:p}),(0,d.jsx)("div",{className:"overflow-x-auto pb-0.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:(0,d.jsx)("div",{className:"inline-flex min-w-full items-center gap-1.5 rounded-xl border border-border-subtle bg-surface/70 p-1.5 sm:min-w-0",children:s.map(a=>(0,d.jsx)("button",{type:"button",onClick:()=>{M(a.value),A(1),O({custom:!1,oauth:!1,free:!1,apikey:!1})},"aria-pressed":L===a.value,className:`flex h-11 flex-1 items-center justify-center whitespace-nowrap rounded-lg px-3 text-xs font-medium transition-colors sm:h-8 sm:flex-none sm:px-3 ${L===a.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-black/5 hover:text-text-main dark:hover:bg-white/5"}`,children:a.label},a.value))})}),!aj&&(0,d.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,d.jsx)("p",{className:"text-text-muted text-sm",children:Q.trim()?"No providers match your search":"No providers match this filter"})]}),ak&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(u,{icon:"extension",title:"Custom Providers",description:"OpenAI and Anthropic-compatible endpoints",count:ab.length+ac.length,collapsed:N.custom&&!Q.trim(),onToggle:()=>$("custom"),children:(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,d.jsx)(h.$n,{size:"sm",icon:"add",onClick:()=>G(!0),className:"min-h-11 w-full sm:min-h-0 sm:w-auto",children:"Add Anthropic Compatible"}),(0,d.jsx)(h.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>E(!0),className:"min-h-11 w-full sm:min-h-0 sm:w-auto",children:"Add OpenAI Compatible"})]})}),(0,d.jsx)("div",{className:N.custom&&!Q.trim()?"hidden sm:block":"",children:0===ab.length&&0===ac.length?(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-xl border border-dashed border-border bg-surface/45 px-4 py-3 text-text-muted",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-2 text-[18px]",children:"add_link"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium text-text-main",children:"No custom endpoints yet"}),(0,d.jsx)("p",{className:"mt-0.5 text-xs",children:"Add an OpenAI or Anthropic-compatible endpoint when you need one."})]})]}):(0,d.jsx)("div",{className:"grid grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4",children:[...ab,...ac].map(a=>(0,d.jsx)(w,{providerId:a.id,provider:a,stats:Y(a.id,"apikey"),onToggle:b=>_(a.id,"apikey",b)},a.id))})})]}),ad.length>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(u,{icon:"passkey",title:"OAuth Providers",description:"Connect existing provider accounts securely",count:ad.length,collapsed:N.oauth&&!Q.trim(),onToggle:()=>$("oauth"),children:(0,d.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,d.jsx)(q,{}),(0,d.jsxs)("button",{onClick:()=>aa("oauth"),disabled:!!H,className:`flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border px-3 text-xs font-medium transition-colors sm:h-8 sm:w-auto sm:rounded-lg ${"oauth"===H?"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,d.jsx)("span",{className:`material-symbols-outlined text-[14px]${"oauth"===H?" animate-spin":""}`,children:"play_arrow"}),"oauth"===H?"Testing...":"Test All"]})]})}),(0,d.jsx)("div",{className:`${N.oauth&&!Q.trim()?"hidden sm:grid":"grid"} grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4`,children:ad.map(([a,b])=>(0,d.jsx)(v,{providerId:a,provider:b,stats:Y(a,"oauth"),onToggle:b=>_(a,"oauth",b)},a))})]}),(ae.length>0||af.length>0)&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(u,{icon:"savings",title:"Free Tier Providers",description:"Ready-to-use and free-tier routing options",count:ae.length+af.length,collapsed:N.free&&!Q.trim(),onToggle:()=>$("free"),children:(0,d.jsxs)("button",{onClick:()=>aa("free"),disabled:!!H,className:`flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border px-3 text-xs font-medium transition-colors sm:h-8 sm:w-auto sm:rounded-lg ${"free"===H?"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,d.jsx)("span",{className:`material-symbols-outlined text-[14px]${"free"===H?" animate-spin":""}`,children:"play_arrow"}),"free"===H?"Testing...":"Test All"]})}),(0,d.jsxs)("div",{className:`${N.free&&!Q.trim()?"hidden sm:grid":"grid"} grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4`,children:[ae.map(([a,b])=>{let c=Array.isArray(b?.authModes)&&b.authModes.includes("apikey");return(0,d.jsx)(v,{providerId:a,provider:b,stats:Y(a,c?["oauth","apikey"]:"oauth"),onToggle:b=>_(a,c?"apikey":"oauth",b)},a)}),af.map(([a,b])=>(0,d.jsx)(w,{providerId:a,provider:b,stats:Y(a,"apikey"),onToggle:b=>_(a,"apikey",b)},a))]})]}),ag.length>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(u,{icon:"key",title:"API Key Providers",description:"Bring your own provider credentials",count:ag.length,collapsed:N.apikey&&!Q.trim(),onToggle:()=>$("apikey"),children:(0,d.jsxs)("button",{onClick:()=>aa("apikey"),disabled:!!H,className:`flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border px-3 text-xs font-medium transition-colors sm:h-8 sm:w-auto sm:rounded-lg ${"apikey"===H?"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,d.jsx)("span",{className:`material-symbols-outlined text-[14px]${"apikey"===H?" animate-spin":""}`,children:"play_arrow"}),"apikey"===H?"Testing...":"Test All"]})}),(0,d.jsx)("div",{className:`${N.apikey&&!Q.trim()?"hidden sm:grid":"grid"} grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4`,children:ai.map(([a,b])=>(0,d.jsx)(w,{providerId:a,provider:b,stats:Y(a,"apikey"),onToggle:b=>_(a,"apikey",b)},a))}),ag.length>0&&(0,d.jsx)("div",{className:N.apikey&&!Q.trim()?"hidden sm:block":"",children:(0,d.jsx)(h.dK,{currentPage:ah,pageSize:B,totalItems:ag.length,onPageChange:A,onPageSizeChange:a=>{C(a),A(1)}})})]}),(0,d.jsx)(x,{isOpen:D,onClose:()=>E(!1),onCreated:a=>{i(b=>[...b,a]),E(!1)}}),(0,d.jsx)(y,{isOpen:F,onClose:()=>G(!1),onCreated:a=>{i(b=>[...b,a]),G(!1)}}),J&&(0,d.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>K(null),children:[(0,d.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,d.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:a=>a.stopPropagation(),children:[(0,d.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,d.jsx)("h3",{className:"font-semibold",children:"Test Results"}),(0,d.jsx)("button",{onClick:()=>K(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,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,d.jsx)("div",{className:"p-5",children:(0,d.jsx)(z,{results:J})})]})]})]})}function u({icon:a,title:b,description:c,count:e,collapsed:f,onToggle:g,children:h}){return(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex w-full min-w-0 items-center gap-2.5 sm:w-auto",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2.5 sm:flex-none",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/[0.08] text-[17px] text-primary",children:a}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h2",{className:"truncate text-lg font-semibold leading-tight",children:b}),(0,d.jsx)("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold tabular-nums text-text-muted",children:e})]}),(0,d.jsx)("p",{className:"mt-0.5 truncate text-[11px] text-text-muted sm:text-xs",children:c})]})]}),(0,d.jsx)("button",{type:"button",onClick:g,className:"flex size-11 shrink-0 items-center justify-center rounded-xl border border-border text-text-muted transition-colors hover:border-primary/30 hover:text-primary sm:hidden","aria-expanded":!f,"aria-label":`${f?"Expand":"Collapse"} ${b}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:f?"expand_more":"expand_less"})})]}),h&&(0,d.jsx)("div",{className:f?"hidden sm:block":"block",children:h})]})}function v({providerId:a,provider:b,stats:c,onToggle:e}){let{connected:f,error:g,errorCode:j,allDisabled:k}=c,l=!!b.noAuth;return(0,d.jsx)(m(),{href:`/dashboard/providers/${a}`,className:"group min-w-0",children:(0,d.jsx)(h.Zp,{padding:"none",className:`relative h-[76px] min-h-[76px] cursor-pointer overflow-hidden transition-[border-color,box-shadow,opacity] group-hover:border-primary/30 group-hover:shadow-[0_10px_26px_-22px_rgba(229,106,74,0.55)] sm:h-[78px] sm:min-h-[78px] ${k?"opacity-55":""}`,children:(0,d.jsxs)("div",{className:"flex h-full min-w-0 items-center justify-between gap-2.5 p-3",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,d.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg ring-1 ring-black/[0.04] dark:ring-white/[0.06]",style:{backgroundColor:`${b.color?.length>7?b.color:b.color+"15"}`},children:(0,d.jsx)(i.A,{src:`/providers/${b.id}.png`,alt:"",size:28,className:"max-h-7 max-w-7 rounded-md object-contain",fallbackText:b.textIcon||b.id.slice(0,2).toUpperCase(),fallbackColor:b.color})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:b.name}),(0,d.jsx)("div",{className:"mt-1 flex min-w-0 items-center overflow-hidden whitespace-nowrap",children:k?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[13px]",children:"pause_circle"}),"Disabled"]}):l?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-[11px] font-medium text-success",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:"size-1.5 rounded-full bg-success"}),"Ready"]}):r(f,g,j)})]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[c.total>0&&(0,d.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:a=>{a.preventDefault(),a.stopPropagation(),e(!!k)},children:(0,d.jsx)(h.lM,{size:"sm",touchTarget:!0,checked:!k,onChange:()=>{},title:k?"Enable provider":"Disable provider"})}),(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[17px] text-text-subtle transition-[transform,color] group-hover:translate-x-0.5 group-hover:text-primary",children:"chevron_right"})]})]})})})}function w({providerId:a,provider:b,stats:c,onToggle:e}){let{connected:f,error:g,errorCode:j,allDisabled:l}=c,n=a.startsWith(k.JH),o=a.startsWith(k.DI);return(0,d.jsx)(m(),{href:`/dashboard/providers/${a}`,className:"group min-w-0",children:(0,d.jsx)(h.Zp,{padding:"none",className:`relative h-[76px] min-h-[76px] cursor-pointer overflow-hidden transition-[border-color,box-shadow,opacity] group-hover:border-primary/30 group-hover:shadow-[0_10px_26px_-22px_rgba(229,106,74,0.55)] sm:h-[78px] sm:min-h-[78px] ${l?"opacity-55":""}`,children:(0,d.jsxs)("div",{className:"flex h-full min-w-0 items-center justify-between gap-2.5 p-3",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,d.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg ring-1 ring-black/[0.04] dark:ring-white/[0.06]",style:{backgroundColor:`${b.color?.length>7?b.color:b.color+"15"}`},children:(0,d.jsx)(i.A,{src:"featherless"===b.id?null:n?"responses"===b.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":o?"/providers/anthropic-m.png":`/providers/${b.id}.png`,alt:"",size:28,className:"max-h-7 max-w-7 rounded-md object-contain",fallbackText:b.textIcon||b.id.slice(0,2).toUpperCase(),fallbackColor:b.color})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:b.name}),(0,d.jsx)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 overflow-hidden whitespace-nowrap",children:l?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[13px]",children:"pause_circle"}),"Disabled"]}):(0,d.jsxs)(d.Fragment,{children:[r(f,g,j),n&&(0,d.jsxs)("span",{className:"text-[10px] text-text-subtle",children:["\xb7 ","responses"===b.apiType?"Responses":"Chat"]}),o&&(0,d.jsx)("span",{className:"text-[10px] text-text-subtle",children:"\xb7 Messages"})]})})]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[c.total>0&&(0,d.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:a=>{a.preventDefault(),a.stopPropagation(),e(!!l)},children:(0,d.jsx)(h.lM,{size:"sm",touchTarget:!0,checked:!l,onChange:()=>{},title:l?"Enable provider":"Disable provider"})}),(0,d.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[17px] text-text-subtle transition-[transform,color] group-hover:translate-x-0.5 group-hover:text-primary",children:"chevron_right"})]})]})})})}function x({isOpen:a,onClose:b,onCreated:c}){let[f,g]=(0,e.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(null),s=async()=>{if(f.name.trim()&&f.prefix.trim()&&f.baseUrl.trim()){j(!0);try{let a=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:f.name,prefix:f.prefix,apiType:f.apiType,baseUrl:f.baseUrl,type:"openai-compatible"})}),b=await a.json();a.ok&&(c(b.node),g({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),l(""),r(null))}catch(a){console.log("Error creating OpenAI Compatible node:",a)}finally{j(!1)}}},t=async()=>{p(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:f.baseUrl,apiKey:k,type:"openai-compatible",modelId:m.trim()||void 0})}),b=await a.json();r(b)}catch{r({valid:!1,error:"Network error"})}finally{p(!1)}};return(0,d.jsx)(h.aF,{isOpen:a,title:"Add OpenAI Compatible",onClose:b,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(h.pd,{label:"Name",value:f.name,onChange:a=>g({...f,name:a.target.value}),placeholder:"OpenAI Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,d.jsx)(h.pd,{label:"Prefix",value:f.prefix,onChange:a=>g({...f,prefix:a.target.value}),placeholder:"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,d.jsx)(h.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:f.apiType,onChange:a=>g({...f,apiType:a.target.value})}),(0,d.jsx)(h.pd,{label:"Base URL",value:f.baseUrl,onChange:a=>g({...f,baseUrl:a.target.value}),placeholder:"https://api.openai.com/v1",hint:"Use the base URL (ending in /v1) for your OpenAI-compatible API."}),(0,d.jsx)(h.pd,{label:"API Key (for Check)",type:"password",value:k,onChange:a=>l(a.target.value)}),(0,d.jsx)(h.pd,{label:"Model ID (optional)",value:m,onChange:a=>n(a.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,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,d.jsx)(h.$n,{onClick:t,disabled:!k||o||!f.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:o?"Checking...":"Check"}),(()=>{if(!q)return null;let{valid:a,error:b,method:c}=q;return a?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.Ex,{variant:"success",children:"Valid"}),"chat"===c&&(0,d.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)(h.Ex,{variant:"error",children:"Invalid"}),b&&(0,d.jsx)("span",{className:"text-sm text-red-500",children:b})]})})()]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,d.jsx)(h.$n,{onClick:s,fullWidth:!0,disabled:!f.name.trim()||!f.prefix.trim()||!f.baseUrl.trim()||i,children:i?"Creating...":"Create"}),(0,d.jsx)(h.$n,{onClick:b,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function y({isOpen:a,onClose:b,onCreated:c}){let[f,g]=(0,e.useState)({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(null),s=async()=>{if(f.name.trim()&&f.prefix.trim()&&f.baseUrl.trim()){j(!0);try{let a=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:f.name,prefix:f.prefix,baseUrl:f.baseUrl,type:"anthropic-compatible"})}),b=await a.json();a.ok&&(c(b.node),g({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),l(""),r(null))}catch(a){console.log("Error creating Anthropic Compatible node:",a)}finally{j(!1)}}},t=async()=>{p(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:f.baseUrl,apiKey:k,type:"anthropic-compatible",modelId:m.trim()||void 0})}),b=await a.json();r(b)}catch{r({valid:!1,error:"Network error"})}finally{p(!1)}};return(0,d.jsx)(h.aF,{isOpen:a,title:"Add Anthropic Compatible",onClose:b,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(h.pd,{label:"Name",value:f.name,onChange:a=>g({...f,name:a.target.value}),placeholder:"Anthropic Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,d.jsx)(h.pd,{label:"Prefix",value:f.prefix,onChange:a=>g({...f,prefix:a.target.value}),placeholder:"ac-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,d.jsx)(h.pd,{label:"Base URL",value:f.baseUrl,onChange:a=>g({...f,baseUrl:a.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,d.jsx)(h.pd,{label:"API Key (for Check)",type:"password",value:k,onChange:a=>l(a.target.value)}),(0,d.jsx)(h.pd,{label:"Model ID (optional)",value:m,onChange:a=>n(a.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,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,d.jsx)(h.$n,{onClick:t,disabled:!k||o||!f.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:o?"Checking...":"Check"}),(()=>{if(!q)return null;let{valid:a,error:b,method:c}=q;return a?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.Ex,{variant:"success",children:"Valid"}),"chat"===c&&(0,d.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)(h.Ex,{variant:"error",children:"Invalid"}),b&&(0,d.jsx)("span",{className:"text-sm text-red-500",children:b})]})})()]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,d.jsx)(h.$n,{onClick:s,fullWidth:!0,disabled:!f.name.trim()||!f.prefix.trim()||!f.baseUrl.trim()||i,children:i?"Creating...":"Create"}),(0,d.jsx)(h.$n,{onClick:b,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function z({results:a}){if(a.error&&!a.results)return(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,d.jsx)("p",{className:"text-sm text-red-400",children:a.error})]});let{summary:b,mode:c}=a,e=a.results||[];return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[b&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,d.jsxs)("span",{className:"text-text-muted",children:[{oauth:"OAuth",free:"Free",apikey:"API Key",provider:"Provider",all:"All"}[c]||c," Test"]}),(0,d.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[b.passed," passed"]}),b.failed>0&&(0,d.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[b.failed," failed"]}),(0,d.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[b.total," tested"]})]}),e.map((a,b)=>(0,d.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,d.jsx)("span",{className:`material-symbols-outlined text-[16px] ${a.valid?"text-emerald-500":"text-red-500"}`,children:a.valid?"check_circle":"error"}),(0,d.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,d.jsx)("span",{className:"block truncate font-medium sm:inline",children:a.connectionName}),(0,d.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",a.provider,")"]})]}),void 0!==a.latencyMs&&(0,d.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[a.latencyMs,"ms"]}),(0,d.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${a.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:a.valid?"OK":a.diagnosis?.type||"ERROR"})]},a.connectionId||b)),0===e.length&&(0,d.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:"No active connections found for this group."})]})}u.propTypes={icon:g().string.isRequired,title:g().string.isRequired,description:g().string.isRequired,count:g().number.isRequired,collapsed:g().bool.isRequired,onToggle:g().func.isRequired,children:g().node},v.propTypes={providerId:g().string.isRequired,provider:g().shape({id:g().string.isRequired,name:g().string.isRequired,color:g().string,textIcon:g().string}).isRequired,stats:g().shape({connected:g().number,error:g().number,errorCode:g().string,errorTime:g().string,total:g().number,allDisabled:g().bool}).isRequired,onToggle:g().func},w.propTypes={providerId:g().string.isRequired,provider:g().shape({id:g().string.isRequired,name:g().string.isRequired,color:g().string,textIcon:g().string,apiType:g().string}).isRequired,stats:g().shape({connected:g().number,error:g().number,errorCode:g().string,errorTime:g().string,total:g().number,allDisabled:g().bool}).isRequired,onToggle:g().func},x.propTypes={isOpen:g().bool.isRequired,onClose:g().func.isRequired,onCreated:g().func.isRequired},y.propTypes={isOpen:g().bool.isRequired,onClose:g().func.isRequired,onCreated:g().func.isRequired},z.propTypes={results:g().shape({mode:g().string,results:g().array,summary:g().shape({total:g().number,passed:g().number,failed:g().number}),error:g().string}).isRequired}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},73814:(a,b,c)=>{Promise.resolve().then(c.bind(c,44030))},74075:a=>{"use strict";a.exports=require("zlib")},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},83997:a=>{"use strict";a.exports=require("tty")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7774,5433,1818,319,9071,5189,601,5024,4404,5681,9609,8590,3155,3110,318,8895,7239,6457,1188,9621,412,9372],()=>b(b.s=57212));module.exports=c})();