@jheavenknows/bluerouter 5.4.13 → 5.4.15

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 (1057) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +17 -16
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +2 -2
  5. package/app/.next-cli-build/routes-manifest.json +6 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js +2 -2
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/logs/console/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/logs/console/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/logs/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personal/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personal/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/stt/page.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/stt/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/tts/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/tts/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  91. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  92. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  94. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  99. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  100. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  101. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  102. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  103. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
  104. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/api/audit-proxy/ca/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/audit-proxy/ca/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/audit-proxy/me/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/audit-proxy/me/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/audit-proxy/route.js +2 -2
  110. package/app/.next-cli-build/server/app/api/audit-proxy/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/audit-proxy/users/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/audit-proxy/users/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/view-mode/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/view-mode/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/branding/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/branding/upload/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-model-profiles/model-catalog/route.js +1 -0
  140. package/app/.next-cli-build/server/app/api/cli-model-profiles/model-catalog/route.js.nft.json +1 -0
  141. package/app/.next-cli-build/server/app/api/cli-model-profiles/model-catalog/route_client-reference-manifest.js +1 -0
  142. package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
  145. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +2 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js +2 -2
  153. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  158. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  160. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  166. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  167. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  168. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  169. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  170. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  172. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js +2 -2
  173. package/app/.next-cli-build/server/app/api/cluster/config/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/cluster/config/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/cluster/peers/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/cluster/peers/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js +2 -2
  184. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/cluster/sync/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/cluster/sync/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/cluster/test/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/cluster/test/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/codex-catalog/download/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/codex-catalog/download/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/codex-catalog/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/codex-catalog/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/codex-catalog/upload/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/codex-catalog/upload/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/keys/route.js +2 -2
  228. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +2 -2
  237. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/pricing/catalog/route.js +2 -2
  304. package/app/.next-cli-build/server/app/api/pricing/catalog/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/provider-nodes/openai-compatible/manage/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/provider-nodes/openai-compatible/manage/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  341. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  343. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js +2 -2
  353. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/resource-monitor/route.js +2 -2
  357. package/app/.next-cli-build/server/app/api/resource-monitor/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/settings/database/export/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/settings/database/export/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/settings/route.js +2 -2
  366. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  371. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  390. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  445. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  447. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/version/restart/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  450. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  455. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  456. package/app/.next-cli-build/server/app/callback.html +1 -1
  457. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  458. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  459. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  460. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  461. package/app/.next-cli-build/server/app/dashboard/ai-power-index.html +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/ai-power-index.rsc +6 -6
  463. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/!KGRhc2hib2FyZCk/dashboard/ai-power-index/__PAGE__.segment.rsc +6 -6
  464. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_full.segment.rsc +6 -6
  465. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_tree.segment.rsc +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  467. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +9 -9
  468. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +9 -9
  469. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +9 -9
  470. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +1 -1
  471. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  473. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  474. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  475. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.html +1 -1
  477. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.rsc +20 -19
  478. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/model-profiles/__PAGE__.segment.rsc +30 -28
  479. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_full.segment.rsc +20 -19
  480. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_tree.segment.rsc +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  483. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
  484. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  485. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  486. package/app/.next-cli-build/server/app/dashboard/cluster.html +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/cluster.rsc +6 -6
  488. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster/__PAGE__.segment.rsc +6 -6
  489. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_full.segment.rsc +6 -6
  490. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_tree.segment.rsc +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  493. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
  494. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  495. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  498. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  499. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  500. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/logs.html +1 -1
  502. package/app/.next-cli-build/server/app/dashboard/logs.rsc +6 -6
  503. package/app/.next-cli-build/server/app/dashboard/logs.segments/!KGRhc2hib2FyZCk/dashboard/logs/__PAGE__.segment.rsc +6 -6
  504. package/app/.next-cli-build/server/app/dashboard/logs.segments/_full.segment.rsc +6 -6
  505. package/app/.next-cli-build/server/app/dashboard/logs.segments/_tree.segment.rsc +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  508. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
  509. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  510. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  512. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  513. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
  514. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  515. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/personal.html +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/personal.rsc +7 -7
  518. package/app/.next-cli-build/server/app/dashboard/personal.segments/!KGRhc2hib2FyZCk/dashboard/personal/__PAGE__.segment.rsc +7 -7
  519. package/app/.next-cli-build/server/app/dashboard/personal.segments/_full.segment.rsc +7 -7
  520. package/app/.next-cli-build/server/app/dashboard/personal.segments/_tree.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  522. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  523. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
  524. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  525. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  526. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +6 -6
  528. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +6 -6
  529. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +6 -6
  530. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  532. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +6 -6
  533. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +6 -6
  534. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +6 -6
  535. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  538. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
  539. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  540. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/providers/stt.html +1 -1
  542. package/app/.next-cli-build/server/app/dashboard/providers/stt.rsc +7 -7
  543. package/app/.next-cli-build/server/app/dashboard/providers/stt.segments/!KGRhc2hib2FyZCk/dashboard/providers/stt/__PAGE__.segment.rsc +7 -7
  544. package/app/.next-cli-build/server/app/dashboard/providers/stt.segments/_full.segment.rsc +7 -7
  545. package/app/.next-cli-build/server/app/dashboard/providers/stt.segments/_tree.segment.rsc +1 -1
  546. package/app/.next-cli-build/server/app/dashboard/providers/tts.html +1 -1
  547. package/app/.next-cli-build/server/app/dashboard/providers/tts.rsc +7 -7
  548. package/app/.next-cli-build/server/app/dashboard/providers/tts.segments/!KGRhc2hib2FyZCk/dashboard/providers/tts/__PAGE__.segment.rsc +7 -7
  549. package/app/.next-cli-build/server/app/dashboard/providers/tts.segments/_full.segment.rsc +7 -7
  550. package/app/.next-cli-build/server/app/dashboard/providers/tts.segments/_tree.segment.rsc +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  552. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  553. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
  554. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  555. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  556. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  557. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  558. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
  559. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  560. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  561. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  562. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  563. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
  564. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  565. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  566. package/app/.next-cli-build/server/app/dashboard/resource-monitor.html +1 -1
  567. package/app/.next-cli-build/server/app/dashboard/resource-monitor.rsc +6 -6
  568. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor/__PAGE__.segment.rsc +6 -6
  569. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_full.segment.rsc +6 -6
  570. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_tree.segment.rsc +1 -1
  571. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  572. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  573. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
  574. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  575. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  576. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  578. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
  579. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  580. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  581. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  582. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  583. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
  584. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  585. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  586. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  588. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
  589. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  590. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  591. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  592. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  593. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
  594. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  595. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  596. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  597. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  598. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  599. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  600. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  601. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  602. package/app/.next-cli-build/server/app/index.html +1 -1
  603. package/app/.next-cli-build/server/app/index.rsc +5 -5
  604. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  605. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  606. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  607. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  608. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  609. package/app/.next-cli-build/server/app/landing.html +1 -1
  610. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  611. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  612. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  613. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
  614. package/app/.next-cli-build/server/app/login/page.js +1 -1
  615. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  616. package/app/.next-cli-build/server/app/login.html +1 -1
  617. package/app/.next-cli-build/server/app/login.rsc +6 -6
  618. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  619. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  620. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
  621. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  622. package/app/.next-cli-build/server/app/page.js +1 -1
  623. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  624. package/app/.next-cli-build/server/app-paths-manifest.json +17 -16
  625. package/app/.next-cli-build/server/chunks/2664.js +1 -1
  626. package/app/.next-cli-build/server/chunks/3399.js +1 -1
  627. package/app/.next-cli-build/server/chunks/3433.js +3 -3
  628. package/app/.next-cli-build/server/chunks/3960.js +1 -1
  629. package/app/.next-cli-build/server/chunks/4350.js +1 -1
  630. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  631. package/app/.next-cli-build/server/chunks/4790.js +2 -2
  632. package/app/.next-cli-build/server/chunks/5210.js +3 -3
  633. package/app/.next-cli-build/server/chunks/5296.js +1 -1
  634. package/app/.next-cli-build/server/chunks/6118.js +1 -1
  635. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  636. package/app/.next-cli-build/server/chunks/6684.js +1 -1
  637. package/app/.next-cli-build/server/chunks/6811.js +1 -1
  638. package/app/.next-cli-build/server/chunks/689.js +3 -3
  639. package/app/.next-cli-build/server/chunks/6992.js +1 -1
  640. package/app/.next-cli-build/server/chunks/7774.js +3 -3
  641. package/app/.next-cli-build/server/chunks/8049.js +1 -1
  642. package/app/.next-cli-build/server/chunks/8352.js +2 -2
  643. package/app/.next-cli-build/server/chunks/9.js +2 -2
  644. package/app/.next-cli-build/server/chunks/9012.js +1 -1
  645. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  646. package/app/.next-cli-build/server/pages/404.html +1 -1
  647. package/app/.next-cli-build/server/pages/500.html +1 -1
  648. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  649. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  650. package/app/.next-cli-build/static/DuSB34H6cE3cKjeFATxgo/_buildManifest.js +1 -0
  651. package/app/.next-cli-build/static/chunks/{5263-bdad820566826d54.js → 5263-533ff8cecf251d8a.js} +1 -1
  652. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/api-keys/{page-07d70ddc2fb95e53.js → page-4e908fccca3cb031.js} +4 -4
  653. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/model-profiles/page-398c89951ed46cd1.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/_global-error/page-866b1d0c2eb324a0.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/audit-proxy/ca/route-866b1d0c2eb324a0.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/audit-proxy/me/route-866b1d0c2eb324a0.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/audit-proxy/route-866b1d0c2eb324a0.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/audit-proxy/users/route-866b1d0c2eb324a0.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-866b1d0c2eb324a0.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-866b1d0c2eb324a0.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-866b1d0c2eb324a0.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-866b1d0c2eb324a0.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-866b1d0c2eb324a0.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-866b1d0c2eb324a0.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-866b1d0c2eb324a0.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-866b1d0c2eb324a0.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/auth/view-mode/route-866b1d0c2eb324a0.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/branding/[asset]/route-866b1d0c2eb324a0.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/branding/route-866b1d0c2eb324a0.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/branding/upload/route-866b1d0c2eb324a0.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/cloud-models/route-866b1d0c2eb324a0.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/model-catalog/route-866b1d0c2eb324a0.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/route-866b1d0c2eb324a0.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-866b1d0c2eb324a0.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-866b1d0c2eb324a0.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-866b1d0c2eb324a0.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-866b1d0c2eb324a0.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-866b1d0c2eb324a0.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-866b1d0c2eb324a0.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-866b1d0c2eb324a0.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-866b1d0c2eb324a0.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-866b1d0c2eb324a0.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-866b1d0c2eb324a0.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-866b1d0c2eb324a0.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-866b1d0c2eb324a0.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-866b1d0c2eb324a0.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-866b1d0c2eb324a0.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-866b1d0c2eb324a0.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-866b1d0c2eb324a0.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-866b1d0c2eb324a0.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-866b1d0c2eb324a0.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-866b1d0c2eb324a0.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-866b1d0c2eb324a0.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/cli-tools/qwen-settings/route-866b1d0c2eb324a0.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/cluster/config/route-866b1d0c2eb324a0.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/cluster/heartbeat/route-866b1d0c2eb324a0.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/command/route-866b1d0c2eb324a0.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/route-866b1d0c2eb324a0.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/route-866b1d0c2eb324a0.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/cluster/snapshot/route-866b1d0c2eb324a0.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/cluster/sync/route-866b1d0c2eb324a0.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/cluster/test/route-866b1d0c2eb324a0.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/codex-catalog/download/route-866b1d0c2eb324a0.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/codex-catalog/route-866b1d0c2eb324a0.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/codex-catalog/upload/route-866b1d0c2eb324a0.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-866b1d0c2eb324a0.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/combos/route-866b1d0c2eb324a0.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/dashboard/ai-power-index/route-866b1d0c2eb324a0.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/ai-models/route-866b1d0c2eb324a0.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/analyze/route-866b1d0c2eb324a0.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/route-866b1d0c2eb324a0.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/dashboard/combos/route-866b1d0c2eb324a0.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/dashboard/endpoint/route-866b1d0c2eb324a0.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-866b1d0c2eb324a0.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-866b1d0c2eb324a0.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-866b1d0c2eb324a0.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/dashboard/token-saver/route-866b1d0c2eb324a0.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/health/route-866b1d0c2eb324a0.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/init/route-866b1d0c2eb324a0.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/caveman-test/route-866b1d0c2eb324a0.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-866b1d0c2eb324a0.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-866b1d0c2eb324a0.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/keys/route-866b1d0c2eb324a0.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/locale/route-866b1d0c2eb324a0.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-866b1d0c2eb324a0.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-866b1d0c2eb324a0.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-866b1d0c2eb324a0.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-866b1d0c2eb324a0.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-866b1d0c2eb324a0.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-866b1d0c2eb324a0.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-866b1d0c2eb324a0.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-866b1d0c2eb324a0.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-866b1d0c2eb324a0.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-866b1d0c2eb324a0.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-866b1d0c2eb324a0.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/models/route-866b1d0c2eb324a0.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/models/test/route-866b1d0c2eb324a0.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-866b1d0c2eb324a0.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-866b1d0c2eb324a0.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-866b1d0c2eb324a0.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-866b1d0c2eb324a0.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-866b1d0c2eb324a0.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/device-code/route-866b1d0c2eb324a0.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/poll/route-866b1d0c2eb324a0.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-866b1d0c2eb324a0.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-866b1d0c2eb324a0.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-866b1d0c2eb324a0.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-866b1d0c2eb324a0.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-866b1d0c2eb324a0.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/api-key-models/route-866b1d0c2eb324a0.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/import-models/route-866b1d0c2eb324a0.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route-866b1d0c2eb324a0.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/move/route-866b1d0c2eb324a0.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/route-866b1d0c2eb324a0.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/usage/route-866b1d0c2eb324a0.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/client/route-866b1d0c2eb324a0.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/monitor/route-866b1d0c2eb324a0.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/permissions/route-866b1d0c2eb324a0.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/route-866b1d0c2eb324a0.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/routing/route-866b1d0c2eb324a0.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/shares/route-866b1d0c2eb324a0.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/visibility/route-866b1d0c2eb324a0.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/pricing/catalog/route-866b1d0c2eb324a0.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/pricing/recalculate/route-866b1d0c2eb324a0.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/pricing/route-866b1d0c2eb324a0.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/provider-health/route-866b1d0c2eb324a0.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-866b1d0c2eb324a0.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/openai-compatible/manage/route-866b1d0c2eb324a0.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-866b1d0c2eb324a0.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-866b1d0c2eb324a0.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-866b1d0c2eb324a0.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-866b1d0c2eb324a0.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-866b1d0c2eb324a0.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-866b1d0c2eb324a0.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-866b1d0c2eb324a0.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-866b1d0c2eb324a0.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/providers/route-866b1d0c2eb324a0.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-866b1d0c2eb324a0.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-866b1d0c2eb324a0.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-866b1d0c2eb324a0.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-866b1d0c2eb324a0.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-866b1d0c2eb324a0.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-866b1d0c2eb324a0.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-866b1d0c2eb324a0.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-866b1d0c2eb324a0.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-866b1d0c2eb324a0.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/[id]/route-866b1d0c2eb324a0.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/ai-models/route-866b1d0c2eb324a0.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/analyze/route-866b1d0c2eb324a0.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/history/route-866b1d0c2eb324a0.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/route-866b1d0c2eb324a0.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/settings/database/export/route-866b1d0c2eb324a0.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-866b1d0c2eb324a0.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-866b1d0c2eb324a0.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-866b1d0c2eb324a0.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/settings/route-866b1d0c2eb324a0.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-866b1d0c2eb324a0.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/tags/route-866b1d0c2eb324a0.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-866b1d0c2eb324a0.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-866b1d0c2eb324a0.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-866b1d0c2eb324a0.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-866b1d0c2eb324a0.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-866b1d0c2eb324a0.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-866b1d0c2eb324a0.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-866b1d0c2eb324a0.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-866b1d0c2eb324a0.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-866b1d0c2eb324a0.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-866b1d0c2eb324a0.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-866b1d0c2eb324a0.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-866b1d0c2eb324a0.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-866b1d0c2eb324a0.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-866b1d0c2eb324a0.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-866b1d0c2eb324a0.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-866b1d0c2eb324a0.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-866b1d0c2eb324a0.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-866b1d0c2eb324a0.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-866b1d0c2eb324a0.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-866b1d0c2eb324a0.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-866b1d0c2eb324a0.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-866b1d0c2eb324a0.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-866b1d0c2eb324a0.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-866b1d0c2eb324a0.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-866b1d0c2eb324a0.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-866b1d0c2eb324a0.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-866b1d0c2eb324a0.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-866b1d0c2eb324a0.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-866b1d0c2eb324a0.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-866b1d0c2eb324a0.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-866b1d0c2eb324a0.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-866b1d0c2eb324a0.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-866b1d0c2eb324a0.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-866b1d0c2eb324a0.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-866b1d0c2eb324a0.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-866b1d0c2eb324a0.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-866b1d0c2eb324a0.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-866b1d0c2eb324a0.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/v1/route-866b1d0c2eb324a0.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-866b1d0c2eb324a0.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-866b1d0c2eb324a0.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-866b1d0c2eb324a0.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-866b1d0c2eb324a0.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/version/restart/route-866b1d0c2eb324a0.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/version/route-866b1d0c2eb324a0.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-866b1d0c2eb324a0.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/version/update/route-866b1d0c2eb324a0.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-866b1d0c2eb324a0.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/page-866b1d0c2eb324a0.js +1 -0
  848. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-866b1d0c2eb324a0.js +1 -0
  849. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-866b1d0c2eb324a0.js +1 -0
  850. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-866b1d0c2eb324a0.js +1 -0
  851. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-866b1d0c2eb324a0.js +1 -0
  852. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
  853. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
  854. package/app/package.json +1 -1
  855. package/package.json +1 -1
  856. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/model-profiles/page-514941d4d89828f3.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/_global-error/page-33a3e242390aab34.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/audit-proxy/ca/route-33a3e242390aab34.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/audit-proxy/me/route-33a3e242390aab34.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/audit-proxy/route-33a3e242390aab34.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/audit-proxy/users/route-33a3e242390aab34.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-33a3e242390aab34.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-33a3e242390aab34.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-33a3e242390aab34.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-33a3e242390aab34.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-33a3e242390aab34.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-33a3e242390aab34.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-33a3e242390aab34.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-33a3e242390aab34.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/auth/view-mode/route-33a3e242390aab34.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/branding/[asset]/route-33a3e242390aab34.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/branding/route-33a3e242390aab34.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/branding/upload/route-33a3e242390aab34.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/cloud-models/route-33a3e242390aab34.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/route-33a3e242390aab34.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-33a3e242390aab34.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-33a3e242390aab34.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-33a3e242390aab34.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-33a3e242390aab34.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-33a3e242390aab34.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-33a3e242390aab34.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-33a3e242390aab34.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-33a3e242390aab34.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-33a3e242390aab34.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-33a3e242390aab34.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-33a3e242390aab34.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-33a3e242390aab34.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-33a3e242390aab34.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-33a3e242390aab34.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-33a3e242390aab34.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-33a3e242390aab34.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-33a3e242390aab34.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-33a3e242390aab34.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-33a3e242390aab34.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-33a3e242390aab34.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/cli-tools/qwen-settings/route-33a3e242390aab34.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/cluster/config/route-33a3e242390aab34.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/cluster/heartbeat/route-33a3e242390aab34.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/command/route-33a3e242390aab34.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/route-33a3e242390aab34.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/route-33a3e242390aab34.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/cluster/snapshot/route-33a3e242390aab34.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/cluster/sync/route-33a3e242390aab34.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/cluster/test/route-33a3e242390aab34.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/codex-catalog/download/route-33a3e242390aab34.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/codex-catalog/route-33a3e242390aab34.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/codex-catalog/upload/route-33a3e242390aab34.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-33a3e242390aab34.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/combos/route-33a3e242390aab34.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/dashboard/ai-power-index/route-33a3e242390aab34.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/ai-models/route-33a3e242390aab34.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/analyze/route-33a3e242390aab34.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/route-33a3e242390aab34.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/dashboard/combos/route-33a3e242390aab34.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/dashboard/endpoint/route-33a3e242390aab34.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-33a3e242390aab34.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-33a3e242390aab34.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-33a3e242390aab34.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/dashboard/token-saver/route-33a3e242390aab34.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/health/route-33a3e242390aab34.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/init/route-33a3e242390aab34.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/caveman-test/route-33a3e242390aab34.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-33a3e242390aab34.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-33a3e242390aab34.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/keys/route-33a3e242390aab34.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/locale/route-33a3e242390aab34.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-33a3e242390aab34.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-33a3e242390aab34.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-33a3e242390aab34.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-33a3e242390aab34.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-33a3e242390aab34.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-33a3e242390aab34.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-33a3e242390aab34.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-33a3e242390aab34.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-33a3e242390aab34.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-33a3e242390aab34.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-33a3e242390aab34.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/models/route-33a3e242390aab34.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/models/test/route-33a3e242390aab34.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-33a3e242390aab34.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-33a3e242390aab34.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-33a3e242390aab34.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-33a3e242390aab34.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-33a3e242390aab34.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/device-code/route-33a3e242390aab34.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/poll/route-33a3e242390aab34.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-33a3e242390aab34.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-33a3e242390aab34.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-33a3e242390aab34.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-33a3e242390aab34.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-33a3e242390aab34.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/api-key-models/route-33a3e242390aab34.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/import-models/route-33a3e242390aab34.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route-33a3e242390aab34.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/move/route-33a3e242390aab34.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/route-33a3e242390aab34.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/usage/route-33a3e242390aab34.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/client/route-33a3e242390aab34.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/monitor/route-33a3e242390aab34.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/permissions/route-33a3e242390aab34.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/route-33a3e242390aab34.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/routing/route-33a3e242390aab34.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/shares/route-33a3e242390aab34.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/visibility/route-33a3e242390aab34.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/pricing/catalog/route-33a3e242390aab34.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/pricing/recalculate/route-33a3e242390aab34.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/pricing/route-33a3e242390aab34.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/provider-health/route-33a3e242390aab34.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-33a3e242390aab34.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/openai-compatible/manage/route-33a3e242390aab34.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-33a3e242390aab34.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-33a3e242390aab34.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-33a3e242390aab34.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-33a3e242390aab34.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-33a3e242390aab34.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-33a3e242390aab34.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-33a3e242390aab34.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-33a3e242390aab34.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/providers/route-33a3e242390aab34.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-33a3e242390aab34.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-33a3e242390aab34.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-33a3e242390aab34.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-33a3e242390aab34.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-33a3e242390aab34.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-33a3e242390aab34.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-33a3e242390aab34.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-33a3e242390aab34.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-33a3e242390aab34.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/[id]/route-33a3e242390aab34.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/ai-models/route-33a3e242390aab34.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/analyze/route-33a3e242390aab34.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/history/route-33a3e242390aab34.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/route-33a3e242390aab34.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/settings/database/export/route-33a3e242390aab34.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-33a3e242390aab34.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-33a3e242390aab34.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-33a3e242390aab34.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/settings/route-33a3e242390aab34.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-33a3e242390aab34.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/tags/route-33a3e242390aab34.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-33a3e242390aab34.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-33a3e242390aab34.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-33a3e242390aab34.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-33a3e242390aab34.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-33a3e242390aab34.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-33a3e242390aab34.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-33a3e242390aab34.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-33a3e242390aab34.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-33a3e242390aab34.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-33a3e242390aab34.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-33a3e242390aab34.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-33a3e242390aab34.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-33a3e242390aab34.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-33a3e242390aab34.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-33a3e242390aab34.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-33a3e242390aab34.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-33a3e242390aab34.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-33a3e242390aab34.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-33a3e242390aab34.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-33a3e242390aab34.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-33a3e242390aab34.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-33a3e242390aab34.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-33a3e242390aab34.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-33a3e242390aab34.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-33a3e242390aab34.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-33a3e242390aab34.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-33a3e242390aab34.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-33a3e242390aab34.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-33a3e242390aab34.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-33a3e242390aab34.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-33a3e242390aab34.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-33a3e242390aab34.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-33a3e242390aab34.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-33a3e242390aab34.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-33a3e242390aab34.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-33a3e242390aab34.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-33a3e242390aab34.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-33a3e242390aab34.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/v1/route-33a3e242390aab34.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-33a3e242390aab34.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-33a3e242390aab34.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-33a3e242390aab34.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-33a3e242390aab34.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/version/restart/route-33a3e242390aab34.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/version/route-33a3e242390aab34.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-33a3e242390aab34.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/version/update/route-33a3e242390aab34.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-33a3e242390aab34.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/page-33a3e242390aab34.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-33a3e242390aab34.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-33a3e242390aab34.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-33a3e242390aab34.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-33a3e242390aab34.js +0 -1
  1054. package/app/.next-cli-build/static/mmuU-WYdHlWiLCuG5xDtl/_buildManifest.js +0 -1
  1055. /package/app/.next-cli-build/static/{mmuU-WYdHlWiLCuG5xDtl → DuSB34H6cE3cKjeFATxgo}/_ssgManifest.js +0 -0
  1056. /package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.4.1-to-5.4.2-5.4.2-20260823-230632 → upgrade-5.4.12-to-5.4.13-5.4.13-20260824-200839}/data.sqlite +0 -0
  1057. /package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.4.2-to-5.4.3-5.4.3-20260823-231221 → upgrade-5.4.5-to-5.4.12-5.4.12-20260824-191612}/data.sqlite +0 -0
