@rsalmn/extremerouter 0.7.3 → 0.7.4

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 (418) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +7 -7
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  94. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  96. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  98. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  99. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  100. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  101. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  103. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  106. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  232. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  306. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  308. package/app/.next-cli-build/server/app/callback.html +1 -1
  309. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  310. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  311. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  312. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  313. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  314. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  315. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  316. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  317. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  319. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  320. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  321. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  322. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  323. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  324. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  325. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  326. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  327. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  328. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  329. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/index.html +1 -1
  331. package/app/.next-cli-build/server/app/index.rsc +4 -4
  332. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  333. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  334. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  335. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  336. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  337. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  338. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  340. package/app/.next-cli-build/server/app/landing.html +1 -1
  341. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  342. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  343. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  344. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  345. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  346. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  347. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  348. package/app/.next-cli-build/server/app/login/page.js +1 -1
  349. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  351. package/app/.next-cli-build/server/app/login.html +1 -1
  352. package/app/.next-cli-build/server/app/login.rsc +5 -5
  353. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  354. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  355. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  356. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  357. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  358. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  359. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/page.js +1 -1
  361. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  363. package/app/.next-cli-build/server/app-paths-manifest.json +7 -7
  364. package/app/.next-cli-build/server/chunks/1216.js +1 -1
  365. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  366. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  367. package/app/.next-cli-build/server/chunks/2231.js +1 -1
  368. package/app/.next-cli-build/server/chunks/2701.js +1 -1
  369. package/app/.next-cli-build/server/chunks/318.js +8 -6
  370. package/app/.next-cli-build/server/chunks/3571.js +1 -0
  371. package/app/.next-cli-build/server/chunks/412.js +2 -2
  372. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  373. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  374. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  375. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  376. package/app/.next-cli-build/server/chunks/615.js +1 -1
  377. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  378. package/app/.next-cli-build/server/chunks/6316.js +2 -2
  379. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  380. package/app/.next-cli-build/server/chunks/6777.js +1 -1
  381. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  382. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  383. package/app/.next-cli-build/server/chunks/8833.js +1 -1
  384. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  385. package/app/.next-cli-build/server/chunks/9630.js +1 -1
  386. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  387. package/app/.next-cli-build/server/middleware.js +1 -1
  388. package/app/.next-cli-build/server/pages/404.html +1 -1
  389. package/app/.next-cli-build/server/pages/500.html +1 -1
  390. package/app/.next-cli-build/static/chunks/1321-b29070c75a1bf41b.js +1 -0
  391. package/app/.next-cli-build/static/chunks/{1696-2558002db021b00d.js → 1696-bafe4b44a7a0439e.js} +1 -1
  392. package/app/.next-cli-build/static/chunks/1992-b492aa3235a8c259.js +1 -0
  393. package/app/.next-cli-build/static/chunks/5497-2bcb49ea235529a8.js +7 -0
  394. package/app/.next-cli-build/static/chunks/705-b7d7b61f41806f0d.js +1 -0
  395. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-8a44865bda8d1138.js +1 -0
  396. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-1e4e44e8b9d5d986.js → page-0cb65a048e0ac91a.js} +3 -3
  397. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-80f241f97889edc2.js +1 -0
  398. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.3-to-0.7.4-0.7.4-20260722-105125/data.sqlite +0 -0
  399. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
  400. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
  401. package/app/package.json +3 -1
  402. package/app/public/providers/alibaba-cn.svg +11 -0
  403. package/app/public/providers/alibaba.svg +11 -0
  404. package/app/public/providers/forge.svg +9 -0
  405. package/app/public/providers/hcnsec.svg +10 -0
  406. package/app/public/providers/qwen-cloud-token-plan.svg +8 -0
  407. package/app/public/providers/qwen-cloud.svg +8 -0
  408. package/app/public/providers/tokenrouter.svg +15 -0
  409. package/package.json +1 -1
  410. package/app/.next-cli-build/server/chunks/8881.js +0 -1
  411. package/app/.next-cli-build/static/chunks/1321-118ecb4341892b2c.js +0 -1
  412. package/app/.next-cli-build/static/chunks/5497-d21171ba9c9fbb8d.js +0 -7
  413. package/app/.next-cli-build/static/chunks/705-197061b2f061280b.js +0 -1
  414. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-ba165a4326051b21.js +0 -1
  415. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-5fc4c9e1400d741e.js +0 -1
  416. /package/app/.next-cli-build/static/{3gc9MPTw0g8Wf0FjVPWJh → fsglpkHqAEeF3CQ_z_ynh}/_buildManifest.js +0 -0
  417. /package/app/.next-cli-build/static/{3gc9MPTw0g8Wf0FjVPWJh → fsglpkHqAEeF3CQ_z_ynh}/_ssgManifest.js +0 -0
  418. /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.6.8-to-0.6.9-0.6.9-20260713-141714 → upgrade-0.7.2-to-0.7.3-0.7.3-20260719-100408}/data.sqlite +0 -0