@@ -1 +1 @@
1
- (()=>{var a={};a.id=8978,a.ids=[8978],a.modules={1932:a=>{"use strict";a.exports=require("url")},2777:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>w,handler:()=>y,routeModule:()=>x});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,32059))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u={children:["",{children:["(dashboard)",{children:["dashboard",{children:["analytics",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,19616))),"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\analytics\\page.js"]}]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"D:\\bluerouter\\src\\app\\(dashboard)\\layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"D:\\bluerouter\\src\\app\\layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,v=(0,e.H)({tree:u,page:"/(dashboard)/dashboard/analytics/page",pathname:"/dashboard/analytics",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),w=v.__next_app__,x=v.routeModule,y=v.handler},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")},6633:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\analytics\\\\AnalyticsRangeGuard.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.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\analytics\\AnalyticsRangeGuard.js","default")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10171:(a,b,c)=>{"use strict";function d(){return null}c.d(b,{default:()=>d}),c(67484)},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19616:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>i,metadata:()=>h});var d=c(5735),e=c(62855),f=c(6633),g=c(78633);let h={title:"Analytics"};async function i({searchParams:a}){let b=await a,c=b?.scope==="cloud"?"cloud":"local";return(0,d.jsxs)(g.default,{initialScope:c,children:[(0,d.jsx)(f.default,{}),(0,d.jsx)(e.default,{})]})}},19771:a=>{"use strict";a.exports=require("process")},20503:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var d={MutableRequestCookiesAdapter:function(){return o},ReadonlyRequestCookiesError:function(){return j},RequestCookiesAdapter:function(){return k},appendMutableCookies:function(){return n},areCookiesMutableInCurrentPhase:function(){return q},createCookiesWithMutableAccessCheck:function(){return p},getModifiedCookieValues:function(){return m},responseCookiesToRequestCookies:function(){return s}};for(var e in d)Object.defineProperty(b,e,{enumerable:!0,get:d[e]});let f=c(91488),g=c(20445),h=c(29294),i=c(43014);class j extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options"),Object.defineProperty(this,"__NEXT_ERROR_CODE",{value:"E1180",enumerable:!1,configurable:!0})}static callable(){throw new j}}class k{static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"clear":case"delete":case"set":return j.callable;default:return g.ReflectAdapter.get(a,b,c)}}})}static fresh(a){return new Proxy(a,{get:(a,b,c)=>g.ReflectAdapter.get(a,b,c)})}}let l=Symbol.for("next.mutated.cookies");function m(a){let b=a[l];return b&&Array.isArray(b)&&0!==b.length?b:[]}function n(a,b){let c=m(b);if(0===c.length)return!1;let d=new f.ResponseCookies(a),e=d.getAll();for(let a of c)d.set(a);for(let a of e)d.set(a);return!0}class o{static wrap(a,b){let c=new f.ResponseCookies(new Headers);for(let b of a.getAll())c.set(b);let d=[],e=new Set,j=()=>{let a=h.workAsyncStorage.getStore();if(a&&(a.pathWasRevalidated=i.ActionDidRevalidateStaticAndDynamic),d=c.getAll().filter(a=>e.has(a.name)),b){let a=[];for(let b of d){let c=new f.ResponseCookies(new Headers);c.set(b),a.push(c.toString())}b(a)}},k=new Proxy(c,{get(a,b,c){switch(b){case l:return d;case"delete":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.delete(...b),k}finally{j()}};case"set":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.set(...b),k}finally{j()}};default:return g.ReflectAdapter.get(a,b,c)}}});return k}}function p(a){let b=new Proxy(a.mutableCookies,{get(c,d,e){switch(d){case"delete":return function(...d){return r(a,"cookies().delete"),c.delete(...d),b};case"set":return function(...d){return r(a,"cookies().set"),c.set(...d),b};default:return g.ReflectAdapter.get(c,d,e)}}});return b}function q(a){return"action"===a.phase}function r(a,b){if(!q(a))throw new j}function s(a){let b=new f.RequestCookies(new Headers);for(let c of a.getAll())b.set(c);return b}},21820:a=>{"use strict";a.exports=require("os")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},32804:(a,b,c)=>{Promise.resolve().then(c.bind(c,78954)),Promise.resolve().then(c.bind(c,10171)),Promise.resolve().then(c.bind(c,91687))},33873:a=>{"use strict";a.exports=require("path")},34631:a=>{"use strict";a.exports=require("tls")},38522:a=>{"use strict";a.exports=require("node:zlib")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41204:a=>{"use strict";a.exports=require("string_decoder")},43014:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={ActionDidNotRevalidate:function(){return e},ActionDidRevalidateDynamicOnly:function(){return g},ActionDidRevalidateStaticAndDynamic:function(){return f}};for(var d in c)Object.defineProperty(b,d,{enumerable:!0,get:c[d]});let e=0,f=1,g=2},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},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")},62855:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\analytics\\\\AnalyticsPageClient.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.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\analytics\\AnalyticsPageClient.js","default")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{"use strict";a.exports=import("pg")},66136:a=>{"use strict";a.exports=require("timers")},73024:a=>{"use strict";a.exports=require("node:fs")},74075:a=>{"use strict";a.exports=require("zlib")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},78633:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\analytics\\\\AnalyticsScopeShell.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.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\analytics\\AnalyticsScopeShell.js","default")},78954:(a,b,c)=>{"use strict";c.d(b,{default:()=>aq});var d=c(48249),e=c(67484),f=c(26921),g=c(20151);function h(a){let b=Number(a);return Number.isFinite(b)?b:0}function i(a,b=0){return h(a).toLocaleString("vi-VN",{maximumFractionDigits:b})}function j(a){return new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}).format(h(a))}function k(a){let b=Number(a);return!Number.isFinite(b)||b<=0?"-":b>=1e3?`${(b/1e3).toLocaleString("vi-VN",{maximumFractionDigits:2})} s`:`${Math.round(b)} ms`}function l(a){let b=Number(a);return Number.isFinite(b)&&b>0?`${b.toLocaleString("vi-VN",{maximumFractionDigits:1})} tok/s`:"-"}function m(a){return`$${h(a).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4})}`}function n({row:a}){return(0,d.jsxs)("div",{className:"min-w-[105px] text-xs tabular-nums",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:j(a.totalTokens)}),(0,d.jsxs)("div",{className:"text-text-muted",children:["in ",j(a.promptTokens)," \xb7 out ",j(a.completionTokens)]})]})}function o({label:a,value:b,hint:c}){return(0,d.jsxs)("div",{className:"rounded-xl border border-border bg-background/55 px-3 py-2.5",children:[(0,d.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-text-muted",children:a}),(0,d.jsx)("div",{className:"mt-1 text-lg font-semibold tabular-nums text-text-main",children:b}),c?(0,d.jsx)("div",{className:"mt-0.5 text-[10px] text-text-muted",children:c}):null]})}function p({rows:a,cloud:b}){return a.length?(0,d.jsx)("div",{className:"overflow-x-auto overflow-y-auto rounded-2xl border border-border",style:{maxHeight:"520px"},children:(0,d.jsxs)("table",{className:"min-w-[1080px] w-full divide-y divide-border text-sm",children:[(0,d.jsx)("thead",{className:"sticky top-0 z-10 bg-background/95 backdrop-blur",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-3 py-2.5 text-left text-xs font-semibold text-text-muted",children:"Model / Provider"}),(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",children:"Req"}),(0,d.jsx)("th",{className:"px-3 py-2.5 text-left text-xs font-semibold text-text-muted",children:"Tokens"}),(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",children:"Error"}),(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",children:"P95 latency"}),(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",children:"P95 TTFT"}),b?null:(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",title:"Decode tok/s = Σ output tokens / Σ (latency - TTFT). Chỉ d\xf9ng request th\xe0nh c\xf4ng c\xf3 output v\xe0 TTFT hợp lệ.",children:"Decode tok/s"}),b?(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",children:"Cost"}):null,(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",children:"Last used"})]})}),(0,d.jsx)("tbody",{className:"divide-y divide-border/70",children:a.map(a=>{let c,e,f=(c=h(a.requests),e=h(a.errors),c>0?e/c:h(a.errorRate)),g=a.decodeTokensPerSecond,j=h(a.decodeSamples),o=h(a.estimatedSamplesExcluded);return(0,d.jsxs)("tr",{className:"hover:bg-background/50",children:[(0,d.jsxs)("td",{className:"px-3 py-2.5",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a.model||a.label||"unknown"}),(0,d.jsx)("div",{className:"mt-0.5 text-xs text-text-muted",children:a.providerLabel||a.provider||"unknown"})]}),(0,d.jsx)("td",{className:"px-3 py-2.5 text-right tabular-nums",children:i(a.requests)}),(0,d.jsx)("td",{className:"px-3 py-2.5",children:(0,d.jsx)(n,{row:a})}),(0,d.jsx)("td",{className:"px-3 py-2.5 text-right",children:(0,d.jsxs)("span",{className:f>=.05?"text-red-500":f>0?"text-amber-500":"text-emerald-500",children:[(100*f).toLocaleString("vi-VN",{maximumFractionDigits:1}),"%"]})}),(0,d.jsx)("td",{className:"px-3 py-2.5 text-right tabular-nums",children:k(a.p95LatencyMs)}),(0,d.jsx)("td",{className:"px-3 py-2.5 text-right tabular-nums",children:k(a.p95TtftMs)}),b?null:(0,d.jsxs)("td",{className:"px-3 py-2.5 text-right tabular-nums",children:[(0,d.jsx)("div",{className:"font-semibold",children:l(g)}),(0,d.jsxs)("div",{className:"mt-0.5 text-[10px] font-normal text-text-muted",children:[i(j)," mẫu TTFT"]}),null==g&&a.e2eOutputTokensPerSecond?(0,d.jsxs)("div",{className:"text-[10px] font-normal text-text-subtle",children:["E2E ",l(a.e2eOutputTokensPerSecond)]}):null,o>0?(0,d.jsxs)("div",{className:"text-[10px] font-normal text-amber-600 dark:text-amber-300",children:[i(o)," mẫu token ước lượng bị loại"]}):null]}),b?(0,d.jsx)("td",{className:"px-3 py-2.5 text-right tabular-nums text-emerald-600 dark:text-emerald-300",children:m(a.cost)}):null,(0,d.jsx)("td",{className:"px-3 py-2.5 text-right text-xs text-text-muted",children:function(a){if(!a)return"-";let b=new Date(a);return Number.isNaN(b.getTime())?String(a):b.toLocaleString("vi-VN")}(a.lastSeen)})]},a.key||`${a.provider}-${a.model}`)})})]})}):(0,d.jsxs)("div",{className:"rounded-2xl border border-dashed border-border px-4 py-7 text-center text-sm text-text-muted",children:["Kh\xf4ng c\xf3 model ",b?"cloud":"local"," trong khoảng lọc hiện tại."]})}function q({type:a,rows:b,summary:c}){let e="local"===a,f=c.decodeTokensPerSecond,g=h(c.estimatedSamplesExcluded),k=[`Σ output / Σ(latency − TTFT) \xb7 ${i(c.decodeSamples||0)} mẫu TTFT hợp lệ`,g>0?`${i(g)} mẫu token ước lượng bị loại`:"",null==f&&c.e2eOutputTokensPerSecond?`Chưa c\xf3 mẫu TTFT hợp lệ \xb7 E2E ${l(c.e2eOutputTokensPerSecond)}`:""].filter(Boolean).join(" \xb7 ");return(0,d.jsxs)("section",{className:"rounded-3xl border border-border bg-surface p-5 shadow-[var(--shadow-soft)]",children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("div",{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl ${e?"bg-primary/10 text-primary":"bg-amber-500/10 text-amber-600 dark:text-amber-300"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:e?"developer_board":"cloud"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:e?"Local Models":"Cloud Models"}),(0,d.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:e?"Self-hosted inference: vLLM, SGLang, Ollama, llama.cpp hoặc compatible endpoint được đ\xe1nh dấu Local.":"External/cloud API providers, kể cả compatible endpoint được đ\xe1nh dấu Cloud."})]})]}),(0,d.jsxs)("span",{className:"rounded-full border border-border bg-background px-3 py-1 text-xs font-semibold text-text-muted",children:[i(c.models??b.length)," models"]})]}),(0,d.jsxs)("div",{className:"mb-4 grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:[(0,d.jsx)(o,{label:"Requests",value:i(c.requests)}),(0,d.jsx)(o,{label:"Total tokens",value:j(c.totalTokens),hint:`In ${j(c.promptTokens)} \xb7 Out ${j(c.completionTokens)}`}),e?(0,d.jsx)(o,{label:"Decode speed",value:l(f),hint:k}):(0,d.jsx)(o,{label:"Estimated cost",value:m(c.cost)})]}),(0,d.jsx)(p,{rows:b,cloud:!e})]})}function r({data:a}){let b=a?.groups||{},c=a?.deploymentAnalytics||{},e=String(a?.analyticsScope||"all").trim().toLowerCase(),f=b.localModels||[],g=b.cloudModels||[],h=b.unknownModels||[];return(0,d.jsxs)("div",{className:"space-y-5",children:["cloud"!==e?(0,d.jsx)(q,{type:"local",rows:f,summary:c.local||{}}):null,"local"!==e?(0,d.jsx)(q,{type:"cloud",rows:g,summary:c.cloud||{}}):null,h.length>0?(0,d.jsx)("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"warning"}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"font-semibold",children:[i(h.length)," model chưa x\xe1c định Local / Cloud"]}),(0,d.jsx)("div",{className:"mt-0.5 text-xs opacity-90",children:"Mở Custom Provider tương ứng v\xe0 chọn Deployment để số liệu kh\xf4ng bị gộp sai."})]})]})}):null]})}f.xI.setOptions({gfm:!0,breaks:!0});let s=[{value:"today",label:"H\xf4m nay"},{value:"todayWorking",label:"H\xf4m nay (Working time)"},{value:"yesterday",label:"H\xf4m qua"},{value:"yesterdayWorking",label:"H\xf4m qua (Working time)"},{value:"24h",label:"24 giờ"},{value:"thisWeek",label:"Tuần n\xe0y"},{value:"lastWeek",label:"Tuần trước"},{value:"7d",label:"7 ng\xe0y"},{value:"thisMonth",label:"Th\xe1ng n\xe0y"},{value:"lastMonth",label:"Th\xe1ng trước"},{value:"30d",label:"30 ng\xe0y"},{value:"60d",label:"60 ng\xe0y"},{value:"all",label:"Tất cả (60 ng\xe0y)"},{value:"custom",label:"T\xf9y chọn"}],t=[{value:"overview",label:"Tổng quan",icon:"dashboard"},{value:"apiKeys",label:"API keys",icon:"vpn_key"},{value:"clients",label:"Client/User",icon:"groups"},{value:"sources",label:"Source IP / Tool",icon:"hub"},{value:"providers",label:"Provider / Model",icon:"dns"},{value:"experience",label:"Trải nghiệm",icon:"speed"},{value:"errors",label:"Lỗi & bất thường",icon:"warning"},{value:"raw",label:"Raw usage",icon:"table"},{value:"aiHealth",label:"Đ\xe1nh gi\xe1 AI",icon:"neurology"}],u={normal:{className:"border-emerald-500/20 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",label:"B\xecnh thường"},warning:{className:"border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-300",label:"Cảnh b\xe1o"},critical:{className:"border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300",label:"Nghi\xeam trọng"},no_traffic:{className:"border-border bg-surface-2 text-text-muted",label:"Kh\xf4ng c\xf3 lưu lượng"},unknown:{className:"border-border bg-surface-2 text-text-muted",label:"Kh\xf4ng r\xf5"}};function v({status:a}){let b=u[a]||u.unknown;return(0,d.jsxs)("span",{className:K("inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-semibold",b.className),children:[(0,d.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-current"}),b.label]})}function w(a){let b=Number(a||0);if(!b)return"-";let c=["B","KiB","MiB","GiB","TiB"],d=Math.min(Math.floor(Math.log(b)/Math.log(1024)),c.length-1);return`${(b/1024**d).toLocaleString("vi-VN",{maximumFractionDigits:1})} ${c[d]}`}function x({nodes:a=[]}){return a.length?(0,d.jsxs)("section",{className:"border-y border-border py-4",children:[(0,d.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[19px] text-primary",children:"developer_board"}),(0,d.jsx)("h4",{className:"text-sm font-semibold text-text-main",children:"Cấu h\xecnh phần cứng từng node tại l\xfac đ\xe1nh gi\xe1"})]}),(0,d.jsx)("div",{className:"divide-y divide-border",children:a.map(a=>(0,d.jsxs)("div",{className:"grid gap-2 py-3 text-xs md:grid-cols-[minmax(180px,0.8fr)_minmax(0,2.2fr)]",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a.name}),(0,d.jsx)("div",{className:"mt-0.5 text-text-muted",children:a.host||a.hostname||"-"}),(0,d.jsx)("div",{className:a.reachable?"mt-1 text-emerald-600 dark:text-emerald-300":"mt-1 text-red-600 dark:text-red-300",children:a.reachable?"C\xf3 dữ liệu":a.error||"Chưa c\xf3 snapshot"})]}),a.reachable?(0,d.jsxs)("div",{className:"space-y-1 text-text-muted",children:[(0,d.jsxs)("p",{children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"CPU:"})," ",a.cpu?.model||"-"," \xb7 ",a.cpu?.cores||0," cores \xb7 sử dụng ",Number(a.cpu?.usagePercent||0).toLocaleString("vi-VN",{maximumFractionDigits:1}),"%"]}),(0,d.jsxs)("p",{children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"RAM:"})," ",w(a.memory?.totalBytes)," \xb7 đang d\xf9ng ",w(a.memory?.usedBytes)," (",Number(a.memory?.usagePercent||0).toLocaleString("vi-VN",{maximumFractionDigits:1}),"%)"]}),a.gpus?.length?a.gpus.map(b=>(0,d.jsxs)("p",{children:[(0,d.jsxs)("span",{className:"font-medium text-text-main",children:["GPU ",b.index,":"]})," ",b.name," \xb7 VRAM ",(Number(b.memoryTotalMb||0)/1024).toLocaleString("vi-VN",{maximumFractionDigits:1})," GiB \xb7 sử dụng ",Number(b.usagePercent||0).toLocaleString("vi-VN",{maximumFractionDigits:1}),"%"]},`${a.id}-${b.index}`)):(0,d.jsxs)("p",{children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"GPU:"})," Kh\xf4ng ph\xe1t hiện NVIDIA GPU"]}),(0,d.jsxs)("p",{className:"text-text-subtle",children:["Snapshot: ",a.statusAt?new Date(a.statusAt).toLocaleString("vi-VN"):"-"]})]}):null]},a.id))})]}):null}function y(){let[a,b]=(0,e.useState)([]),[c,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(null),[j,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)(!1),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(""),[w,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(""),B=(0,e.useCallback)(a=>{g(a),fetch("/api/dashboard/analytics/analyze",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a})}).catch(()=>{})},[]),C=(0,e.useCallback)(async({showMessage:a=!0}={})=>{y(!0),a&&A("");try{let b=await fetch("/api/dashboard/analytics/analyze",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({vllmConfig:r})}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Kh\xf4ng thể lưu cấu h\xecnh vLLM");let d=c.vllmConfig||"";return s(d),u(d),a&&A("Đ\xe3 lưu cấu h\xecnh vLLM"),d}finally{y(!1)}},[r]),D=(0,e.useCallback)(async()=>{o("");try{await C()}catch(a){A(""),o(a?.message||"Kh\xf4ng thể lưu cấu h\xecnh vLLM")}},[C]),E=(0,e.useCallback)(async()=>{if(!c)return;let a=c.indexOf("::"),b=c.slice(0,a),d=c.slice(a+2);m(!0),o("");try{r.trim()!==t&&await C({showMessage:!1});let a=await fetch("/api/dashboard/analytics/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:b,model:d})}),c=await a.json().catch(()=>({}));if(!a.ok)throw Error(c.error||"Kh\xf4ng thể ph\xe2n t\xedch");i(c.analysis)}catch(a){o(a?.message||"Kh\xf4ng thể ph\xe2n t\xedch")}finally{m(!1)}},[C,t,c,r]),F=(0,e.useMemo)(()=>h?.summary?f.xI.parse(h.summary):"",[h]);return(0,d.jsxs)("section",{className:"overflow-hidden rounded-3xl border border-border bg-surface shadow-[var(--shadow-soft)]",children:[(0,d.jsx)("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b border-border px-6 py-5",children:(0,d.jsxs)("div",{className:"flex items-center gap-4",children:[(0,d.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[27px]",children:"neurology"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"text-lg font-semibold text-text-main",children:"Đ\xe1nh gi\xe1 AI về trải nghiệm & hiệu năng"}),(0,d.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:'Ph\xe2n t\xedch giờ l\xe0m việc h\xf4m nay, tập trung v\xe0o tab "Trải nghiệm" v\xe0 c\xe1c vLLM AI server local. Chạy nền tự động mỗi 1 giờ.'})]})]})}),(0,d.jsxs)("div",{className:"space-y-5 p-6",children:[j?(0,d.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:"Standby mode: kết quả ph\xe2n t\xedch được đồng bộ tự động từ Master. Node n\xe0y kh\xf4ng tự chạy ph\xe2n t\xedch AI."}):null,(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("label",{htmlFor:"analytics-vllm-config",className:"text-xs font-medium text-text-muted",children:"Cấu h\xecnh vLLM của c\xe1c server"}),(0,d.jsxs)("span",{className:"text-xs text-text-subtle",children:[r.length.toLocaleString("vi-VN")," / 50.000 k\xfd tự"]})]}),(0,d.jsx)("textarea",{id:"analytics-vllm-config",rows:8,maxLength:5e4,value:r,onChange:a=>{s(a.target.value),A("")},disabled:j||w,placeholder:"M\xf4 tả theo từng node, v\xed dụ:\nnode-gpu-01: model=..., --tensor-parallel-size 4, --max-model-len 32768, --gpu-memory-utilization 0.9\nnode-gpu-02: model=..., replicas=2, c\xe1c tham số batching/concurrency...",className:"w-full resize-y rounded-lg border border-border bg-surface px-3 py-2.5 font-mono text-xs leading-5 text-text-main outline-none transition focus:border-primary focus:ring-2 focus:ring-primary/15 disabled:opacity-60"}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"D\xf9ng t\xean hoặc host tr\xf9ng với Linux node trong Resource Monitor để AI \xe1nh xạ ch\xednh x\xe1c."}),(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[z?(0,d.jsx)("span",{className:"text-xs text-emerald-600 dark:text-emerald-300",children:z}):null,(0,d.jsxs)("button",{type:"button",onClick:D,disabled:j||w||r.trim()===t,className:"inline-flex items-center gap-2 rounded-lg border border-border bg-surface px-3 py-2 text-xs font-semibold text-text-main transition hover:border-primary/40 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:w?"progress_activity":"save"}),w?"Đang lưu...":"Lưu cấu h\xecnh"]})]})]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,d.jsxs)("label",{className:"flex min-w-[280px] flex-1 flex-col gap-1.5 text-sm",children:[(0,d.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"AI model d\xf9ng để ph\xe2n t\xedch"}),(0,d.jsxs)("select",{className:"rounded-xl border border-border bg-surface px-3 py-2.5 text-sm text-text-main disabled:opacity-60",value:c,onChange:a=>B(a.target.value),disabled:!a.length||j,children:[a.length?null:(0,d.jsx)("option",{value:"",children:"Chưa c\xf3 kết nối AI n\xe0o đang hoạt động"}),a.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value))]})]}),(0,d.jsxs)("button",{type:"button",onClick:E,disabled:!c||j||l,className:"flex items-center gap-2 rounded-xl bg-primary px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition disabled:cursor-not-allowed disabled:opacity-60",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l?"progress_activity":"auto_awesome"}),l?"Đang ph\xe2n t\xedch...":"Ph\xe2n t\xedch lại"]})]}),n?(0,d.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-300",children:n}):null,h?(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-text-muted",children:[(0,d.jsxs)("span",{children:["Model: ",(0,d.jsx)("span",{className:"font-semibold",children:h.modelLabel})]}),(0,d.jsxs)("span",{children:["Cập nhật l\xfac ",h.generatedAt?new Date(h.generatedAt).toLocaleString("vi-VN"):"-"]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Tổng quan:"}),(0,d.jsx)(v,{status:h.status}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"vLLM local:"}),(0,d.jsx)(v,{status:h.vllmStatus}),"number"==typeof h.vllmServerCount?(0,d.jsxs)("span",{className:"text-xs text-text-subtle",children:["(",h.vllmServerCount," node)"]}):null]}),(0,d.jsx)(x,{nodes:h.hardwareNodes||[]}),(0,d.jsx)("div",{className:"analytics-ai-body rounded-2xl border border-border bg-surface-2/40 p-5 text-sm leading-6 text-text-main",dangerouslySetInnerHTML:{__html:F}})]}):!l&&p?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border bg-surface-2/40 py-10 text-center text-sm text-text-muted",children:'Chưa c\xf3 ph\xe2n t\xedch n\xe0o — bấm "Ph\xe2n t\xedch lại" để bắt đầu.'}):null]})]})}function z(a,b=0){return Number(a||0).toLocaleString("vi-VN",{maximumFractionDigits:b})}function A(a){let b=Number(a||0);return Intl.NumberFormat("vi-VN",{notation:"compact",maximumFractionDigits:1}).format(b)}function B(a){let b=100*Number(a||0);return`${b.toLocaleString("vi-VN",{maximumFractionDigits:1})}%`}function C(a){let b=Number(a||0);return b?`$${b.toLocaleString("vi-VN",{minimumFractionDigits:4,maximumFractionDigits:6})}`:"$0"}function D(a){if(null==a||Number.isNaN(Number(a)))return"-";let b=Number(a);return b>=1e3?`${(b/1e3).toLocaleString("vi-VN",{maximumFractionDigits:2})}s`:`${b.toLocaleString("vi-VN",{maximumFractionDigits:0})}ms`}function E(a,b="/s"){if(null==a||Number.isNaN(Number(a)))return"-";let c=Number(a);return`${c.toLocaleString("vi-VN",{maximumFractionDigits:c>=10?1:2})}${b}`}function F(a){return null==a||Number.isNaN(Number(a))?"-":`${Number(a).toLocaleString("vi-VN",{maximumFractionDigits:0})}/100`}function G(a){if(!a)return null;let b=String(a).trim();return new Date(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)?$/.test(b)?`${b.replace(" ","T")}Z`:b)}function H(a){if(!a)return"-";try{let b=G(a);if(!b||Number.isNaN(b.getTime()))return String(a);return b.toLocaleString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return String(a)}}function I(a){if(!a)return"";try{let b=G(a);if(!b||Number.isNaN(b.getTime()))return String(a);return b.toLocaleString("vi-VN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch{return String(a)}}function J(){let{isAdmin:a,isMonitorAdmin:b,isAiGatewaysMonitor:c}=(0,g.s)();return a||b||c}function K(...a){return a.filter(Boolean).join(" ")}function L(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}function M(a,b={}){let c=new URLSearchParams;return Object.entries({...a,...b}).forEach(([a,b])=>{let d=String(b??"").trim();d&&c.set(a,d)}),c.toString()}function N({children:a,className:b=""}){return(0,d.jsx)("div",{className:K("min-w-0 rounded-2xl border border-border bg-surface p-5 shadow-sm",b),children:a})}function O({icon:a,label:b,value:c,hint:e,help:f,tone:g="blue"}){return(0,d.jsx)(N,{className:"min-h-[126px]",children:(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"text-sm font-medium text-text-muted",children:b}),(0,d.jsx)("div",{className:"mt-2 text-2xl font-semibold text-text-main",children:c}),e?(0,d.jsx)("div",{className:"mt-2 text-xs text-text-muted",children:e}):null,f?(0,d.jsx)("div",{className:"mt-1 text-[11px] leading-4 text-text-muted/70",children:f}):null]}),(0,d.jsx)("div",{className:K("flex h-10 w-10 items-center justify-center rounded-xl",{blue:"bg-blue-500/10 text-blue-600 dark:text-blue-300",green:"bg-green-500/10 text-green-600 dark:text-green-300",red:"bg-red-500/10 text-red-600 dark:text-red-300",amber:"bg-amber-500/10 text-amber-600 dark:text-amber-300",purple:"bg-purple-500/10 text-purple-600 dark:text-purple-300",slate:"bg-slate-500/10 text-slate-600 dark:text-slate-300"}[g]||"bg-blue-500/10 text-blue-600 dark:text-blue-300"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:a})})]})})}function P({label:a,children:b}){return(0,d.jsxs)("label",{className:"space-y-1.5 text-xs font-medium text-text-muted",children:[(0,d.jsx)("span",{children:a}),b]})}function Q({value:a,onChange:b,children:c}){return(0,d.jsx)("select",{value:a||"",onChange:a=>b(a.target.value),className:"h-10 w-full rounded-xl border border-border bg-background px-3 text-sm text-text-main outline-none transition focus:border-primary/60 focus:ring-2 focus:ring-primary/20",children:c})}function R({value:a,onChange:b,placeholder:c="",type:e="text"}){return(0,d.jsx)("input",{value:a||"",type:e,onChange:a=>b(a.target.value),placeholder:c,className:"h-10 w-full rounded-xl border border-border bg-background px-3 text-sm text-text-main outline-none transition placeholder:text-text-muted/60 focus:border-primary/60 focus:ring-2 focus:ring-primary/20"})}function S(){return(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:Array.from({length:8}).map((a,b)=>(0,d.jsx)("div",{className:"h-32 animate-pulse rounded-2xl border border-border bg-surface"},b))}),(0,d.jsx)("div",{className:"h-80 animate-pulse rounded-2xl border border-border bg-surface"})]})}function T({title:a="Kh\xf4ng c\xf3 dữ liệu",description:b="Kh\xf4ng t\xecm thấy dữ liệu theo bộ lọc hiện tại."}){return(0,d.jsxs)("div",{className:"flex min-h-[180px] flex-col items-center justify-center rounded-2xl border border-dashed border-border bg-surface/60 p-8 text-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-4xl text-text-muted",children:"database_off"}),(0,d.jsx)("div",{className:"mt-3 text-sm font-semibold text-text-main",children:a}),(0,d.jsx)("div",{className:"mt-1 max-w-xl text-sm text-text-muted",children:b})]})}function U({data:a=[],valueKey:b="totalTokens",secondaryKey:c="requests",height:e=220}){let f=a||[],g=Math.max(...f.map(a=>Number(a[b]||0)),1),h=Math.max(...f.map(a=>Number(a[c]||0)),1);return 0===f.length?(0,d.jsx)(T,{description:"Chưa c\xf3 time-series trong khoảng thời gian n\xe0y."}):(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("div",{className:"min-w-[720px]",children:[(0,d.jsx)("div",{className:"flex items-end gap-1",style:{height:e},children:f.map((a,f)=>{let i=Math.max(2,Number(a[b]||0)/g*(e-42)),j=Math.max(2,Number(a[c]||0)/h*(e-42));return(0,d.jsx)("div",{className:"group flex flex-1 flex-col items-center justify-end gap-1",children:(0,d.jsxs)("div",{className:"relative flex h-full w-full max-w-[34px] items-end justify-center gap-0.5",children:[(0,d.jsx)("div",{className:"w-2 rounded-t bg-primary/70",style:{height:i}}),(0,d.jsx)("div",{className:"w-2 rounded-t bg-amber-500/70",style:{height:j}}),(0,d.jsxs)("div",{className:"pointer-events-none absolute bottom-full left-1/2 z-20 hidden w-56 -translate-x-1/2 rounded-xl border border-border bg-surface p-3 text-left text-xs shadow-xl group-hover:block",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:I(a.label)}),(0,d.jsxs)("div",{className:"mt-1 text-text-muted",children:["Request: ",z(a.requests)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["Input token: ",z(a.promptTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["Output token: ",z(a.completionTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["Tổng token: ",z(a.totalTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["Lỗi: ",z(a.errors)]})]})]})},`${a.label}-${f}`)})}),(0,d.jsxs)("div",{className:"mt-3 flex justify-between gap-2 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{children:I(f[0]?.label)}),(0,d.jsx)("span",{children:I(f[Math.floor(f.length/2)]?.label)}),(0,d.jsx)("span",{children:I(f[f.length-1]?.label)})]})]})})}function V(){return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-text-muted",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"h-2.5 w-2.5 rounded-sm bg-primary/70"}),"Token"]}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"h-2.5 w-2.5 rounded-sm bg-amber-500/70"}),"Request"]})]})}function W({columns:a,rows:b,empty:c="Kh\xf4ng c\xf3 dữ liệu"}){return b&&0!==b.length?(0,d.jsx)("div",{className:"overflow-x-auto overflow-y-auto rounded-2xl border border-border",style:{maxHeight:"500px"},children:(0,d.jsxs)("table",{className:"min-w-full divide-y divide-border text-sm",children:[(0,d.jsx)("thead",{className:"bg-background/70",children:(0,d.jsx)("tr",{children:a.map(a=>(0,d.jsx)("th",{className:K("whitespace-nowrap px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-text-muted",a.className),children:a.label},a.key))})}),(0,d.jsx)("tbody",{className:"divide-y divide-border bg-surface",children:b.map((b,c)=>(0,d.jsx)("tr",{className:"hover:bg-background/60",children:a.map(a=>(0,d.jsx)("td",{className:K("whitespace-nowrap px-4 py-3 align-top text-text-main",a.className),children:a.render?a.render(b,c):b[a.key]??"-"},a.key))},b.key||b.id||`${b.label}-${c}`))})]})}):(0,d.jsx)(T,{title:c})}function X({items:a=[]}){return a&&0!==a.length?(0,d.jsx)("div",{className:"flex max-w-[360px] flex-wrap gap-1.5",children:a.slice(0,3).map(a=>(0,d.jsxs)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary",children:[a.label||a.key," \xb7 ",z(a.count??a.requests??a.totalTokens??0)]},a.key))}):(0,d.jsx)("span",{className:"text-text-muted",children:"-"})}function Y({row:a}){return(0,d.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,d.jsxs)("div",{className:"font-semibold text-text-main",children:[A(a.totalTokens)," token"]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["In ",A(a.promptTokens)," / Out ",A(a.completionTokens)]})]})}function Z({leaderboard:a={}}){let b=J(),c=a.rows||[],e=a.status||"warming",f="ready"===e?`${a.periodLabel||"H\xf4m nay"} \xb7 cập nhật ${H(a.generatedAt)} \xb7 refresh nền mỗi ${Math.round((a.refreshEveryMs||9e5)/6e4)} ph\xfat`:"error"===e?"Leaderboard đang chờ job nền tổng hợp lại dữ liệu.":"Leaderboard đang được job nền khởi tạo.";return(0,d.jsxs)(N,{className:"border-amber-500/20 bg-amber-500/[0.03]",children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-2xl text-amber-500",children:"crown"}),(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top 5 vinh danh token"})]}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp hạng theo API key owner d\xf9ng nhiều input + output token nhất."})]}),(0,d.jsx)("span",{className:"rounded-full bg-amber-500/10 px-3 py-1 text-xs font-semibold text-amber-700 dark:text-amber-300",children:f})]}),(0,d.jsx)(W,{rows:c,empty:"Chưa c\xf3 snapshot leaderboard từ job nền.",columns:[{key:"rank",label:"Hạng",render:a=>(0,d.jsxs)("div",{className:"flex min-w-[170px] items-center gap-3",children:[(0,d.jsx)("div",{className:K("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",1===a.rank?"bg-amber-500/15 text-amber-600":"bg-primary/10 text-primary"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"crown"})}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"font-semibold text-text-main",children:["#",a.rank," \xb7 ",a.title]}),(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:[B(a.tokenShare||0)," tổng token"]})]})]})},{key:"owner",label:"Owner",render:a=>(0,d.jsxs)("div",{className:"min-w-[210px]",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a.ownerUser||a.label}),(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:[a.apiKeyName||"API key",b&&a.apiKeyFingerprint?` \xb7 ${a.apiKeyFingerprint}`:""]})]})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"scope",label:"Phạm vi",render:a=>(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:[(0,d.jsxs)("div",{children:["API key ",z(a.apiKeyCount)," \xb7 IP ",z(a.sourceIpCount)]}),(0,d.jsxs)("div",{children:["Model ",z(a.modelCount)," \xb7 Provider ",z(a.providerCount)]})]})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]})}function $({value:a}){let b=Number(a||0);return(0,d.jsx)("span",{className:K("rounded-full px-2 py-1 text-xs font-semibold",b>=.2?"bg-red-500/10 text-red-600 dark:text-red-300":b>=.05?"bg-amber-500/10 text-amber-600 dark:text-amber-300":"bg-green-500/10 text-green-600 dark:text-green-300"),children:B(b)})}function _({level:a,label:b}){let c=String(a||"none");return(0,d.jsx)("span",{className:K("rounded-full px-2 py-1 text-xs font-semibold",{fast:"bg-green-500/10 text-green-700 dark:text-green-300",ok:"bg-blue-500/10 text-blue-700 dark:text-blue-300",slow:"bg-amber-500/10 text-amber-700 dark:text-amber-300",very_slow:"bg-red-500/10 text-red-700 dark:text-red-300",low_sample:"bg-amber-500/10 text-amber-700 dark:text-amber-300",none:"bg-slate-500/10 text-slate-700 dark:text-slate-300"}[c]||"bg-slate-500/10 text-slate-700 dark:text-slate-300"),children:b||"-"})}function aa({level:a,label:b}){let c=String(a||"normal");return(0,d.jsx)("span",{className:K("rounded-full px-2 py-1 text-xs font-semibold",{critical:"bg-red-500/10 text-red-700 dark:text-red-300",high:"bg-amber-500/10 text-amber-700 dark:text-amber-300",medium:"bg-blue-500/10 text-blue-700 dark:text-blue-300",normal:"bg-green-500/10 text-green-700 dark:text-green-300",none:"bg-slate-500/10 text-slate-700 dark:text-slate-300"}[c]||"bg-slate-500/10 text-slate-700 dark:text-slate-300"),children:b||"-"})}function ab({value:a}){let b=String(a||"unknown"),c={gateway:{label:"Gateway",cls:"bg-purple-500/10 text-purple-700 dark:text-purple-300"},upstream:{label:"Upstream",cls:"bg-red-500/10 text-red-700 dark:text-red-300"},client:{label:"Client",cls:"bg-slate-500/10 text-slate-700 dark:text-slate-300"},rate_limit:{label:"Rate limit",cls:"bg-amber-500/10 text-amber-700 dark:text-amber-300"},unknown:{label:"Unknown",cls:"bg-zinc-500/10 text-zinc-700 dark:text-zinc-300"}}[b]||{label:b,cls:"bg-zinc-500/10 text-zinc-700 dark:text-zinc-300"};return(0,d.jsx)("span",{className:K("rounded-full px-2 py-1 text-xs font-semibold",c.cls),children:c.label})}function ac({row:a}){let b=a.sampleMessage||a.errorMessageShort||"";return b?(0,d.jsx)("span",{className:"block max-w-[360px] truncate text-xs text-text-muted",title:b,children:b}):(0,d.jsx)("span",{className:"text-text-muted",children:"-"})}function ad({icon:a,label:b,value:c,hint:e,tone:f="slate"}){return(0,d.jsx)("div",{className:K("rounded-2xl border p-4 shadow-sm",{red:"border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300",amber:"border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-300",purple:"border-purple-500/20 bg-purple-500/10 text-purple-700 dark:text-purple-300",slate:"border-border bg-surface text-text-main",green:"border-green-500/20 bg-green-500/10 text-green-700 dark:text-green-300"}[f]||"border-border bg-surface text-text-main"),children:(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide opacity-75",children:b}),(0,d.jsx)("div",{className:"mt-2 text-2xl font-bold",children:z(c)}),e?(0,d.jsx)("div",{className:"mt-1 text-xs opacity-80",children:e}):null]}),(0,d.jsx)("span",{className:"material-symbols-outlined text-[24px] opacity-80",children:a})]})})}function ae({anomaly:a}){let b="danger"===a.level?"border-red-500/30 bg-red-500/10 text-red-700 dark:text-red-300":"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",c="danger"===a.level?"error":"warning";return(0,d.jsx)("div",{className:K("rounded-2xl border p-4",b),children:(0,d.jsxs)("div",{className:"flex gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:c}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.title}),(0,d.jsx)("div",{className:"mt-1 text-sm opacity-90",children:a.detail})]})]})})}function af({notes:a=[]}){return a.length?(0,d.jsx)("div",{className:"space-y-2 rounded-2xl border border-blue-500/20 bg-blue-500/10 p-4 text-sm text-blue-700 dark:text-blue-300",children:a.map((a,b)=>(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"info"}),(0,d.jsx)("span",{children:a})]},b))}):null}function ag(a){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}-${b(a.getMonth()+1)}-${b(a.getDate())}T${b(a.getHours())}:${b(a.getMinutes())}`}function ah({filters:a,setFilters:b,options:c,onRefresh:e,onExportCsv:f,loading:g,showProviderFilters:h=!0}){let i=(a,c)=>{let d=null;b(b=>{if("period"===a&&"custom"===c){let a,e;return d={...b,period:c,...((e=new Date(a=new Date)).setHours(8,0,0,0),{dateFrom:ag(e),dateTo:ag(a)})}}return{...b,[a]:c}}),d&&e?.(d)};return(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-6",children:[(0,d.jsx)(P,{label:"Khoảng thời gian",children:(0,d.jsx)(Q,{value:a.period,onChange:a=>i("period",a),children:s.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value))})}),(0,d.jsx)(P,{label:"Từ ng\xe0y",children:(0,d.jsx)(R,{type:"datetime-local",value:a.dateFrom,onChange:a=>i("dateFrom",a)})}),(0,d.jsx)(P,{label:"Đến ng\xe0y",children:(0,d.jsx)(R,{type:"datetime-local",value:a.dateTo,onChange:a=>i("dateTo",a)})}),h?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(P,{label:"Provider",children:(0,d.jsxs)(Q,{value:a.provider,onChange:a=>i("provider",a),children:[(0,d.jsx)("option",{value:"",children:"Tất cả provider"}),(c.providers||[]).map(a=>{let b="string"==typeof a?a:a.value,c="string"==typeof a?a:a.label||a.value;return(0,d.jsx)("option",{value:b,children:c},b)})]})}),(0,d.jsx)(P,{label:"Model",children:(0,d.jsxs)(Q,{value:a.model,onChange:a=>i("model",a),children:[(0,d.jsx)("option",{value:"",children:"Tất cả model"}),(c.models||[]).map(a=>(0,d.jsx)("option",{value:a,children:a},a))]})})]}):null,(0,d.jsx)(P,{label:"Source IP",children:(0,d.jsx)(R,{value:a.clientIp,onChange:a=>i("clientIp",a),placeholder:"172.16.253.1"})}),(0,d.jsx)(P,{label:"Source tool",children:(0,d.jsx)(R,{value:a.sourceTool,onChange:a=>i("sourceTool",a),placeholder:"copilot, antigravity..."})}),(0,d.jsx)(P,{label:"Status",children:(0,d.jsxs)(Q,{value:a.status,onChange:a=>i("status",a),children:[(0,d.jsx)("option",{value:"",children:"Tất cả status"}),(c.statuses||[]).map(a=>(0,d.jsx)("option",{value:a,children:a},a))]})}),(0,d.jsx)(P,{label:"Session / keyword",children:(0,d.jsx)(R,{value:a.sessionId||a.keyword,onChange:a=>i("keyword",a),placeholder:"session, prompt, error..."})})]}),(0,d.jsxs)("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[(0,d.jsx)("div",{className:"text-xs text-text-muted",children:"Token/cost lấy từ UsageHistory. Source IP/tool/session lấy từ Prompt Logs."}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)("button",{onClick:()=>b({period:"today",dateFrom:"",dateTo:"",provider:"",model:"",status:"",clientIp:"",sourceTool:"",sessionId:"",keyword:""}),className:"rounded-xl border border-border px-3 py-2 text-sm font-medium text-text-main hover:bg-background",children:"Reset"}),(0,d.jsxs)("button",{onClick:f,className:"rounded-xl border border-border px-3 py-2 text-sm font-medium text-text-main hover:bg-background",children:[(0,d.jsx)("span",{className:"material-symbols-outlined mr-1 align-[-4px] text-[18px]",children:"download"}),"Export CSV"]}),(0,d.jsxs)("button",{onClick:()=>e?.(),disabled:g,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white shadow-sm disabled:opacity-60",children:[(0,d.jsx)("span",{className:"material-symbols-outlined mr-1 align-[-5px] text-[18px]",children:"refresh"}),g?"Đang tải...":"Refresh"]})]})]})]})}function ai({data:a}){let b=J(),c=a.overview||{},e=a.latency||{},f=a.experience||{};return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsx)(Z,{leaderboard:a.tokenLeaderboard}),(0,d.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,d.jsx)(O,{icon:"call_made",label:"Tổng request",value:z(c.requests),hint:`${z(c.requestsPerMinute,2)} request/ph\xfat`,help:"Số request khớp bộ lọc hiện tại."}),(0,d.jsx)(O,{icon:"check_circle",label:"Th\xe0nh c\xf4ng",value:z(c.success),hint:`Tỷ lệ lỗi ${B(c.errorRate)}`,help:"Request trả về th\xe0nh c\xf4ng v\xe0 c\xf3 trạng th\xe1i OK.",tone:"green"}),(0,d.jsx)(O,{icon:"dns",label:"Lỗi server/provider",value:z(c.serverErrorEvents),hint:`Server-impacting ${B(c.serverErrorRate)} \xb7 client ${z(c.clientErrorEvents)}`,help:"Lỗi từ gateway, provider hoặc model server; t\xe1ch ri\xeang lỗi client.",tone:c.serverErrorEvents?"red":"green"}),(0,d.jsx)(O,{icon:"speed",label:"Trải nghiệm",value:F(f.score),hint:`${f.label||"-"} \xb7 ${z(f.samples)} mẫu`,help:"Điểm 0-100. Trừ tối đa 45 cho tốc độ (latency/TTFT/slow-rate t\xednh gộp, kh\xf4ng cộng dồn) v\xe0 40 cho lỗi server. Rate limit v\xe0 lỗi client chỉ trừ nhẹ v\xec kh\xf4ng phản \xe1nh chất lượng dịch vụ.",tone:f.tone||"purple"}),(0,d.jsx)(O,{icon:"timer",label:"Latency P95",value:D(f.p95LatencyMs||e.p95Ms),hint:`AVG ${D(f.avgLatencyMs||e.avgMs)} \xb7 P50 ${D(f.p50LatencyMs||e.p50Ms)}`,help:"95% request ho\xe0n tất nhanh hơn gi\xe1 trị n\xe0y.",tone:"purple"}),(0,d.jsx)(O,{icon:"bolt",label:"TTFT P95",value:D(f.p95TtftMs),hint:"Thời gian chờ token đầu ti\xean",help:"95% request nhận token đầu ti\xean nhanh hơn gi\xe1 trị n\xe0y.",tone:f.slowTtftRate>=.2?"amber":"blue"}),(0,d.jsx)(O,{icon:"input",label:"Input P95",value:A(f.p95PromptTokens||0),hint:`Avg ${A(f.avgPromptTokens||c.avgPromptTokens)} \xb7 >=30k ${B(f.longInputRate)}`,help:"95% request c\xf3 k\xedch thước input nhỏ hơn gi\xe1 trị n\xe0y."}),(0,d.jsx)(O,{icon:"psychology_alt",label:"Auto-off thinking",value:B(a.thinkingAnalytics?.autoOffRate),hint:`${z(a.thinkingAnalytics?.autoOffRequests||0)} request bị tắt theo policy`,help:"Tỷ lệ request bị tắt thinking do vượt ngưỡng hoặc policy.",tone:(a.thinkingAnalytics?.autoOffRate||0)>=.3?"amber":"slate"}),(0,d.jsx)(O,{icon:"data_object",label:"Large context >=50k",value:B(a.largeContextAnalytics?.gte50kRate),hint:`>=100k ${B(a.largeContextAnalytics?.gte100kRate)}`,help:"Tỷ lệ request c\xf3 context rất lớn, dễ l\xe0m tăng TTFT/latency.",tone:(a.largeContextAnalytics?.gte50kRate||0)>=.3?"amber":"slate"}),(0,d.jsx)(O,{icon:"person_alert",label:"Top user nặng",value:c.topHeavyUser||"-",hint:`Chiếm ${B(c.topHeavyUserTokenShare)} tổng token`,help:"User/API key ti\xeau thụ nhiều token nhất trong bộ lọc.",tone:c.topHeavyUserTokenShare>=.35?"amber":"slate"}),(0,d.jsx)(O,{icon:"running_with_errors",label:"Request chậm",value:B(f.slowRequestRate),hint:`>= ${D(f.thresholds?.slowLatencyMs||45e3)} \xb7 max ${D(f.maxLatencyMs)}`,help:"Tỷ lệ request vượt ngưỡng chậm đ\xe3 cấu h\xecnh.",tone:f.slowRequestRate>=.2?"amber":"green"}),(0,d.jsx)(O,{icon:"output",label:"Output tokens",value:A(c.completionTokens),hint:`Avg ${z(c.avgCompletionTokens,1)} / request`,help:"Tổng token model sinh ra."}),(0,d.jsx)(O,{icon:"token",label:"Tổng tokens",value:A(c.totalTokens),hint:`${A(c.tokensPerMinute)} token/ph\xfat`,help:"Tổng input + output token.",tone:"amber"}),(0,d.jsx)(O,{icon:"speed",label:"Output speed",value:E(f.decodeTokensPerSecond," tok/s"),hint:`${z(f.decodeSamples)} mẫu TTFT \xb7 Latency/10k input ${D(f.latencyMsPer10kInputTokens)}`,help:"Tốc độ sinh token sau khi model bắt đầu trả lời: Σ output token / Σ(latency − TTFT). Chỉ t\xednh request streaming c\xf3 TTFT thật v\xe0 token do provider b\xe1o, n\xean số mẫu c\xf3 thể nhỏ hơn tổng request.",tone:"slate"}),(0,d.jsx)(O,{icon:"payments",label:"Cost ước t\xednh",value:C(c.cost),hint:"Dựa tr\xean pricing đ\xe3 cấu h\xecnh",help:"Chi ph\xed suy ra từ token usage v\xe0 bảng gi\xe1 hiện tại.",tone:"green"})]}),(0,d.jsxs)("div",{className:"grid min-w-0 gap-5 xl:grid-cols-[2fr_1fr]",children:[(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Tần suất request & token theo thời gian"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Cột xanh l\xe0 token, cột v\xe0ng l\xe0 số request trong từng bucket thời gian."})]}),(0,d.jsx)(V,{})]}),(0,d.jsx)(U,{data:a.timeSeries||[]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"T\xf3m tắt active"}),(0,d.jsx)("div",{className:"mt-4 space-y-3",children:[["API key đang d\xf9ng",c.activeApiKeys],["Provider active",c.activeProviders],["Model active",c.activeModels],["Endpoint active",c.activeEndpoints],["Cached tokens",c.cachedTokens],["Reasoning tokens",c.reasoningTokens],["Latency AVG",D(f.avgLatencyMs||e.avgMs)],["Latency P50",D(f.p50LatencyMs||e.p50Ms)],["Latency P99",D(f.p99LatencyMs||e.p99Ms)],["TTFT P95",D(f.p95TtftMs)],["Input P95",A(f.p95PromptTokens||0)],["Long input >=30k",B(f.longInputRate)]].map(([a,b])=>(0,d.jsxs)("div",{className:"flex items-center justify-between rounded-xl bg-background px-3 py-2",children:[(0,d.jsx)("span",{className:"text-sm text-text-muted",children:a}),(0,d.jsx)("span",{className:"font-semibold text-text-main",children:"number"==typeof b?z(b):b})]},a))})]})]}),(0,d.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top API key d\xf9ng nhiều token"}),(0,d.jsx)(W,{rows:(a.clientRequests?.topApiKeysByTokens||a.groups?.apiKeys||[]).slice(0,8),columns:[{key:"name",label:"API key",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.name||a.label}),(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:[b?a.fingerprint||a.apiKeyFingerprint:"",a.ownerUser||a.apiKeyOwner?`${b&&(a.fingerprint||a.apiKeyFingerprint)?" \xb7 ":""}${a.ownerUser||a.apiKeyOwner}`:""]})]})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"input",label:"P95/Max input",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:A(a.p95PromptTokens||0)}),(0,d.jsxs)("div",{className:"text-text-muted",children:["max ",A(a.maxPromptTokens||0)]})]})}]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top Source IP d\xf9ng nhiều token"}),(0,d.jsx)(W,{rows:(a.clientRequests?.topSourceIpsByTokens||[]).slice(0,8),columns:[{key:"label",label:"Source IP",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.label})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"heavy",label:"Nặng",render:a=>(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:[z(a.heavyRequests||0)," req"]})}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]})]})]})}function aj({data:a}){let b=J(),c=a.clientRequests||{},e=c.summary||{},f=c.topHeavyUsers||[],g=c.topProblemClients||[],h=c.topApiKeysByTokens||[],i=c.topSourceIpsByTokens||[];c.topSourceIpsByHeavyRequests;let j=c.inputBuckets||[],k=a=>(0,d.jsxs)("div",{className:"min-w-[220px]",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a.label}),(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:a.ownerUser?`Owner ${a.ownerUser}`:a.apiKeyName||"Kh\xf4ng c\xf3 owner"}),(0,d.jsx)("div",{className:"font-mono text-[11px] text-text-muted",children:b?a.apiKeyFingerprint||a.primaryClientIp||a.key:a.primaryClientIp||""})]}),l=a=>(0,d.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,d.jsxs)("div",{children:["Nặng ",z(a.heavyRequests)," \xb7 ",B(a.heavyRequestRate)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["P95 input ",A(a.p95PromptTokens)," \xb7 Max ",A(a.maxPromptTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:[">=70k ",z(a.extremeInputRequests)," \xb7 ",B(a.extremeInputRate)]})]});return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,d.jsx)(O,{icon:"person_alert",label:"Top user nặng nhất",value:e.topUserLabel||"-",hint:`${A(e.topUserTokens)} token \xb7 ${B(e.topUserTokenShare)} tổng token`,tone:e.topUserTokenShare>=.35?"amber":"slate"}),(0,d.jsx)(O,{icon:"vpn_key",label:"Top API key nhiều token",value:e.topApiKeyLabel||"-",hint:`${A(e.topApiKeyTokens)} token \xb7 ${B(e.topApiKeyTokenShare)} tổng token`,tone:e.topApiKeyTokenShare>=.35?"amber":"blue"}),(0,d.jsx)(O,{icon:"lan",label:"Top IP nhiều token",value:e.topSourceIpLabel||"-",hint:`${A(e.topSourceIpTokens)} token \xb7 ${B(e.topSourceIpTokenShare)} tổng token`,tone:e.topSourceIpTokenShare>=.35?"amber":"purple"}),(0,d.jsx)(O,{icon:"input",label:"Input d\xe0i >=30k",value:B(e.longInputBucketShare||0),hint:`>=70k ${B(e.extremeInputShare||0)}`,tone:(e.extremeInputShare||0)>=.1?"amber":"green"}),(0,d.jsx)(O,{icon:"groups",label:"User/API key được theo d\xf5i",value:z(e.trackedUsers||0),hint:"Theo owner/API key fingerprint/source IP",tone:"blue"}),(0,d.jsx)(O,{icon:"network_check",label:"Top IP request nặng",value:e.topSourceIpHeavyLabel||"-",hint:`${z(e.topSourceIpHeavyRequests||0)} request >=30k input/total`,tone:e.topSourceIpHeavyRequests?"amber":"slate"}),(0,d.jsx)(O,{icon:"report",label:"Client lỗi nhiều",value:z(e.problemClients||0),hint:"Nh\xf3m user/API key c\xf3 error rows",tone:e.problemClients?"amber":"green"})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top user/API key gửi request nặng nhất"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp theo tổng input/output token của request th\xe0nh c\xf4ng c\xf3 token. D\xf9ng để ph\xe1t hiện user VS Code/agent đang tạo tải long-context lớn."})]}),(0,d.jsx)("span",{className:"rounded-full bg-primary/10 px-3 py-1 text-xs font-semibold text-primary",children:"Kh\xf4ng hiển thị full bearer token"})]}),(0,d.jsx)(W,{rows:f,columns:[{key:"user",label:"User/API key",render:k},{key:"quality",label:"\xc1p lực",render:a=>(0,d.jsx)(aa,{level:a.level,label:a.pressureLabel})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"input",label:"Input pressure",render:a=>(0,d.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,d.jsxs)("div",{children:["Avg ",A(a.avgPromptTokens)," \xb7 P95 ",A(a.p95PromptTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["Max ",A(a.maxPromptTokens)," \xb7 >=30k ",B(a.longInputRate)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:[">=50k ",B(a.hugeInputRate)," \xb7 >=70k ",B(a.extremeInputRate)]})]})},{key:"latency",label:"Latency / TTFT",render:a=>(0,d.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,d.jsxs)("div",{children:["P95 ",D(a.p95LatencyMs)," \xb7 Max ",D(a.maxLatencyMs)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["TTFT P95 ",D(a.p95TtftMs)," \xb7 Slow ",B(a.slowRequestRate)]})]})},{key:"topModels",label:"Top model",render:a=>(0,d.jsx)(X,{items:a.topModels})},{key:"topIps",label:"IP / Tool",render:a=>(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)(X,{items:a.topIps}),(0,d.jsx)(X,{items:a.topTools})]})},{key:"meta",label:"Meta",render:a=>(0,d.jsxs)("div",{className:"space-y-1 text-xs text-text-muted",children:[(0,d.jsxs)("div",{children:["Key ",z(a.apiKeyCount)," \xb7 IP ",z(a.sourceIpCount)," \xb7 Tool ",z(a.sourceToolCount)]}),(0,d.jsxs)("div",{children:["Session ",z(a.sessionCount)," \xb7 Last ",H(a.lastSeen)]})]})}],empty:"Kh\xf4ng c\xf3 request th\xe0nh c\xf4ng c\xf3 token trong khoảng lọc."})]}),(0,d.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top API key d\xf9ng nhiều token nhất"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp theo tổng input + output token từ UsageHistory, kh\xf4ng lộ full bearer token."})]}),(0,d.jsx)(W,{rows:h,columns:[{key:"apiKey",label:"API key",render:a=>(0,d.jsxs)("div",{className:"min-w-[220px]",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a.label}),(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:a.apiKeyOwner?`Owner ${a.apiKeyOwner}`:a.apiKeyName||a.primarySourceTool||"-"}),(0,d.jsx)("div",{className:"font-mono text-[11px] text-text-muted",children:b?a.apiKeyFingerprint||a.primaryClientIp||a.key:a.primaryClientIp||""})]})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"input",label:"Input nặng",render:l},{key:"meta",label:"Nguồn",render:a=>(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:[(0,d.jsxs)("div",{children:["IP ",z(a.sourceIpCount)," \xb7 Tool ",z(a.sourceToolCount)]}),(0,d.jsxs)("div",{children:["Model ",z(a.modelCount)," \xb7 Provider ",z(a.providerCount)]})]})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}],empty:"Kh\xf4ng c\xf3 API key c\xf3 token trong khoảng lọc."})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top Source IP d\xf9ng nhiều token nhất"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Dựa tr\xean UsageHistory n\xean c\xf3 input/output token, kh\xe1c với bảng Source IP từ Prompt Logs chỉ đếm log."})]}),(0,d.jsx)(W,{rows:i,columns:[{key:"ip",label:"Source IP",render:a=>(0,d.jsxs)("div",{className:"min-w-[180px]",children:[(0,d.jsx)("div",{className:"font-mono text-sm font-semibold text-text-main",children:a.label}),(0,d.jsxs)("div",{className:"mt-1 text-xs text-text-muted",children:["Tool ",z(a.sourceToolCount)," \xb7 API key ",z(a.apiKeyCount)]}),(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:["Model ",z(a.modelCount)," \xb7 Provider ",z(a.providerCount)]})]})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"input",label:"Input nặng",render:l},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]})]}),(0,d.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Ph\xe2n bố request theo k\xedch thước input"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Gi\xfap admin biết workload đang l\xe0 chat ngắn hay long-context VS Code/agent."})]}),(0,d.jsx)(W,{rows:j,columns:[{key:"label",label:"Input bucket",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.label})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"share",label:"Tỷ trọng",render:a=>B(a.share)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"latency",label:"Latency P95/MAX",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsxs)("div",{children:[D(a.p95LatencyMs)," / ",D(a.maxLatencyMs)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["TTFT P95 ",D(a.p95TtftMs)]})]})}],empty:"Kh\xf4ng c\xf3 dữ liệu bucket input."})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Client/API key lỗi nhiều"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"D\xf9ng để ph\xe1t hiện sai endpoint/model/auth/policy hoặc client tool cấu h\xecnh sai."})]}),(0,d.jsx)(W,{rows:g,columns:[{key:"user",label:"Client",render:k},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"errors",label:"Lỗi",render:a=>z(a.errors)},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"source",label:"IP/Tool",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{className:"font-mono",children:a.primaryClientIp||"-"}),(0,d.jsx)("div",{className:"text-text-muted",children:a.primarySourceTool||"-"})]})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}],empty:"Kh\xf4ng c\xf3 client lỗi theo bộ lọc hiện tại."})]})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"G\xf3c nh\xecn monitor client n\xean d\xf9ng"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"C\xe1c chỉ số n\xe0y bổ sung cho latency/model để admin ph\xe2n biệt server chậm hay client gửi request qu\xe1 nặng."})]}),(0,d.jsx)("div",{className:"grid gap-3 text-sm md:grid-cols-2 xl:grid-cols-3",children:[["Token/user","X\xe1c định user/API key tạo tải lớn nhất, hữu \xedch cho quota v\xe0 hướng dẫn workflow VS Code."],["Input bucket","Nếu phần lớn request nằm ở 30k-70k+, P95/P99 cao chủ yếu do prompt eval/context d\xe0i."],["TTFT theo user","TTFT cao cho một user thường l\xe0 input d\xe0i hoặc chờ slot, kh\xf4ng nhất thiết provider lỗi."],["Error theo client","T\xe1ch lỗi sai endpoint/model/API key khỏi lỗi server/provider để kh\xf4ng cảnh b\xe1o nhầm."],["Source IP/tool","Ph\xe1t hiện m\xe1y/tool gửi request nhiều hoặc cấu h\xecnh sai."],["Top request nặng","D\xf9ng Raw usage để drill-down request cụ thể khi một user k\xe9o tải hệ thống."]].map(([a,b])=>(0,d.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a}),(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:b})]},a))})]})]})}function ak({data:a}){let b=J();return(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Thống k\xea theo API key"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Kh\xf4ng hiển thị full bearer token. Dashboard chỉ d\xf9ng fingerprint/masked key."})]}),(0,d.jsx)(W,{rows:a.groups?.apiKeys||[],columns:[{key:"name",label:"API key",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.name}),(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:[b?a.fingerprint:"",a.ownerUser?`${b&&a.fingerprint?" \xb7 ":""}Owner: ${a.ownerUser}`:""]})]})},{key:"requests",label:"Requests",render:a=>z(a.requests)},{key:"success",label:"OK/Lỗi",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsxs)("div",{className:"text-green-600",children:["OK ",z(a.success)]}),(0,d.jsxs)("div",{className:"text-red-600",children:["Lỗi ",z(a.errors)]})]})},{key:"tokens",label:"In/Out token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"cost",label:"Cost",render:a=>C(a.cost)},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})},{key:"topModels",label:"Top model",render:a=>(0,d.jsx)(X,{items:a.topModels})},{key:"topProviders",label:"Top provider",render:a=>(0,d.jsx)(X,{items:a.topProviders})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]})}function al({data:a}){let b=a.clientRequests?.topSourceIpsByTokens||[],c=a.clientRequests?.topSourceIpsByHeavyRequests||[],e=a=>(0,d.jsxs)("div",{className:"min-w-[180px]",children:[(0,d.jsx)("div",{className:"font-mono text-sm font-semibold text-text-main",children:a.label}),(0,d.jsxs)("div",{className:"mt-1 text-xs text-text-muted",children:["API key ",z(a.apiKeyCount)," \xb7 Tool ",z(a.sourceToolCount)]}),(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:["Model ",z(a.modelCount)," \xb7 Provider ",z(a.providerCount)]})]});return(0,d.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top IP d\xf9ng nhiều token nhất"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Aggregate từ UsageHistory, xếp theo tổng input + output token."})]}),(0,d.jsx)(W,{rows:b,columns:[{key:"ip",label:"Source IP",render:e},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top IP gửi request nặng nhất"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp theo số request input/total token từ 30k trở l\xean, sau đ\xf3 theo max/P95 input."})]}),(0,d.jsx)(W,{rows:c,columns:[{key:"ip",label:"Source IP",render:e},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"heavy",label:"Request nặng",render:a=>(0,d.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,d.jsxs)("div",{children:["Nặng ",z(a.heavyRequests)," \xb7 ",B(a.heavyRequestRate)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["P95 input ",A(a.p95PromptTokens)," \xb7 Max ",A(a.maxPromptTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:[">=70k ",z(a.extremeInputRequests)," \xb7 ",B(a.extremeInputRate)]})]})},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP gửi request nặng trong khoảng lọc."})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Source IP từ Prompt Logs"}),(0,d.jsx)(W,{rows:a.promptLogs?.topClientIps||[],columns:[{key:"label",label:"IP",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.label})},{key:"requests",label:"Logs",render:a=>z(a.requests)},{key:"errors",label:"Lỗi",render:a=>z(a.errors)},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})},{key:"topTools",label:"Tools",render:a=>(0,d.jsx)(X,{items:a.topTools})},{key:"topModels",label:"Models",render:a=>(0,d.jsx)(X,{items:a.topModels})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Source tool"}),(0,d.jsx)(W,{rows:a.promptLogs?.topSourceTools||[],columns:[{key:"label",label:"Tool",render:a=>(0,d.jsx)("span",{className:"font-semibold",children:a.label})},{key:"requests",label:"Logs",render:a=>z(a.requests)},{key:"errors",label:"Lỗi",render:a=>z(a.errors)},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})},{key:"topIps",label:"Top IP",render:a=>(0,d.jsx)(X,{items:a.topIps})},{key:"topModels",label:"Top model",render:a=>(0,d.jsx)(X,{items:a.topModels})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]}),(0,d.jsxs)(N,{className:"xl:col-span-2",children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Session nhiều hoạt động"}),(0,d.jsx)(W,{rows:a.promptLogs?.topSessions||[],columns:[{key:"label",label:"Session",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.label})},{key:"requests",label:"Logs",render:a=>z(a.requests)},{key:"errors",label:"Lỗi",render:a=>z(a.errors)},{key:"topIps",label:"IP",render:a=>(0,d.jsx)(X,{items:a.topIps})},{key:"topTools",label:"Tool",render:a=>(0,d.jsx)(X,{items:a.topTools})},{key:"topModels",label:"Model",render:a=>(0,d.jsx)(X,{items:a.topModels})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]})]})}function am({data:a}){return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Provider"}),(0,d.jsx)(W,{rows:a.groups?.providers||[],columns:[{key:"label",label:"Provider",render:a=>(0,d.jsx)("span",{className:"font-semibold",children:a.label})},{key:"requests",label:"Requests",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"cost",label:"Cost",render:a=>C(a.cost)},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})},{key:"topModels",label:"Top model",render:a=>(0,d.jsx)(X,{items:a.topModels})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]}),(0,d.jsx)(r,{data:a}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Provider account / connection"}),(0,d.jsx)(W,{rows:a.groups?.providerAccounts||[],columns:[{key:"label",label:"Account",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.label}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:a.providerLabel||a.provider||a.connectionId})]})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"errorRate",label:"Lỗi",render:a=>(0,d.jsx)($,{value:a.errorRate})}]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Endpoint"}),(0,d.jsx)(W,{rows:a.groups?.endpoints||[],columns:[{key:"label",label:"Endpoint",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.label})},{key:"requests",label:"Requests",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"cost",label:"Cost",render:a=>C(a.cost)},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]})]})}function an({data:a}){let b=J(),c=a.experience||{},e=c.thresholds||{},f=a.thinkingAnalytics||{},g=a.largeContextAnalytics||{},h=c.byModel||[],i=c.slowestRequests||[];return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,d.jsx)(O,{icon:"verified",label:"Đ\xe1nh gi\xe1 tổng",value:F(c.score),hint:`${c.label||"-"} \xb7 ${z(c.samples)} mẫu success c\xf3 token`,help:"Điểm 0-100 từ request th\xe0nh c\xf4ng c\xf3 token. Tốc độ trừ tối đa 45 (chuẩn ho\xe1 theo k\xedch thước input khi prompt lớn), lỗi server trừ tối đa 40. Rate limit trừ nhẹ v\xec đ\xf3 l\xe0 hệ thống tự bảo vệ.",tone:c.tone||"slate"}),(0,d.jsx)(O,{icon:"timer",label:"Latency AVG / P95",value:`${D(c.avgLatencyMs)} / ${D(c.p95LatencyMs)}`,hint:`P50 ${D(c.p50LatencyMs)} \xb7 P99 ${D(c.p99LatencyMs)}`,help:"AVG l\xe0 trung b\xecnh; P95 thể hiện nh\xf3m 5% request chậm nhất.",tone:"purple"}),(0,d.jsx)(O,{icon:"bolt",label:"TTFT AVG / P95",value:`${D(c.avgTtftMs)} / ${D(c.p95TtftMs)}`,hint:"TTFT cao thường l\xe0 queue/prompt eval/input d\xe0i",help:"Thời gian từ l\xfac gửi request đến token đầu ti\xean.",tone:c.slowTtftRate>=.2?"amber":"blue"}),(0,d.jsx)(O,{icon:"keyboard_double_arrow_up",label:"Input AVG / P95",value:`${A(c.avgPromptTokens)} / ${A(c.p95PromptTokens)}`,hint:`>=30k ${B(c.longInputRate)} \xb7 >=50k ${B(c.hugeInputRate)}`,help:"Input c\xe0ng lớn th\xec prompt eval v\xe0 TTFT thường c\xe0ng cao."}),(0,d.jsx)(O,{icon:"running_with_errors",label:"Slow request",value:B(c.slowRequestRate),hint:`Latency >= ${D(e.slowLatencyMs||45e3)} \xb7 rất chậm ${B(c.verySlowRequestRate)}`,help:"Tỷ lệ request ho\xe0n tất chậm hơn ngưỡng vận h\xe0nh.",tone:c.slowRequestRate>=.2?"amber":"green"}),(0,d.jsx)(O,{icon:"pending_actions",label:"Slow TTFT",value:B(c.slowTtftRate),hint:`TTFT >= ${D(e.slowTtftMs||2e4)}`,help:"Tỷ lệ request chờ token đầu ti\xean qu\xe1 l\xe2u.",tone:c.slowTtftRate>=.2?"amber":"green"}),(0,d.jsx)(O,{icon:"speed",label:"Decode tốc độ",value:E(c.decodeTokensPerSecond," tok/s"),hint:`${z(c.decodeSamples)} mẫu TTFT \xb7 E2E ${E(c.e2eOutputTokensPerSecond," tok/s")}`,help:"Σ output token / Σ(latency − TTFT), chỉ t\xednh request streaming c\xf3 TTFT thật v\xe0 token do provider b\xe1o. E2E l\xe0 output/tổng latency (gồm cả prefill).",tone:"slate"}),(0,d.jsx)(O,{icon:"data_usage",label:"Latency / 10k input",value:D(c.latencyMsPer10kInputTokens),hint:"Hữu \xedch khi VS Code gửi 30k–70k token",help:"Σ latency E2E / (Σ input token / 10k). L\xe0 latency to\xe0n bộ request được chuẩn h\xf3a theo input, n\xean vẫn phụ thuộc độ d\xe0i output — kh\xf4ng phải tốc độ prefill.",tone:"slate"}),(0,d.jsx)(O,{icon:"psychology_alt",label:"Thinking auto-off",value:B(f.autoOffRate),hint:`${z(f.autoOffRequests||0)} / ${z(f.totalRequests||0)} request`,help:"Request bị tắt thinking tự động do vượt ngưỡng prompt chars.",tone:(f.autoOffRate||0)>=.3?"amber":"green"}),(0,d.jsx)(O,{icon:"toggle_off",label:"Thinking OFF",value:B(f.thinkingOffRate),hint:`ON ${B(f.thinkingOnRate)} \xb7 unknown ${B(f.unknownRate)}`,help:"Tỷ lệ request cuối c\xf9ng chạy ở chế độ kh\xf4ng thinking.",tone:(f.thinkingOffRate||0)>=.5?"blue":"slate"}),(0,d.jsx)(O,{icon:"data_object",label:"Large context",value:B(g.gte50kRate),hint:`>=30k ${B(g.gte30kRate)} \xb7 >=100k ${B(g.gte100kRate)}`,help:"Tỷ lệ request c\xf3 context lớn; thường l\xe0 nguy\xean nh\xe2n l\xe0m P95/P99 tăng.",tone:(g.gte50kRate||0)>=.3?"amber":"slate"})]}),(0,d.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Thinking Analytics"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Theo d\xf5i request bật/tắt thinking v\xe0 tỷ lệ auto-off do vượt ngưỡng prompt chars."})]}),(0,d.jsx)("div",{className:"grid gap-3 md:grid-cols-2",children:[["Thinking ON",z(f.thinkingOnRequests||0),B(f.thinkingOnRate)],["Thinking OFF",z(f.thinkingOffRequests||0),B(f.thinkingOffRate)],["Auto-off hit",z(f.autoOffRequests||0),B(f.autoOffRate)],["C\xf3 ngưỡng auto-off",z(f.thresholdConfiguredRequests||0),`hit ${B(f.autoOffEligibleHitRate)}`]].map(([a,b,c])=>(0,d.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:a}),(0,d.jsx)("div",{className:"mt-2 text-xl font-semibold text-text-main",children:b}),(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:c})]},a))}),(0,d.jsx)("div",{className:"mt-4",children:(0,d.jsx)(W,{rows:f.byModel||[],empty:"Chưa c\xf3 dữ liệu thinking trong khoảng lọc.",columns:[{key:"model",label:"Model",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.model}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:a.provider})]})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"autoOff",label:"Auto-off",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:z(a.autoOffRequests)}),(0,d.jsx)("div",{className:"text-text-muted",children:B(a.autoOffRate)})]})},{key:"thinking",label:"ON/OFF",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsxs)("div",{children:["ON ",z(a.thinkingOnRequests)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["OFF ",z(a.thinkingOffRequests)]})]})},{key:"chars",label:"Chars avg/max",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:A(a.avgPromptChars)}),(0,d.jsxs)("div",{className:"text-text-muted",children:["max ",A(a.maxPromptChars)]})]})}]})})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Large Context Analytics"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Bucket theo request size, ưu ti\xean prompt chars; nếu chưa c\xf3 chars th\xec fallback prompt tokens."})]}),(0,d.jsx)("div",{className:"grid gap-3 md:grid-cols-3",children:[[">=30k",g.gte30kRequests,g.gte30kRate],[">=50k",g.gte50kRequests,g.gte50kRate],[">=100k",g.gte100kRequests,g.gte100kRate]].map(([a,b,c])=>(0,d.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:a}),(0,d.jsx)("div",{className:"mt-2 text-xl font-semibold text-text-main",children:z(b||0)}),(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:B(c)})]},a))}),(0,d.jsx)("div",{className:"mt-4",children:(0,d.jsx)(W,{rows:g.buckets||[],empty:"Chưa c\xf3 large context buckets trong khoảng lọc.",columns:[{key:"label",label:"Bucket",render:a=>(0,d.jsx)("span",{className:"font-semibold",children:a.label})},{key:"requests",label:"Req",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:z(a.requests)}),(0,d.jsx)("div",{className:"text-text-muted",children:B(a.share)})]})},{key:"chars",label:"Size avg/max",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:A(a.avgRequestSize)}),(0,d.jsxs)("div",{className:"text-text-muted",children:["max ",A(a.maxRequestSize)]})]})},{key:"latency",label:"Latency/TTFT",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:D(a.avgLatencyMs)}),(0,d.jsxs)("div",{className:"text-text-muted",children:["TTFT ",D(a.avgTtftMs)]})]})},{key:"autoOff",label:"Auto-off",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:z(a.autoOffRequests)}),(0,d.jsx)("div",{className:"text-text-muted",children:B(a.autoOffRate)})]})}]})})]})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"C\xe1ch đọc trải nghiệm user"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Nh\xf3m n\xe0y chỉ t\xednh request th\xe0nh c\xf4ng c\xf3 token v\xe0 latency > 0. Error/pending/success 0-token kh\xf4ng trộn v\xe0o tốc độ model. TTFT l\xe0 thời gian tới token đầu ti\xean; với VS Code input 30k–70k, TTFT cao thường phản \xe1nh chờ slot hoặc prompt eval d\xe0i."})]}),(0,d.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,d.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Nhanh/chậm thực tế"}),(0,d.jsx)("div",{className:"mt-2 text-sm text-text-main",children:"Latency AVG/P50/P95/MAX cho biết user phải chờ bao l\xe2u để request ho\xe0n tất."})]}),(0,d.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Queue hoặc prompt eval"}),(0,d.jsx)("div",{className:"mt-2 text-sm text-text-main",children:"TTFT cao + input P95 cao l\xe0 t\xedn hiệu request d\xe0i, hết slot hoặc upstream đang queue."})]}),(0,d.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"VS Code / agent"}),(0,d.jsx)("div",{className:"mt-2 text-sm text-text-main",children:"Theo d\xf5i tỷ lệ input >=30k/50k/70k để biết P95/P99 cao c\xf3 phải do context cực d\xe0i hay kh\xf4ng."})]})]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Chất lượng phản hồi theo provider/model"}),(0,d.jsx)(W,{rows:h,empty:"Chưa c\xf3 mẫu latency cho model trong khoảng lọc.",columns:[{key:"model",label:"Model",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.model}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:a.providerLabel||a.provider})]})},{key:"quality",label:"Đ\xe1nh gi\xe1",render:a=>(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)(_,{level:a.level,label:a.labelQuality}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:F(a.score)})]})},{key:"samples",label:"Mẫu",render:a=>z(a.samples)},{key:"latency",label:"Latency P50/P95/MAX",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsxs)("div",{children:[D(a.p50LatencyMs)," / ",D(a.p95LatencyMs)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["max ",D(a.maxLatencyMs)]})]})},{key:"ttft",label:"TTFT P95",render:a=>D(a.p95TtftMs)},{key:"input",label:"Input avg/P95",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsxs)("div",{children:[A(a.avgPromptTokens)," / ",A(a.p95PromptTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:[">=30k ",B(a.longInputRate)]})]})},{key:"slow",label:"Chậm",render:a=>(0,d.jsx)($,{value:a.slowRequestRate})},{key:"speed",label:"Decode tok/s",render:a=>E(a.decodeTokensPerSecond??a.outputTokensPerSecond," tok/s")}]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Request chậm nhất"}),(0,d.jsx)(W,{rows:i,empty:"Kh\xf4ng c\xf3 request chậm trong khoảng lọc.",columns:[{key:"timestamp",label:"Time",render:a=>H(a.timestamp)},{key:"model",label:"Model",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.model}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:a.providerLabel||a.provider})]})},{key:"latency",label:"Latency / TTFT",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{className:"font-semibold",children:D(a.latencyMs)}),(0,d.jsxs)("div",{className:"text-text-muted",children:["TTFT ",D(a.ttftMs)]})]})},{key:"tokens",label:"In / Out",render:a=>(0,d.jsx)(Y,{row:a})},{key:"apiKeyName",label:"API key",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{children:a.apiKeyName}),b?(0,d.jsx)("div",{className:"font-mono text-xs text-text-muted",children:a.apiKeyFingerprint}):null]})},{key:"sourceTool",label:"Tool/IP",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:a.sourceTool||"-"}),(0,d.jsx)("div",{className:"font-mono text-text-muted",children:a.clientIp||"-"})]})},{key:"endpoint",label:"Endpoint",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.endpoint||"-"})}]})]})]})}function ao({data:a}){let b=J(),c=a.requestErrors||{},e=c.summary||{},f=a.overview||{},g=Number(f.serverErrorRate||0),h=Number(f.clientErrorRate||0),i=Number(f.rateLimitErrorRate||0),j=[{key:"faultOwner",label:"Loại",render:a=>(0,d.jsx)(ab,{value:a.faultOwner})},{key:"status",label:"Status",render:a=>(0,d.jsx)("span",{className:"rounded-full bg-red-500/10 px-2 py-1 text-xs font-semibold text-red-600 dark:text-red-300",children:a.status})},{key:"provider",label:"Provider",render:a=>a.providerLabel||a.provider},{key:"model",label:"Model"},{key:"endpoint",label:"Endpoint",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.endpoint})},{key:"requests",label:"Lỗi",render:a=>z(a.errors||a.requests)},{key:"errorType",label:"Type",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.errorType||a.errorCode||"-"})},{key:"sampleMessage",label:"Sample",render:a=>(0,d.jsx)(ac,{row:a})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}];return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-5",children:[(0,d.jsx)(ad,{icon:"dns",label:"Server/provider",value:e.serverImpacting||0,hint:`${B(g)} tr\xean tổng request`,tone:e.serverImpacting?"red":"green"}),(0,d.jsx)(ad,{icon:"cloud_off",label:"Upstream",value:e.upstream||0,hint:"Provider/model server, timeout, network, 5xx",tone:e.upstream?"red":"green"}),(0,d.jsx)(ad,{icon:"router",label:"Gateway",value:e.gateway||0,hint:"Lỗi nội bộ BlueRouter/gateway",tone:e.gateway?"purple":"green"}),(0,d.jsx)(ad,{icon:"integration_instructions",label:"Client/request",value:e.client||0,hint:`${B(h)} do endpoint/model/body/auth`,tone:e.client?"slate":"green"}),(0,d.jsx)(ad,{icon:"speed",label:"Rate/quota",value:e.rateLimit||0,hint:`${B(i)} rate-limit/quota`,tone:e.rateLimit?"amber":"green"})]}),(0,d.jsx)("div",{className:"rounded-2xl border border-blue-500/20 bg-blue-500/10 p-4 text-sm text-blue-700 dark:text-blue-300",children:(0,d.jsxs)("div",{className:"flex gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"rule_settings"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:"Ph\xe2n loại lỗi đ\xe3 t\xe1ch client khỏi server/provider"}),(0,d.jsxs)("div",{className:"mt-1 opacity-90",children:["Cảnh b\xe1o vận h\xe0nh n\xean ưu ti\xean nh\xf3m ",(0,d.jsx)("b",{children:"Server/provider"})," gồm gateway, upstream, timeout, network v\xe0 5xx. Nh\xf3m ",(0,d.jsx)("b",{children:"Client/request"})," vẫn được log đầy đủ nhưng thường l\xe0 sai endpoint, model, auth, JSON/body hoặc context."]})]})]})}),a.anomalies?.length?(0,d.jsx)("div",{className:"grid gap-4 xl:grid-cols-2",children:a.anomalies.map((a,b)=>(0,d.jsx)(ae,{anomaly:a},b))}):(0,d.jsxs)("div",{className:"rounded-2xl border border-green-500/20 bg-green-500/10 p-4 text-sm text-green-700 dark:text-green-300",children:[(0,d.jsx)("span",{className:"material-symbols-outlined mr-2 align-[-5px]",children:"check_circle"}),"Chưa ph\xe1t hiện bất thường server/provider r\xf5 r\xe0ng theo bộ lọc hiện tại."]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Lỗi server/provider cần xử l\xfd"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Chỉ gồm gateway/upstream/server-impacting errors. Đ\xe2y l\xe0 bảng quan trọng nhất cho vận h\xe0nh."})]}),(0,d.jsxs)("span",{className:"rounded-full bg-red-500/10 px-3 py-1 text-xs font-semibold text-red-600 dark:text-red-300",children:[z(e.serverImpacting||0)," lỗi"]})]}),(0,d.jsx)(W,{rows:c.topServerErrors||[],columns:j,empty:"Kh\xf4ng c\xf3 lỗi server/provider trong khoảng lọc."})]}),(0,d.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Lỗi client/request sai"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Sai endpoint, model, auth, JSON/body, context length. D\xf9ng để hướng dẫn client sửa request."})]}),(0,d.jsx)(W,{rows:c.topClientErrors||[],columns:j.filter(a=>!["sampleMessage"].includes(a.key)),empty:"Kh\xf4ng c\xf3 lỗi client/request trong khoảng lọc."})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Ph\xe2n bố loại lỗi"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"T\xe1ch nguồn chịu tr\xe1ch nhiệm để kh\xf4ng nhầm lỗi client th\xe0nh lỗi server."})]}),(0,d.jsx)(W,{rows:c.byFaultOwner||[],columns:[{key:"faultOwner",label:"Loại",render:a=>(0,d.jsx)(ab,{value:a.faultOwner||a.key})},{key:"requests",label:"Số lỗi",render:a=>z(a.requests)},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}],empty:"Kh\xf4ng c\xf3 lỗi để ph\xe2n loại."})]})]}),c.topRateLimitErrors?.length?(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Rate limit / quota"}),(0,d.jsx)(W,{rows:c.topRateLimitErrors||[],columns:j})]}):null,(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Tất cả lỗi raw theo status/provider/model/endpoint"}),(0,d.jsx)(W,{rows:[...a.groups?.errors||[]].sort((a,b)=>new Date(G(b.lastSeen)||0)-new Date(G(a.lastSeen)||0)||Number(b.errors||b.requests||0)-Number(a.errors||a.requests||0)),columns:[{key:"faultOwner",label:"Loại",render:a=>(0,d.jsx)(ab,{value:a.faultOwner})},{key:"status",label:"Status",render:a=>(0,d.jsx)("span",{className:"rounded-full bg-red-500/10 px-2 py-1 text-xs font-semibold text-red-600 dark:text-red-300",children:a.status})},{key:"provider",label:"Provider",render:a=>a.providerLabel||a.provider},{key:"model",label:"Model"},{key:"endpoint",label:"Endpoint",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.endpoint})},{key:"requests",label:"Lỗi",render:a=>z(a.errors||a.requests)},{key:"apiKey",label:"API key",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:b?a.apiKey:a.apiKeyName||"•••"})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Status distribution"}),(0,d.jsx)(W,{rows:a.groups?.statuses||[],columns:[{key:"label",label:"Status"},{key:"requests",label:"Requests",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})}]})]})]})}function ap({data:a}){let b=J();return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top request nặng token"}),(0,d.jsx)(W,{rows:a.heavyRequests||[],columns:[{key:"timestamp",label:"Time",render:a=>H(a.timestamp)},{key:"model",label:"Model",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.model}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:a.providerLabel||a.provider})]})},{key:"apiKeyName",label:"API key",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{children:a.apiKeyName}),b?(0,d.jsx)("div",{className:"font-mono text-xs text-text-muted",children:a.apiKeyFingerprint}):null]})},{key:"accountName",label:"Account"},{key:"endpoint",label:"Endpoint",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.endpoint})},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"status",label:"Status"}]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Recent usage"}),(0,d.jsx)(W,{rows:a.recentUsage||[],columns:[{key:"timestamp",label:"Time",render:a=>H(a.timestamp)},{key:"provider",label:"Provider",render:a=>a.providerLabel||a.provider},{key:"model",label:"Model"},{key:"apiKeyName",label:"API key"},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"cost",label:"Cost",render:a=>C(a.cost)},{key:"status",label:"Status"}]})]})]})}function aq(){let{isAdmin:a,isMonitorAdmin:b,isAiGatewaysMonitor:c}=(0,g.s)(),f=a||b||c,h=(0,e.useMemo)(()=>a?t:t.filter(a=>"aiHealth"!==a.value),[a]),[i,j]=(0,e.useState)({period:"today",dateFrom:"",dateTo:"",provider:"",model:"",status:"",clientIp:"",sourceTool:"",sessionId:"",keyword:""}),[k,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(!0),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)("overview"),[s,u]=(0,e.useState)(null),v=function(a){let[b,c]=(0,e.useState)(a);return b}(i),w=(0,e.useRef)(0),x=(0,e.useCallback)(async({clear:a=!1,filtersOverride:b=null}={})=>{let c=w.current+1;w.current=c,a&&l(null),n(!0),p("");let d=Date.now();try{let a=M(b||v,{timeZone:L()}),e=await fetch(`/api/dashboard/analytics?${a}`,{cache:"no-store"}),f=await e.json().catch(()=>({}));if(c!==w.current)return;if(!e.ok)throw Error(f.error||"Kh\xf4ng tải được dữ liệu analytics");l(f),u({loadedMs:Date.now()-d,cacheState:f.cacheState||"",cacheAgeMs:f.cacheAgeMs||0})}catch(a){if(c!==w.current)return;p(a.message||"Kh\xf4ng tải được dữ liệu analytics")}finally{c===w.current&&n(!1)}},[v]),z=k?.options||{},A=(0,e.useMemo)(()=>k?.generatedAt?H(k.generatedAt):"-",[k]);return(0,d.jsxs)("div",{className:"space-y-5 p-4 md:p-6",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-primary",children:[(0,d.jsx)("span",{className:"material-symbols-outlined",children:"monitoring"}),(0,d.jsx)("span",{className:"text-sm font-semibold uppercase tracking-wide",children:"BlueRouter Analytics"})]}),(0,d.jsx)("h1",{className:"mt-2 text-2xl font-bold text-text-main",children:"Thống k\xea sử dụng Gateway"}),(0,d.jsx)("p",{className:"mt-1 max-w-3xl text-sm text-text-muted",children:"Theo d\xf5i tần suất request, input/output token, API key, provider, model, endpoint, Source IP, source tool v\xe0 lỗi vận h\xe0nh."})]}),(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-border bg-surface px-4 py-3 text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"schedule"}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{children:["Generated: ",A]}),s?(0,d.jsxs)("div",{className:"mt-0.5 text-xs",children:["Loaded in ",s.loadedMs>=1e3?`${(s.loadedMs/1e3).toLocaleString("vi-VN",{maximumFractionDigits:1})}s`:`${s.loadedMs}ms`,"hit"===s.cacheState?(0,d.jsxs)("span",{className:"ml-1.5 rounded bg-emerald-500/10 px-1.5 py-0.5 font-medium text-emerald-500",children:["cache hit",s.cacheAgeMs?` \xb7 ${Math.round(s.cacheAgeMs/1e3)}s`:""]}):"joined"===s.cacheState?(0,d.jsx)("span",{className:"ml-1.5 rounded bg-sky-500/10 px-1.5 py-0.5 font-medium text-sky-500",children:"shared compute"}):"fresh"===s.cacheState?(0,d.jsx)("span",{className:"ml-1.5 rounded bg-amber-500/10 px-1.5 py-0.5 font-medium text-amber-500",children:"fresh compute"}):null]}):null]})]})]}),(0,d.jsx)(ah,{filters:i,setFilters:j,options:z,onRefresh:a=>x({filtersOverride:a||i}),onExportCsv:()=>{let a=M(i,{format:"csv",timeZone:L()});window.open(`/api/dashboard/analytics?${a}`,"_blank","noopener,noreferrer")},loading:m,showProviderFilters:f}),o?(0,d.jsxs)("div",{className:"rounded-2xl border border-red-500/30 bg-red-500/10 p-4 text-sm text-red-700 dark:text-red-300",children:[(0,d.jsx)("span",{className:"material-symbols-outlined mr-2 align-[-5px]",children:"error"}),o]}):null,k?.qualityNotes?.length?(0,d.jsx)(af,{notes:k.qualityNotes}):null,(0,d.jsx)("div",{className:"flex flex-wrap gap-2 rounded-2xl border border-border bg-surface p-2",children:h.map(a=>(0,d.jsxs)("button",{onClick:()=>r(a.value),className:K("flex items-center gap-2 rounded-xl px-3 py-2 text-sm font-medium transition",q===a.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-background hover:text-text-main"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:a.icon}),a.label]},a.value))}),m&&!k?(0,d.jsx)(S,{}):null,!m&&k&&k.overview?.requests===0&&0===(k.promptLogs?.total||0)?(0,d.jsx)(T,{title:"Chưa c\xf3 dữ liệu analytics",description:"Kh\xf4ng c\xf3 UsageHistory hoặc Prompt Logs theo bộ lọc hiện tại."}):null,k?(0,d.jsxs)(d.Fragment,{children:["overview"===q?(0,d.jsx)(ai,{data:k}):null,"apiKeys"===q?(0,d.jsx)(ak,{data:k}):null,"clients"===q?(0,d.jsx)(aj,{data:k}):null,"sources"===q?(0,d.jsx)(al,{data:k}):null,"providers"===q?(0,d.jsx)(am,{data:k}):null,"experience"===q?(0,d.jsx)(an,{data:k}):null,"errors"===q?(0,d.jsx)(ao,{data:k}):null,"raw"===q?(0,d.jsx)(ap,{data:k}):null]}):null,"aiHealth"===q&&a?(0,d.jsx)(y,{}):null]})}},79428:a=>{"use strict";a.exports=require("buffer")},79748:a=>{"use strict";a.exports=require("fs/promises")},80099:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},89768:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return i}});let d=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=e(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&Object.prototype.hasOwnProperty.call(a,f)){var g=d?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(c,f,g):c[f]=a[f]}return c.default=a,b&&b.set(a,c),c}(c(91986));function e(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(e=function(a){return a?c:b})(a)}let f={current:null},g="function"==typeof d.cache?d.cache:a=>a,h=console.warn;function i(a){return function(...b){h(a(...b))}}g(a=>{try{h(f.current)}finally{f.current=null}})},91645:a=>{"use strict";a.exports=require("net")},91687:(a,b,c)=>{"use strict";c.d(b,{default:()=>h});var d=c(48249),e=c(67484),f=c(20151);function g(a){return"cloud"===String(a||"").trim().toLowerCase()?"cloud":"local"}function h({initialScope:a="local",children:b}){let{isAdmin:c,isMonitorAdmin:i,isAiGatewaysMonitor:j}=(0,f.s)(),k=c||i||j,[l,m]=(0,e.useState)(()=>g(a)),[n,o]=(0,e.useState)(!1),p=(0,e.useRef)(null),q=a=>{if(!k)return;let b=g(a);if(b===l)return;document.cookie=`bluerouter_analytics_scope=${b}; Path=/; Max-Age=31536000; SameSite=Lax`,m(b);let c=new URL(window.location.href);c.searchParams.set("scope",b),window.history.replaceState(window.history.state,"",c.toString())};return(0,d.jsxs)("div",{ref:p,children:[k?(0,d.jsx)("div",{className:"px-4 pt-4 md:px-6 md:pt-6",children:(0,d.jsxs)("div",{className:"flex flex-wrap gap-2 rounded-2xl border border-border bg-surface p-2 shadow-sm",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>q("local"),"aria-pressed":"local"===l,className:`flex min-w-[220px] flex-1 items-center gap-3 rounded-xl px-4 py-3 text-left transition ${"local"===l?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-background hover:text-text-main"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"developer_board"}),(0,d.jsxs)("span",{children:[(0,d.jsx)("span",{className:"block text-sm font-semibold",children:"Local models & providers"}),(0,d.jsx)("span",{className:`mt-0.5 block text-xs ${"local"===l?"text-white/75":"text-text-subtle"}`,children:"Self-hosted runtime, latency, TTFT, throughput v\xe0 token"})]})]}),(0,d.jsxs)("button",{type:"button",onClick:()=>q("cloud"),"aria-pressed":"cloud"===l,className:`flex min-w-[220px] flex-1 items-center gap-3 rounded-xl px-4 py-3 text-left transition ${"cloud"===l?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-background hover:text-text-main"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"cloud"}),(0,d.jsxs)("span",{children:[(0,d.jsx)("span",{className:"block text-sm font-semibold",children:"Cloud providers"}),(0,d.jsx)("span",{className:`mt-0.5 block text-xs ${"cloud"===l?"text-white/75":"text-text-subtle"}`,children:"External provider reliability, latency, token v\xe0 cost"})]})]})]})}):null,n?(0,d.jsx)("div",{children:b},k?l:"user-owned"):null]})}},92305:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var d={isRequestApiAllowedInCurrentPhase:function(){return k},throwForSearchParamsAccessInUseCache:function(){return j},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return i}};for(var e in d)Object.defineProperty(b,e,{enumerable:!0,get:d[e]});let f=c(15693),g=c(19121),h=c(3295);function i(a,b){throw Object.defineProperty(new f.StaticGenBailoutError(`Route ${a} with \`dynamic = "error"\` couldn't be rendered statically because it used ${b}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function j(a,b){let c=Object.defineProperty(Error(`Route ${a.route} used \`searchParams\` inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \`searchParams\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E842",enumerable:!1,configurable:!0});throw Error.captureStackTrace(c,b),a.invalidDynamicUsageError??=c,c}function k(a){switch(a.phase){case"action":case"render":return!0;case"after":{let a=g.actionAsyncStorage.getStore();if(a&&(a.isAppRoute||a.isAction))return!0;let b=h.afterTaskAsyncStorage.getStore();if(b)return"action"===b.rootTaskSpawnPhase;return!1}}}},94735:a=>{"use strict";a.exports=require("events")},96004:(a,b,c)=>{Promise.resolve().then(c.bind(c,62855)),Promise.resolve().then(c.bind(c,6633)),Promise.resolve().then(c.bind(c,78633))}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,2430,8316,8946,402,5681,4404,6064,6328,8640],()=>b(b.s=2777));module.exports=c})();
1
+ (()=>{var a={};a.id=8978,a.ids=[8978],a.modules={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")},6633:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\analytics\\\\AnalyticsRangeGuard.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.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\analytics\\AnalyticsRangeGuard.js","default")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10171:(a,b,c)=>{"use strict";function d(){return null}c.d(b,{default:()=>d}),c(67484)},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19616:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>i,metadata:()=>h});var d=c(5735),e=c(62855),f=c(6633),g=c(78633);let h={title:"Analytics"};async function i({searchParams:a}){let b=await a,c=b?.scope==="cloud"?"cloud":"local";return(0,d.jsxs)(g.default,{initialScope:c,children:[(0,d.jsx)(f.default,{}),(0,d.jsx)(e.default,{})]})}},19771:a=>{"use strict";a.exports=require("process")},20503:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var d={MutableRequestCookiesAdapter:function(){return o},ReadonlyRequestCookiesError:function(){return j},RequestCookiesAdapter:function(){return k},appendMutableCookies:function(){return n},areCookiesMutableInCurrentPhase:function(){return q},createCookiesWithMutableAccessCheck:function(){return p},getModifiedCookieValues:function(){return m},responseCookiesToRequestCookies:function(){return s}};for(var e in d)Object.defineProperty(b,e,{enumerable:!0,get:d[e]});let f=c(91488),g=c(20445),h=c(29294),i=c(43014);class j extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options"),Object.defineProperty(this,"__NEXT_ERROR_CODE",{value:"E1180",enumerable:!1,configurable:!0})}static callable(){throw new j}}class k{static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"clear":case"delete":case"set":return j.callable;default:return g.ReflectAdapter.get(a,b,c)}}})}static fresh(a){return new Proxy(a,{get:(a,b,c)=>g.ReflectAdapter.get(a,b,c)})}}let l=Symbol.for("next.mutated.cookies");function m(a){let b=a[l];return b&&Array.isArray(b)&&0!==b.length?b:[]}function n(a,b){let c=m(b);if(0===c.length)return!1;let d=new f.ResponseCookies(a),e=d.getAll();for(let a of c)d.set(a);for(let a of e)d.set(a);return!0}class o{static wrap(a,b){let c=new f.ResponseCookies(new Headers);for(let b of a.getAll())c.set(b);let d=[],e=new Set,j=()=>{let a=h.workAsyncStorage.getStore();if(a&&(a.pathWasRevalidated=i.ActionDidRevalidateStaticAndDynamic),d=c.getAll().filter(a=>e.has(a.name)),b){let a=[];for(let b of d){let c=new f.ResponseCookies(new Headers);c.set(b),a.push(c.toString())}b(a)}},k=new Proxy(c,{get(a,b,c){switch(b){case l:return d;case"delete":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.delete(...b),k}finally{j()}};case"set":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.set(...b),k}finally{j()}};default:return g.ReflectAdapter.get(a,b,c)}}});return k}}function p(a){let b=new Proxy(a.mutableCookies,{get(c,d,e){switch(d){case"delete":return function(...d){return r(a,"cookies().delete"),c.delete(...d),b};case"set":return function(...d){return r(a,"cookies().set"),c.set(...d),b};default:return g.ReflectAdapter.get(c,d,e)}}});return b}function q(a){return"action"===a.phase}function r(a,b){if(!q(a))throw new j}function s(a){let b=new f.RequestCookies(new Headers);for(let c of a.getAll())b.set(c);return b}},21820:a=>{"use strict";a.exports=require("os")},26224:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>w,handler:()=>y,routeModule:()=>x});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,32059))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u={children:["",{children:["(dashboard)",{children:["dashboard",{children:["analytics",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,19616))),"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\analytics\\page.js"]}]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"D:\\bluerouter\\src\\app\\(dashboard)\\layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"D:\\bluerouter\\src\\app\\layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,v=(0,e.H)({tree:u,page:"/(dashboard)/dashboard/analytics/page",pathname:"/dashboard/analytics",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),w=v.__next_app__,x=v.routeModule,y=v.handler},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},32804:(a,b,c)=>{Promise.resolve().then(c.bind(c,78954)),Promise.resolve().then(c.bind(c,10171)),Promise.resolve().then(c.bind(c,91687))},33873:a=>{"use strict";a.exports=require("path")},34631:a=>{"use strict";a.exports=require("tls")},38522:a=>{"use strict";a.exports=require("node:zlib")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41204:a=>{"use strict";a.exports=require("string_decoder")},43014:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={ActionDidNotRevalidate:function(){return e},ActionDidRevalidateDynamicOnly:function(){return g},ActionDidRevalidateStaticAndDynamic:function(){return f}};for(var d in c)Object.defineProperty(b,d,{enumerable:!0,get:c[d]});let e=0,f=1,g=2},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},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")},62855:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\analytics\\\\AnalyticsPageClient.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.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\analytics\\AnalyticsPageClient.js","default")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{"use strict";a.exports=import("pg")},66136:a=>{"use strict";a.exports=require("timers")},73024:a=>{"use strict";a.exports=require("node:fs")},74075:a=>{"use strict";a.exports=require("zlib")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},78633:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"D:\\\\bluerouter\\\\src\\\\app\\\\(dashboard)\\\\dashboard\\\\analytics\\\\AnalyticsScopeShell.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.")},"D:\\bluerouter\\src\\app\\(dashboard)\\dashboard\\analytics\\AnalyticsScopeShell.js","default")},78954:(a,b,c)=>{"use strict";c.d(b,{default:()=>aq});var d=c(48249),e=c(67484),f=c(26921),g=c(20151);function h(a){let b=Number(a);return Number.isFinite(b)?b:0}function i(a,b=0){return h(a).toLocaleString("vi-VN",{maximumFractionDigits:b})}function j(a){return new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}).format(h(a))}function k(a){let b=Number(a);return!Number.isFinite(b)||b<=0?"-":b>=1e3?`${(b/1e3).toLocaleString("vi-VN",{maximumFractionDigits:2})} s`:`${Math.round(b)} ms`}function l(a){let b=Number(a);return Number.isFinite(b)&&b>0?`${b.toLocaleString("vi-VN",{maximumFractionDigits:1})} tok/s`:"-"}function m(a){return`$${h(a).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4})}`}function n({row:a}){return(0,d.jsxs)("div",{className:"min-w-[105px] text-xs tabular-nums",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:j(a.totalTokens)}),(0,d.jsxs)("div",{className:"text-text-muted",children:["in ",j(a.promptTokens)," \xb7 out ",j(a.completionTokens)]})]})}function o({label:a,value:b,hint:c}){return(0,d.jsxs)("div",{className:"rounded-xl border border-border bg-background/55 px-3 py-2.5",children:[(0,d.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-text-muted",children:a}),(0,d.jsx)("div",{className:"mt-1 text-lg font-semibold tabular-nums text-text-main",children:b}),c?(0,d.jsx)("div",{className:"mt-0.5 text-[10px] text-text-muted",children:c}):null]})}function p({rows:a,cloud:b}){return a.length?(0,d.jsx)("div",{className:"overflow-x-auto overflow-y-auto rounded-2xl border border-border",style:{maxHeight:"520px"},children:(0,d.jsxs)("table",{className:"min-w-[1080px] w-full divide-y divide-border text-sm",children:[(0,d.jsx)("thead",{className:"sticky top-0 z-10 bg-background/95 backdrop-blur",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-3 py-2.5 text-left text-xs font-semibold text-text-muted",children:"Model / Provider"}),(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",children:"Req"}),(0,d.jsx)("th",{className:"px-3 py-2.5 text-left text-xs font-semibold text-text-muted",children:"Tokens"}),(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",children:"Error"}),(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",children:"P95 latency"}),(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",children:"P95 TTFT"}),b?null:(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",title:"Decode tok/s = Σ output tokens / Σ (latency - TTFT). Chỉ d\xf9ng request th\xe0nh c\xf4ng c\xf3 output v\xe0 TTFT hợp lệ.",children:"Decode tok/s"}),b?(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",children:"Cost"}):null,(0,d.jsx)("th",{className:"px-3 py-2.5 text-right text-xs font-semibold text-text-muted",children:"Last used"})]})}),(0,d.jsx)("tbody",{className:"divide-y divide-border/70",children:a.map(a=>{let c,e,f=(c=h(a.requests),e=h(a.errors),c>0?e/c:h(a.errorRate)),g=a.decodeTokensPerSecond,j=h(a.decodeSamples),o=h(a.estimatedSamplesExcluded);return(0,d.jsxs)("tr",{className:"hover:bg-background/50",children:[(0,d.jsxs)("td",{className:"px-3 py-2.5",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a.model||a.label||"unknown"}),(0,d.jsx)("div",{className:"mt-0.5 text-xs text-text-muted",children:a.providerLabel||a.provider||"unknown"})]}),(0,d.jsx)("td",{className:"px-3 py-2.5 text-right tabular-nums",children:i(a.requests)}),(0,d.jsx)("td",{className:"px-3 py-2.5",children:(0,d.jsx)(n,{row:a})}),(0,d.jsx)("td",{className:"px-3 py-2.5 text-right",children:(0,d.jsxs)("span",{className:f>=.05?"text-red-500":f>0?"text-amber-500":"text-emerald-500",children:[(100*f).toLocaleString("vi-VN",{maximumFractionDigits:1}),"%"]})}),(0,d.jsx)("td",{className:"px-3 py-2.5 text-right tabular-nums",children:k(a.p95LatencyMs)}),(0,d.jsx)("td",{className:"px-3 py-2.5 text-right tabular-nums",children:k(a.p95TtftMs)}),b?null:(0,d.jsxs)("td",{className:"px-3 py-2.5 text-right tabular-nums",children:[(0,d.jsx)("div",{className:"font-semibold",children:l(g)}),(0,d.jsxs)("div",{className:"mt-0.5 text-[10px] font-normal text-text-muted",children:[i(j)," mẫu TTFT"]}),null==g&&a.e2eOutputTokensPerSecond?(0,d.jsxs)("div",{className:"text-[10px] font-normal text-text-subtle",children:["E2E ",l(a.e2eOutputTokensPerSecond)]}):null,o>0?(0,d.jsxs)("div",{className:"text-[10px] font-normal text-amber-600 dark:text-amber-300",children:[i(o)," mẫu token ước lượng bị loại"]}):null]}),b?(0,d.jsx)("td",{className:"px-3 py-2.5 text-right tabular-nums text-emerald-600 dark:text-emerald-300",children:m(a.cost)}):null,(0,d.jsx)("td",{className:"px-3 py-2.5 text-right text-xs text-text-muted",children:function(a){if(!a)return"-";let b=new Date(a);return Number.isNaN(b.getTime())?String(a):b.toLocaleString("vi-VN")}(a.lastSeen)})]},a.key||`${a.provider}-${a.model}`)})})]})}):(0,d.jsxs)("div",{className:"rounded-2xl border border-dashed border-border px-4 py-7 text-center text-sm text-text-muted",children:["Kh\xf4ng c\xf3 model ",b?"cloud":"local"," trong khoảng lọc hiện tại."]})}function q({type:a,rows:b,summary:c}){let e="local"===a,f=c.decodeTokensPerSecond,g=h(c.estimatedSamplesExcluded),k=[`Σ output / Σ(latency − TTFT) \xb7 ${i(c.decodeSamples||0)} mẫu TTFT hợp lệ`,g>0?`${i(g)} mẫu token ước lượng bị loại`:"",null==f&&c.e2eOutputTokensPerSecond?`Chưa c\xf3 mẫu TTFT hợp lệ \xb7 E2E ${l(c.e2eOutputTokensPerSecond)}`:""].filter(Boolean).join(" \xb7 ");return(0,d.jsxs)("section",{className:"rounded-3xl border border-border bg-surface p-5 shadow-[var(--shadow-soft)]",children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("div",{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl ${e?"bg-primary/10 text-primary":"bg-amber-500/10 text-amber-600 dark:text-amber-300"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:e?"developer_board":"cloud"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:e?"Local Models":"Cloud Models"}),(0,d.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:e?"Self-hosted inference: vLLM, SGLang, Ollama, llama.cpp hoặc compatible endpoint được đ\xe1nh dấu Local.":"External/cloud API providers, kể cả compatible endpoint được đ\xe1nh dấu Cloud."})]})]}),(0,d.jsxs)("span",{className:"rounded-full border border-border bg-background px-3 py-1 text-xs font-semibold text-text-muted",children:[i(c.models??b.length)," models"]})]}),(0,d.jsxs)("div",{className:"mb-4 grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:[(0,d.jsx)(o,{label:"Requests",value:i(c.requests)}),(0,d.jsx)(o,{label:"Total tokens",value:j(c.totalTokens),hint:`In ${j(c.promptTokens)} \xb7 Out ${j(c.completionTokens)}`}),e?(0,d.jsx)(o,{label:"Decode speed",value:l(f),hint:k}):(0,d.jsx)(o,{label:"Estimated cost",value:m(c.cost)})]}),(0,d.jsx)(p,{rows:b,cloud:!e})]})}function r({data:a}){let b=a?.groups||{},c=a?.deploymentAnalytics||{},e=String(a?.analyticsScope||"all").trim().toLowerCase(),f=b.localModels||[],g=b.cloudModels||[],h=b.unknownModels||[];return(0,d.jsxs)("div",{className:"space-y-5",children:["cloud"!==e?(0,d.jsx)(q,{type:"local",rows:f,summary:c.local||{}}):null,"local"!==e?(0,d.jsx)(q,{type:"cloud",rows:g,summary:c.cloud||{}}):null,h.length>0?(0,d.jsx)("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"warning"}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"font-semibold",children:[i(h.length)," model chưa x\xe1c định Local / Cloud"]}),(0,d.jsx)("div",{className:"mt-0.5 text-xs opacity-90",children:"Mở Custom Provider tương ứng v\xe0 chọn Deployment để số liệu kh\xf4ng bị gộp sai."})]})]})}):null]})}f.xI.setOptions({gfm:!0,breaks:!0});let s=[{value:"today",label:"H\xf4m nay"},{value:"todayWorking",label:"H\xf4m nay (Working time)"},{value:"yesterday",label:"H\xf4m qua"},{value:"yesterdayWorking",label:"H\xf4m qua (Working time)"},{value:"24h",label:"24 giờ"},{value:"thisWeek",label:"Tuần n\xe0y"},{value:"lastWeek",label:"Tuần trước"},{value:"7d",label:"7 ng\xe0y"},{value:"thisMonth",label:"Th\xe1ng n\xe0y"},{value:"lastMonth",label:"Th\xe1ng trước"},{value:"30d",label:"30 ng\xe0y"},{value:"60d",label:"60 ng\xe0y"},{value:"all",label:"Tất cả (60 ng\xe0y)"},{value:"custom",label:"T\xf9y chọn"}],t=[{value:"overview",label:"Tổng quan",icon:"dashboard"},{value:"apiKeys",label:"API keys",icon:"vpn_key"},{value:"clients",label:"Client/User",icon:"groups"},{value:"sources",label:"Source IP / Tool",icon:"hub"},{value:"providers",label:"Provider / Model",icon:"dns"},{value:"experience",label:"Trải nghiệm",icon:"speed"},{value:"errors",label:"Lỗi & bất thường",icon:"warning"},{value:"raw",label:"Raw usage",icon:"table"},{value:"aiHealth",label:"Đ\xe1nh gi\xe1 AI",icon:"neurology"}],u={normal:{className:"border-emerald-500/20 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",label:"B\xecnh thường"},warning:{className:"border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-300",label:"Cảnh b\xe1o"},critical:{className:"border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300",label:"Nghi\xeam trọng"},no_traffic:{className:"border-border bg-surface-2 text-text-muted",label:"Kh\xf4ng c\xf3 lưu lượng"},unknown:{className:"border-border bg-surface-2 text-text-muted",label:"Kh\xf4ng r\xf5"}};function v({status:a}){let b=u[a]||u.unknown;return(0,d.jsxs)("span",{className:K("inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-semibold",b.className),children:[(0,d.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-current"}),b.label]})}function w(a){let b=Number(a||0);if(!b)return"-";let c=["B","KiB","MiB","GiB","TiB"],d=Math.min(Math.floor(Math.log(b)/Math.log(1024)),c.length-1);return`${(b/1024**d).toLocaleString("vi-VN",{maximumFractionDigits:1})} ${c[d]}`}function x({nodes:a=[]}){return a.length?(0,d.jsxs)("section",{className:"border-y border-border py-4",children:[(0,d.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[19px] text-primary",children:"developer_board"}),(0,d.jsx)("h4",{className:"text-sm font-semibold text-text-main",children:"Cấu h\xecnh phần cứng từng node tại l\xfac đ\xe1nh gi\xe1"})]}),(0,d.jsx)("div",{className:"divide-y divide-border",children:a.map(a=>(0,d.jsxs)("div",{className:"grid gap-2 py-3 text-xs md:grid-cols-[minmax(180px,0.8fr)_minmax(0,2.2fr)]",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a.name}),(0,d.jsx)("div",{className:"mt-0.5 text-text-muted",children:a.host||a.hostname||"-"}),(0,d.jsx)("div",{className:a.reachable?"mt-1 text-emerald-600 dark:text-emerald-300":"mt-1 text-red-600 dark:text-red-300",children:a.reachable?"C\xf3 dữ liệu":a.error||"Chưa c\xf3 snapshot"})]}),a.reachable?(0,d.jsxs)("div",{className:"space-y-1 text-text-muted",children:[(0,d.jsxs)("p",{children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"CPU:"})," ",a.cpu?.model||"-"," \xb7 ",a.cpu?.cores||0," cores \xb7 sử dụng ",Number(a.cpu?.usagePercent||0).toLocaleString("vi-VN",{maximumFractionDigits:1}),"%"]}),(0,d.jsxs)("p",{children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"RAM:"})," ",w(a.memory?.totalBytes)," \xb7 đang d\xf9ng ",w(a.memory?.usedBytes)," (",Number(a.memory?.usagePercent||0).toLocaleString("vi-VN",{maximumFractionDigits:1}),"%)"]}),a.gpus?.length?a.gpus.map(b=>(0,d.jsxs)("p",{children:[(0,d.jsxs)("span",{className:"font-medium text-text-main",children:["GPU ",b.index,":"]})," ",b.name," \xb7 VRAM ",(Number(b.memoryTotalMb||0)/1024).toLocaleString("vi-VN",{maximumFractionDigits:1})," GiB \xb7 sử dụng ",Number(b.usagePercent||0).toLocaleString("vi-VN",{maximumFractionDigits:1}),"%"]},`${a.id}-${b.index}`)):(0,d.jsxs)("p",{children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"GPU:"})," Kh\xf4ng ph\xe1t hiện NVIDIA GPU"]}),(0,d.jsxs)("p",{className:"text-text-subtle",children:["Snapshot: ",a.statusAt?new Date(a.statusAt).toLocaleString("vi-VN"):"-"]})]}):null]},a.id))})]}):null}function y(){let[a,b]=(0,e.useState)([]),[c,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(null),[j,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)(!1),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(""),[w,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(""),B=(0,e.useCallback)(a=>{g(a),fetch("/api/dashboard/analytics/analyze",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a})}).catch(()=>{})},[]),C=(0,e.useCallback)(async({showMessage:a=!0}={})=>{y(!0),a&&A("");try{let b=await fetch("/api/dashboard/analytics/analyze",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({vllmConfig:r})}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Kh\xf4ng thể lưu cấu h\xecnh vLLM");let d=c.vllmConfig||"";return s(d),u(d),a&&A("Đ\xe3 lưu cấu h\xecnh vLLM"),d}finally{y(!1)}},[r]),D=(0,e.useCallback)(async()=>{o("");try{await C()}catch(a){A(""),o(a?.message||"Kh\xf4ng thể lưu cấu h\xecnh vLLM")}},[C]),E=(0,e.useCallback)(async()=>{if(!c)return;let a=c.indexOf("::"),b=c.slice(0,a),d=c.slice(a+2);m(!0),o("");try{r.trim()!==t&&await C({showMessage:!1});let a=await fetch("/api/dashboard/analytics/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:b,model:d})}),c=await a.json().catch(()=>({}));if(!a.ok)throw Error(c.error||"Kh\xf4ng thể ph\xe2n t\xedch");i(c.analysis)}catch(a){o(a?.message||"Kh\xf4ng thể ph\xe2n t\xedch")}finally{m(!1)}},[C,t,c,r]),F=(0,e.useMemo)(()=>h?.summary?f.xI.parse(h.summary):"",[h]);return(0,d.jsxs)("section",{className:"overflow-hidden rounded-3xl border border-border bg-surface shadow-[var(--shadow-soft)]",children:[(0,d.jsx)("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b border-border px-6 py-5",children:(0,d.jsxs)("div",{className:"flex items-center gap-4",children:[(0,d.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[27px]",children:"neurology"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"text-lg font-semibold text-text-main",children:"Đ\xe1nh gi\xe1 AI về trải nghiệm & hiệu năng"}),(0,d.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:'Ph\xe2n t\xedch giờ l\xe0m việc h\xf4m nay, tập trung v\xe0o tab "Trải nghiệm" v\xe0 c\xe1c vLLM AI server local. Chạy nền tự động mỗi 1 giờ.'})]})]})}),(0,d.jsxs)("div",{className:"space-y-5 p-6",children:[j?(0,d.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:"Standby mode: kết quả ph\xe2n t\xedch được đồng bộ tự động từ Master. Node n\xe0y kh\xf4ng tự chạy ph\xe2n t\xedch AI."}):null,(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("label",{htmlFor:"analytics-vllm-config",className:"text-xs font-medium text-text-muted",children:"Cấu h\xecnh vLLM của c\xe1c server"}),(0,d.jsxs)("span",{className:"text-xs text-text-subtle",children:[r.length.toLocaleString("vi-VN")," / 50.000 k\xfd tự"]})]}),(0,d.jsx)("textarea",{id:"analytics-vllm-config",rows:8,maxLength:5e4,value:r,onChange:a=>{s(a.target.value),A("")},disabled:j||w,placeholder:"M\xf4 tả theo từng node, v\xed dụ:\nnode-gpu-01: model=..., --tensor-parallel-size 4, --max-model-len 32768, --gpu-memory-utilization 0.9\nnode-gpu-02: model=..., replicas=2, c\xe1c tham số batching/concurrency...",className:"w-full resize-y rounded-lg border border-border bg-surface px-3 py-2.5 font-mono text-xs leading-5 text-text-main outline-none transition focus:border-primary focus:ring-2 focus:ring-primary/15 disabled:opacity-60"}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"D\xf9ng t\xean hoặc host tr\xf9ng với Linux node trong Resource Monitor để AI \xe1nh xạ ch\xednh x\xe1c."}),(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[z?(0,d.jsx)("span",{className:"text-xs text-emerald-600 dark:text-emerald-300",children:z}):null,(0,d.jsxs)("button",{type:"button",onClick:D,disabled:j||w||r.trim()===t,className:"inline-flex items-center gap-2 rounded-lg border border-border bg-surface px-3 py-2 text-xs font-semibold text-text-main transition hover:border-primary/40 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:w?"progress_activity":"save"}),w?"Đang lưu...":"Lưu cấu h\xecnh"]})]})]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,d.jsxs)("label",{className:"flex min-w-[280px] flex-1 flex-col gap-1.5 text-sm",children:[(0,d.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"AI model d\xf9ng để ph\xe2n t\xedch"}),(0,d.jsxs)("select",{className:"rounded-xl border border-border bg-surface px-3 py-2.5 text-sm text-text-main disabled:opacity-60",value:c,onChange:a=>B(a.target.value),disabled:!a.length||j,children:[a.length?null:(0,d.jsx)("option",{value:"",children:"Chưa c\xf3 kết nối AI n\xe0o đang hoạt động"}),a.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value))]})]}),(0,d.jsxs)("button",{type:"button",onClick:E,disabled:!c||j||l,className:"flex items-center gap-2 rounded-xl bg-primary px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition disabled:cursor-not-allowed disabled:opacity-60",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l?"progress_activity":"auto_awesome"}),l?"Đang ph\xe2n t\xedch...":"Ph\xe2n t\xedch lại"]})]}),n?(0,d.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-300",children:n}):null,h?(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-text-muted",children:[(0,d.jsxs)("span",{children:["Model: ",(0,d.jsx)("span",{className:"font-semibold",children:h.modelLabel})]}),(0,d.jsxs)("span",{children:["Cập nhật l\xfac ",h.generatedAt?new Date(h.generatedAt).toLocaleString("vi-VN"):"-"]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Tổng quan:"}),(0,d.jsx)(v,{status:h.status}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"vLLM local:"}),(0,d.jsx)(v,{status:h.vllmStatus}),"number"==typeof h.vllmServerCount?(0,d.jsxs)("span",{className:"text-xs text-text-subtle",children:["(",h.vllmServerCount," node)"]}):null]}),(0,d.jsx)(x,{nodes:h.hardwareNodes||[]}),(0,d.jsx)("div",{className:"analytics-ai-body rounded-2xl border border-border bg-surface-2/40 p-5 text-sm leading-6 text-text-main",dangerouslySetInnerHTML:{__html:F}})]}):!l&&p?(0,d.jsx)("div",{className:"rounded-2xl border border-dashed border-border bg-surface-2/40 py-10 text-center text-sm text-text-muted",children:'Chưa c\xf3 ph\xe2n t\xedch n\xe0o — bấm "Ph\xe2n t\xedch lại" để bắt đầu.'}):null]})]})}function z(a,b=0){return Number(a||0).toLocaleString("vi-VN",{maximumFractionDigits:b})}function A(a){let b=Number(a||0);return Intl.NumberFormat("vi-VN",{notation:"compact",maximumFractionDigits:1}).format(b)}function B(a){let b=100*Number(a||0);return`${b.toLocaleString("vi-VN",{maximumFractionDigits:1})}%`}function C(a){let b=Number(a||0);return b?`$${b.toLocaleString("vi-VN",{minimumFractionDigits:4,maximumFractionDigits:6})}`:"$0"}function D(a){if(null==a||Number.isNaN(Number(a)))return"-";let b=Number(a);return b>=1e3?`${(b/1e3).toLocaleString("vi-VN",{maximumFractionDigits:2})}s`:`${b.toLocaleString("vi-VN",{maximumFractionDigits:0})}ms`}function E(a,b="/s"){if(null==a||Number.isNaN(Number(a)))return"-";let c=Number(a);return`${c.toLocaleString("vi-VN",{maximumFractionDigits:c>=10?1:2})}${b}`}function F(a){return null==a||Number.isNaN(Number(a))?"-":`${Number(a).toLocaleString("vi-VN",{maximumFractionDigits:0})}/100`}function G(a){if(!a)return null;let b=String(a).trim();return new Date(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)?$/.test(b)?`${b.replace(" ","T")}Z`:b)}function H(a){if(!a)return"-";try{let b=G(a);if(!b||Number.isNaN(b.getTime()))return String(a);return b.toLocaleString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return String(a)}}function I(a){if(!a)return"";try{let b=G(a);if(!b||Number.isNaN(b.getTime()))return String(a);return b.toLocaleString("vi-VN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch{return String(a)}}function J(){let{isAdmin:a,isMonitorAdmin:b,isAiGatewaysMonitor:c}=(0,g.s)();return a||b||c}function K(...a){return a.filter(Boolean).join(" ")}function L(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}function M(a,b={}){let c=new URLSearchParams;return Object.entries({...a,...b}).forEach(([a,b])=>{let d=String(b??"").trim();d&&c.set(a,d)}),c.toString()}function N({children:a,className:b=""}){return(0,d.jsx)("div",{className:K("min-w-0 rounded-2xl border border-border bg-surface p-5 shadow-sm",b),children:a})}function O({icon:a,label:b,value:c,hint:e,help:f,tone:g="blue"}){return(0,d.jsx)(N,{className:"min-h-[126px]",children:(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"text-sm font-medium text-text-muted",children:b}),(0,d.jsx)("div",{className:"mt-2 text-2xl font-semibold text-text-main",children:c}),e?(0,d.jsx)("div",{className:"mt-2 text-xs text-text-muted",children:e}):null,f?(0,d.jsx)("div",{className:"mt-1 text-[11px] leading-4 text-text-muted/70",children:f}):null]}),(0,d.jsx)("div",{className:K("flex h-10 w-10 items-center justify-center rounded-xl",{blue:"bg-blue-500/10 text-blue-600 dark:text-blue-300",green:"bg-green-500/10 text-green-600 dark:text-green-300",red:"bg-red-500/10 text-red-600 dark:text-red-300",amber:"bg-amber-500/10 text-amber-600 dark:text-amber-300",purple:"bg-purple-500/10 text-purple-600 dark:text-purple-300",slate:"bg-slate-500/10 text-slate-600 dark:text-slate-300"}[g]||"bg-blue-500/10 text-blue-600 dark:text-blue-300"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:a})})]})})}function P({label:a,children:b}){return(0,d.jsxs)("label",{className:"space-y-1.5 text-xs font-medium text-text-muted",children:[(0,d.jsx)("span",{children:a}),b]})}function Q({value:a,onChange:b,children:c}){return(0,d.jsx)("select",{value:a||"",onChange:a=>b(a.target.value),className:"h-10 w-full rounded-xl border border-border bg-background px-3 text-sm text-text-main outline-none transition focus:border-primary/60 focus:ring-2 focus:ring-primary/20",children:c})}function R({value:a,onChange:b,placeholder:c="",type:e="text"}){return(0,d.jsx)("input",{value:a||"",type:e,onChange:a=>b(a.target.value),placeholder:c,className:"h-10 w-full rounded-xl border border-border bg-background px-3 text-sm text-text-main outline-none transition placeholder:text-text-muted/60 focus:border-primary/60 focus:ring-2 focus:ring-primary/20"})}function S(){return(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:Array.from({length:8}).map((a,b)=>(0,d.jsx)("div",{className:"h-32 animate-pulse rounded-2xl border border-border bg-surface"},b))}),(0,d.jsx)("div",{className:"h-80 animate-pulse rounded-2xl border border-border bg-surface"})]})}function T({title:a="Kh\xf4ng c\xf3 dữ liệu",description:b="Kh\xf4ng t\xecm thấy dữ liệu theo bộ lọc hiện tại."}){return(0,d.jsxs)("div",{className:"flex min-h-[180px] flex-col items-center justify-center rounded-2xl border border-dashed border-border bg-surface/60 p-8 text-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-4xl text-text-muted",children:"database_off"}),(0,d.jsx)("div",{className:"mt-3 text-sm font-semibold text-text-main",children:a}),(0,d.jsx)("div",{className:"mt-1 max-w-xl text-sm text-text-muted",children:b})]})}function U({data:a=[],valueKey:b="totalTokens",secondaryKey:c="requests",height:e=220}){let f=a||[],g=Math.max(...f.map(a=>Number(a[b]||0)),1),h=Math.max(...f.map(a=>Number(a[c]||0)),1);return 0===f.length?(0,d.jsx)(T,{description:"Chưa c\xf3 time-series trong khoảng thời gian n\xe0y."}):(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("div",{className:"min-w-[720px]",children:[(0,d.jsx)("div",{className:"flex items-end gap-1",style:{height:e},children:f.map((a,f)=>{let i=Math.max(2,Number(a[b]||0)/g*(e-42)),j=Math.max(2,Number(a[c]||0)/h*(e-42));return(0,d.jsx)("div",{className:"group flex flex-1 flex-col items-center justify-end gap-1",children:(0,d.jsxs)("div",{className:"relative flex h-full w-full max-w-[34px] items-end justify-center gap-0.5",children:[(0,d.jsx)("div",{className:"w-2 rounded-t bg-primary/70",style:{height:i}}),(0,d.jsx)("div",{className:"w-2 rounded-t bg-amber-500/70",style:{height:j}}),(0,d.jsxs)("div",{className:"pointer-events-none absolute bottom-full left-1/2 z-20 hidden w-56 -translate-x-1/2 rounded-xl border border-border bg-surface p-3 text-left text-xs shadow-xl group-hover:block",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:I(a.label)}),(0,d.jsxs)("div",{className:"mt-1 text-text-muted",children:["Request: ",z(a.requests)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["Input token: ",z(a.promptTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["Output token: ",z(a.completionTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["Tổng token: ",z(a.totalTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["Lỗi: ",z(a.errors)]})]})]})},`${a.label}-${f}`)})}),(0,d.jsxs)("div",{className:"mt-3 flex justify-between gap-2 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{children:I(f[0]?.label)}),(0,d.jsx)("span",{children:I(f[Math.floor(f.length/2)]?.label)}),(0,d.jsx)("span",{children:I(f[f.length-1]?.label)})]})]})})}function V(){return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-text-muted",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"h-2.5 w-2.5 rounded-sm bg-primary/70"}),"Token"]}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"h-2.5 w-2.5 rounded-sm bg-amber-500/70"}),"Request"]})]})}function W({columns:a,rows:b,empty:c="Kh\xf4ng c\xf3 dữ liệu"}){return b&&0!==b.length?(0,d.jsx)("div",{className:"overflow-x-auto overflow-y-auto rounded-2xl border border-border",style:{maxHeight:"500px"},children:(0,d.jsxs)("table",{className:"min-w-full divide-y divide-border text-sm",children:[(0,d.jsx)("thead",{className:"bg-background/70",children:(0,d.jsx)("tr",{children:a.map(a=>(0,d.jsx)("th",{className:K("whitespace-nowrap px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-text-muted",a.className),children:a.label},a.key))})}),(0,d.jsx)("tbody",{className:"divide-y divide-border bg-surface",children:b.map((b,c)=>(0,d.jsx)("tr",{className:"hover:bg-background/60",children:a.map(a=>(0,d.jsx)("td",{className:K("whitespace-nowrap px-4 py-3 align-top text-text-main",a.className),children:a.render?a.render(b,c):b[a.key]??"-"},a.key))},b.key||b.id||`${b.label}-${c}`))})]})}):(0,d.jsx)(T,{title:c})}function X({items:a=[]}){return a&&0!==a.length?(0,d.jsx)("div",{className:"flex max-w-[360px] flex-wrap gap-1.5",children:a.slice(0,3).map(a=>(0,d.jsxs)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary",children:[a.label||a.key," \xb7 ",z(a.count??a.requests??a.totalTokens??0)]},a.key))}):(0,d.jsx)("span",{className:"text-text-muted",children:"-"})}function Y({row:a}){return(0,d.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,d.jsxs)("div",{className:"font-semibold text-text-main",children:[A(a.totalTokens)," token"]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["In ",A(a.promptTokens)," / Out ",A(a.completionTokens)]})]})}function Z({leaderboard:a={}}){let b=J(),c=a.rows||[],e=a.status||"warming",f="ready"===e?`${a.periodLabel||"H\xf4m nay"} \xb7 cập nhật ${H(a.generatedAt)} \xb7 refresh nền mỗi ${Math.round((a.refreshEveryMs||9e5)/6e4)} ph\xfat`:"error"===e?"Leaderboard đang chờ job nền tổng hợp lại dữ liệu.":"Leaderboard đang được job nền khởi tạo.";return(0,d.jsxs)(N,{className:"border-amber-500/20 bg-amber-500/[0.03]",children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-2xl text-amber-500",children:"crown"}),(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top 5 vinh danh token"})]}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp hạng theo API key owner d\xf9ng nhiều input + output token nhất."})]}),(0,d.jsx)("span",{className:"rounded-full bg-amber-500/10 px-3 py-1 text-xs font-semibold text-amber-700 dark:text-amber-300",children:f})]}),(0,d.jsx)(W,{rows:c,empty:"Chưa c\xf3 snapshot leaderboard từ job nền.",columns:[{key:"rank",label:"Hạng",render:a=>(0,d.jsxs)("div",{className:"flex min-w-[170px] items-center gap-3",children:[(0,d.jsx)("div",{className:K("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",1===a.rank?"bg-amber-500/15 text-amber-600":"bg-primary/10 text-primary"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"crown"})}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"font-semibold text-text-main",children:["#",a.rank," \xb7 ",a.title]}),(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:[B(a.tokenShare||0)," tổng token"]})]})]})},{key:"owner",label:"Owner",render:a=>(0,d.jsxs)("div",{className:"min-w-[210px]",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a.ownerUser||a.label}),(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:[a.apiKeyName||"API key",b&&a.apiKeyFingerprint?` \xb7 ${a.apiKeyFingerprint}`:""]})]})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"scope",label:"Phạm vi",render:a=>(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:[(0,d.jsxs)("div",{children:["API key ",z(a.apiKeyCount)," \xb7 IP ",z(a.sourceIpCount)]}),(0,d.jsxs)("div",{children:["Model ",z(a.modelCount)," \xb7 Provider ",z(a.providerCount)]})]})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]})}function $({value:a}){let b=Number(a||0);return(0,d.jsx)("span",{className:K("rounded-full px-2 py-1 text-xs font-semibold",b>=.2?"bg-red-500/10 text-red-600 dark:text-red-300":b>=.05?"bg-amber-500/10 text-amber-600 dark:text-amber-300":"bg-green-500/10 text-green-600 dark:text-green-300"),children:B(b)})}function _({level:a,label:b}){let c=String(a||"none");return(0,d.jsx)("span",{className:K("rounded-full px-2 py-1 text-xs font-semibold",{fast:"bg-green-500/10 text-green-700 dark:text-green-300",ok:"bg-blue-500/10 text-blue-700 dark:text-blue-300",slow:"bg-amber-500/10 text-amber-700 dark:text-amber-300",very_slow:"bg-red-500/10 text-red-700 dark:text-red-300",low_sample:"bg-amber-500/10 text-amber-700 dark:text-amber-300",none:"bg-slate-500/10 text-slate-700 dark:text-slate-300"}[c]||"bg-slate-500/10 text-slate-700 dark:text-slate-300"),children:b||"-"})}function aa({level:a,label:b}){let c=String(a||"normal");return(0,d.jsx)("span",{className:K("rounded-full px-2 py-1 text-xs font-semibold",{critical:"bg-red-500/10 text-red-700 dark:text-red-300",high:"bg-amber-500/10 text-amber-700 dark:text-amber-300",medium:"bg-blue-500/10 text-blue-700 dark:text-blue-300",normal:"bg-green-500/10 text-green-700 dark:text-green-300",none:"bg-slate-500/10 text-slate-700 dark:text-slate-300"}[c]||"bg-slate-500/10 text-slate-700 dark:text-slate-300"),children:b||"-"})}function ab({value:a}){let b=String(a||"unknown"),c={gateway:{label:"Gateway",cls:"bg-purple-500/10 text-purple-700 dark:text-purple-300"},upstream:{label:"Upstream",cls:"bg-red-500/10 text-red-700 dark:text-red-300"},client:{label:"Client",cls:"bg-slate-500/10 text-slate-700 dark:text-slate-300"},rate_limit:{label:"Rate limit",cls:"bg-amber-500/10 text-amber-700 dark:text-amber-300"},unknown:{label:"Unknown",cls:"bg-zinc-500/10 text-zinc-700 dark:text-zinc-300"}}[b]||{label:b,cls:"bg-zinc-500/10 text-zinc-700 dark:text-zinc-300"};return(0,d.jsx)("span",{className:K("rounded-full px-2 py-1 text-xs font-semibold",c.cls),children:c.label})}function ac({row:a}){let b=a.sampleMessage||a.errorMessageShort||"";return b?(0,d.jsx)("span",{className:"block max-w-[360px] truncate text-xs text-text-muted",title:b,children:b}):(0,d.jsx)("span",{className:"text-text-muted",children:"-"})}function ad({icon:a,label:b,value:c,hint:e,tone:f="slate"}){return(0,d.jsx)("div",{className:K("rounded-2xl border p-4 shadow-sm",{red:"border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300",amber:"border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-300",purple:"border-purple-500/20 bg-purple-500/10 text-purple-700 dark:text-purple-300",slate:"border-border bg-surface text-text-main",green:"border-green-500/20 bg-green-500/10 text-green-700 dark:text-green-300"}[f]||"border-border bg-surface text-text-main"),children:(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide opacity-75",children:b}),(0,d.jsx)("div",{className:"mt-2 text-2xl font-bold",children:z(c)}),e?(0,d.jsx)("div",{className:"mt-1 text-xs opacity-80",children:e}):null]}),(0,d.jsx)("span",{className:"material-symbols-outlined text-[24px] opacity-80",children:a})]})})}function ae({anomaly:a}){let b="danger"===a.level?"border-red-500/30 bg-red-500/10 text-red-700 dark:text-red-300":"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",c="danger"===a.level?"error":"warning";return(0,d.jsx)("div",{className:K("rounded-2xl border p-4",b),children:(0,d.jsxs)("div",{className:"flex gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:c}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.title}),(0,d.jsx)("div",{className:"mt-1 text-sm opacity-90",children:a.detail})]})]})})}function af({notes:a=[]}){return a.length?(0,d.jsx)("div",{className:"space-y-2 rounded-2xl border border-blue-500/20 bg-blue-500/10 p-4 text-sm text-blue-700 dark:text-blue-300",children:a.map((a,b)=>(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"info"}),(0,d.jsx)("span",{children:a})]},b))}):null}function ag(a){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}-${b(a.getMonth()+1)}-${b(a.getDate())}T${b(a.getHours())}:${b(a.getMinutes())}`}function ah({filters:a,setFilters:b,options:c,onRefresh:e,onExportCsv:f,loading:g,showProviderFilters:h=!0}){let i=(a,c)=>{let d=null;b(b=>{if("period"===a&&"custom"===c){let a,e;return d={...b,period:c,...((e=new Date(a=new Date)).setHours(8,0,0,0),{dateFrom:ag(e),dateTo:ag(a)})}}return{...b,[a]:c}}),d&&e?.(d)};return(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-6",children:[(0,d.jsx)(P,{label:"Khoảng thời gian",children:(0,d.jsx)(Q,{value:a.period,onChange:a=>i("period",a),children:s.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value))})}),(0,d.jsx)(P,{label:"Từ ng\xe0y",children:(0,d.jsx)(R,{type:"datetime-local",value:a.dateFrom,onChange:a=>i("dateFrom",a)})}),(0,d.jsx)(P,{label:"Đến ng\xe0y",children:(0,d.jsx)(R,{type:"datetime-local",value:a.dateTo,onChange:a=>i("dateTo",a)})}),h?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(P,{label:"Provider",children:(0,d.jsxs)(Q,{value:a.provider,onChange:a=>i("provider",a),children:[(0,d.jsx)("option",{value:"",children:"Tất cả provider"}),(c.providers||[]).map(a=>{let b="string"==typeof a?a:a.value,c="string"==typeof a?a:a.label||a.value;return(0,d.jsx)("option",{value:b,children:c},b)})]})}),(0,d.jsx)(P,{label:"Model",children:(0,d.jsxs)(Q,{value:a.model,onChange:a=>i("model",a),children:[(0,d.jsx)("option",{value:"",children:"Tất cả model"}),(c.models||[]).map(a=>(0,d.jsx)("option",{value:a,children:a},a))]})})]}):null,(0,d.jsx)(P,{label:"Source IP",children:(0,d.jsx)(R,{value:a.clientIp,onChange:a=>i("clientIp",a),placeholder:"172.16.253.1"})}),(0,d.jsx)(P,{label:"Source tool",children:(0,d.jsx)(R,{value:a.sourceTool,onChange:a=>i("sourceTool",a),placeholder:"copilot, antigravity..."})}),(0,d.jsx)(P,{label:"Status",children:(0,d.jsxs)(Q,{value:a.status,onChange:a=>i("status",a),children:[(0,d.jsx)("option",{value:"",children:"Tất cả status"}),(c.statuses||[]).map(a=>(0,d.jsx)("option",{value:a,children:a},a))]})}),(0,d.jsx)(P,{label:"Session / keyword",children:(0,d.jsx)(R,{value:a.sessionId||a.keyword,onChange:a=>i("keyword",a),placeholder:"session, prompt, error..."})})]}),(0,d.jsxs)("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[(0,d.jsx)("div",{className:"text-xs text-text-muted",children:"Token/cost lấy từ UsageHistory. Source IP/tool/session lấy từ Prompt Logs."}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)("button",{onClick:()=>b({period:"today",dateFrom:"",dateTo:"",provider:"",model:"",status:"",clientIp:"",sourceTool:"",sessionId:"",keyword:""}),className:"rounded-xl border border-border px-3 py-2 text-sm font-medium text-text-main hover:bg-background",children:"Reset"}),(0,d.jsxs)("button",{onClick:f,className:"rounded-xl border border-border px-3 py-2 text-sm font-medium text-text-main hover:bg-background",children:[(0,d.jsx)("span",{className:"material-symbols-outlined mr-1 align-[-4px] text-[18px]",children:"download"}),"Export CSV"]}),(0,d.jsxs)("button",{onClick:()=>e?.(),disabled:g,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white shadow-sm disabled:opacity-60",children:[(0,d.jsx)("span",{className:"material-symbols-outlined mr-1 align-[-5px] text-[18px]",children:"refresh"}),g?"Đang tải...":"Refresh"]})]})]})]})}function ai({data:a}){let b=J(),c=a.overview||{},e=a.latency||{},f=a.experience||{};return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsx)(Z,{leaderboard:a.tokenLeaderboard}),(0,d.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,d.jsx)(O,{icon:"call_made",label:"Tổng request",value:z(c.requests),hint:`${z(c.requestsPerMinute,2)} request/ph\xfat`,help:"Số request khớp bộ lọc hiện tại."}),(0,d.jsx)(O,{icon:"check_circle",label:"Th\xe0nh c\xf4ng",value:z(c.success),hint:`Tỷ lệ lỗi ${B(c.errorRate)}`,help:"Request trả về th\xe0nh c\xf4ng v\xe0 c\xf3 trạng th\xe1i OK.",tone:"green"}),(0,d.jsx)(O,{icon:"dns",label:"Lỗi server/provider",value:z(c.serverErrorEvents),hint:`Server-impacting ${B(c.serverErrorRate)} \xb7 client ${z(c.clientErrorEvents)}`,help:"Lỗi từ gateway, provider hoặc model server; t\xe1ch ri\xeang lỗi client.",tone:c.serverErrorEvents?"red":"green"}),(0,d.jsx)(O,{icon:"speed",label:"Trải nghiệm",value:F(f.score),hint:`${f.label||"-"} \xb7 ${z(f.samples)} mẫu`,help:"Điểm 0-100. Trừ tối đa 45 cho tốc độ (latency/TTFT/slow-rate t\xednh gộp, kh\xf4ng cộng dồn) v\xe0 40 cho lỗi server. Rate limit v\xe0 lỗi client chỉ trừ nhẹ v\xec kh\xf4ng phản \xe1nh chất lượng dịch vụ.",tone:f.tone||"purple"}),(0,d.jsx)(O,{icon:"timer",label:"Latency P95",value:D(f.p95LatencyMs||e.p95Ms),hint:`AVG ${D(f.avgLatencyMs||e.avgMs)} \xb7 P50 ${D(f.p50LatencyMs||e.p50Ms)}`,help:"95% request ho\xe0n tất nhanh hơn gi\xe1 trị n\xe0y.",tone:"purple"}),(0,d.jsx)(O,{icon:"bolt",label:"TTFT P95",value:D(f.p95TtftMs),hint:"Thời gian chờ token đầu ti\xean",help:"95% request nhận token đầu ti\xean nhanh hơn gi\xe1 trị n\xe0y.",tone:f.slowTtftRate>=.2?"amber":"blue"}),(0,d.jsx)(O,{icon:"input",label:"Input P95",value:A(f.p95PromptTokens||0),hint:`Avg ${A(f.avgPromptTokens||c.avgPromptTokens)} \xb7 >=30k ${B(f.longInputRate)}`,help:"95% request c\xf3 k\xedch thước input nhỏ hơn gi\xe1 trị n\xe0y."}),(0,d.jsx)(O,{icon:"psychology_alt",label:"Auto-off thinking",value:B(a.thinkingAnalytics?.autoOffRate),hint:`${z(a.thinkingAnalytics?.autoOffRequests||0)} request bị tắt theo policy`,help:"Tỷ lệ request bị tắt thinking do vượt ngưỡng hoặc policy.",tone:(a.thinkingAnalytics?.autoOffRate||0)>=.3?"amber":"slate"}),(0,d.jsx)(O,{icon:"data_object",label:"Large context >=50k",value:B(a.largeContextAnalytics?.gte50kRate),hint:`>=100k ${B(a.largeContextAnalytics?.gte100kRate)}`,help:"Tỷ lệ request c\xf3 context rất lớn, dễ l\xe0m tăng TTFT/latency.",tone:(a.largeContextAnalytics?.gte50kRate||0)>=.3?"amber":"slate"}),(0,d.jsx)(O,{icon:"person_alert",label:"Top user nặng",value:c.topHeavyUser||"-",hint:`Chiếm ${B(c.topHeavyUserTokenShare)} tổng token`,help:"User/API key ti\xeau thụ nhiều token nhất trong bộ lọc.",tone:c.topHeavyUserTokenShare>=.35?"amber":"slate"}),(0,d.jsx)(O,{icon:"running_with_errors",label:"Request chậm",value:B(f.slowRequestRate),hint:`>= ${D(f.thresholds?.slowLatencyMs||45e3)} \xb7 max ${D(f.maxLatencyMs)}`,help:"Tỷ lệ request vượt ngưỡng chậm đ\xe3 cấu h\xecnh.",tone:f.slowRequestRate>=.2?"amber":"green"}),(0,d.jsx)(O,{icon:"output",label:"Output tokens",value:A(c.completionTokens),hint:`Avg ${z(c.avgCompletionTokens,1)} / request`,help:"Tổng token model sinh ra."}),(0,d.jsx)(O,{icon:"token",label:"Tổng tokens",value:A(c.totalTokens),hint:`${A(c.tokensPerMinute)} token/ph\xfat`,help:"Tổng input + output token.",tone:"amber"}),(0,d.jsx)(O,{icon:"speed",label:"Output speed",value:E(f.decodeTokensPerSecond," tok/s"),hint:`${z(f.decodeSamples)} mẫu TTFT \xb7 Latency/10k input ${D(f.latencyMsPer10kInputTokens)}`,help:"Tốc độ sinh token sau khi model bắt đầu trả lời: Σ output token / Σ(latency − TTFT). Chỉ t\xednh request streaming c\xf3 TTFT thật v\xe0 token do provider b\xe1o, n\xean số mẫu c\xf3 thể nhỏ hơn tổng request.",tone:"slate"}),(0,d.jsx)(O,{icon:"payments",label:"Cost ước t\xednh",value:C(c.cost),hint:"Dựa tr\xean pricing đ\xe3 cấu h\xecnh",help:"Chi ph\xed suy ra từ token usage v\xe0 bảng gi\xe1 hiện tại.",tone:"green"})]}),(0,d.jsxs)("div",{className:"grid min-w-0 gap-5 xl:grid-cols-[2fr_1fr]",children:[(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Tần suất request & token theo thời gian"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Cột xanh l\xe0 token, cột v\xe0ng l\xe0 số request trong từng bucket thời gian."})]}),(0,d.jsx)(V,{})]}),(0,d.jsx)(U,{data:a.timeSeries||[]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"T\xf3m tắt active"}),(0,d.jsx)("div",{className:"mt-4 space-y-3",children:[["API key đang d\xf9ng",c.activeApiKeys],["Provider active",c.activeProviders],["Model active",c.activeModels],["Endpoint active",c.activeEndpoints],["Cached tokens",c.cachedTokens],["Reasoning tokens",c.reasoningTokens],["Latency AVG",D(f.avgLatencyMs||e.avgMs)],["Latency P50",D(f.p50LatencyMs||e.p50Ms)],["Latency P99",D(f.p99LatencyMs||e.p99Ms)],["TTFT P95",D(f.p95TtftMs)],["Input P95",A(f.p95PromptTokens||0)],["Long input >=30k",B(f.longInputRate)]].map(([a,b])=>(0,d.jsxs)("div",{className:"flex items-center justify-between rounded-xl bg-background px-3 py-2",children:[(0,d.jsx)("span",{className:"text-sm text-text-muted",children:a}),(0,d.jsx)("span",{className:"font-semibold text-text-main",children:"number"==typeof b?z(b):b})]},a))})]})]}),(0,d.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top API key d\xf9ng nhiều token"}),(0,d.jsx)(W,{rows:(a.clientRequests?.topApiKeysByTokens||a.groups?.apiKeys||[]).slice(0,8),columns:[{key:"name",label:"API key",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.name||a.label}),(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:[b?a.fingerprint||a.apiKeyFingerprint:"",a.ownerUser||a.apiKeyOwner?`${b&&(a.fingerprint||a.apiKeyFingerprint)?" \xb7 ":""}${a.ownerUser||a.apiKeyOwner}`:""]})]})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"input",label:"P95/Max input",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:A(a.p95PromptTokens||0)}),(0,d.jsxs)("div",{className:"text-text-muted",children:["max ",A(a.maxPromptTokens||0)]})]})}]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top Source IP d\xf9ng nhiều token"}),(0,d.jsx)(W,{rows:(a.clientRequests?.topSourceIpsByTokens||[]).slice(0,8),columns:[{key:"label",label:"Source IP",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.label})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"heavy",label:"Nặng",render:a=>(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:[z(a.heavyRequests||0)," req"]})}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]})]})]})}function aj({data:a}){let b=J(),c=a.clientRequests||{},e=c.summary||{},f=c.topHeavyUsers||[],g=c.topProblemClients||[],h=c.topApiKeysByTokens||[],i=c.topSourceIpsByTokens||[];c.topSourceIpsByHeavyRequests;let j=c.inputBuckets||[],k=a=>(0,d.jsxs)("div",{className:"min-w-[220px]",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a.label}),(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:a.ownerUser?`Owner ${a.ownerUser}`:a.apiKeyName||"Kh\xf4ng c\xf3 owner"}),(0,d.jsx)("div",{className:"font-mono text-[11px] text-text-muted",children:b?a.apiKeyFingerprint||a.primaryClientIp||a.key:a.primaryClientIp||""})]}),l=a=>(0,d.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,d.jsxs)("div",{children:["Nặng ",z(a.heavyRequests)," \xb7 ",B(a.heavyRequestRate)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["P95 input ",A(a.p95PromptTokens)," \xb7 Max ",A(a.maxPromptTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:[">=70k ",z(a.extremeInputRequests)," \xb7 ",B(a.extremeInputRate)]})]});return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,d.jsx)(O,{icon:"person_alert",label:"Top user nặng nhất",value:e.topUserLabel||"-",hint:`${A(e.topUserTokens)} token \xb7 ${B(e.topUserTokenShare)} tổng token`,tone:e.topUserTokenShare>=.35?"amber":"slate"}),(0,d.jsx)(O,{icon:"vpn_key",label:"Top API key nhiều token",value:e.topApiKeyLabel||"-",hint:`${A(e.topApiKeyTokens)} token \xb7 ${B(e.topApiKeyTokenShare)} tổng token`,tone:e.topApiKeyTokenShare>=.35?"amber":"blue"}),(0,d.jsx)(O,{icon:"lan",label:"Top IP nhiều token",value:e.topSourceIpLabel||"-",hint:`${A(e.topSourceIpTokens)} token \xb7 ${B(e.topSourceIpTokenShare)} tổng token`,tone:e.topSourceIpTokenShare>=.35?"amber":"purple"}),(0,d.jsx)(O,{icon:"input",label:"Input d\xe0i >=30k",value:B(e.longInputBucketShare||0),hint:`>=70k ${B(e.extremeInputShare||0)}`,tone:(e.extremeInputShare||0)>=.1?"amber":"green"}),(0,d.jsx)(O,{icon:"groups",label:"User/API key được theo d\xf5i",value:z(e.trackedUsers||0),hint:"Theo owner/API key fingerprint/source IP",tone:"blue"}),(0,d.jsx)(O,{icon:"network_check",label:"Top IP request nặng",value:e.topSourceIpHeavyLabel||"-",hint:`${z(e.topSourceIpHeavyRequests||0)} request >=30k input/total`,tone:e.topSourceIpHeavyRequests?"amber":"slate"}),(0,d.jsx)(O,{icon:"report",label:"Client lỗi nhiều",value:z(e.problemClients||0),hint:"Nh\xf3m user/API key c\xf3 error rows",tone:e.problemClients?"amber":"green"})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top user/API key gửi request nặng nhất"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp theo tổng input/output token của request th\xe0nh c\xf4ng c\xf3 token. D\xf9ng để ph\xe1t hiện user VS Code/agent đang tạo tải long-context lớn."})]}),(0,d.jsx)("span",{className:"rounded-full bg-primary/10 px-3 py-1 text-xs font-semibold text-primary",children:"Kh\xf4ng hiển thị full bearer token"})]}),(0,d.jsx)(W,{rows:f,columns:[{key:"user",label:"User/API key",render:k},{key:"quality",label:"\xc1p lực",render:a=>(0,d.jsx)(aa,{level:a.level,label:a.pressureLabel})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"input",label:"Input pressure",render:a=>(0,d.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,d.jsxs)("div",{children:["Avg ",A(a.avgPromptTokens)," \xb7 P95 ",A(a.p95PromptTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["Max ",A(a.maxPromptTokens)," \xb7 >=30k ",B(a.longInputRate)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:[">=50k ",B(a.hugeInputRate)," \xb7 >=70k ",B(a.extremeInputRate)]})]})},{key:"latency",label:"Latency / TTFT",render:a=>(0,d.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,d.jsxs)("div",{children:["P95 ",D(a.p95LatencyMs)," \xb7 Max ",D(a.maxLatencyMs)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["TTFT P95 ",D(a.p95TtftMs)," \xb7 Slow ",B(a.slowRequestRate)]})]})},{key:"topModels",label:"Top model",render:a=>(0,d.jsx)(X,{items:a.topModels})},{key:"topIps",label:"IP / Tool",render:a=>(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)(X,{items:a.topIps}),(0,d.jsx)(X,{items:a.topTools})]})},{key:"meta",label:"Meta",render:a=>(0,d.jsxs)("div",{className:"space-y-1 text-xs text-text-muted",children:[(0,d.jsxs)("div",{children:["Key ",z(a.apiKeyCount)," \xb7 IP ",z(a.sourceIpCount)," \xb7 Tool ",z(a.sourceToolCount)]}),(0,d.jsxs)("div",{children:["Session ",z(a.sessionCount)," \xb7 Last ",H(a.lastSeen)]})]})}],empty:"Kh\xf4ng c\xf3 request th\xe0nh c\xf4ng c\xf3 token trong khoảng lọc."})]}),(0,d.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top API key d\xf9ng nhiều token nhất"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp theo tổng input + output token từ UsageHistory, kh\xf4ng lộ full bearer token."})]}),(0,d.jsx)(W,{rows:h,columns:[{key:"apiKey",label:"API key",render:a=>(0,d.jsxs)("div",{className:"min-w-[220px]",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a.label}),(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:a.apiKeyOwner?`Owner ${a.apiKeyOwner}`:a.apiKeyName||a.primarySourceTool||"-"}),(0,d.jsx)("div",{className:"font-mono text-[11px] text-text-muted",children:b?a.apiKeyFingerprint||a.primaryClientIp||a.key:a.primaryClientIp||""})]})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"input",label:"Input nặng",render:l},{key:"meta",label:"Nguồn",render:a=>(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:[(0,d.jsxs)("div",{children:["IP ",z(a.sourceIpCount)," \xb7 Tool ",z(a.sourceToolCount)]}),(0,d.jsxs)("div",{children:["Model ",z(a.modelCount)," \xb7 Provider ",z(a.providerCount)]})]})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}],empty:"Kh\xf4ng c\xf3 API key c\xf3 token trong khoảng lọc."})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top Source IP d\xf9ng nhiều token nhất"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Dựa tr\xean UsageHistory n\xean c\xf3 input/output token, kh\xe1c với bảng Source IP từ Prompt Logs chỉ đếm log."})]}),(0,d.jsx)(W,{rows:i,columns:[{key:"ip",label:"Source IP",render:a=>(0,d.jsxs)("div",{className:"min-w-[180px]",children:[(0,d.jsx)("div",{className:"font-mono text-sm font-semibold text-text-main",children:a.label}),(0,d.jsxs)("div",{className:"mt-1 text-xs text-text-muted",children:["Tool ",z(a.sourceToolCount)," \xb7 API key ",z(a.apiKeyCount)]}),(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:["Model ",z(a.modelCount)," \xb7 Provider ",z(a.providerCount)]})]})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"input",label:"Input nặng",render:l},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]})]}),(0,d.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Ph\xe2n bố request theo k\xedch thước input"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Gi\xfap admin biết workload đang l\xe0 chat ngắn hay long-context VS Code/agent."})]}),(0,d.jsx)(W,{rows:j,columns:[{key:"label",label:"Input bucket",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.label})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"share",label:"Tỷ trọng",render:a=>B(a.share)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"latency",label:"Latency P95/MAX",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsxs)("div",{children:[D(a.p95LatencyMs)," / ",D(a.maxLatencyMs)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["TTFT P95 ",D(a.p95TtftMs)]})]})}],empty:"Kh\xf4ng c\xf3 dữ liệu bucket input."})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Client/API key lỗi nhiều"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"D\xf9ng để ph\xe1t hiện sai endpoint/model/auth/policy hoặc client tool cấu h\xecnh sai."})]}),(0,d.jsx)(W,{rows:g,columns:[{key:"user",label:"Client",render:k},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"errors",label:"Lỗi",render:a=>z(a.errors)},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"source",label:"IP/Tool",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{className:"font-mono",children:a.primaryClientIp||"-"}),(0,d.jsx)("div",{className:"text-text-muted",children:a.primarySourceTool||"-"})]})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}],empty:"Kh\xf4ng c\xf3 client lỗi theo bộ lọc hiện tại."})]})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"G\xf3c nh\xecn monitor client n\xean d\xf9ng"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"C\xe1c chỉ số n\xe0y bổ sung cho latency/model để admin ph\xe2n biệt server chậm hay client gửi request qu\xe1 nặng."})]}),(0,d.jsx)("div",{className:"grid gap-3 text-sm md:grid-cols-2 xl:grid-cols-3",children:[["Token/user","X\xe1c định user/API key tạo tải lớn nhất, hữu \xedch cho quota v\xe0 hướng dẫn workflow VS Code."],["Input bucket","Nếu phần lớn request nằm ở 30k-70k+, P95/P99 cao chủ yếu do prompt eval/context d\xe0i."],["TTFT theo user","TTFT cao cho một user thường l\xe0 input d\xe0i hoặc chờ slot, kh\xf4ng nhất thiết provider lỗi."],["Error theo client","T\xe1ch lỗi sai endpoint/model/API key khỏi lỗi server/provider để kh\xf4ng cảnh b\xe1o nhầm."],["Source IP/tool","Ph\xe1t hiện m\xe1y/tool gửi request nhiều hoặc cấu h\xecnh sai."],["Top request nặng","D\xf9ng Raw usage để drill-down request cụ thể khi một user k\xe9o tải hệ thống."]].map(([a,b])=>(0,d.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3",children:[(0,d.jsx)("div",{className:"font-semibold text-text-main",children:a}),(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:b})]},a))})]})]})}function ak({data:a}){let b=J();return(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Thống k\xea theo API key"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Kh\xf4ng hiển thị full bearer token. Dashboard chỉ d\xf9ng fingerprint/masked key."})]}),(0,d.jsx)(W,{rows:a.groups?.apiKeys||[],columns:[{key:"name",label:"API key",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.name}),(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:[b?a.fingerprint:"",a.ownerUser?`${b&&a.fingerprint?" \xb7 ":""}Owner: ${a.ownerUser}`:""]})]})},{key:"requests",label:"Requests",render:a=>z(a.requests)},{key:"success",label:"OK/Lỗi",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsxs)("div",{className:"text-green-600",children:["OK ",z(a.success)]}),(0,d.jsxs)("div",{className:"text-red-600",children:["Lỗi ",z(a.errors)]})]})},{key:"tokens",label:"In/Out token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"cost",label:"Cost",render:a=>C(a.cost)},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})},{key:"topModels",label:"Top model",render:a=>(0,d.jsx)(X,{items:a.topModels})},{key:"topProviders",label:"Top provider",render:a=>(0,d.jsx)(X,{items:a.topProviders})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]})}function al({data:a}){let b=a.clientRequests?.topSourceIpsByTokens||[],c=a.clientRequests?.topSourceIpsByHeavyRequests||[],e=a=>(0,d.jsxs)("div",{className:"min-w-[180px]",children:[(0,d.jsx)("div",{className:"font-mono text-sm font-semibold text-text-main",children:a.label}),(0,d.jsxs)("div",{className:"mt-1 text-xs text-text-muted",children:["API key ",z(a.apiKeyCount)," \xb7 Tool ",z(a.sourceToolCount)]}),(0,d.jsxs)("div",{className:"text-xs text-text-muted",children:["Model ",z(a.modelCount)," \xb7 Provider ",z(a.providerCount)]})]});return(0,d.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top IP d\xf9ng nhiều token nhất"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Aggregate từ UsageHistory, xếp theo tổng input + output token."})]}),(0,d.jsx)(W,{rows:b,columns:[{key:"ip",label:"Source IP",render:e},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top IP gửi request nặng nhất"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp theo số request input/total token từ 30k trở l\xean, sau đ\xf3 theo max/P95 input."})]}),(0,d.jsx)(W,{rows:c,columns:[{key:"ip",label:"Source IP",render:e},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"heavy",label:"Request nặng",render:a=>(0,d.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,d.jsxs)("div",{children:["Nặng ",z(a.heavyRequests)," \xb7 ",B(a.heavyRequestRate)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["P95 input ",A(a.p95PromptTokens)," \xb7 Max ",A(a.maxPromptTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:[">=70k ",z(a.extremeInputRequests)," \xb7 ",B(a.extremeInputRate)]})]})},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP gửi request nặng trong khoảng lọc."})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Source IP từ Prompt Logs"}),(0,d.jsx)(W,{rows:a.promptLogs?.topClientIps||[],columns:[{key:"label",label:"IP",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.label})},{key:"requests",label:"Logs",render:a=>z(a.requests)},{key:"errors",label:"Lỗi",render:a=>z(a.errors)},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})},{key:"topTools",label:"Tools",render:a=>(0,d.jsx)(X,{items:a.topTools})},{key:"topModels",label:"Models",render:a=>(0,d.jsx)(X,{items:a.topModels})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Source tool"}),(0,d.jsx)(W,{rows:a.promptLogs?.topSourceTools||[],columns:[{key:"label",label:"Tool",render:a=>(0,d.jsx)("span",{className:"font-semibold",children:a.label})},{key:"requests",label:"Logs",render:a=>z(a.requests)},{key:"errors",label:"Lỗi",render:a=>z(a.errors)},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})},{key:"topIps",label:"Top IP",render:a=>(0,d.jsx)(X,{items:a.topIps})},{key:"topModels",label:"Top model",render:a=>(0,d.jsx)(X,{items:a.topModels})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]}),(0,d.jsxs)(N,{className:"xl:col-span-2",children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Session nhiều hoạt động"}),(0,d.jsx)(W,{rows:a.promptLogs?.topSessions||[],columns:[{key:"label",label:"Session",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.label})},{key:"requests",label:"Logs",render:a=>z(a.requests)},{key:"errors",label:"Lỗi",render:a=>z(a.errors)},{key:"topIps",label:"IP",render:a=>(0,d.jsx)(X,{items:a.topIps})},{key:"topTools",label:"Tool",render:a=>(0,d.jsx)(X,{items:a.topTools})},{key:"topModels",label:"Model",render:a=>(0,d.jsx)(X,{items:a.topModels})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]})]})}function am({data:a}){return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Provider"}),(0,d.jsx)(W,{rows:a.groups?.providers||[],columns:[{key:"label",label:"Provider",render:a=>(0,d.jsx)("span",{className:"font-semibold",children:a.label})},{key:"requests",label:"Requests",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"cost",label:"Cost",render:a=>C(a.cost)},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})},{key:"topModels",label:"Top model",render:a=>(0,d.jsx)(X,{items:a.topModels})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]}),(0,d.jsx)(r,{data:a}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Provider account / connection"}),(0,d.jsx)(W,{rows:a.groups?.providerAccounts||[],columns:[{key:"label",label:"Account",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.label}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:a.providerLabel||a.provider||a.connectionId})]})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"errorRate",label:"Lỗi",render:a=>(0,d.jsx)($,{value:a.errorRate})}]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Endpoint"}),(0,d.jsx)(W,{rows:a.groups?.endpoints||[],columns:[{key:"label",label:"Endpoint",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.label})},{key:"requests",label:"Requests",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"cost",label:"Cost",render:a=>C(a.cost)},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]})]})}function an({data:a}){let b=J(),c=a.experience||{},e=c.thresholds||{},f=a.thinkingAnalytics||{},g=a.largeContextAnalytics||{},h=c.byModel||[],i=c.slowestRequests||[];return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,d.jsx)(O,{icon:"verified",label:"Đ\xe1nh gi\xe1 tổng",value:F(c.score),hint:`${c.label||"-"} \xb7 ${z(c.samples)} mẫu success c\xf3 token`,help:"Điểm 0-100 từ request th\xe0nh c\xf4ng c\xf3 token. Tốc độ trừ tối đa 45 (chuẩn ho\xe1 theo k\xedch thước input khi prompt lớn), lỗi server trừ tối đa 40. Rate limit trừ nhẹ v\xec đ\xf3 l\xe0 hệ thống tự bảo vệ.",tone:c.tone||"slate"}),(0,d.jsx)(O,{icon:"timer",label:"Latency AVG / P95",value:`${D(c.avgLatencyMs)} / ${D(c.p95LatencyMs)}`,hint:`P50 ${D(c.p50LatencyMs)} \xb7 P99 ${D(c.p99LatencyMs)}`,help:"AVG l\xe0 trung b\xecnh; P95 thể hiện nh\xf3m 5% request chậm nhất.",tone:"purple"}),(0,d.jsx)(O,{icon:"bolt",label:"TTFT AVG / P95",value:`${D(c.avgTtftMs)} / ${D(c.p95TtftMs)}`,hint:"TTFT cao thường l\xe0 queue/prompt eval/input d\xe0i",help:"Thời gian từ l\xfac gửi request đến token đầu ti\xean.",tone:c.slowTtftRate>=.2?"amber":"blue"}),(0,d.jsx)(O,{icon:"keyboard_double_arrow_up",label:"Input AVG / P95",value:`${A(c.avgPromptTokens)} / ${A(c.p95PromptTokens)}`,hint:`>=30k ${B(c.longInputRate)} \xb7 >=50k ${B(c.hugeInputRate)}`,help:"Input c\xe0ng lớn th\xec prompt eval v\xe0 TTFT thường c\xe0ng cao."}),(0,d.jsx)(O,{icon:"running_with_errors",label:"Slow request",value:B(c.slowRequestRate),hint:`Latency >= ${D(e.slowLatencyMs||45e3)} \xb7 rất chậm ${B(c.verySlowRequestRate)}`,help:"Tỷ lệ request ho\xe0n tất chậm hơn ngưỡng vận h\xe0nh.",tone:c.slowRequestRate>=.2?"amber":"green"}),(0,d.jsx)(O,{icon:"pending_actions",label:"Slow TTFT",value:B(c.slowTtftRate),hint:`TTFT >= ${D(e.slowTtftMs||2e4)}`,help:"Tỷ lệ request chờ token đầu ti\xean qu\xe1 l\xe2u.",tone:c.slowTtftRate>=.2?"amber":"green"}),(0,d.jsx)(O,{icon:"speed",label:"Decode tốc độ",value:E(c.decodeTokensPerSecond," tok/s"),hint:`${z(c.decodeSamples)} mẫu TTFT \xb7 E2E ${E(c.e2eOutputTokensPerSecond," tok/s")}`,help:"Σ output token / Σ(latency − TTFT), chỉ t\xednh request streaming c\xf3 TTFT thật v\xe0 token do provider b\xe1o. E2E l\xe0 output/tổng latency (gồm cả prefill).",tone:"slate"}),(0,d.jsx)(O,{icon:"data_usage",label:"Latency / 10k input",value:D(c.latencyMsPer10kInputTokens),hint:"Hữu \xedch khi VS Code gửi 30k–70k token",help:"Σ latency E2E / (Σ input token / 10k). L\xe0 latency to\xe0n bộ request được chuẩn h\xf3a theo input, n\xean vẫn phụ thuộc độ d\xe0i output — kh\xf4ng phải tốc độ prefill.",tone:"slate"}),(0,d.jsx)(O,{icon:"psychology_alt",label:"Thinking auto-off",value:B(f.autoOffRate),hint:`${z(f.autoOffRequests||0)} / ${z(f.totalRequests||0)} request`,help:"Request bị tắt thinking tự động do vượt ngưỡng prompt chars.",tone:(f.autoOffRate||0)>=.3?"amber":"green"}),(0,d.jsx)(O,{icon:"toggle_off",label:"Thinking OFF",value:B(f.thinkingOffRate),hint:`ON ${B(f.thinkingOnRate)} \xb7 unknown ${B(f.unknownRate)}`,help:"Tỷ lệ request cuối c\xf9ng chạy ở chế độ kh\xf4ng thinking.",tone:(f.thinkingOffRate||0)>=.5?"blue":"slate"}),(0,d.jsx)(O,{icon:"data_object",label:"Large context",value:B(g.gte50kRate),hint:`>=30k ${B(g.gte30kRate)} \xb7 >=100k ${B(g.gte100kRate)}`,help:"Tỷ lệ request c\xf3 context lớn; thường l\xe0 nguy\xean nh\xe2n l\xe0m P95/P99 tăng.",tone:(g.gte50kRate||0)>=.3?"amber":"slate"})]}),(0,d.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Thinking Analytics"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Theo d\xf5i request bật/tắt thinking v\xe0 tỷ lệ auto-off do vượt ngưỡng prompt chars."})]}),(0,d.jsx)("div",{className:"grid gap-3 md:grid-cols-2",children:[["Thinking ON",z(f.thinkingOnRequests||0),B(f.thinkingOnRate)],["Thinking OFF",z(f.thinkingOffRequests||0),B(f.thinkingOffRate)],["Auto-off hit",z(f.autoOffRequests||0),B(f.autoOffRate)],["C\xf3 ngưỡng auto-off",z(f.thresholdConfiguredRequests||0),`hit ${B(f.autoOffEligibleHitRate)}`]].map(([a,b,c])=>(0,d.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:a}),(0,d.jsx)("div",{className:"mt-2 text-xl font-semibold text-text-main",children:b}),(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:c})]},a))}),(0,d.jsx)("div",{className:"mt-4",children:(0,d.jsx)(W,{rows:f.byModel||[],empty:"Chưa c\xf3 dữ liệu thinking trong khoảng lọc.",columns:[{key:"model",label:"Model",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.model}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:a.provider})]})},{key:"requests",label:"Req",render:a=>z(a.requests)},{key:"autoOff",label:"Auto-off",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:z(a.autoOffRequests)}),(0,d.jsx)("div",{className:"text-text-muted",children:B(a.autoOffRate)})]})},{key:"thinking",label:"ON/OFF",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsxs)("div",{children:["ON ",z(a.thinkingOnRequests)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["OFF ",z(a.thinkingOffRequests)]})]})},{key:"chars",label:"Chars avg/max",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:A(a.avgPromptChars)}),(0,d.jsxs)("div",{className:"text-text-muted",children:["max ",A(a.maxPromptChars)]})]})}]})})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Large Context Analytics"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Bucket theo request size, ưu ti\xean prompt chars; nếu chưa c\xf3 chars th\xec fallback prompt tokens."})]}),(0,d.jsx)("div",{className:"grid gap-3 md:grid-cols-3",children:[[">=30k",g.gte30kRequests,g.gte30kRate],[">=50k",g.gte50kRequests,g.gte50kRate],[">=100k",g.gte100kRequests,g.gte100kRate]].map(([a,b,c])=>(0,d.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:a}),(0,d.jsx)("div",{className:"mt-2 text-xl font-semibold text-text-main",children:z(b||0)}),(0,d.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:B(c)})]},a))}),(0,d.jsx)("div",{className:"mt-4",children:(0,d.jsx)(W,{rows:g.buckets||[],empty:"Chưa c\xf3 large context buckets trong khoảng lọc.",columns:[{key:"label",label:"Bucket",render:a=>(0,d.jsx)("span",{className:"font-semibold",children:a.label})},{key:"requests",label:"Req",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:z(a.requests)}),(0,d.jsx)("div",{className:"text-text-muted",children:B(a.share)})]})},{key:"chars",label:"Size avg/max",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:A(a.avgRequestSize)}),(0,d.jsxs)("div",{className:"text-text-muted",children:["max ",A(a.maxRequestSize)]})]})},{key:"latency",label:"Latency/TTFT",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:D(a.avgLatencyMs)}),(0,d.jsxs)("div",{className:"text-text-muted",children:["TTFT ",D(a.avgTtftMs)]})]})},{key:"autoOff",label:"Auto-off",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:z(a.autoOffRequests)}),(0,d.jsx)("div",{className:"text-text-muted",children:B(a.autoOffRate)})]})}]})})]})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"C\xe1ch đọc trải nghiệm user"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Nh\xf3m n\xe0y chỉ t\xednh request th\xe0nh c\xf4ng c\xf3 token v\xe0 latency > 0. Error/pending/success 0-token kh\xf4ng trộn v\xe0o tốc độ model. TTFT l\xe0 thời gian tới token đầu ti\xean; với VS Code input 30k–70k, TTFT cao thường phản \xe1nh chờ slot hoặc prompt eval d\xe0i."})]}),(0,d.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,d.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Nhanh/chậm thực tế"}),(0,d.jsx)("div",{className:"mt-2 text-sm text-text-main",children:"Latency AVG/P50/P95/MAX cho biết user phải chờ bao l\xe2u để request ho\xe0n tất."})]}),(0,d.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Queue hoặc prompt eval"}),(0,d.jsx)("div",{className:"mt-2 text-sm text-text-main",children:"TTFT cao + input P95 cao l\xe0 t\xedn hiệu request d\xe0i, hết slot hoặc upstream đang queue."})]}),(0,d.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,d.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"VS Code / agent"}),(0,d.jsx)("div",{className:"mt-2 text-sm text-text-main",children:"Theo d\xf5i tỷ lệ input >=30k/50k/70k để biết P95/P99 cao c\xf3 phải do context cực d\xe0i hay kh\xf4ng."})]})]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Chất lượng phản hồi theo provider/model"}),(0,d.jsx)(W,{rows:h,empty:"Chưa c\xf3 mẫu latency cho model trong khoảng lọc.",columns:[{key:"model",label:"Model",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.model}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:a.providerLabel||a.provider})]})},{key:"quality",label:"Đ\xe1nh gi\xe1",render:a=>(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)(_,{level:a.level,label:a.labelQuality}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:F(a.score)})]})},{key:"samples",label:"Mẫu",render:a=>z(a.samples)},{key:"latency",label:"Latency P50/P95/MAX",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsxs)("div",{children:[D(a.p50LatencyMs)," / ",D(a.p95LatencyMs)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:["max ",D(a.maxLatencyMs)]})]})},{key:"ttft",label:"TTFT P95",render:a=>D(a.p95TtftMs)},{key:"input",label:"Input avg/P95",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsxs)("div",{children:[A(a.avgPromptTokens)," / ",A(a.p95PromptTokens)]}),(0,d.jsxs)("div",{className:"text-text-muted",children:[">=30k ",B(a.longInputRate)]})]})},{key:"slow",label:"Chậm",render:a=>(0,d.jsx)($,{value:a.slowRequestRate})},{key:"speed",label:"Decode tok/s",render:a=>E(a.decodeTokensPerSecond??a.outputTokensPerSecond," tok/s")}]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Request chậm nhất"}),(0,d.jsx)(W,{rows:i,empty:"Kh\xf4ng c\xf3 request chậm trong khoảng lọc.",columns:[{key:"timestamp",label:"Time",render:a=>H(a.timestamp)},{key:"model",label:"Model",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.model}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:a.providerLabel||a.provider})]})},{key:"latency",label:"Latency / TTFT",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{className:"font-semibold",children:D(a.latencyMs)}),(0,d.jsxs)("div",{className:"text-text-muted",children:["TTFT ",D(a.ttftMs)]})]})},{key:"tokens",label:"In / Out",render:a=>(0,d.jsx)(Y,{row:a})},{key:"apiKeyName",label:"API key",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{children:a.apiKeyName}),b?(0,d.jsx)("div",{className:"font-mono text-xs text-text-muted",children:a.apiKeyFingerprint}):null]})},{key:"sourceTool",label:"Tool/IP",render:a=>(0,d.jsxs)("div",{className:"text-xs",children:[(0,d.jsx)("div",{children:a.sourceTool||"-"}),(0,d.jsx)("div",{className:"font-mono text-text-muted",children:a.clientIp||"-"})]})},{key:"endpoint",label:"Endpoint",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.endpoint||"-"})}]})]})]})}function ao({data:a}){let b=J(),c=a.requestErrors||{},e=c.summary||{},f=a.overview||{},g=Number(f.serverErrorRate||0),h=Number(f.clientErrorRate||0),i=Number(f.rateLimitErrorRate||0),j=[{key:"faultOwner",label:"Loại",render:a=>(0,d.jsx)(ab,{value:a.faultOwner})},{key:"status",label:"Status",render:a=>(0,d.jsx)("span",{className:"rounded-full bg-red-500/10 px-2 py-1 text-xs font-semibold text-red-600 dark:text-red-300",children:a.status})},{key:"provider",label:"Provider",render:a=>a.providerLabel||a.provider},{key:"model",label:"Model"},{key:"endpoint",label:"Endpoint",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.endpoint})},{key:"requests",label:"Lỗi",render:a=>z(a.errors||a.requests)},{key:"errorType",label:"Type",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.errorType||a.errorCode||"-"})},{key:"sampleMessage",label:"Sample",render:a=>(0,d.jsx)(ac,{row:a})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}];return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-5",children:[(0,d.jsx)(ad,{icon:"dns",label:"Server/provider",value:e.serverImpacting||0,hint:`${B(g)} tr\xean tổng request`,tone:e.serverImpacting?"red":"green"}),(0,d.jsx)(ad,{icon:"cloud_off",label:"Upstream",value:e.upstream||0,hint:"Provider/model server, timeout, network, 5xx",tone:e.upstream?"red":"green"}),(0,d.jsx)(ad,{icon:"router",label:"Gateway",value:e.gateway||0,hint:"Lỗi nội bộ BlueRouter/gateway",tone:e.gateway?"purple":"green"}),(0,d.jsx)(ad,{icon:"integration_instructions",label:"Client/request",value:e.client||0,hint:`${B(h)} do endpoint/model/body/auth`,tone:e.client?"slate":"green"}),(0,d.jsx)(ad,{icon:"speed",label:"Rate/quota",value:e.rateLimit||0,hint:`${B(i)} rate-limit/quota`,tone:e.rateLimit?"amber":"green"})]}),(0,d.jsx)("div",{className:"rounded-2xl border border-blue-500/20 bg-blue-500/10 p-4 text-sm text-blue-700 dark:text-blue-300",children:(0,d.jsxs)("div",{className:"flex gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"rule_settings"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:"Ph\xe2n loại lỗi đ\xe3 t\xe1ch client khỏi server/provider"}),(0,d.jsxs)("div",{className:"mt-1 opacity-90",children:["Cảnh b\xe1o vận h\xe0nh n\xean ưu ti\xean nh\xf3m ",(0,d.jsx)("b",{children:"Server/provider"})," gồm gateway, upstream, timeout, network v\xe0 5xx. Nh\xf3m ",(0,d.jsx)("b",{children:"Client/request"})," vẫn được log đầy đủ nhưng thường l\xe0 sai endpoint, model, auth, JSON/body hoặc context."]})]})]})}),a.anomalies?.length?(0,d.jsx)("div",{className:"grid gap-4 xl:grid-cols-2",children:a.anomalies.map((a,b)=>(0,d.jsx)(ae,{anomaly:a},b))}):(0,d.jsxs)("div",{className:"rounded-2xl border border-green-500/20 bg-green-500/10 p-4 text-sm text-green-700 dark:text-green-300",children:[(0,d.jsx)("span",{className:"material-symbols-outlined mr-2 align-[-5px]",children:"check_circle"}),"Chưa ph\xe1t hiện bất thường server/provider r\xf5 r\xe0ng theo bộ lọc hiện tại."]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Lỗi server/provider cần xử l\xfd"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Chỉ gồm gateway/upstream/server-impacting errors. Đ\xe2y l\xe0 bảng quan trọng nhất cho vận h\xe0nh."})]}),(0,d.jsxs)("span",{className:"rounded-full bg-red-500/10 px-3 py-1 text-xs font-semibold text-red-600 dark:text-red-300",children:[z(e.serverImpacting||0)," lỗi"]})]}),(0,d.jsx)(W,{rows:c.topServerErrors||[],columns:j,empty:"Kh\xf4ng c\xf3 lỗi server/provider trong khoảng lọc."})]}),(0,d.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Lỗi client/request sai"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Sai endpoint, model, auth, JSON/body, context length. D\xf9ng để hướng dẫn client sửa request."})]}),(0,d.jsx)(W,{rows:c.topClientErrors||[],columns:j.filter(a=>!["sampleMessage"].includes(a.key)),empty:"Kh\xf4ng c\xf3 lỗi client/request trong khoảng lọc."})]}),(0,d.jsxs)(N,{children:[(0,d.jsxs)("div",{className:"mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Ph\xe2n bố loại lỗi"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"T\xe1ch nguồn chịu tr\xe1ch nhiệm để kh\xf4ng nhầm lỗi client th\xe0nh lỗi server."})]}),(0,d.jsx)(W,{rows:c.byFaultOwner||[],columns:[{key:"faultOwner",label:"Loại",render:a=>(0,d.jsx)(ab,{value:a.faultOwner||a.key})},{key:"requests",label:"Số lỗi",render:a=>z(a.requests)},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}],empty:"Kh\xf4ng c\xf3 lỗi để ph\xe2n loại."})]})]}),c.topRateLimitErrors?.length?(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Rate limit / quota"}),(0,d.jsx)(W,{rows:c.topRateLimitErrors||[],columns:j})]}):null,(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Tất cả lỗi raw theo status/provider/model/endpoint"}),(0,d.jsx)(W,{rows:[...a.groups?.errors||[]].sort((a,b)=>new Date(G(b.lastSeen)||0)-new Date(G(a.lastSeen)||0)||Number(b.errors||b.requests||0)-Number(a.errors||a.requests||0)),columns:[{key:"faultOwner",label:"Loại",render:a=>(0,d.jsx)(ab,{value:a.faultOwner})},{key:"status",label:"Status",render:a=>(0,d.jsx)("span",{className:"rounded-full bg-red-500/10 px-2 py-1 text-xs font-semibold text-red-600 dark:text-red-300",children:a.status})},{key:"provider",label:"Provider",render:a=>a.providerLabel||a.provider},{key:"model",label:"Model"},{key:"endpoint",label:"Endpoint",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.endpoint})},{key:"requests",label:"Lỗi",render:a=>z(a.errors||a.requests)},{key:"apiKey",label:"API key",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:b?a.apiKey:a.apiKeyName||"•••"})},{key:"lastSeen",label:"Last seen",render:a=>H(a.lastSeen)}]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Status distribution"}),(0,d.jsx)(W,{rows:a.groups?.statuses||[],columns:[{key:"label",label:"Status"},{key:"requests",label:"Requests",render:a=>z(a.requests)},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"errorRate",label:"Error %",render:a=>(0,d.jsx)($,{value:a.errorRate})}]})]})]})}function ap({data:a}){let b=J();return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top request nặng token"}),(0,d.jsx)(W,{rows:a.heavyRequests||[],columns:[{key:"timestamp",label:"Time",render:a=>H(a.timestamp)},{key:"model",label:"Model",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"font-semibold",children:a.model}),(0,d.jsx)("div",{className:"text-xs text-text-muted",children:a.providerLabel||a.provider})]})},{key:"apiKeyName",label:"API key",render:a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{children:a.apiKeyName}),b?(0,d.jsx)("div",{className:"font-mono text-xs text-text-muted",children:a.apiKeyFingerprint}):null]})},{key:"accountName",label:"Account"},{key:"endpoint",label:"Endpoint",render:a=>(0,d.jsx)("span",{className:"font-mono text-xs",children:a.endpoint})},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"status",label:"Status"}]})]}),(0,d.jsxs)(N,{children:[(0,d.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Recent usage"}),(0,d.jsx)(W,{rows:a.recentUsage||[],columns:[{key:"timestamp",label:"Time",render:a=>H(a.timestamp)},{key:"provider",label:"Provider",render:a=>a.providerLabel||a.provider},{key:"model",label:"Model"},{key:"apiKeyName",label:"API key"},{key:"tokens",label:"Token",render:a=>(0,d.jsx)(Y,{row:a})},{key:"cost",label:"Cost",render:a=>C(a.cost)},{key:"status",label:"Status"}]})]})]})}function aq(){let{isAdmin:a,isMonitorAdmin:b,isAiGatewaysMonitor:c}=(0,g.s)(),f=a||b||c,h=(0,e.useMemo)(()=>a?t:t.filter(a=>"aiHealth"!==a.value),[a]),[i,j]=(0,e.useState)({period:"today",dateFrom:"",dateTo:"",provider:"",model:"",status:"",clientIp:"",sourceTool:"",sessionId:"",keyword:""}),[k,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(!0),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)("overview"),[s,u]=(0,e.useState)(null),v=function(a){let[b,c]=(0,e.useState)(a);return b}(i),w=(0,e.useRef)(0),x=(0,e.useCallback)(async({clear:a=!1,filtersOverride:b=null}={})=>{let c=w.current+1;w.current=c,a&&l(null),n(!0),p("");let d=Date.now();try{let a=M(b||v,{timeZone:L()}),e=await fetch(`/api/dashboard/analytics?${a}`,{cache:"no-store"}),f=await e.json().catch(()=>({}));if(c!==w.current)return;if(!e.ok)throw Error(f.error||"Kh\xf4ng tải được dữ liệu analytics");l(f),u({loadedMs:Date.now()-d,cacheState:f.cacheState||"",cacheAgeMs:f.cacheAgeMs||0})}catch(a){if(c!==w.current)return;p(a.message||"Kh\xf4ng tải được dữ liệu analytics")}finally{c===w.current&&n(!1)}},[v]),z=k?.options||{},A=(0,e.useMemo)(()=>k?.generatedAt?H(k.generatedAt):"-",[k]);return(0,d.jsxs)("div",{className:"space-y-5 p-4 md:p-6",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-primary",children:[(0,d.jsx)("span",{className:"material-symbols-outlined",children:"monitoring"}),(0,d.jsx)("span",{className:"text-sm font-semibold uppercase tracking-wide",children:"BlueRouter Analytics"})]}),(0,d.jsx)("h1",{className:"mt-2 text-2xl font-bold text-text-main",children:"Thống k\xea sử dụng Gateway"}),(0,d.jsx)("p",{className:"mt-1 max-w-3xl text-sm text-text-muted",children:"Theo d\xf5i tần suất request, input/output token, API key, provider, model, endpoint, Source IP, source tool v\xe0 lỗi vận h\xe0nh."})]}),(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-border bg-surface px-4 py-3 text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"schedule"}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{children:["Generated: ",A]}),s?(0,d.jsxs)("div",{className:"mt-0.5 text-xs",children:["Loaded in ",s.loadedMs>=1e3?`${(s.loadedMs/1e3).toLocaleString("vi-VN",{maximumFractionDigits:1})}s`:`${s.loadedMs}ms`,"hit"===s.cacheState?(0,d.jsxs)("span",{className:"ml-1.5 rounded bg-emerald-500/10 px-1.5 py-0.5 font-medium text-emerald-500",children:["cache hit",s.cacheAgeMs?` \xb7 ${Math.round(s.cacheAgeMs/1e3)}s`:""]}):"joined"===s.cacheState?(0,d.jsx)("span",{className:"ml-1.5 rounded bg-sky-500/10 px-1.5 py-0.5 font-medium text-sky-500",children:"shared compute"}):"fresh"===s.cacheState?(0,d.jsx)("span",{className:"ml-1.5 rounded bg-amber-500/10 px-1.5 py-0.5 font-medium text-amber-500",children:"fresh compute"}):null]}):null]})]})]}),(0,d.jsx)(ah,{filters:i,setFilters:j,options:z,onRefresh:a=>x({filtersOverride:a||i}),onExportCsv:()=>{let a=M(i,{format:"csv",timeZone:L()});window.open(`/api/dashboard/analytics?${a}`,"_blank","noopener,noreferrer")},loading:m,showProviderFilters:f}),o?(0,d.jsxs)("div",{className:"rounded-2xl border border-red-500/30 bg-red-500/10 p-4 text-sm text-red-700 dark:text-red-300",children:[(0,d.jsx)("span",{className:"material-symbols-outlined mr-2 align-[-5px]",children:"error"}),o]}):null,k?.qualityNotes?.length?(0,d.jsx)(af,{notes:k.qualityNotes}):null,(0,d.jsx)("div",{className:"flex flex-wrap gap-2 rounded-2xl border border-border bg-surface p-2",children:h.map(a=>(0,d.jsxs)("button",{onClick:()=>r(a.value),className:K("flex items-center gap-2 rounded-xl px-3 py-2 text-sm font-medium transition",q===a.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-background hover:text-text-main"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:a.icon}),a.label]},a.value))}),m&&!k?(0,d.jsx)(S,{}):null,!m&&k&&k.overview?.requests===0&&0===(k.promptLogs?.total||0)?(0,d.jsx)(T,{title:"Chưa c\xf3 dữ liệu analytics",description:"Kh\xf4ng c\xf3 UsageHistory hoặc Prompt Logs theo bộ lọc hiện tại."}):null,k?(0,d.jsxs)(d.Fragment,{children:["overview"===q?(0,d.jsx)(ai,{data:k}):null,"apiKeys"===q?(0,d.jsx)(ak,{data:k}):null,"clients"===q?(0,d.jsx)(aj,{data:k}):null,"sources"===q?(0,d.jsx)(al,{data:k}):null,"providers"===q?(0,d.jsx)(am,{data:k}):null,"experience"===q?(0,d.jsx)(an,{data:k}):null,"errors"===q?(0,d.jsx)(ao,{data:k}):null,"raw"===q?(0,d.jsx)(ap,{data:k}):null]}):null,"aiHealth"===q&&a?(0,d.jsx)(y,{}):null]})}},79428:a=>{"use strict";a.exports=require("buffer")},79748:a=>{"use strict";a.exports=require("fs/promises")},80099:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},89768:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return i}});let d=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=e(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&Object.prototype.hasOwnProperty.call(a,f)){var g=d?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(c,f,g):c[f]=a[f]}return c.default=a,b&&b.set(a,c),c}(c(91986));function e(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(e=function(a){return a?c:b})(a)}let f={current:null},g="function"==typeof d.cache?d.cache:a=>a,h=console.warn;function i(a){return function(...b){h(a(...b))}}g(a=>{try{h(f.current)}finally{f.current=null}})},91645:a=>{"use strict";a.exports=require("net")},91687:(a,b,c)=>{"use strict";c.d(b,{default:()=>h});var d=c(48249),e=c(67484),f=c(20151);function g(a){return"cloud"===String(a||"").trim().toLowerCase()?"cloud":"local"}function h({initialScope:a="local",children:b}){let{isAdmin:c,isMonitorAdmin:i,isAiGatewaysMonitor:j}=(0,f.s)(),k=c||i||j,[l,m]=(0,e.useState)(()=>g(a)),[n,o]=(0,e.useState)(!1),p=(0,e.useRef)(null),q=a=>{if(!k)return;let b=g(a);if(b===l)return;document.cookie=`bluerouter_analytics_scope=${b}; Path=/; Max-Age=31536000; SameSite=Lax`,m(b);let c=new URL(window.location.href);c.searchParams.set("scope",b),window.history.replaceState(window.history.state,"",c.toString())};return(0,d.jsxs)("div",{ref:p,children:[k?(0,d.jsx)("div",{className:"px-4 pt-4 md:px-6 md:pt-6",children:(0,d.jsxs)("div",{className:"flex flex-wrap gap-2 rounded-2xl border border-border bg-surface p-2 shadow-sm",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>q("local"),"aria-pressed":"local"===l,className:`flex min-w-[220px] flex-1 items-center gap-3 rounded-xl px-4 py-3 text-left transition ${"local"===l?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-background hover:text-text-main"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"developer_board"}),(0,d.jsxs)("span",{children:[(0,d.jsx)("span",{className:"block text-sm font-semibold",children:"Local models & providers"}),(0,d.jsx)("span",{className:`mt-0.5 block text-xs ${"local"===l?"text-white/75":"text-text-subtle"}`,children:"Self-hosted runtime, latency, TTFT, throughput v\xe0 token"})]})]}),(0,d.jsxs)("button",{type:"button",onClick:()=>q("cloud"),"aria-pressed":"cloud"===l,className:`flex min-w-[220px] flex-1 items-center gap-3 rounded-xl px-4 py-3 text-left transition ${"cloud"===l?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-background hover:text-text-main"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"cloud"}),(0,d.jsxs)("span",{children:[(0,d.jsx)("span",{className:"block text-sm font-semibold",children:"Cloud providers"}),(0,d.jsx)("span",{className:`mt-0.5 block text-xs ${"cloud"===l?"text-white/75":"text-text-subtle"}`,children:"External provider reliability, latency, token v\xe0 cost"})]})]})]})}):null,n?(0,d.jsx)("div",{children:b},k?l:"user-owned"):null]})}},92305:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var d={isRequestApiAllowedInCurrentPhase:function(){return k},throwForSearchParamsAccessInUseCache:function(){return j},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return i}};for(var e in d)Object.defineProperty(b,e,{enumerable:!0,get:d[e]});let f=c(15693),g=c(19121),h=c(3295);function i(a,b){throw Object.defineProperty(new f.StaticGenBailoutError(`Route ${a} with \`dynamic = "error"\` couldn't be rendered statically because it used ${b}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function j(a,b){let c=Object.defineProperty(Error(`Route ${a.route} used \`searchParams\` inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \`searchParams\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E842",enumerable:!1,configurable:!0});throw Error.captureStackTrace(c,b),a.invalidDynamicUsageError??=c,c}function k(a){switch(a.phase){case"action":case"render":return!0;case"after":{let a=g.actionAsyncStorage.getStore();if(a&&(a.isAppRoute||a.isAction))return!0;let b=h.afterTaskAsyncStorage.getStore();if(b)return"action"===b.rootTaskSpawnPhase;return!1}}}},94735:a=>{"use strict";a.exports=require("events")},96004:(a,b,c)=>{Promise.resolve().then(c.bind(c,62855)),Promise.resolve().then(c.bind(c,6633)),Promise.resolve().then(c.bind(c,78633))}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,2430,8316,8946,402,5681,4404,6064,6328,8640],()=>b(b.s=26224));module.exports=c})();