@@ -1,3 +1,3 @@
1
1
  (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1696],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>r,Hx:()=>n,Iv:()=>d,Nv:()=>x,RL:()=>c,ev:()=>m,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>o});let a=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],n=2e3,r=3e5,i=5e3,o=5,c=1e4,d=5e3,m=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],x=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},20242:(e,t,s)=>{"use strict";s.d(t,{default:()=>g});var a=s(95155),l=s(12115),n=s(14051),r=s.n(n),i=s(35497),o=s(11059),c=s(15536);async function d(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(c.Iv)})).ok}catch{return!1}}async function m(...e){let t=e.filter(Boolean).map(d);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}function x({label:e,url:t,copyId:s,copied:l,onCopy:n,badge:r,actions:o}){return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${"CF"===r||"TS"===r?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:e}),(0,a.jsx)(i.pd,{value:t,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>n(t,s),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l===s?"check":"content_copy"})}),o]})}function u({status:e,className:t=""}){return(0,a.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function h({text:e}){return(0,a.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,a.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function p({message:e,action:t}){return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-xs flex-1",children:e}),t&&(0,a.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}function g({machineId:e}){let[t,s]=(0,l.useState)([]),[n,r]=(0,l.useState)(!0),[f,b]=(0,l.useState)(!1),[j,v]=(0,l.useState)(""),[w,k]=(0,l.useState)(null),[N,C]=(0,l.useState)(null),[S,T]=(0,l.useState)(null),[P,E]=(0,l.useState)(!1),[_,$]=(0,l.useState)(!0),[A,I]=(0,l.useState)(!0),[U,D]=(0,l.useState)(!1),[F,O]=(0,l.useState)(!0),[R,L]=(0,l.useState)(!1),[W,q]=(0,l.useState)(!1),[K,M]=(0,l.useState)(""),[z,H]=(0,l.useState)(""),[J,B]=(0,l.useState)(!1),[G,Q]=(0,l.useState)(""),[X,Y]=(0,l.useState)(null),[Z,V]=(0,l.useState)(!1),[ee,et]=(0,l.useState)(!1),[es,ea]=(0,l.useState)(!1),[el,en]=(0,l.useState)(!1),[er,ei]=(0,l.useState)(""),[eo,ec]=(0,l.useState)(!1),[ed,em]=(0,l.useState)(""),[ex,eu]=(0,l.useState)(null),[eh,ep]=(0,l.useState)(""),[eg,ey]=(0,l.useState)(""),[ef,eb]=(0,l.useState)(null),[ej,ev]=(0,l.useState)(!1),[ew,ek]=(0,l.useState)([]),[eN,eC]=(0,l.useState)(""),[eS,eT]=(0,l.useState)(!1),[eP,eE]=(0,l.useState)(!1),[e_,e$]=(0,l.useState)(!1),eA=(0,l.useRef)(null),eI=(0,l.useRef)(0),eU=(0,l.useRef)(0),eD=(0,l.useRef)(!1),eF=(0,l.useRef)(!1),eO=(0,l.useRef)(!1),eR=(0,l.useRef)(!1),[eL,eW]=(0,l.useState)(!1),[eq,eK]=(0,l.useState)(!1),[eM,ez]=(0,l.useState)(new Set),[eH,eJ]=(0,l.useState)(!1);(0,l.useEffect)(()=>{eJ(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]);let{copied:eB,copy:eG}=(0,o.C)(),eQ=!_||!A,eX=_?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,l.useEffect)(()=>{eA.current&&(eA.current.scrollTop=eA.current.scrollHeight)},[ew]),(0,l.useEffect)(()=>{e2(),eV()},[]),(0,l.useEffect)(()=>{if(!(R||es))return;let e=!R||W,t=!es||el,s=()=>{document.hidden||eZ()};if(document.addEventListener("visibilitychange",s),e&&t)return()=>document.removeEventListener("visibilitychange",s);let a=setInterval(()=>{document.hidden||eZ()},c.fl);return()=>{clearInterval(a),document.removeEventListener("visibilitychange",s)}},[R,es,W,el]),(0,l.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(R&&(K||z)){let e=await m(z,K);eD.current=e,e?(eI.current=0,q(!0),eO.current||(eO.current=!0,eW(!0))):(eI.current+=1,eI.current>=c.t6&&q(!1))}else eD.current=!1;if(es&&er){let e=await d(er);eF.current=e,e?(eU.current=0,en(!0),eR.current||(eR.current=!0,eK(!0))):(eU.current+=1,eU.current>=c.t6&&en(!1))}else eF.current=!1}};if(!(R&&(K||z)||es&&er))return;e();let t=!es||el;if((!R||W)&&t)return;let s=setInterval(e,c.RL);return()=>clearInterval(s)},[R,K,z,es,er,W,el]);let eY=(0,l.useCallback)((e,t,s,a,l,n)=>{t.current?(s.current=0,a(!0),l.current||(l.current=!0,n(!0))):(s.current+=1,s.current>=c.t6&&a(!1))},[]),eZ=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,a=t.tunnel?.tunnelUrl||"";M(a),H(t.tunnel?.publicUrl||""),L(s),eY(null,eD,eI,q,eO,eW);let l=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,n=t.tailscale?.tunnelUrl||"";ei(n),ea(l),eY(null,eF,eU,en,eR,eK)}catch{}},eV=async()=>{O(!0);try{let[e,t]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e.ok){let t=await e.json();E(t.requireApiKey||!1),$(!1!==t.requireLogin),I(t.hasPassword||!1),D(t.tunnelDashboardAccess||!1)}if(t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,a=e.tunnel?.tunnelUrl||"";M(a),H(e.tunnel?.publicUrl||""),L(s),eY(null,eD,eI,q,eO,eW);let l=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,n=e.tailscale?.tunnelUrl||"";ei(n),ea(l),eY(null,eF,eU,en,eR,eK)}}catch(e){console.log("Error loading settings:",e)}finally{O(!1)}},e0=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:e})})).ok&&D(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},e1=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:e})})).ok&&E(e)}catch(e){console.log("Error updating requireApiKey:",e)}},e2=async()=>{try{let e=await fetch("/api/keys"),t=await e.json();e.ok&&s(t.keys||[])}catch(e){console.log("Error fetching data:",e)}finally{r(!1)}},e5=async(...e)=>{B(!0),Q("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),s=Date.now();for(;Date.now()-s<c.Cp;){if(await new Promise(e=>setTimeout(e,c.Hx)),await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return L(!0),B(!1),Q(""),!0;if((Date.now()-s)%1e4<c.Hx)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return Y({type:"error",message:"Tunnel process stopped unexpectedly."}),B(!1),Q(""),!1}}catch{}}return Y({type:"error",message:"Tunnel created but not reachable. Please try again."}),B(!1),Q(""),!1},e4=async()=>{V(!1),B(!0),Y(null),Q("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let s=await t.json();s.download?.downloading?Q(`Downloading cloudflared... ${s.download.progress}%`):e&&Q("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let s=await t.json();if(!t.ok)return void Y({type:"error",message:s.error||"Failed to enable tunnel"});let a=s.tunnelUrl;if(!a)return void Y({type:"error",message:"No tunnel URL returned"});M(a),H(s.publicUrl||""),await e5(s.publicUrl,a)}catch(e){Y({type:"error",message:e.message})}finally{e=!1,B(!1),Q("")}},e3=async()=>{B(!0),Y(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(L(!1),M(""),et(!1),Y({type:"success",message:"Tunnel disabled"})):Y({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){Y({type:"error",message:e.message})}finally{B(!1)}},e8=async()=>{eb(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return eb(t.installed),t}}catch{}return eb(!1),{installed:!1}},e6=async()=>{ev(!0),eu(null),ek([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eN})});eC("");let t=e.body.getReader(),s=new TextDecoder,a="";for(;;){let{done:e,value:l}=await t.read();if(e)break;let n=(a+=s.decode(l,{stream:!0})).split("\n\n");for(let e of(a=n.pop()||"",n)){let t=e.split("\n"),s="progress",a=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{a=JSON.parse(e.slice(6))}catch{}if(a)if("progress"===s)ek(e=>[...e.slice(-50),a.message]);else if("done"===s){eb(!0),ev(!1),eE(!1),tt();return}else"error"===s&&eu({type:"error",message:a.error||"Install failed"})}}}catch(e){eu({type:"error",message:e.message})}finally{ev(!1)}},e7=async e=>{em("Waiting for Tailscale ready...");let t=`${e}/api/health`,s=Date.now();for(;Date.now()-s<c.Cp;){await new Promise(e=>setTimeout(e,c.Hx));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},e9=(e,t)=>{ep(e),ey(t)},te=()=>{ep(""),ey("")},tt=async()=>{eE(!1),eT(!0),ec(!0),eu(null),em("Connecting..."),te();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){ei(t.tunnelUrl||"");let e=await e7(t.tunnelUrl);ea(!0),eu(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.needsLogin&&t.authUrl){e9(t.authUrl,"Open Login Page"),em('Login required — click "Open Login Page" to continue');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){te(),em("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){ei(t.tunnelUrl||"");let e=await e7(t.tunnelUrl);ea(!0),eu(e?null:{type:"warning",message:"Connected but not reachable yet."})}else t.funnelNotEnabled&&t.enableUrl?await ts(t.enableUrl):eu({type:"error",message:t.error||"Failed to start funnel"});return}}catch{}}te(),eu({type:"error",message:"Login timed out. Please try again."});return}if(t.funnelNotEnabled&&t.enableUrl)return void await ts(t.enableUrl);eu({type:"error",message:t.error||"Failed to connect"})}catch(e){eu({type:"error",message:e.message})}finally{ec(!1),eT(!1),em(""),te()}},ts=async e=>{e9(e,"Open Funnel Settings"),em('Click "Open Funnel Settings" to enable Funnel...');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){te(),ei(t.tunnelUrl||"");let e=await e7(t.tunnelUrl);ea(!0),eu(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.funnelNotEnabled)continue;if(t.error){te(),eu({type:"error",message:t.error});return}}catch{}}te(),eu({type:"error",message:"Timed out waiting for Funnel to be enabled."})},ta=async()=>{ec(!0),eu(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(ea(!1),ei(""),e$(!1),eu({type:"success",message:"Tailscale disabled"})):eu({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){eu({type:"error",message:e.message})}finally{ec(!1)}},tl=async()=>{eu(null),ek([]);let e=await e8();e?.installed&&e?.hasCachedPassword?tt():eE(!0)},tn=async()=>{if(j.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:j})}),t=await e.json();e.ok&&(k(t.key),await e2(),v(""),b(!1))}catch(e){console.log("Error creating key:",e)}},tr=async e=>{C({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{C(null);try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(s(t.filter(t=>t.id!==e)),ez(t=>{let s=new Set(t);return s.delete(e),s}))}catch(e){console.log("Error deleting key:",e)}}})},ti=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error toggling key:",e)}},[to,tc]=(0,l.useState)("/v1");return((0,l.useEffect)(()=>{tc(`${window.location.origin}/v1`)},[]),n)?(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(i.Qv,{}),(0,a.jsx)(i.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsx)(i.zY,{title:"Endpoint",description:"Gateway URL, public exposure, and API keys",icon:"api",actions:(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>b(!0),children:"New Key"})}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(x,{label:"Local",url:to,copyId:"local_url",copied:eB,onCopy:eG}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${R?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),R&&!J&&W?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${z||K}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>eG(`${z||K}/v1`,"tunnel_url"),className:"p-2 hover:hover:bg-surface-3 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===eB?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>et(!0),className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!R||J||W?J?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),G||"Creating tunnel..."]}),(0,a.jsx)("button",{onClick:()=>{B(!1),Q("")},className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):X?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-danger",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),X.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>V(!0),children:"Enable"})]}):F?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,a.jsx)("button",{onClick:()=>O(!1),className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{eQ?Y({type:"error",message:`Security required: ${eX}`}):P?V(!0):Y({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-warning",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eL?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,a.jsx)("button",{onClick:()=>et(!0),className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${es?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),es&&!eo&&el?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${er}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>eG(`${er}/v1`,"ts_url"),className:"p-2 hover:hover:bg-surface-3 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===eB?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>e$(!0),className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!es||eo||el?eo||eS?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),ed||"Connecting..."]}),eh&&(0,a.jsx)(i.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(eh,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:eg||"Open"}),(0,a.jsx)("button",{onClick:()=>{ec(!1),eT(!1),em(""),te()},className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ex?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-danger",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ex.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:tl,children:"Enable"})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{eQ?eu({type:"error",message:`Security required: ${eX}`}):tl()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-warning",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eq?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,a.jsx)("button",{onClick:()=>e$(!0),className:"p-2 hover:bg-danger/10 text-danger transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),eQ&&!R&&!es&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(p,{message:eX,action:{label:"Open settings",href:"/dashboard/profile"}})}),(R||es)&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!P&&(0,a.jsx)(p,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!_||!A)&&(0,a.jsx)(p,{message:_?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:_?"Change password":"Enable",href:"/dashboard/profile"}})]}),(R||es)&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,a.jsx)(i.lM,{checked:U,onChange:()=>e0(!U)}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,a.jsx)(h,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,a.jsxs)(i.Zp,{id:"require-api-key",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>b(!0),children:"Create Key"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,a.jsx)(i.lM,{checked:P,onChange:()=>e1(!P)})]}),eH&&!P&&(0,a.jsx)("div",{className:"mb-4 -mt-2",children:(0,a.jsx)(p,{message:"Endpoint is exposed without an API key."})}),0===t.length?(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>b(!0),children:"Create Key"})]}):(0,a.jsx)("div",{className:"flex flex-col",children:t.map(e=>{var t;return(0,a.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono",children:eM.has(e.id)?e.key:(t=e.key)&&!(t.length<=10)?t.slice(0,6)+"•".repeat(t.length-10)+t.slice(-4):t||""}),(0,a.jsx)("button",{onClick:()=>{var t;return t=e.id,void ez(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"p-1 hover:hover:bg-surface-3 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:eM.has(e.id)?"Hide key":"Show key",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eM.has(e.id)?"visibility_off":"visibility"})}),(0,a.jsx)("button",{onClick:()=>eG(e.key,e.id),className:"p-1 hover:hover:bg-surface-3 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eB===e.id?"check":"content_copy"})})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,a.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[Array.isArray(e.allowedModels)&&e.allowedModels.length>0&&(0,a.jsxs)("span",{className:"hidden sm:inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-semibold text-primary",title:`Restricted to ${e.allowedModels.length} models`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"lock"}),e.allowedModels.length]}),(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?C({title:"Pause API Key",message:`Pause API key "${e.name}"?
2
2
 
3
- This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{C(null),ti(e.id,t)}}):ti(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,a.jsx)("button",{onClick:()=>T(e),className:"p-2 hover:bg-surface-2 text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:"Model access control",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tune"})}),(0,a.jsx)("button",{onClick:()=>tr(e.id),className:"p-2 hover:bg-danger/10 text-danger opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsx)(i.aF,{isOpen:f,title:"Create API Key",onClose:()=>{b(!1),v("")},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(i.pd,{label:"Key Name",value:j,onChange:e=>v(e.target.value),placeholder:"Production Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tn,fullWidth:!0,disabled:!j.trim(),children:"Create"}),(0,a.jsx)(i.$n,{onClick:()=>{b(!1),v("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!w,title:"API Key Created",onClose:()=>k(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.pd,{value:w||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(i.$n,{variant:"secondary",icon:"created_key"===eB?"check":"content_copy",onClick:()=>eG(w,"created_key"),children:"created_key"===eB?"Copied!":"Copy"})]}),(0,a.jsx)(i.$n,{onClick:()=>k(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(i.aF,{isOpen:Z,title:"Enable Tunnel",onClose:()=>V(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local ExtremeRouter to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:c.oX.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e4,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(i.$n,{onClick:()=>V(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:ee,title:"Disable Tunnel",onClose:()=>!J&&et(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e3,fullWidth:!0,disabled:J,variant:"danger",children:J?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>et(!1),variant:"ghost",fullWidth:!0,disabled:J,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:eP,title:"Tailscale Funnel",onClose:()=>{ej||(eE(!1),eC(""),eu(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===ef&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===ef&&!ej&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e6,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(i.$n,{onClick:()=>eE(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ej&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),ew.length>0&&(0,a.jsx)("div",{ref:eA,className:"bg-surface-2 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:ew.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===ef&&!ej&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:()=>tt(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(i.$n,{onClick:()=>eE(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ex&&(0,a.jsx)(u,{status:ex})]})}),(0,a.jsx)(i.aF,{isOpen:e_,title:"Disable Tailscale",onClose:()=>!eo&&e$(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:ta,fullWidth:!0,disabled:eo,variant:"danger",children:eo?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>e$(!1),variant:"ghost",fullWidth:!0,disabled:eo,children:"Cancel"})]})]})}),(0,a.jsx)(y,{apiKey:S,onClose:()=>T(null),onSaved:async()=>{await e2(),T(null)}}),(0,a.jsx)(i.uo,{isOpen:!!N,onClose:()=>C(null),onConfirm:N?.onConfirm,title:N?.title||"Confirm",message:N?.message,variant:"danger"})]})}function y({apiKey:e,onClose:t,onSaved:s}){let[n,r]=(0,l.useState)(null),[o,c]=(0,l.useState)(""),[d,m]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{e&&(r(Array.isArray(e.allowedModels)?[...e.allowedModels]:[]),c(""))},[e]),!e)return null;let x=()=>{let e=o.trim();e&&(n.includes(e)||r(t=>[...t,e]),c(""))},u=async()=>{m(!0);try{await fetch(`/api/keys/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({allowedModels:n.length>0?n:null})}),await s()}catch(e){console.log("Failed to save model access:",e)}finally{m(!1)}};return(0,a.jsx)(i.aF,{isOpen:!!e,onClose:t,title:`Model Access — ${e.name||"Key"}`,footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.$n,{variant:"ghost",onClick:t,disabled:d,children:"Cancel"}),(0,a.jsx)(i.$n,{onClick:u,loading:d,children:"Save"})]}),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Restrict which models this API key can access. Leave empty to allow all models. Supports exact model IDs (e.g. ",(0,a.jsx)("code",{className:"font-mono text-xs",children:"glm/glm-5"}),") or provider prefixes (e.g. ",(0,a.jsx)("code",{className:"font-mono text-xs",children:"glm/"})," to allow all GLM models)."]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),x())},placeholder:"e.g. glm/glm-5 or glm/",className:"flex-1 rounded border border-border bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted/70 focus:outline-none focus:ring-2 focus:ring-primary/30"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"add",onClick:x,children:"Add"})]}),n.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-primary/30 bg-primary/5 px-2.5 py-1 text-xs font-mono text-primary",children:[e,(0,a.jsx)("button",{onClick:()=>r(t=>t.filter(t=>t!==e)),className:"text-primary/60 hover:text-danger transition-colors","aria-label":`Remove ${e}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e))}):(0,a.jsx)("div",{className:"rounded-lg border border-dashed border-border p-4 text-center text-sm text-text-muted",children:"No restrictions — this key can access all models"}),n.length>0&&(0,a.jsx)("button",{onClick:()=>r([]),className:"self-start text-xs text-danger hover:underline",children:"Clear all restrictions"})]})})}g.propTypes={machineId:r().string.isRequired}},81696:(e,t,s)=>{Promise.resolve().then(s.bind(s,20242))}}]);
3
+ This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{C(null),ti(e.id,t)}}):ti(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,a.jsx)("button",{onClick:()=>T(e),className:"p-2 hover:bg-surface-2 text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:"Model access control",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tune"})}),(0,a.jsx)("button",{onClick:()=>tr(e.id),className:"p-2 hover:bg-danger/10 text-danger opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsx)(i.aF,{isOpen:f,title:"Create API Key",onClose:()=>{b(!1),v("")},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(i.pd,{label:"Key Name",value:j,onChange:e=>v(e.target.value),placeholder:"Production Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tn,fullWidth:!0,disabled:!j.trim(),children:"Create"}),(0,a.jsx)(i.$n,{onClick:()=>{b(!1),v("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!w,title:"API Key Created",onClose:()=>k(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.pd,{value:w||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(i.$n,{variant:"secondary",icon:"created_key"===eB?"check":"content_copy",onClick:()=>eG(w,"created_key"),children:"created_key"===eB?"Copied!":"Copy"})]}),(0,a.jsx)(i.$n,{onClick:()=>k(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(i.aF,{isOpen:Z,title:"Enable Tunnel",onClose:()=>V(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local ExtremeRouter to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:c.oX.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e4,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(i.$n,{onClick:()=>V(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:ee,title:"Disable Tunnel",onClose:()=>!J&&et(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e3,fullWidth:!0,disabled:J,variant:"danger",children:J?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>et(!1),variant:"ghost",fullWidth:!0,disabled:J,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:eP,title:"Tailscale Funnel",onClose:()=>{ej||(eE(!1),eC(""),eu(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===ef&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===ef&&!ej&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e6,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(i.$n,{onClick:()=>eE(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ej&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),ew.length>0&&(0,a.jsx)("div",{ref:eA,className:"bg-surface-2 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:ew.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===ef&&!ej&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:()=>tt(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(i.$n,{onClick:()=>eE(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ex&&(0,a.jsx)(u,{status:ex})]})}),(0,a.jsx)(i.aF,{isOpen:e_,title:"Disable Tailscale",onClose:()=>!eo&&e$(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:ta,fullWidth:!0,disabled:eo,variant:"danger",children:eo?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>e$(!1),variant:"ghost",fullWidth:!0,disabled:eo,children:"Cancel"})]})]})}),(0,a.jsx)(y,{apiKey:S,onClose:()=>T(null),onSaved:async()=>{await e2(),T(null)}}),(0,a.jsx)(i.uo,{isOpen:!!N,onClose:()=>C(null),onConfirm:N?.onConfirm,title:N?.title||"Confirm",message:N?.message,variant:"danger"})]})}function y({apiKey:e,onClose:t,onSaved:s}){let[n,r]=(0,l.useState)(()=>Array.isArray(e?.allowedModels)?[...e.allowedModels]:[]),[o,c]=(0,l.useState)(""),[d,m]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{e&&(r(Array.isArray(e.allowedModels)?[...e.allowedModels]:[]),c(""))},[e]),!e)return null;let x=()=>{let e=o.trim();e&&(r(t=>t.includes(e)?t:[...t,e]),c(""))},u=async()=>{m(!0);try{await fetch(`/api/keys/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({allowedModels:n.length>0?n:null})}),await s()}catch(e){console.log("Failed to save model access:",e)}finally{m(!1)}};return(0,a.jsx)(i.aF,{isOpen:!!e,onClose:t,title:`Model Access — ${e.name||"Key"}`,footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.$n,{variant:"ghost",onClick:t,disabled:d,children:"Cancel"}),(0,a.jsx)(i.$n,{onClick:u,loading:d,children:"Save"})]}),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Restrict which models this API key can access. Leave empty to allow all models. Supports exact model IDs (e.g. ",(0,a.jsx)("code",{className:"font-mono text-xs",children:"glm/glm-5"}),") or provider prefixes (e.g. ",(0,a.jsx)("code",{className:"font-mono text-xs",children:"glm/"})," to allow all GLM models)."]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),x())},placeholder:"e.g. glm/glm-5 or glm/",className:"flex-1 rounded border border-border bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted/70 focus:outline-none focus:ring-2 focus:ring-primary/30"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"add",onClick:x,children:"Add"})]}),n.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-primary/30 bg-primary/5 px-2.5 py-1 text-xs font-mono text-primary",children:[e,(0,a.jsx)("button",{onClick:()=>r(t=>t.filter(t=>t!==e)),className:"text-primary/60 hover:text-danger transition-colors","aria-label":`Remove ${e}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e))}):(0,a.jsx)("div",{className:"rounded-lg border border-dashed border-border p-4 text-center text-sm text-text-muted",children:"No restrictions — this key can access all models"}),n.length>0&&(0,a.jsx)("button",{onClick:()=>r([]),className:"self-start text-xs text-danger hover:underline",children:"Clear all restrictions"})]})})}g.propTypes={machineId:r().string.isRequired}},81696:(e,t,s)=>{Promise.resolve().then(s.bind(s,20242))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1992],{91992:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:()=>ed});let o=Object.entries,a=Object.setPrototypeOf,i=Object.isFrozen,l=Object.getPrototypeOf,c=Object.getOwnPropertyDescriptor,u=Object.freeze,s=Object.seal,f=Object.create,p="u">typeof Reflect&&Reflect,m=p.apply,d=p.construct;u||(u=function(e){return e}),s||(s=function(e){return e}),m||(m=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),d||(d=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});let h=M(Array.prototype.forEach),g=M(Array.prototype.lastIndexOf),y=M(Array.prototype.pop),T=M(Array.prototype.push),b=M(Array.prototype.splice),E=Array.isArray,S=M(String.prototype.toLowerCase),_=M(String.prototype.toString),A=M(String.prototype.match),N=M(String.prototype.replace),w=M(String.prototype.indexOf),O=M(String.prototype.trim),v=M(Number.prototype.toString),R=M(Boolean.prototype.toString),C="u"<typeof BigInt?null:M(BigInt.prototype.toString),D="u"<typeof Symbol?null:M(Symbol.prototype.toString),k=M(Object.prototype.hasOwnProperty),I=M(Object.prototype.toString),x=M(RegExp.prototype.test),L=(em=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return d(em,t)});function M(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return m(e,t,r)}}function P(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S;if(a&&a(e,null),!E(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){let e=n(o);e!==o&&(i(t)||(t[r]=e),o=e)}e[o]=!0}return e}function U(e){let t=f(null);for(let a of o(e)){var n=function(e){if(Array.isArray(e))return e}(a)||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,a,i=[],l=!0,c=!1;try{o=(t=t.call(e)).next,!1;for(;!(l=(n=o.call(t)).done)&&(i.push(n.value),2!==i.length);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}(a)||function(e){if(e){if("string"==typeof e)return r(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,2):void 0}}(a)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();let o=n[0],i=n[1];k(e,o)&&(E(i)?t[o]=function(e){for(let t=0;t<e.length;t++)k(e,t)||(e[t]=null);return e}(i):i&&"object"==typeof i&&i.constructor===Object?t[o]=U(i):t[o]=i)}return t}function z(e,t){for(;null!==e;){let n=c(e,t);if(n){if(n.get)return M(n.get);if("function"==typeof n.value)return M(n.value)}e=l(e)}return function(){return null}}let F=u(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),H=u(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=u(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),B=u(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),G=u(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),W=u(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=u(["#text"]),q=u(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),X=u(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$=u(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),K=u(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=s(/{{[\w\W]*|^[\w\W]*}}/g),Z=s(/<%[\w\W]*|^[\w\W]*%>/g),J=s(/\${[\w\W]*/g),Q=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),ee=s(/^aria-[\-\w]+$/),et=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),en=s(/^(?:\w+script|data):/i),er=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eo=s(/^html$/i),ea=s(/^[a-z][.\w]*(-[.\w]+)+$/i),ei=s(/<[/\w!]/g),el=s(/<[/\w]/g),ec=s(/<\/no(script|embed|frames)/i),eu=s(/\/>/i),es=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}},ef=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ep=function(e,t,n,r){return k(e,t)&&E(e[t])?P(r.base?U(r.base):{},e[t],r.transform):n};var em,ed=function e(){let t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"u"<typeof window?null:window,a=t=>e(t);if(a.version="3.4.12",a.removed=[],!r||!r.document||9!==r.document.nodeType||!r.Element)return a.isSupported=!1,a;let i=r.document,l=i,c=l.currentScript;r.DocumentFragment;let p=r.HTMLTemplateElement,m=r.Node,d=r.Element,M=r.NodeFilter;void 0===r.NamedNodeMap&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let em=r.DOMParser,ed=r.trustedTypes,eh=d.prototype,eg=z(eh,"cloneNode"),ey=z(eh,"remove"),eT=z(eh,"nextSibling"),eb=z(eh,"childNodes"),eE=z(eh,"parentNode"),eS=z(eh,"shadowRoot"),e_=z(eh,"attributes"),eA=m&&m.prototype?z(m.prototype,"nodeType"):null,eN=m&&m.prototype?z(m.prototype,"nodeName"):null;if("function"==typeof p){let e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let ew="",eO=!1,ev=0,eR=function(){if(ev>0)throw L('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},eC=function(e){eR(),ev++;try{return t.createHTML(e)}finally{ev--}},eD=function(e){eR(),ev++;try{return t.createScriptURL(e)}finally{ev--}},ek=i,eI=ek.implementation,ex=ek.createNodeIterator,eL=ek.createDocumentFragment,eM=ek.getElementsByTagName,eP=l.importNode,eU=ef();a.isSupported="function"==typeof o&&"function"==typeof eE&&eI&&void 0!==eI.createHTMLDocument;let ez=et,eF=null,eH=P({},[...F,...H,...j,...G,...Y]),ej=null,eB=P({},[...q,...X,...$,...K]),eG=Object.seal(f(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),eW=null,eY=null,eq=Object.seal(f(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),eX=!0,e$=!0,eK=!1,eV=!0,eZ=!1,eJ=!0,eQ=!1,e0=!1,e1=null,e2=null,e9=!1,e3=!1,e8=!1,e4=!1,e6=!0,e7=!1,e5="user-content-",te=!0,tt=!1,tn={},tr=null,to=P({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),ta=null,ti=P({},["audio","video","img","source","image","track"]),tl=null,tc=P({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tu="http://www.w3.org/1998/Math/MathML",ts="http://www.w3.org/2000/svg",tf="http://www.w3.org/1999/xhtml",tp=tf,tm=!1,td=null,th=P({},[tu,ts,tf],_),tg=u(["mi","mo","mn","ms","mtext"]),ty=P({},tg),tT=u(["annotation-xml"]),tb=P({},tT),tE=P({},["title","style","font","a","script"]),tS=null,t_=["application/xhtml+xml","text/html"],tA=null,tN=null,tw=i.createElement("form"),tO=function(e){return e instanceof RegExp||e instanceof Function},tv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(tN&&tN===e)return;e&&"object"==typeof e||(e={}),e=U(e),tA="application/xhtml+xml"===(tS=-1===t_.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?_:S,eF=ep(e,"ALLOWED_TAGS",eH,{transform:tA}),ej=ep(e,"ALLOWED_ATTR",eB,{transform:tA}),td=ep(e,"ALLOWED_NAMESPACES",th,{transform:_}),tl=ep(e,"ADD_URI_SAFE_ATTR",tc,{transform:tA,base:tc}),ta=ep(e,"ADD_DATA_URI_TAGS",ti,{transform:tA,base:ti}),tr=ep(e,"FORBID_CONTENTS",to,{transform:tA}),eW=ep(e,"FORBID_TAGS",U({}),{transform:tA}),eY=ep(e,"FORBID_ATTR",U({}),{transform:tA}),tn=!!k(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?U(e.USE_PROFILES):e.USE_PROFILES),eX=!1!==e.ALLOW_ARIA_ATTR,e$=!1!==e.ALLOW_DATA_ATTR,eK=e.ALLOW_UNKNOWN_PROTOCOLS||!1,eV=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,eZ=e.SAFE_FOR_TEMPLATES||!1,eJ=!1!==e.SAFE_FOR_XML,eQ=e.WHOLE_DOCUMENT||!1,e3=e.RETURN_DOM||!1,e8=e.RETURN_DOM_FRAGMENT||!1,e4=e.RETURN_TRUSTED_TYPE||!1,e9=e.FORCE_BODY||!1,e6=!1!==e.SANITIZE_DOM,e7=e.SANITIZE_NAMED_PROPS||!1,te=!1!==e.KEEP_CONTENT,tt=e.IN_PLACE||!1,ez=!function(e){try{return x(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?et:e.ALLOWED_URI_REGEXP,tp="string"==typeof e.NAMESPACE?e.NAMESPACE:tf,ty=k(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?U(e.MATHML_TEXT_INTEGRATION_POINTS):P({},tg),tb=k(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?U(e.HTML_INTEGRATION_POINTS):P({},tT);let r=k(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?U(e.CUSTOM_ELEMENT_HANDLING):f(null);if(eG=f(null),k(r,"tagNameCheck")&&tO(r.tagNameCheck)&&(eG.tagNameCheck=r.tagNameCheck),k(r,"attributeNameCheck")&&tO(r.attributeNameCheck)&&(eG.attributeNameCheck=r.attributeNameCheck),k(r,"allowCustomizedBuiltInElements")&&"boolean"==typeof r.allowCustomizedBuiltInElements&&(eG.allowCustomizedBuiltInElements=r.allowCustomizedBuiltInElements),s(eG),eZ&&(e$=!1),e8&&(e3=!0),tn&&(eF=P({},Y),ej=f(null),!0===tn.html&&(P(eF,F),P(ej,q)),!0===tn.svg&&(P(eF,H),P(ej,X),P(ej,K)),!0===tn.svgFilters&&(P(eF,j),P(ej,X),P(ej,K)),!0===tn.mathMl&&(P(eF,G),P(ej,$),P(ej,K))),eq.tagCheck=null,eq.attributeCheck=null,k(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?eq.tagCheck=e.ADD_TAGS:E(e.ADD_TAGS)&&(eF===eH&&(eF=U(eF)),P(eF,e.ADD_TAGS,tA))),k(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?eq.attributeCheck=e.ADD_ATTR:E(e.ADD_ATTR)&&(ej===eB&&(ej=U(ej)),P(ej,e.ADD_ATTR,tA))),k(e,"ADD_URI_SAFE_ATTR")&&E(e.ADD_URI_SAFE_ATTR)&&P(tl,e.ADD_URI_SAFE_ATTR,tA),k(e,"FORBID_CONTENTS")&&E(e.FORBID_CONTENTS)&&(tr===to&&(tr=U(tr)),P(tr,e.FORBID_CONTENTS,tA)),k(e,"ADD_FORBID_CONTENTS")&&E(e.ADD_FORBID_CONTENTS)&&(tr===to&&(tr=U(tr)),P(tr,e.ADD_FORBID_CONTENTS,tA)),te&&(eF["#text"]=!0),eQ&&P(eF,["html","head","body"]),eF.table&&(P(eF,["tbody"]),delete eW.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw L('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw L('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let n=t;t=e.TRUSTED_TYPES_POLICY;try{ew=eC("")}catch(e){throw t=n,e}}else null===e.TRUSTED_TYPES_POLICY?(t=void 0,ew=""):(void 0===t&&(eO||(n=es(ed,c),eO=!0),t=n),t&&"string"==typeof ew&&(ew=eC("")));u&&u(e),tN=e},tR=P({},[...H,...j,...B]),tC=P({},[...G,...W]),tD=function(e){var t,n,r;let o=eE(e);o&&o.tagName||(o={namespaceURI:tp,tagName:"template"});let a=S(e.tagName),i=S(o.tagName);return!!td[e.namespaceURI]&&(e.namespaceURI===ts?(t=o).namespaceURI===tf?"svg"===a:t.namespaceURI===tu?"svg"===a&&("annotation-xml"===i||ty[i]):!!tR[a]:e.namespaceURI===tu?(n=o).namespaceURI===tf?"math"===a:n.namespaceURI===ts?"math"===a&&tb[i]:!!tC[a]:e.namespaceURI===tf?((r=o).namespaceURI!==ts||!!tb[i])&&(r.namespaceURI!==tu||!!ty[i])&&!tC[a]&&(tE[a]||!tR[a]):"application/xhtml+xml"===tS&&!!td[e.namespaceURI])},tk=function(e){T(a.removed,{element:e});try{eE(e).removeChild(e)}catch(t){if(ey(e),!eE(e))throw L("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tI=function(e){tM(e);let t=eb(e);if(t){let e=[];h(t,t=>{T(e,t)}),h(e,e=>{try{ey(e)}catch(e){}})}let n=e_(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],o=r&&r.name;if("string"==typeof o)try{e.removeAttribute(o)}catch(e){}}},tx=function(e,t){try{T(a.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){T(a.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(e3||e8)try{tk(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},tL=function(e){let t=e_(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],o=r&&r.name;if("string"==typeof o&&!ej[tA(o)])try{e.removeAttribute(o)}catch(e){}}},tM=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(eA?eA(e):e.nodeType)===1&&tL(e);let n=eb(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},tP=function(e){if(!eJ)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=eA?eA(e):e.nodeType;if(7===n||8===n&&x(el,e.data)){try{ey(e)}catch(e){}continue}if(1===n){let t=tA(eN?eN(e):e.nodeName);try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&"label"!==t&&"output"!==t&&e.removeAttribute("for")}catch(e){}}let r=eb(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},tU=function(e){let n=null,r=null;if(e9)e="<remove></remove>"+e;else{let t=A(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===tS&&tp===tf&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let o=t?eC(e):e;if(tp===tf)try{n=new em().parseFromString(o,tS)}catch(e){}if(!n||!n.documentElement){n=eI.createDocument(tp,"template",null);try{n.documentElement.innerHTML=tm?ew:o}catch(e){}}let a=n.body||n.documentElement;return(e&&r&&a.insertBefore(i.createTextNode(r),a.childNodes[0]||null),tp===tf)?eM.call(n,eQ?"html":"body")[0]:eQ?n.documentElement:a},tz=function(e){return ex.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT|M.SHOW_PROCESSING_INSTRUCTION|M.SHOW_CDATA_SECTION,null)},tF=function(e){return e=N(e,V," "),e=N(e,Z," "),e=N(e,J," ")},tH=function(e){var t;e.normalize();let n=ex.call(e.ownerDocument||e,e,M.SHOW_TEXT|M.SHOW_COMMENT|M.SHOW_CDATA_SECTION|M.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=tF(r.data),r=n.nextNode();let o=null==(t=e.querySelectorAll)?void 0:t.call(e,"template");o&&h(o,e=>{tB(e.content)&&tH(e.content)})},tj=function(e){let t=eN?eN(e):null;return"string"==typeof t&&"form"===tA(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==e_(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==eA(e)||e.childNodes!==eb(e))},tB=function(e){if(!eA||"object"!=typeof e||null===e)return!1;try{return 11===eA(e)}catch(e){return!1}},tG=function(e){if(!eA||"object"!=typeof e||null===e)return!1;try{return"number"==typeof eA(e)}catch(e){return!1}};function tW(e,t,n){0!==e.length&&h(e,e=>{e.call(a,t,n,tN)})}let tY=function(e,t){if(!eW[t]&&tK(t)&&(eG.tagNameCheck instanceof RegExp&&x(eG.tagNameCheck,t)||eG.tagNameCheck instanceof Function&&eG.tagNameCheck(t)))return!1;if(te&&!tr[t]){let t=eE(e),n=eb(e);if(n&&t){let r=n.length;for(let o=r-1;o>=0;--o){let r=tt?n[o]:eg(n[o],!0);t.insertBefore(r,eT(e))}}}return tk(e),!0},tq=function(e,t){if(tW(eU.beforeSanitizeElements,e,null),e!==t&&null===eE(e))return!0;if(tj(e))return tk(e),!0;let n=tA(eN?eN(e):e.nodeName);if(tW(eU.uponSanitizeElement,e,{tagName:n,allowedTags:eF}),e!==t&&null===eE(e))return!0;if(eJ&&e.hasChildNodes()&&!tG(e.firstElementChild)&&x(ei,e.textContent)&&x(ei,e.innerHTML)||eJ&&e.namespaceURI===tf&&"style"===n&&tG(e.firstElementChild)||7===e.nodeType||eJ&&8===e.nodeType&&x(el,e.data))return tk(e),!0;if(eW[n]||!(eq.tagCheck instanceof Function&&eq.tagCheck(n))&&!eF[n]){let t=tY(e,n);return!1===t&&tW(eU.afterSanitizeElements,e,null),t}if((eA?eA(e):e.nodeType)===1&&!tD(e)||("noscript"===n||"noembed"===n||"noframes"===n)&&x(ec,e.innerHTML))return tk(e),!0;if(eZ&&3===e.nodeType){let t=tF(e.textContent);e.textContent!==t&&(T(a.removed,{element:e.cloneNode()}),e.textContent=t)}return tW(eU.afterSanitizeElements,e,null),!1},tX=function(e,t,n){if(eY[t]||eJ&&"patchsrc"===t||eJ&&"for"===t&&"label"!==e&&"output"!==e||e6&&("id"===t||"name"===t)&&(n in i||n in tw))return!1;let r=ej[t]||eq.attributeCheck instanceof Function&&eq.attributeCheck(t,e);if(e$&&x(Q,t));else if(eX&&x(ee,t));else if(r){if(tl[t]);else if(x(ez,N(n,er,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===w(n,"data:")&&ta[e]);else if(eK&&!x(en,N(n,er,"")));else if(n)return!1}else if(!(tK(e)&&(eG.tagNameCheck instanceof RegExp&&x(eG.tagNameCheck,e)||eG.tagNameCheck instanceof Function&&eG.tagNameCheck(e))&&(eG.attributeNameCheck instanceof RegExp&&x(eG.attributeNameCheck,t)||eG.attributeNameCheck instanceof Function&&eG.attributeNameCheck(t,e))||"is"===t&&eG.allowCustomizedBuiltInElements&&(eG.tagNameCheck instanceof RegExp&&x(eG.tagNameCheck,n)||eG.tagNameCheck instanceof Function&&eG.tagNameCheck(n))))return!1;return!0},t$=P({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),tK=function(e){return!t$[S(e)]&&x(ea,e)},tV=function(e,n,r,o){if(t&&"object"==typeof ed&&"function"==typeof ed.getAttributeType&&!r)switch(ed.getAttributeType(e,n)){case"TrustedHTML":return eC(o);case"TrustedScriptURL":return eD(o)}return o},tZ=function(e,t,n,r){try{n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),tj(e)?tk(e):y(a.removed)}catch(n){tx(t,e)}},tJ=function(e){tW(eU.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||tj(e))return;let n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ej,forceKeepAttr:void 0},r=t.length,o=tA(e.nodeName);for(;r--;){let a=t[r],i=a.name,l=a.namespaceURI,c=a.value,u=tA(i),s="value"===i?c:O(c);if(n.attrName=u,n.attrValue=s,n.keepAttr=!0,n.forceKeepAttr=void 0,tW(eU.uponSanitizeAttribute,e,n),s=n.attrValue,e7&&("id"===u||"name"===u)&&0!==w(s,e5)&&(tx(i,e),s=e5+s),eJ&&x(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,s)||"attributename"===u&&A(s,"href")){tx(i,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr||!eV&&x(eu,s)||(eZ&&(s=tF(s)),!tX(o,u,s))){tx(i,e);continue}(s=tV(o,u,l,s))!==c&&tZ(e,i,l,s)}}tW(eU.afterSanitizeAttributes,e,null)},tQ=function(e){let t=null,n=tz(e);for(tW(eU.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(tW(eU.uponSanitizeShadowNode,t,null),tq(t,e),tJ(t),tB(t.content)&&tQ(t.content),(eA?eA(t):t.nodeType)===1){let e=eS(t);tB(e)&&(t0(e),tQ(e))}tW(eU.afterSanitizeShadowDOM,e,null)},t0=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){tQ(e.shadow);continue}let n=e.node,r=(eA?eA(n):n.nodeType)===1,o=eb(n);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(r){let e=eN?eN(n):null;if("string"==typeof e&&"template"===tA(e)){let e=n.content;tB(e)&&t.push({node:e,shadow:null})}}if(r){let e=eS(n);tB(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return a.sanitize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,i=null,c=null;if((tm=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!tG(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return v(e);case"boolean":return R(e);case"bigint":return C?C(e):"0";case"symbol":return D?D(e):"Symbol()";case"undefined":default:return I(e);case"function":case"object":{if(null===e)return I(e);let t=z(e,"toString");if("function"==typeof t){let n=t(e);return"string"==typeof n?n:I(n)}return I(e)}}}(e)))throw L("dirty is not a string, aborting");if(!a.isSupported)return e;e0?(eF=e1,ej=e2):tv(n),(eU.uponSanitizeElement.length>0||eU.uponSanitizeAttribute.length>0)&&(eF=U(eF)),eU.uponSanitizeAttribute.length>0&&(ej=U(ej)),a.removed=[];let u=tt&&"string"!=typeof e&&tG(e);if(u){tP(e);let t=eN?eN(e):e.nodeName;if("string"==typeof t){let n=tA(t);if(!eF[n]||eW[n])throw tI(e),L("root node is forbidden and cannot be sanitized in-place")}if(tj(e))throw tI(e),L("root node is clobbered and cannot be sanitized in-place");try{t0(e)}catch(t){throw tI(e),t}}else if(tG(e))1===(o=(r=tU("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o),t0(o);else{if(!e3&&!eZ&&!eQ&&-1===e.indexOf("<"))return t&&e4?eC(e):e;if(!(r=tU(e)))return e3?null:e4?ew:""}r&&e9&&tk(r.firstChild);let s=u?e:r,f=tz(s);try{for(;i=f.nextNode();)tq(i,s),tJ(i),tB(i.content)&&tQ(i.content)}catch(t){throw u&&(tI(e),h(a.removed,e=>{e.element&&tM(e.element)})),t}if(u)return h(a.removed,e=>{e.element&&tM(e.element)}),eZ&&tH(e),e;if(e3){if(eZ&&tH(r),e8)for(c=eL.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(ej.shadowroot||ej.shadowrootmode)&&(c=eP.call(l,c,!0)),c}let p=eQ?r.outerHTML:r.innerHTML;return eQ&&eF["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&x(eo,r.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+p),eZ&&(p=tF(p)),t&&e4?eC(p):p},a.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tv(e),e0=!0,e1=eF,e2=ej},a.clearConfig=function(){tN=null,e0=!1,e1=null,e2=null,t=n,ew=""},a.isValidAttribute=function(e,t,n){return tN||tv({}),tX(tA(e),tA(t),n)},a.addHook=function(e,t){"function"!=typeof t||k(eU,e)&&T(eU[e],t)},a.removeHook=function(e,t){if(k(eU,e)){if(void 0!==t){let n=g(eU[e],t);return -1===n?void 0:b(eU[e],n,1)[0]}return y(eU[e])}},a.removeHooks=function(e){k(eU,e)&&(eU[e]=[])},a.removeAllHooks=function(){eU=ef()},a}()}}]);