@neurouter/server 0.0.0-stage → 0.1.0
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.
- package/LICENSE +202 -0
- package/NOTICE +10 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/app.d.ts +29 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +79 -0
- package/dist/app.js.map +1 -0
- package/dist/console.d.ts +16 -0
- package/dist/console.d.ts.map +1 -0
- package/dist/console.js +149 -0
- package/dist/console.js.map +1 -0
- package/dist/controlplane/api/context.d.ts +64 -0
- package/dist/controlplane/api/context.d.ts.map +1 -0
- package/dist/controlplane/api/context.js +7 -0
- package/dist/controlplane/api/context.js.map +1 -0
- package/dist/controlplane/api/plugin.d.ts +8 -0
- package/dist/controlplane/api/plugin.d.ts.map +1 -0
- package/dist/controlplane/api/plugin.js +36 -0
- package/dist/controlplane/api/plugin.js.map +1 -0
- package/dist/controlplane/api/ports.d.ts +40 -0
- package/dist/controlplane/api/ports.d.ts.map +1 -0
- package/dist/controlplane/api/ports.js +2 -0
- package/dist/controlplane/api/ports.js.map +1 -0
- package/dist/controlplane/api/problem.d.ts +15 -0
- package/dist/controlplane/api/problem.d.ts.map +1 -0
- package/dist/controlplane/api/problem.js +80 -0
- package/dist/controlplane/api/problem.js.map +1 -0
- package/dist/controlplane/api/routes/audit.d.ts +6 -0
- package/dist/controlplane/api/routes/audit.d.ts.map +1 -0
- package/dist/controlplane/api/routes/audit.js +139 -0
- package/dist/controlplane/api/routes/audit.js.map +1 -0
- package/dist/controlplane/api/routes/auth.d.ts +10 -0
- package/dist/controlplane/api/routes/auth.d.ts.map +1 -0
- package/dist/controlplane/api/routes/auth.js +125 -0
- package/dist/controlplane/api/routes/auth.js.map +1 -0
- package/dist/controlplane/api/routes/environments.d.ts +5 -0
- package/dist/controlplane/api/routes/environments.d.ts.map +1 -0
- package/dist/controlplane/api/routes/environments.js +118 -0
- package/dist/controlplane/api/routes/environments.js.map +1 -0
- package/dist/controlplane/api/routes/evals.d.ts +5 -0
- package/dist/controlplane/api/routes/evals.d.ts.map +1 -0
- package/dist/controlplane/api/routes/evals.js +348 -0
- package/dist/controlplane/api/routes/evals.js.map +1 -0
- package/dist/controlplane/api/routes/inbox.d.ts +5 -0
- package/dist/controlplane/api/routes/inbox.d.ts.map +1 -0
- package/dist/controlplane/api/routes/inbox.js +226 -0
- package/dist/controlplane/api/routes/inbox.js.map +1 -0
- package/dist/controlplane/api/routes/keys.d.ts +5 -0
- package/dist/controlplane/api/routes/keys.d.ts.map +1 -0
- package/dist/controlplane/api/routes/keys.js +176 -0
- package/dist/controlplane/api/routes/keys.js.map +1 -0
- package/dist/controlplane/api/routes/metrics.d.ts +5 -0
- package/dist/controlplane/api/routes/metrics.d.ts.map +1 -0
- package/dist/controlplane/api/routes/metrics.js +197 -0
- package/dist/controlplane/api/routes/metrics.js.map +1 -0
- package/dist/controlplane/api/routes/overlays.d.ts +36 -0
- package/dist/controlplane/api/routes/overlays.d.ts.map +1 -0
- package/dist/controlplane/api/routes/overlays.js +244 -0
- package/dist/controlplane/api/routes/overlays.js.map +1 -0
- package/dist/controlplane/api/routes/public.d.ts +7 -0
- package/dist/controlplane/api/routes/public.d.ts.map +1 -0
- package/dist/controlplane/api/routes/public.js +71 -0
- package/dist/controlplane/api/routes/public.js.map +1 -0
- package/dist/controlplane/api/routes/servers.d.ts +45 -0
- package/dist/controlplane/api/routes/servers.d.ts.map +1 -0
- package/dist/controlplane/api/routes/servers.js +423 -0
- package/dist/controlplane/api/routes/servers.js.map +1 -0
- package/dist/controlplane/api/routes/settings.d.ts +21 -0
- package/dist/controlplane/api/routes/settings.d.ts.map +1 -0
- package/dist/controlplane/api/routes/settings.js +408 -0
- package/dist/controlplane/api/routes/settings.js.map +1 -0
- package/dist/controlplane/api/routes/tasks.d.ts +12 -0
- package/dist/controlplane/api/routes/tasks.d.ts.map +1 -0
- package/dist/controlplane/api/routes/tasks.js +144 -0
- package/dist/controlplane/api/routes/tasks.js.map +1 -0
- package/dist/controlplane/api/routes/tools.d.ts +14 -0
- package/dist/controlplane/api/routes/tools.d.ts.map +1 -0
- package/dist/controlplane/api/routes/tools.js +174 -0
- package/dist/controlplane/api/routes/tools.js.map +1 -0
- package/dist/controlplane/api/routes.d.ts +25 -0
- package/dist/controlplane/api/routes.d.ts.map +1 -0
- package/dist/controlplane/api/routes.js +43 -0
- package/dist/controlplane/api/routes.js.map +1 -0
- package/dist/controlplane/api/views.d.ts +53 -0
- package/dist/controlplane/api/views.d.ts.map +1 -0
- package/dist/controlplane/api/views.js +290 -0
- package/dist/controlplane/api/views.js.map +1 -0
- package/dist/controlplane/auth/guards.d.ts +40 -0
- package/dist/controlplane/auth/guards.d.ts.map +1 -0
- package/dist/controlplane/auth/guards.js +87 -0
- package/dist/controlplane/auth/guards.js.map +1 -0
- package/dist/controlplane/auth/local-link.d.ts +28 -0
- package/dist/controlplane/auth/local-link.d.ts.map +1 -0
- package/dist/controlplane/auth/local-link.js +41 -0
- package/dist/controlplane/auth/local-link.js.map +1 -0
- package/dist/controlplane/auth/login.d.ts +51 -0
- package/dist/controlplane/auth/login.d.ts.map +1 -0
- package/dist/controlplane/auth/login.js +115 -0
- package/dist/controlplane/auth/login.js.map +1 -0
- package/dist/controlplane/auth/oidc.d.ts +63 -0
- package/dist/controlplane/auth/oidc.d.ts.map +1 -0
- package/dist/controlplane/auth/oidc.js +76 -0
- package/dist/controlplane/auth/oidc.js.map +1 -0
- package/dist/controlplane/auth/sessions.d.ts +46 -0
- package/dist/controlplane/auth/sessions.d.ts.map +1 -0
- package/dist/controlplane/auth/sessions.js +65 -0
- package/dist/controlplane/auth/sessions.js.map +1 -0
- package/dist/controlplane/config-sync/reconcile.d.ts +88 -0
- package/dist/controlplane/config-sync/reconcile.d.ts.map +1 -0
- package/dist/controlplane/config-sync/reconcile.js +287 -0
- package/dist/controlplane/config-sync/reconcile.js.map +1 -0
- package/dist/controlplane/environments/environments.service.d.ts +46 -0
- package/dist/controlplane/environments/environments.service.d.ts.map +1 -0
- package/dist/controlplane/environments/environments.service.js +209 -0
- package/dist/controlplane/environments/environments.service.js.map +1 -0
- package/dist/controlplane/evals/evals.service.d.ts +126 -0
- package/dist/controlplane/evals/evals.service.d.ts.map +1 -0
- package/dist/controlplane/evals/evals.service.js +551 -0
- package/dist/controlplane/evals/evals.service.js.map +1 -0
- package/dist/controlplane/evals/model-keys.d.ts +37 -0
- package/dist/controlplane/evals/model-keys.d.ts.map +1 -0
- package/dist/controlplane/evals/model-keys.js +43 -0
- package/dist/controlplane/evals/model-keys.js.map +1 -0
- package/dist/controlplane/keys/api-key-format.d.ts +19 -0
- package/dist/controlplane/keys/api-key-format.d.ts.map +1 -0
- package/dist/controlplane/keys/api-key-format.js +39 -0
- package/dist/controlplane/keys/api-key-format.js.map +1 -0
- package/dist/controlplane/keys/api-keys.service.d.ts +42 -0
- package/dist/controlplane/keys/api-keys.service.d.ts.map +1 -0
- package/dist/controlplane/keys/api-keys.service.js +91 -0
- package/dist/controlplane/keys/api-keys.service.js.map +1 -0
- package/dist/controlplane/oauth/authorize.d.ts +101 -0
- package/dist/controlplane/oauth/authorize.d.ts.map +1 -0
- package/dist/controlplane/oauth/authorize.js +172 -0
- package/dist/controlplane/oauth/authorize.js.map +1 -0
- package/dist/controlplane/oauth/cimd.d.ts +52 -0
- package/dist/controlplane/oauth/cimd.d.ts.map +1 -0
- package/dist/controlplane/oauth/cimd.js +173 -0
- package/dist/controlplane/oauth/cimd.js.map +1 -0
- package/dist/controlplane/oauth/clients.service.d.ts +101 -0
- package/dist/controlplane/oauth/clients.service.d.ts.map +1 -0
- package/dist/controlplane/oauth/clients.service.js +269 -0
- package/dist/controlplane/oauth/clients.service.js.map +1 -0
- package/dist/controlplane/oauth/metadata.d.ts +27 -0
- package/dist/controlplane/oauth/metadata.d.ts.map +1 -0
- package/dist/controlplane/oauth/metadata.js +35 -0
- package/dist/controlplane/oauth/metadata.js.map +1 -0
- package/dist/controlplane/oauth/pkce.d.ts +8 -0
- package/dist/controlplane/oauth/pkce.d.ts.map +1 -0
- package/dist/controlplane/oauth/pkce.js +16 -0
- package/dist/controlplane/oauth/pkce.js.map +1 -0
- package/dist/controlplane/oauth/redirect-uri.d.ts +15 -0
- package/dist/controlplane/oauth/redirect-uri.d.ts.map +1 -0
- package/dist/controlplane/oauth/redirect-uri.js +61 -0
- package/dist/controlplane/oauth/redirect-uri.js.map +1 -0
- package/dist/controlplane/oauth/resource.d.ts +28 -0
- package/dist/controlplane/oauth/resource.d.ts.map +1 -0
- package/dist/controlplane/oauth/resource.js +49 -0
- package/dist/controlplane/oauth/resource.js.map +1 -0
- package/dist/controlplane/oauth/routes.d.ts +28 -0
- package/dist/controlplane/oauth/routes.d.ts.map +1 -0
- package/dist/controlplane/oauth/routes.js +191 -0
- package/dist/controlplane/oauth/routes.js.map +1 -0
- package/dist/controlplane/oauth/session.d.ts +36 -0
- package/dist/controlplane/oauth/session.d.ts.map +1 -0
- package/dist/controlplane/oauth/session.js +38 -0
- package/dist/controlplane/oauth/session.js.map +1 -0
- package/dist/controlplane/oauth/tokens.service.d.ts +105 -0
- package/dist/controlplane/oauth/tokens.service.d.ts.map +1 -0
- package/dist/controlplane/oauth/tokens.service.js +209 -0
- package/dist/controlplane/oauth/tokens.service.js.map +1 -0
- package/dist/controlplane/servers/builds.service.d.ts +54 -0
- package/dist/controlplane/servers/builds.service.d.ts.map +1 -0
- package/dist/controlplane/servers/builds.service.js +173 -0
- package/dist/controlplane/servers/builds.service.js.map +1 -0
- package/dist/controlplane/servers/fetch-spec.d.ts +13 -0
- package/dist/controlplane/servers/fetch-spec.d.ts.map +1 -0
- package/dist/controlplane/servers/fetch-spec.js +30 -0
- package/dist/controlplane/servers/fetch-spec.js.map +1 -0
- package/dist/controlplane/servers/servers.service.d.ts +87 -0
- package/dist/controlplane/servers/servers.service.d.ts.map +1 -0
- package/dist/controlplane/servers/servers.service.js +168 -0
- package/dist/controlplane/servers/servers.service.js.map +1 -0
- package/dist/controlplane/traces/traces.service.d.ts +38 -0
- package/dist/controlplane/traces/traces.service.d.ts.map +1 -0
- package/dist/controlplane/traces/traces.service.js +189 -0
- package/dist/controlplane/traces/traces.service.js.map +1 -0
- package/dist/controlplane/upstream-oauth/upstream-oauth.service.d.ts +70 -0
- package/dist/controlplane/upstream-oauth/upstream-oauth.service.d.ts.map +1 -0
- package/dist/controlplane/upstream-oauth/upstream-oauth.service.js +208 -0
- package/dist/controlplane/upstream-oauth/upstream-oauth.service.js.map +1 -0
- package/dist/controlplane/users/users.service.d.ts +33 -0
- package/dist/controlplane/users/users.service.d.ts.map +1 -0
- package/dist/controlplane/users/users.service.js +68 -0
- package/dist/controlplane/users/users.service.js.map +1 -0
- package/dist/dataplane/auth/authenticate.d.ts +58 -0
- package/dist/dataplane/auth/authenticate.d.ts.map +1 -0
- package/dist/dataplane/auth/authenticate.js +152 -0
- package/dist/dataplane/auth/authenticate.js.map +1 -0
- package/dist/dataplane/auth/external-jwt.d.ts +30 -0
- package/dist/dataplane/auth/external-jwt.d.ts.map +1 -0
- package/dist/dataplane/auth/external-jwt.js +78 -0
- package/dist/dataplane/auth/external-jwt.js.map +1 -0
- package/dist/dataplane/code/executor-health.d.ts +24 -0
- package/dist/dataplane/code/executor-health.d.ts.map +1 -0
- package/dist/dataplane/code/executor-health.js +49 -0
- package/dist/dataplane/code/executor-health.js.map +1 -0
- package/dist/dataplane/code/run-script.d.ts +90 -0
- package/dist/dataplane/code/run-script.d.ts.map +1 -0
- package/dist/dataplane/code/run-script.js +320 -0
- package/dist/dataplane/code/run-script.js.map +1 -0
- package/dist/dataplane/code/tokenize.d.ts +44 -0
- package/dist/dataplane/code/tokenize.d.ts.map +1 -0
- package/dist/dataplane/code/tokenize.js +267 -0
- package/dist/dataplane/code/tokenize.js.map +1 -0
- package/dist/dataplane/code/validate.d.ts +30 -0
- package/dist/dataplane/code/validate.d.ts.map +1 -0
- package/dist/dataplane/code/validate.js +94 -0
- package/dist/dataplane/code/validate.js.map +1 -0
- package/dist/dataplane/code/wrap.d.ts +20 -0
- package/dist/dataplane/code/wrap.d.ts.map +1 -0
- package/dist/dataplane/code/wrap.js +108 -0
- package/dist/dataplane/code/wrap.js.map +1 -0
- package/dist/dataplane/http/circuit-breaker.d.ts +23 -0
- package/dist/dataplane/http/circuit-breaker.d.ts.map +1 -0
- package/dist/dataplane/http/circuit-breaker.js +53 -0
- package/dist/dataplane/http/circuit-breaker.js.map +1 -0
- package/dist/dataplane/http/credentials.d.ts +59 -0
- package/dist/dataplane/http/credentials.d.ts.map +1 -0
- package/dist/dataplane/http/credentials.js +93 -0
- package/dist/dataplane/http/credentials.js.map +1 -0
- package/dist/dataplane/http/errors.d.ts +16 -0
- package/dist/dataplane/http/errors.d.ts.map +1 -0
- package/dist/dataplane/http/errors.js +32 -0
- package/dist/dataplane/http/errors.js.map +1 -0
- package/dist/dataplane/http/invoker.d.ts +56 -0
- package/dist/dataplane/http/invoker.d.ts.map +1 -0
- package/dist/dataplane/http/invoker.js +114 -0
- package/dist/dataplane/http/invoker.js.map +1 -0
- package/dist/dataplane/http/request-builder.d.ts +39 -0
- package/dist/dataplane/http/request-builder.d.ts.map +1 -0
- package/dist/dataplane/http/request-builder.js +162 -0
- package/dist/dataplane/http/request-builder.js.map +1 -0
- package/dist/dataplane/mcp/challenge.d.ts +14 -0
- package/dist/dataplane/mcp/challenge.d.ts.map +1 -0
- package/dist/dataplane/mcp/challenge.js +25 -0
- package/dist/dataplane/mcp/challenge.js.map +1 -0
- package/dist/dataplane/mcp/dispatch.d.ts +64 -0
- package/dist/dataplane/mcp/dispatch.d.ts.map +1 -0
- package/dist/dataplane/mcp/dispatch.js +165 -0
- package/dist/dataplane/mcp/dispatch.js.map +1 -0
- package/dist/dataplane/mcp/event-bus.d.ts +19 -0
- package/dist/dataplane/mcp/event-bus.d.ts.map +1 -0
- package/dist/dataplane/mcp/event-bus.js +39 -0
- package/dist/dataplane/mcp/event-bus.js.map +1 -0
- package/dist/dataplane/mcp/inflight.d.ts +66 -0
- package/dist/dataplane/mcp/inflight.d.ts.map +1 -0
- package/dist/dataplane/mcp/inflight.js +135 -0
- package/dist/dataplane/mcp/inflight.js.map +1 -0
- package/dist/dataplane/mcp/origin.d.ts +7 -0
- package/dist/dataplane/mcp/origin.d.ts.map +1 -0
- package/dist/dataplane/mcp/origin.js +27 -0
- package/dist/dataplane/mcp/origin.js.map +1 -0
- package/dist/dataplane/mcp/route.d.ts +43 -0
- package/dist/dataplane/mcp/route.d.ts.map +1 -0
- package/dist/dataplane/mcp/route.js +280 -0
- package/dist/dataplane/mcp/route.js.map +1 -0
- package/dist/dataplane/mcp/surface.d.ts +43 -0
- package/dist/dataplane/mcp/surface.d.ts.map +1 -0
- package/dist/dataplane/mcp/surface.js +133 -0
- package/dist/dataplane/mcp/surface.js.map +1 -0
- package/dist/dataplane/mcp/translate.d.ts +16 -0
- package/dist/dataplane/mcp/translate.d.ts.map +1 -0
- package/dist/dataplane/mcp/translate.js +33 -0
- package/dist/dataplane/mcp/translate.js.map +1 -0
- package/dist/dataplane/mock/mock-upstream.d.ts +23 -0
- package/dist/dataplane/mock/mock-upstream.d.ts.map +1 -0
- package/dist/dataplane/mock/mock-upstream.js +26 -0
- package/dist/dataplane/mock/mock-upstream.js.map +1 -0
- package/dist/dataplane/ops/ops.d.ts +66 -0
- package/dist/dataplane/ops/ops.d.ts.map +1 -0
- package/dist/dataplane/ops/ops.js +315 -0
- package/dist/dataplane/ops/ops.js.map +1 -0
- package/dist/dataplane/pipeline/arg-validate.d.ts +19 -0
- package/dist/dataplane/pipeline/arg-validate.d.ts.map +1 -0
- package/dist/dataplane/pipeline/arg-validate.js +61 -0
- package/dist/dataplane/pipeline/arg-validate.js.map +1 -0
- package/dist/dataplane/pipeline/context.d.ts +78 -0
- package/dist/dataplane/pipeline/context.d.ts.map +1 -0
- package/dist/dataplane/pipeline/context.js +13 -0
- package/dist/dataplane/pipeline/context.js.map +1 -0
- package/dist/dataplane/pipeline/errors.d.ts +53 -0
- package/dist/dataplane/pipeline/errors.d.ts.map +1 -0
- package/dist/dataplane/pipeline/errors.js +61 -0
- package/dist/dataplane/pipeline/errors.js.map +1 -0
- package/dist/dataplane/pipeline/pipeline.d.ts +128 -0
- package/dist/dataplane/pipeline/pipeline.d.ts.map +1 -0
- package/dist/dataplane/pipeline/pipeline.js +443 -0
- package/dist/dataplane/pipeline/pipeline.js.map +1 -0
- package/dist/dataplane/pipeline/policy.d.ts +24 -0
- package/dist/dataplane/pipeline/policy.d.ts.map +1 -0
- package/dist/dataplane/pipeline/policy.js +93 -0
- package/dist/dataplane/pipeline/policy.js.map +1 -0
- package/dist/dataplane/rate-limit/limiter.d.ts +42 -0
- package/dist/dataplane/rate-limit/limiter.d.ts.map +1 -0
- package/dist/dataplane/rate-limit/limiter.js +34 -0
- package/dist/dataplane/rate-limit/limiter.js.map +1 -0
- package/dist/dataplane/rate-limit/stores.d.ts +56 -0
- package/dist/dataplane/rate-limit/stores.d.ts.map +1 -0
- package/dist/dataplane/rate-limit/stores.js +95 -0
- package/dist/dataplane/rate-limit/stores.js.map +1 -0
- package/dist/dataplane/rate-limit/token-bucket.d.ts +19 -0
- package/dist/dataplane/rate-limit/token-bucket.d.ts.map +1 -0
- package/dist/dataplane/rate-limit/token-bucket.js +16 -0
- package/dist/dataplane/rate-limit/token-bucket.js.map +1 -0
- package/dist/dataplane/search/document.d.ts +22 -0
- package/dist/dataplane/search/document.d.ts.map +1 -0
- package/dist/dataplane/search/document.js +45 -0
- package/dist/dataplane/search/document.js.map +1 -0
- package/dist/dataplane/search/embed-worker.d.ts +2 -0
- package/dist/dataplane/search/embed-worker.d.ts.map +1 -0
- package/dist/dataplane/search/embed-worker.js +55 -0
- package/dist/dataplane/search/embed-worker.js.map +1 -0
- package/dist/dataplane/search/embedder.d.ts +113 -0
- package/dist/dataplane/search/embedder.d.ts.map +1 -0
- package/dist/dataplane/search/embedder.js +216 -0
- package/dist/dataplane/search/embedder.js.map +1 -0
- package/dist/dataplane/search/hybrid.d.ts +28 -0
- package/dist/dataplane/search/hybrid.d.ts.map +1 -0
- package/dist/dataplane/search/hybrid.js +45 -0
- package/dist/dataplane/search/hybrid.js.map +1 -0
- package/dist/dataplane/search/indexer.d.ts +62 -0
- package/dist/dataplane/search/indexer.d.ts.map +1 -0
- package/dist/dataplane/search/indexer.js +105 -0
- package/dist/dataplane/search/indexer.js.map +1 -0
- package/dist/dataplane/search/keyword-index.d.ts +26 -0
- package/dist/dataplane/search/keyword-index.d.ts.map +1 -0
- package/dist/dataplane/search/keyword-index.js +60 -0
- package/dist/dataplane/search/keyword-index.js.map +1 -0
- package/dist/dataplane/search/model-profiles.d.ts +12 -0
- package/dist/dataplane/search/model-profiles.d.ts.map +1 -0
- package/dist/dataplane/search/model-profiles.js +12 -0
- package/dist/dataplane/search/model-profiles.js.map +1 -0
- package/dist/dataplane/search/search.service.d.ts +39 -0
- package/dist/dataplane/search/search.service.d.ts.map +1 -0
- package/dist/dataplane/search/search.service.js +69 -0
- package/dist/dataplane/search/search.service.js.map +1 -0
- package/dist/dataplane/search/suggest.d.ts +15 -0
- package/dist/dataplane/search/suggest.d.ts.map +1 -0
- package/dist/dataplane/search/suggest.js +76 -0
- package/dist/dataplane/search/suggest.js.map +1 -0
- package/dist/dataplane/search/vector-index.d.ts +49 -0
- package/dist/dataplane/search/vector-index.d.ts.map +1 -0
- package/dist/dataplane/search/vector-index.js +72 -0
- package/dist/dataplane/search/vector-index.js.map +1 -0
- package/dist/dataplane/shaping/result-pages.d.ts +19 -0
- package/dist/dataplane/shaping/result-pages.d.ts.map +1 -0
- package/dist/dataplane/shaping/result-pages.js +37 -0
- package/dist/dataplane/shaping/result-pages.js.map +1 -0
- package/dist/dataplane/shaping/sanitize.d.ts +6 -0
- package/dist/dataplane/shaping/sanitize.d.ts.map +1 -0
- package/dist/dataplane/shaping/sanitize.js +31 -0
- package/dist/dataplane/shaping/sanitize.js.map +1 -0
- package/dist/dataplane/tasks/tracker.d.ts +60 -0
- package/dist/dataplane/tasks/tracker.d.ts.map +1 -0
- package/dist/dataplane/tasks/tracker.js +178 -0
- package/dist/dataplane/tasks/tracker.js.map +1 -0
- package/dist/dataplane/tasks/usage.d.ts +8 -0
- package/dist/dataplane/tasks/usage.d.ts.map +1 -0
- package/dist/dataplane/tasks/usage.js +35 -0
- package/dist/dataplane/tasks/usage.js.map +1 -0
- package/dist/deps.d.ts +133 -0
- package/dist/deps.d.ts.map +1 -0
- package/dist/deps.js +356 -0
- package/dist/deps.js.map +1 -0
- package/dist/health/routes.d.ts +22 -0
- package/dist/health/routes.d.ts.map +1 -0
- package/dist/health/routes.js +40 -0
- package/dist/health/routes.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/instrumentation.d.ts +10 -0
- package/dist/instrumentation.d.ts.map +1 -0
- package/dist/instrumentation.js +72 -0
- package/dist/instrumentation.js.map +1 -0
- package/dist/jobs.d.ts +5 -0
- package/dist/jobs.d.ts.map +1 -0
- package/dist/jobs.js +96 -0
- package/dist/jobs.js.map +1 -0
- package/dist/kernel/audit/archive/azure.d.ts +42 -0
- package/dist/kernel/audit/archive/azure.d.ts.map +1 -0
- package/dist/kernel/audit/archive/azure.js +80 -0
- package/dist/kernel/audit/archive/azure.js.map +1 -0
- package/dist/kernel/audit/archive/gcs.d.ts +27 -0
- package/dist/kernel/audit/archive/gcs.d.ts.map +1 -0
- package/dist/kernel/audit/archive/gcs.js +42 -0
- package/dist/kernel/audit/archive/gcs.js.map +1 -0
- package/dist/kernel/audit/archive/index.d.ts +20 -0
- package/dist/kernel/audit/archive/index.d.ts.map +1 -0
- package/dist/kernel/audit/archive/index.js +90 -0
- package/dist/kernel/audit/archive/index.js.map +1 -0
- package/dist/kernel/audit/archive/local-fs.d.ts +10 -0
- package/dist/kernel/audit/archive/local-fs.d.ts.map +1 -0
- package/dist/kernel/audit/archive/local-fs.js +24 -0
- package/dist/kernel/audit/archive/local-fs.js.map +1 -0
- package/dist/kernel/audit/archive/s3.d.ts +49 -0
- package/dist/kernel/audit/archive/s3.d.ts.map +1 -0
- package/dist/kernel/audit/archive/s3.js +85 -0
- package/dist/kernel/audit/archive/s3.js.map +1 -0
- package/dist/kernel/audit/archive/store.d.ts +34 -0
- package/dist/kernel/audit/archive/store.d.ts.map +1 -0
- package/dist/kernel/audit/archive/store.js +27 -0
- package/dist/kernel/audit/archive/store.js.map +1 -0
- package/dist/kernel/audit/chain.d.ts +33 -0
- package/dist/kernel/audit/chain.d.ts.map +1 -0
- package/dist/kernel/audit/chain.js +64 -0
- package/dist/kernel/audit/chain.js.map +1 -0
- package/dist/kernel/audit/checkpoints.d.ts +30 -0
- package/dist/kernel/audit/checkpoints.d.ts.map +1 -0
- package/dist/kernel/audit/checkpoints.js +33 -0
- package/dist/kernel/audit/checkpoints.js.map +1 -0
- package/dist/kernel/audit/export.d.ts +14 -0
- package/dist/kernel/audit/export.d.ts.map +1 -0
- package/dist/kernel/audit/export.js +88 -0
- package/dist/kernel/audit/export.js.map +1 -0
- package/dist/kernel/audit/partitions.d.ts +29 -0
- package/dist/kernel/audit/partitions.d.ts.map +1 -0
- package/dist/kernel/audit/partitions.js +58 -0
- package/dist/kernel/audit/partitions.js.map +1 -0
- package/dist/kernel/audit/query.d.ts +28 -0
- package/dist/kernel/audit/query.d.ts.map +1 -0
- package/dist/kernel/audit/query.js +114 -0
- package/dist/kernel/audit/query.js.map +1 -0
- package/dist/kernel/audit/recorder.d.ts +53 -0
- package/dist/kernel/audit/recorder.d.ts.map +1 -0
- package/dist/kernel/audit/recorder.js +71 -0
- package/dist/kernel/audit/recorder.js.map +1 -0
- package/dist/kernel/audit/redact.d.ts +69 -0
- package/dist/kernel/audit/redact.d.ts.map +1 -0
- package/dist/kernel/audit/redact.js +202 -0
- package/dist/kernel/audit/redact.js.map +1 -0
- package/dist/kernel/audit/redaction-rules.service.d.ts +34 -0
- package/dist/kernel/audit/redaction-rules.service.d.ts.map +1 -0
- package/dist/kernel/audit/redaction-rules.service.js +53 -0
- package/dist/kernel/audit/redaction-rules.service.js.map +1 -0
- package/dist/kernel/audit/retention.d.ts +54 -0
- package/dist/kernel/audit/retention.d.ts.map +1 -0
- package/dist/kernel/audit/retention.js +119 -0
- package/dist/kernel/audit/retention.js.map +1 -0
- package/dist/kernel/audit/sinks/dispatcher.d.ts +38 -0
- package/dist/kernel/audit/sinks/dispatcher.d.ts.map +1 -0
- package/dist/kernel/audit/sinks/dispatcher.js +68 -0
- package/dist/kernel/audit/sinks/dispatcher.js.map +1 -0
- package/dist/kernel/audit/sinks/otel-logs.d.ts +25 -0
- package/dist/kernel/audit/sinks/otel-logs.d.ts.map +1 -0
- package/dist/kernel/audit/sinks/otel-logs.js +51 -0
- package/dist/kernel/audit/sinks/otel-logs.js.map +1 -0
- package/dist/kernel/audit/sinks/sink.d.ts +14 -0
- package/dist/kernel/audit/sinks/sink.d.ts.map +1 -0
- package/dist/kernel/audit/sinks/sink.js +9 -0
- package/dist/kernel/audit/sinks/sink.js.map +1 -0
- package/dist/kernel/audit/sinks/webhook.d.ts +29 -0
- package/dist/kernel/audit/sinks/webhook.d.ts.map +1 -0
- package/dist/kernel/audit/sinks/webhook.js +49 -0
- package/dist/kernel/audit/sinks/webhook.js.map +1 -0
- package/dist/kernel/audit/store.d.ts +158 -0
- package/dist/kernel/audit/store.d.ts.map +1 -0
- package/dist/kernel/audit/store.js +155 -0
- package/dist/kernel/audit/store.js.map +1 -0
- package/dist/kernel/audit/types.d.ts +136 -0
- package/dist/kernel/audit/types.d.ts.map +1 -0
- package/dist/kernel/audit/types.js +2 -0
- package/dist/kernel/audit/types.js.map +1 -0
- package/dist/kernel/audit/verify.d.ts +22 -0
- package/dist/kernel/audit/verify.d.ts.map +1 -0
- package/dist/kernel/audit/verify.js +96 -0
- package/dist/kernel/audit/verify.js.map +1 -0
- package/dist/kernel/audit/writer.d.ts +85 -0
- package/dist/kernel/audit/writer.d.ts.map +1 -0
- package/dist/kernel/audit/writer.js +255 -0
- package/dist/kernel/audit/writer.js.map +1 -0
- package/dist/kernel/config/env.d.ts +119 -0
- package/dist/kernel/config/env.d.ts.map +1 -0
- package/dist/kernel/config/env.js +173 -0
- package/dist/kernel/config/env.js.map +1 -0
- package/dist/kernel/config/load.d.ts +51 -0
- package/dist/kernel/config/load.d.ts.map +1 -0
- package/dist/kernel/config/load.js +102 -0
- package/dist/kernel/config/load.js.map +1 -0
- package/dist/kernel/coordination/memory.d.ts +20 -0
- package/dist/kernel/coordination/memory.d.ts.map +1 -0
- package/dist/kernel/coordination/memory.js +92 -0
- package/dist/kernel/coordination/memory.js.map +1 -0
- package/dist/kernel/coordination/postgres.d.ts +47 -0
- package/dist/kernel/coordination/postgres.d.ts.map +1 -0
- package/dist/kernel/coordination/postgres.js +111 -0
- package/dist/kernel/coordination/postgres.js.map +1 -0
- package/dist/kernel/coordination/types.d.ts +37 -0
- package/dist/kernel/coordination/types.d.ts.map +1 -0
- package/dist/kernel/coordination/types.js +2 -0
- package/dist/kernel/coordination/types.js.map +1 -0
- package/dist/kernel/coordination/wait.d.ts +4 -0
- package/dist/kernel/coordination/wait.d.ts.map +1 -0
- package/dist/kernel/coordination/wait.js +38 -0
- package/dist/kernel/coordination/wait.js.map +1 -0
- package/dist/kernel/db/columns.d.ts +25 -0
- package/dist/kernel/db/columns.d.ts.map +1 -0
- package/dist/kernel/db/columns.js +32 -0
- package/dist/kernel/db/columns.js.map +1 -0
- package/dist/kernel/db/empty-in-plugin.d.ts +7 -0
- package/dist/kernel/db/empty-in-plugin.d.ts.map +1 -0
- package/dist/kernel/db/empty-in-plugin.js +28 -0
- package/dist/kernel/db/empty-in-plugin.js.map +1 -0
- package/dist/kernel/db/index.d.ts +67 -0
- package/dist/kernel/db/index.d.ts.map +1 -0
- package/dist/kernel/db/index.js +72 -0
- package/dist/kernel/db/index.js.map +1 -0
- package/dist/kernel/db/migrations/audit/0006_audit.d.ts +7 -0
- package/dist/kernel/db/migrations/audit/0006_audit.d.ts.map +1 -0
- package/dist/kernel/db/migrations/audit/0006_audit.js +125 -0
- package/dist/kernel/db/migrations/audit/0006_audit.js.map +1 -0
- package/dist/kernel/db/migrations/audit/0007_metrics.d.ts +6 -0
- package/dist/kernel/db/migrations/audit/0007_metrics.d.ts.map +1 -0
- package/dist/kernel/db/migrations/audit/0007_metrics.js +38 -0
- package/dist/kernel/db/migrations/audit/0007_metrics.js.map +1 -0
- package/dist/kernel/db/migrations/index.d.ts +10 -0
- package/dist/kernel/db/migrations/index.d.ts.map +1 -0
- package/dist/kernel/db/migrations/index.js +15 -0
- package/dist/kernel/db/migrations/index.js.map +1 -0
- package/dist/kernel/db/migrations/main/0001_core.d.ts +4 -0
- package/dist/kernel/db/migrations/main/0001_core.d.ts.map +1 -0
- package/dist/kernel/db/migrations/main/0001_core.js +178 -0
- package/dist/kernel/db/migrations/main/0001_core.js.map +1 -0
- package/dist/kernel/db/migrations/main/0002_servers.d.ts +4 -0
- package/dist/kernel/db/migrations/main/0002_servers.d.ts.map +1 -0
- package/dist/kernel/db/migrations/main/0002_servers.js +240 -0
- package/dist/kernel/db/migrations/main/0002_servers.js.map +1 -0
- package/dist/kernel/db/migrations/main/0003_auth.d.ts +4 -0
- package/dist/kernel/db/migrations/main/0003_auth.d.ts.map +1 -0
- package/dist/kernel/db/migrations/main/0003_auth.js +125 -0
- package/dist/kernel/db/migrations/main/0003_auth.js.map +1 -0
- package/dist/kernel/db/migrations/main/0004_ops.d.ts +4 -0
- package/dist/kernel/db/migrations/main/0004_ops.d.ts.map +1 -0
- package/dist/kernel/db/migrations/main/0004_ops.js +196 -0
- package/dist/kernel/db/migrations/main/0004_ops.js.map +1 -0
- package/dist/kernel/db/migrations/main/0005_evals.d.ts +4 -0
- package/dist/kernel/db/migrations/main/0005_evals.d.ts.map +1 -0
- package/dist/kernel/db/migrations/main/0005_evals.js +117 -0
- package/dist/kernel/db/migrations/main/0005_evals.js.map +1 -0
- package/dist/kernel/db/migrations/types.d.ts +17 -0
- package/dist/kernel/db/migrations/types.d.ts.map +1 -0
- package/dist/kernel/db/migrations/types.js +7 -0
- package/dist/kernel/db/migrations/types.js.map +1 -0
- package/dist/kernel/db/migrator.d.ts +29 -0
- package/dist/kernel/db/migrator.d.ts.map +1 -0
- package/dist/kernel/db/migrator.js +64 -0
- package/dist/kernel/db/migrator.js.map +1 -0
- package/dist/kernel/db/postgres.d.ts +35 -0
- package/dist/kernel/db/postgres.d.ts.map +1 -0
- package/dist/kernel/db/postgres.js +44 -0
- package/dist/kernel/db/postgres.js.map +1 -0
- package/dist/kernel/db/schema.d.ts +936 -0
- package/dist/kernel/db/schema.d.ts.map +1 -0
- package/dist/kernel/db/schema.js +61 -0
- package/dist/kernel/db/schema.js.map +1 -0
- package/dist/kernel/db/sqlite.d.ts +20 -0
- package/dist/kernel/db/sqlite.d.ts.map +1 -0
- package/dist/kernel/db/sqlite.js +31 -0
- package/dist/kernel/db/sqlite.js.map +1 -0
- package/dist/kernel/db/tools-fts.d.ts +11 -0
- package/dist/kernel/db/tools-fts.d.ts.map +1 -0
- package/dist/kernel/db/tools-fts.js +17 -0
- package/dist/kernel/db/tools-fts.js.map +1 -0
- package/dist/kernel/db/url.d.ts +17 -0
- package/dist/kernel/db/url.d.ts.map +1 -0
- package/dist/kernel/db/url.js +30 -0
- package/dist/kernel/db/url.js.map +1 -0
- package/dist/kernel/jobs/jobs.service.d.ts +24 -0
- package/dist/kernel/jobs/jobs.service.d.ts.map +1 -0
- package/dist/kernel/jobs/jobs.service.js +65 -0
- package/dist/kernel/jobs/jobs.service.js.map +1 -0
- package/dist/kernel/jobs/scheduler.d.ts +34 -0
- package/dist/kernel/jobs/scheduler.d.ts.map +1 -0
- package/dist/kernel/jobs/scheduler.js +70 -0
- package/dist/kernel/jobs/scheduler.js.map +1 -0
- package/dist/kernel/lib/clock.d.ts +11 -0
- package/dist/kernel/lib/clock.d.ts.map +1 -0
- package/dist/kernel/lib/clock.js +15 -0
- package/dist/kernel/lib/clock.js.map +1 -0
- package/dist/kernel/lib/crypto.d.ts +12 -0
- package/dist/kernel/lib/crypto.d.ts.map +1 -0
- package/dist/kernel/lib/crypto.js +48 -0
- package/dist/kernel/lib/crypto.js.map +1 -0
- package/dist/kernel/lib/errors.d.ts +29 -0
- package/dist/kernel/lib/errors.d.ts.map +1 -0
- package/dist/kernel/lib/errors.js +40 -0
- package/dist/kernel/lib/errors.js.map +1 -0
- package/dist/kernel/lib/histogram.d.ts +28 -0
- package/dist/kernel/lib/histogram.d.ts.map +1 -0
- package/dist/kernel/lib/histogram.js +70 -0
- package/dist/kernel/lib/histogram.js.map +1 -0
- package/dist/kernel/lib/ids.d.ts +3 -0
- package/dist/kernel/lib/ids.d.ts.map +1 -0
- package/dist/kernel/lib/ids.js +6 -0
- package/dist/kernel/lib/ids.js.map +1 -0
- package/dist/kernel/lib/jcs.d.ts +5 -0
- package/dist/kernel/lib/jcs.d.ts.map +1 -0
- package/dist/kernel/lib/jcs.js +14 -0
- package/dist/kernel/lib/jcs.js.map +1 -0
- package/dist/kernel/lib/json.d.ts +9 -0
- package/dist/kernel/lib/json.d.ts.map +1 -0
- package/dist/kernel/lib/json.js +21 -0
- package/dist/kernel/lib/json.js.map +1 -0
- package/dist/kernel/lib/keyset.d.ts +25 -0
- package/dist/kernel/lib/keyset.d.ts.map +1 -0
- package/dist/kernel/lib/keyset.js +36 -0
- package/dist/kernel/lib/keyset.js.map +1 -0
- package/dist/kernel/lib/logger.d.ts +12 -0
- package/dist/kernel/lib/logger.d.ts.map +1 -0
- package/dist/kernel/lib/logger.js +41 -0
- package/dist/kernel/lib/logger.js.map +1 -0
- package/dist/kernel/lib/net/safe-fetch.d.ts +36 -0
- package/dist/kernel/lib/net/safe-fetch.d.ts.map +1 -0
- package/dist/kernel/lib/net/safe-fetch.js +106 -0
- package/dist/kernel/lib/net/safe-fetch.js.map +1 -0
- package/dist/kernel/lib/net/ssrf-guard.d.ts +30 -0
- package/dist/kernel/lib/net/ssrf-guard.d.ts.map +1 -0
- package/dist/kernel/lib/net/ssrf-guard.js +78 -0
- package/dist/kernel/lib/net/ssrf-guard.js.map +1 -0
- package/dist/kernel/lib/pagination.d.ts +14 -0
- package/dist/kernel/lib/pagination.d.ts.map +1 -0
- package/dist/kernel/lib/pagination.js +40 -0
- package/dist/kernel/lib/pagination.js.map +1 -0
- package/dist/kernel/observability/metrics.d.ts +53 -0
- package/dist/kernel/observability/metrics.d.ts.map +1 -0
- package/dist/kernel/observability/metrics.js +95 -0
- package/dist/kernel/observability/metrics.js.map +1 -0
- package/dist/kernel/observability/tracing.d.ts +32 -0
- package/dist/kernel/observability/tracing.d.ts.map +1 -0
- package/dist/kernel/observability/tracing.js +116 -0
- package/dist/kernel/observability/tracing.js.map +1 -0
- package/dist/kernel/principal.d.ts +16 -0
- package/dist/kernel/principal.d.ts.map +1 -0
- package/dist/kernel/principal.js +9 -0
- package/dist/kernel/principal.js.map +1 -0
- package/dist/kernel/runtime-config.d.ts +194 -0
- package/dist/kernel/runtime-config.d.ts.map +1 -0
- package/dist/kernel/runtime-config.js +192 -0
- package/dist/kernel/runtime-config.js.map +1 -0
- package/dist/kernel/secrets/builtin.provider.d.ts +26 -0
- package/dist/kernel/secrets/builtin.provider.d.ts.map +1 -0
- package/dist/kernel/secrets/builtin.provider.js +65 -0
- package/dist/kernel/secrets/builtin.provider.js.map +1 -0
- package/dist/kernel/secrets/envelope.d.ts +16 -0
- package/dist/kernel/secrets/envelope.d.ts.map +1 -0
- package/dist/kernel/secrets/envelope.js +44 -0
- package/dist/kernel/secrets/envelope.js.map +1 -0
- package/dist/kernel/secrets/envelope.service.d.ts +38 -0
- package/dist/kernel/secrets/envelope.service.d.ts.map +1 -0
- package/dist/kernel/secrets/envelope.service.js +86 -0
- package/dist/kernel/secrets/envelope.service.js.map +1 -0
- package/dist/kernel/secrets/keyring.d.ts +30 -0
- package/dist/kernel/secrets/keyring.d.ts.map +1 -0
- package/dist/kernel/secrets/keyring.js +32 -0
- package/dist/kernel/secrets/keyring.js.map +1 -0
- package/dist/kernel/secrets/named-secrets.d.ts +33 -0
- package/dist/kernel/secrets/named-secrets.d.ts.map +1 -0
- package/dist/kernel/secrets/named-secrets.js +63 -0
- package/dist/kernel/secrets/named-secrets.js.map +1 -0
- package/dist/kernel/secrets/provider.d.ts +17 -0
- package/dist/kernel/secrets/provider.d.ts.map +1 -0
- package/dist/kernel/secrets/provider.js +2 -0
- package/dist/kernel/secrets/provider.js.map +1 -0
- package/dist/kernel/secrets/rotation.d.ts +25 -0
- package/dist/kernel/secrets/rotation.d.ts.map +1 -0
- package/dist/kernel/secrets/rotation.js +32 -0
- package/dist/kernel/secrets/rotation.js.map +1 -0
- package/dist/kernel/settings/settings.service.d.ts +98 -0
- package/dist/kernel/settings/settings.service.d.ts.map +1 -0
- package/dist/kernel/settings/settings.service.js +92 -0
- package/dist/kernel/settings/settings.service.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +39 -0
- package/dist/main.js.map +1 -0
- package/dist/routes.d.ts +5 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +58 -0
- package/dist/routes.js.map +1 -0
- package/dist/scripts/fetch-model.d.ts +2 -0
- package/dist/scripts/fetch-model.d.ts.map +1 -0
- package/dist/scripts/fetch-model.js +34 -0
- package/dist/scripts/fetch-model.js.map +1 -0
- package/dist/scripts/gen-schema.d.ts +2 -0
- package/dist/scripts/gen-schema.d.ts.map +1 -0
- package/dist/scripts/gen-schema.js +71 -0
- package/dist/scripts/gen-schema.js.map +1 -0
- package/dist/scripts/keys.d.ts +2 -0
- package/dist/scripts/keys.d.ts.map +1 -0
- package/dist/scripts/keys.js +24 -0
- package/dist/scripts/keys.js.map +1 -0
- package/dist/scripts/migrate.d.ts +2 -0
- package/dist/scripts/migrate.d.ts.map +1 -0
- package/dist/scripts/migrate.js +45 -0
- package/dist/scripts/migrate.js.map +1 -0
- package/dist/server.d.ts +30 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +129 -0
- package/dist/server.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +13 -0
- package/dist/version.js.map +1 -0
- package/dist/web/static.d.ts +30 -0
- package/dist/web/static.d.ts.map +1 -0
- package/dist/web/static.js +65 -0
- package/dist/web/static.js.map +1 -0
- package/package.json +106 -4
- package/web-dist/assets/CompositeItem-B2Bd2eM-.js +2 -0
- package/web-dist/assets/CompositeItem-B2Bd2eM-.js.map +1 -0
- package/web-dist/assets/DialogRoot-h0udFiba.js +2 -0
- package/web-dist/assets/DialogRoot-h0udFiba.js.map +1 -0
- package/web-dist/assets/DialogTitle-fTXvJGbH.js +2 -0
- package/web-dist/assets/DialogTitle-fTXvJGbH.js.map +1 -0
- package/web-dist/assets/DirectionContext-CRBE3EOa.js +2 -0
- package/web-dist/assets/DirectionContext-CRBE3EOa.js.map +1 -0
- package/web-dist/assets/FieldItemContext-B4r08RkZ.js +2 -0
- package/web-dist/assets/FieldItemContext-B4r08RkZ.js.map +1 -0
- package/web-dist/assets/FloatingPortal-D_eDEbvZ.js +2 -0
- package/web-dist/assets/FloatingPortal-D_eDEbvZ.js.map +1 -0
- package/web-dist/assets/FloatingPortalLite-DWlDzoqv.js +2 -0
- package/web-dist/assets/FloatingPortalLite-DWlDzoqv.js.map +1 -0
- package/web-dist/assets/Separator-DDDyVkeP.js +2 -0
- package/web-dist/assets/Separator-DDDyVkeP.js.map +1 -0
- package/web-dist/assets/_app-BY6-IpyI.js +2 -0
- package/web-dist/assets/_app-BY6-IpyI.js.map +1 -0
- package/web-dist/assets/_app-Ba10rJVa.js +2 -0
- package/web-dist/assets/_app-Ba10rJVa.js.map +1 -0
- package/web-dist/assets/_app-Bv2dBVot.js +2 -0
- package/web-dist/assets/_app-Bv2dBVot.js.map +1 -0
- package/web-dist/assets/_groupId-ENiG99V5.js +2 -0
- package/web-dist/assets/_groupId-ENiG99V5.js.map +1 -0
- package/web-dist/assets/_issueId-CAHjIiZ8.js +2 -0
- package/web-dist/assets/_issueId-CAHjIiZ8.js.map +1 -0
- package/web-dist/assets/_runId-XmmZmpWa.js +4 -0
- package/web-dist/assets/_runId-XmmZmpWa.js.map +1 -0
- package/web-dist/assets/_serverId-C9y6ztaL.js +2 -0
- package/web-dist/assets/_serverId-C9y6ztaL.js.map +1 -0
- package/web-dist/assets/_taskId-D8fVBV_H.js +2 -0
- package/web-dist/assets/_taskId-D8fVBV_H.js.map +1 -0
- package/web-dist/assets/_toolId-CnbF7zls.js +6 -0
- package/web-dist/assets/_toolId-CnbF7zls.js.map +1 -0
- package/web-dist/assets/alert-OPOFnW2X.js +2 -0
- package/web-dist/assets/alert-OPOFnW2X.js.map +1 -0
- package/web-dist/assets/api-client-CnTzbAbK.js +56 -0
- package/web-dist/assets/api-client-CnTzbAbK.js.map +1 -0
- package/web-dist/assets/appearance-D7nZLK7y.js +2 -0
- package/web-dist/assets/appearance-D7nZLK7y.js.map +1 -0
- package/web-dist/assets/arrow-up-Dop2Zfy9.js +2 -0
- package/web-dist/assets/arrow-up-Dop2Zfy9.js.map +1 -0
- package/web-dist/assets/audit-Cws4Sb1Z.js +2 -0
- package/web-dist/assets/audit-Cws4Sb1Z.js.map +1 -0
- package/web-dist/assets/button-0-kx6BS-.js +2 -0
- package/web-dist/assets/button-0-kx6BS-.js.map +1 -0
- package/web-dist/assets/card-bOMGzWND.js +2 -0
- package/web-dist/assets/card-bOMGzWND.js.map +1 -0
- package/web-dist/assets/chevron-right-jlmAjiMj.js +2 -0
- package/web-dist/assets/chevron-right-jlmAjiMj.js.map +1 -0
- package/web-dist/assets/client-snippet-DyzxqQDv.js +2 -0
- package/web-dist/assets/client-snippet-DyzxqQDv.js.map +1 -0
- package/web-dist/assets/code-view-Dp3S3g6k.js +4 -0
- package/web-dist/assets/code-view-Dp3S3g6k.js.map +1 -0
- package/web-dist/assets/compare-CHKwYuEP.js +2 -0
- package/web-dist/assets/compare-CHKwYuEP.js.map +1 -0
- package/web-dist/assets/components-CNkWqS3X.js +2 -0
- package/web-dist/assets/components-CNkWqS3X.js.map +1 -0
- package/web-dist/assets/components-DYbjYUzw.js +2 -0
- package/web-dist/assets/components-DYbjYUzw.js.map +1 -0
- package/web-dist/assets/composite-Bfwhy6qy.js +2 -0
- package/web-dist/assets/composite-Bfwhy6qy.js.map +1 -0
- package/web-dist/assets/confirm-dialog-BY5FJuQC.js +2 -0
- package/web-dist/assets/confirm-dialog-BY5FJuQC.js.map +1 -0
- package/web-dist/assets/connect-DEWuCUqH.js +2 -0
- package/web-dist/assets/connect-DEWuCUqH.js.map +1 -0
- package/web-dist/assets/core-CveQFPAO.js +13 -0
- package/web-dist/assets/core-CveQFPAO.js.map +1 -0
- package/web-dist/assets/create-key-dialog-DbtnDlv9.js +3 -0
- package/web-dist/assets/create-key-dialog-DbtnDlv9.js.map +1 -0
- package/web-dist/assets/createLucideIcon-4wkYGrAu.js +2 -0
- package/web-dist/assets/createLucideIcon-4wkYGrAu.js.map +1 -0
- package/web-dist/assets/crumbs-CFOzyevD.js +2 -0
- package/web-dist/assets/crumbs-CFOzyevD.js.map +1 -0
- package/web-dist/assets/data-table-DL8nsehq.js +2 -0
- package/web-dist/assets/data-table-DL8nsehq.js.map +1 -0
- package/web-dist/assets/download-BJL2mMMG.js +2 -0
- package/web-dist/assets/download-BJL2mMMG.js.map +1 -0
- package/web-dist/assets/download-Ct9K1Blk.js +2 -0
- package/web-dist/assets/download-Ct9K1Blk.js.map +1 -0
- package/web-dist/assets/draft-bar-DQo326FN.js +2 -0
- package/web-dist/assets/draft-bar-DQo326FN.js.map +1 -0
- package/web-dist/assets/engine-javascript-C30F4iNc.js +142 -0
- package/web-dist/assets/engine-javascript-C30F4iNc.js.map +1 -0
- package/web-dist/assets/env-summary-C8OSGAi1.js +2 -0
- package/web-dist/assets/env-summary-C8OSGAi1.js.map +1 -0
- package/web-dist/assets/environments-xDHrvcC0.js +2 -0
- package/web-dist/assets/environments-xDHrvcC0.js.map +1 -0
- package/web-dist/assets/evals-D103yj9M.js +2 -0
- package/web-dist/assets/evals-D103yj9M.js.map +1 -0
- package/web-dist/assets/file-drop-BUz7NVu0.js +2 -0
- package/web-dist/assets/file-drop-BUz7NVu0.js.map +1 -0
- package/web-dist/assets/file-text-BzSWwAXx.js +2 -0
- package/web-dist/assets/file-text-BzSWwAXx.js.map +1 -0
- package/web-dist/assets/file-up-DhxoycHf.js +2 -0
- package/web-dist/assets/file-up-DhxoycHf.js.map +1 -0
- package/web-dist/assets/gauge-DB20Sf_v.js +2 -0
- package/web-dist/assets/gauge-DB20Sf_v.js.map +1 -0
- package/web-dist/assets/github-dark-default-DXG-b-1a.js +2 -0
- package/web-dist/assets/github-dark-default-DXG-b-1a.js.map +1 -0
- package/web-dist/assets/github-light-default-BXViO-2h.js +2 -0
- package/web-dist/assets/github-light-default-BXViO-2h.js.map +1 -0
- package/web-dist/assets/graphql-CSsyTQ1B.js +2 -0
- package/web-dist/assets/graphql-CSsyTQ1B.js.map +1 -0
- package/web-dist/assets/inbox--axfoemS.js +2 -0
- package/web-dist/assets/inbox--axfoemS.js.map +1 -0
- package/web-dist/assets/inbox-Bg9XxN9I.js +2 -0
- package/web-dist/assets/inbox-Bg9XxN9I.js.map +1 -0
- package/web-dist/assets/index-CI-LmJP7.css +2 -0
- package/web-dist/assets/index-EqRZkjd6.js +17 -0
- package/web-dist/assets/index-EqRZkjd6.js.map +1 -0
- package/web-dist/assets/inertValue-BEKHztUQ.js +2 -0
- package/web-dist/assets/inertValue-BEKHztUQ.js.map +1 -0
- package/web-dist/assets/json-qhed-kSA.js +2 -0
- package/web-dist/assets/json-qhed-kSA.js.map +1 -0
- package/web-dist/assets/json-viewer-DFAY-JaC.js +2 -0
- package/web-dist/assets/json-viewer-DFAY-JaC.js.map +1 -0
- package/web-dist/assets/key-round-CPrc1zQr.js +2 -0
- package/web-dist/assets/key-round-CPrc1zQr.js.map +1 -0
- package/web-dist/assets/keys-D2H6bYnB.js +2 -0
- package/web-dist/assets/keys-D2H6bYnB.js.map +1 -0
- package/web-dist/assets/labels-B8sf8Hg_.js +2 -0
- package/web-dist/assets/labels-B8sf8Hg_.js.map +1 -0
- package/web-dist/assets/link-CByMaQfX.js +3 -0
- package/web-dist/assets/link-CByMaQfX.js.map +1 -0
- package/web-dist/assets/link-tabs-C06q3Y1p.js +2 -0
- package/web-dist/assets/link-tabs-C06q3Y1p.js.map +1 -0
- package/web-dist/assets/link-xDlPECzC.js +2 -0
- package/web-dist/assets/link-xDlPECzC.js.map +1 -0
- package/web-dist/assets/list-tree-Cq6aoA_B.js +2 -0
- package/web-dist/assets/list-tree-Cq6aoA_B.js.map +1 -0
- package/web-dist/assets/logged-out-Cia2QO9r.js +2 -0
- package/web-dist/assets/logged-out-Cia2QO9r.js.map +1 -0
- package/web-dist/assets/login-DgDPuB_V.js +2 -0
- package/web-dist/assets/login-DgDPuB_V.js.map +1 -0
- package/web-dist/assets/mode-recommendation-DoHGuZUm.js +2 -0
- package/web-dist/assets/mode-recommendation-DoHGuZUm.js.map +1 -0
- package/web-dist/assets/models-DPi2Bzvy.js +2 -0
- package/web-dist/assets/models-DPi2Bzvy.js.map +1 -0
- package/web-dist/assets/navigation-Crt8lW1m.js +2 -0
- package/web-dist/assets/navigation-Crt8lW1m.js.map +1 -0
- package/web-dist/assets/new-Ccw0Hlfl.js +5 -0
- package/web-dist/assets/new-Ccw0Hlfl.js.map +1 -0
- package/web-dist/assets/overlay-C_UeOJOw.js +2 -0
- package/web-dist/assets/overlay-C_UeOJOw.js.map +1 -0
- package/web-dist/assets/page-header-CHk7bso7.js +2 -0
- package/web-dist/assets/page-header-CHk7bso7.js.map +1 -0
- package/web-dist/assets/permissions-Bf3wb1Jv.js +2 -0
- package/web-dist/assets/permissions-Bf3wb1Jv.js.map +1 -0
- package/web-dist/assets/plug-CrM5MZO2.js +2 -0
- package/web-dist/assets/plug-CrM5MZO2.js.map +1 -0
- package/web-dist/assets/plus-C6_H380k.js +2 -0
- package/web-dist/assets/plus-C6_H380k.js.map +1 -0
- package/web-dist/assets/progress-DaZnZarb.js +2 -0
- package/web-dist/assets/progress-DaZnZarb.js.map +1 -0
- package/web-dist/assets/python-gzcpVVnB.js +2 -0
- package/web-dist/assets/python-gzcpVVnB.js.map +1 -0
- package/web-dist/assets/queries-3DiENdpp.js +2 -0
- package/web-dist/assets/queries-3DiENdpp.js.map +1 -0
- package/web-dist/assets/queries-CJD0QpGi.js +2 -0
- package/web-dist/assets/queries-CJD0QpGi.js.map +1 -0
- package/web-dist/assets/queries-CaU3gifI.js +2 -0
- package/web-dist/assets/queries-CaU3gifI.js.map +1 -0
- package/web-dist/assets/queries-DOMFJPBg.js +2 -0
- package/web-dist/assets/queries-DOMFJPBg.js.map +1 -0
- package/web-dist/assets/queries-DzYj_ZKK.js +2 -0
- package/web-dist/assets/queries-DzYj_ZKK.js.map +1 -0
- package/web-dist/assets/queries-O4X2594T.js +2 -0
- package/web-dist/assets/queries-O4X2594T.js.map +1 -0
- package/web-dist/assets/queries-iauKjcDt.js +2 -0
- package/web-dist/assets/queries-iauKjcDt.js.map +1 -0
- package/web-dist/assets/queries-yxFwGLDb.js +2 -0
- package/web-dist/assets/queries-yxFwGLDb.js.map +1 -0
- package/web-dist/assets/reason-parts-B6nt3n-F.js +2 -0
- package/web-dist/assets/reason-parts-B6nt3n-F.js.map +1 -0
- package/web-dist/assets/redirect-B4OxYbs2.js +2 -0
- package/web-dist/assets/redirect-B4OxYbs2.js.map +1 -0
- package/web-dist/assets/refresh-cw-Dk41furN.js +2 -0
- package/web-dist/assets/refresh-cw-Dk41furN.js.map +1 -0
- package/web-dist/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/web-dist/assets/route-Ba10rJVa.js +2 -0
- package/web-dist/assets/route-Ba10rJVa.js.map +1 -0
- package/web-dist/assets/route-DFvqBlRc.js +2 -0
- package/web-dist/assets/route-DFvqBlRc.js.map +1 -0
- package/web-dist/assets/score-ring-D3Ff8hXt.js +2 -0
- package/web-dist/assets/score-ring-D3Ff8hXt.js.map +1 -0
- package/web-dist/assets/section-Bq1blJ9c.js +2 -0
- package/web-dist/assets/section-Bq1blJ9c.js.map +1 -0
- package/web-dist/assets/segmented-RsFdV9xJ.js +2 -0
- package/web-dist/assets/segmented-RsFdV9xJ.js.map +1 -0
- package/web-dist/assets/separator-CcxDVEHH.js +2 -0
- package/web-dist/assets/separator-CcxDVEHH.js.map +1 -0
- package/web-dist/assets/server-BvD6BIlz.js +2 -0
- package/web-dist/assets/server-BvD6BIlz.js.map +1 -0
- package/web-dist/assets/server-switcher-hOm8Popx.js +2 -0
- package/web-dist/assets/server-switcher-hOm8Popx.js.map +1 -0
- package/web-dist/assets/servers-DBjU_qiZ.js +2 -0
- package/web-dist/assets/servers-DBjU_qiZ.js.map +1 -0
- package/web-dist/assets/settings-DCmODejD.js +2 -0
- package/web-dist/assets/settings-DCmODejD.js.map +1 -0
- package/web-dist/assets/settings-zp4uTZ2u.js +2 -0
- package/web-dist/assets/settings-zp4uTZ2u.js.map +1 -0
- package/web-dist/assets/sheet-CZ77BIgN.js +2 -0
- package/web-dist/assets/sheet-CZ77BIgN.js.map +1 -0
- package/web-dist/assets/skeleton-CuU6NqIG.js +2 -0
- package/web-dist/assets/skeleton-CuU6NqIG.js.map +1 -0
- package/web-dist/assets/sparkles-DMF5S9tx.js +2 -0
- package/web-dist/assets/sparkles-DMF5S9tx.js.map +1 -0
- package/web-dist/assets/spec-Bhk7L9IF.js +2 -0
- package/web-dist/assets/spec-Bhk7L9IF.js.map +1 -0
- package/web-dist/assets/spinner-BLf8_Ajk.js +2 -0
- package/web-dist/assets/spinner-BLf8_Ajk.js.map +1 -0
- package/web-dist/assets/states-Z2xH3pUB.js +2 -0
- package/web-dist/assets/states-Z2xH3pUB.js.map +1 -0
- package/web-dist/assets/storage-CuUK35fn.js +2 -0
- package/web-dist/assets/storage-CuUK35fn.js.map +1 -0
- package/web-dist/assets/store-SrwTVjPk.js +2 -0
- package/web-dist/assets/store-SrwTVjPk.js.map +1 -0
- package/web-dist/assets/switch-C_lbqEIt.js +2 -0
- package/web-dist/assets/switch-C_lbqEIt.js.map +1 -0
- package/web-dist/assets/tasks-CRKt_Suy.js +2 -0
- package/web-dist/assets/tasks-CRKt_Suy.js.map +1 -0
- package/web-dist/assets/timeline-Cye1s7g_.js +2 -0
- package/web-dist/assets/timeline-Cye1s7g_.js.map +1 -0
- package/web-dist/assets/tools-C5I1npEn.js +2 -0
- package/web-dist/assets/tools-C5I1npEn.js.map +1 -0
- package/web-dist/assets/tooltip--tDonqxM.js +2 -0
- package/web-dist/assets/tooltip--tDonqxM.js.map +1 -0
- package/web-dist/assets/use-cursor-stack-DIOApcfL.js +2 -0
- package/web-dist/assets/use-cursor-stack-DIOApcfL.js.map +1 -0
- package/web-dist/assets/use-debounced-value-CSowsQHr.js +2 -0
- package/web-dist/assets/use-debounced-value-CSowsQHr.js.map +1 -0
- package/web-dist/assets/use-min-width-b55txtG6.js +2 -0
- package/web-dist/assets/use-min-width-b55txtG6.js.map +1 -0
- package/web-dist/assets/use-mobile-R850ZQZG.js +2 -0
- package/web-dist/assets/use-mobile-R850ZQZG.js.map +1 -0
- package/web-dist/assets/useAriaLabelledBy-DjHYrmeF.js +2 -0
- package/web-dist/assets/useAriaLabelledBy-DjHYrmeF.js.map +1 -0
- package/web-dist/assets/useBaseQuery-BoQjiPOp.js +2 -0
- package/web-dist/assets/useBaseQuery-BoQjiPOp.js.map +1 -0
- package/web-dist/assets/useBaseUiId-BUBV7JiZ.js +2 -0
- package/web-dist/assets/useBaseUiId-BUBV7JiZ.js.map +1 -0
- package/web-dist/assets/useButton-DQ6Sgg7h.js +2 -0
- package/web-dist/assets/useButton-DQ6Sgg7h.js.map +1 -0
- package/web-dist/assets/useControlled-B9BFcdfh.js +2 -0
- package/web-dist/assets/useControlled-B9BFcdfh.js.map +1 -0
- package/web-dist/assets/useNavigate-CrwlTILa.js +2 -0
- package/web-dist/assets/useNavigate-CrwlTILa.js.map +1 -0
- package/web-dist/assets/useOpenChangeComplete-DUM-_E2z.js +2 -0
- package/web-dist/assets/useOpenChangeComplete-DUM-_E2z.js.map +1 -0
- package/web-dist/assets/usePositioner-BQnDdcQL.js +2 -0
- package/web-dist/assets/usePositioner-BQnDdcQL.js.map +1 -0
- package/web-dist/assets/useQuery-BkgWvtTa.js +2 -0
- package/web-dist/assets/useQuery-BkgWvtTa.js.map +1 -0
- package/web-dist/assets/useRegisterFieldControl-DuodOtnM.js +2 -0
- package/web-dist/assets/useRegisterFieldControl-DuodOtnM.js.map +1 -0
- package/web-dist/assets/useRouterState-DeGPqG1m.js +2 -0
- package/web-dist/assets/useRouterState-DeGPqG1m.js.map +1 -0
- package/web-dist/assets/useScrollLock-BWBVawYJ.js +2 -0
- package/web-dist/assets/useScrollLock-BWBVawYJ.js.map +1 -0
- package/web-dist/assets/useTimeout-SGSgaiy1.js +2 -0
- package/web-dist/assets/useTimeout-SGSgaiy1.js.map +1 -0
- package/web-dist/assets/useTransitionStatus-Dy_zd4z2.js +2 -0
- package/web-dist/assets/useTransitionStatus-Dy_zd4z2.js.map +1 -0
- package/web-dist/assets/useTriggerFocusGuards-9VjGYE1p.js +2 -0
- package/web-dist/assets/useTriggerFocusGuards-9VjGYE1p.js.map +1 -0
- package/web-dist/assets/useValueChanged-BqSvidps.js +2 -0
- package/web-dist/assets/useValueChanged-BqSvidps.js.map +1 -0
- package/web-dist/assets/utils-BFSetRo1.js +2 -0
- package/web-dist/assets/utils-BFSetRo1.js.map +1 -0
- package/web-dist/assets/wrench-CIdGHcvJ.js +2 -0
- package/web-dist/assets/wrench-CIdGHcvJ.js.map +1 -0
- package/web-dist/assets/x-5OcgPlDp.js +2 -0
- package/web-dist/assets/x-5OcgPlDp.js.map +1 -0
- package/web-dist/assets/yaml-rwi0_p6S.js +2 -0
- package/web-dist/assets/yaml-rwi0_p6S.js.map +1 -0
- package/web-dist/favicon.svg +1 -0
- package/web-dist/index.html +55 -0
- package/web-dist/theme-init.js +44 -0
- package/README.md +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-SrwTVjPk.js","names":["TransitionStatusDataAttributes.startingStyle","TransitionStatusDataAttributes.endingStyle","CommonTriggerDataAttributes.popupOpen","CommonTriggerDataAttributes.pressed","CommonPopupDataAttributes.open","CommonPopupDataAttributes.closed","CommonPopupDataAttributes.anchorHidden","platform.os.android","platform.env.jsdom","outsidePress","REASONS.triggerPress","escapeKey","REASONS.escapeKey","platform.engine.webkit","REASONS.outsidePress","REASONS.triggerHover","REASONS.none","__toESM","require_react","require_jsx_runtime","require_react_dom","startingStyle$1","endingStyle$1","transitionStatusMapping","useOpenChangeComplete","contains","getTarget","EMPTY_OBJECT","useIsoLayoutEffect","useRefWithInit","useStableCallback","isHTMLElement","getParentNode","getComputedStyle","isShadowRoot","isLastTraversableNode","isElement","createChangeEventDetails","useForcedRerendering","outsidePress","triggerPress","triggerHover","escapeKey","none","useId","addEventListener","jsdom","mergeCleanups","webkit","android","popupOpen","FOCUSABLE_ATTRIBUTE","isRootElement","ReactStore","ownerDocument","isEventTargetWithin","createAttribute","useTimeout","Timeout","useTransitionStatus","open","closed","startingStyle","endingStyle","anchorHidden","TRIGGER_HOOK","PRESSABLE_TRIGGER_HOOK","pressed","POPUP_OPEN_HOOK","POPUP_CLOSED_HOOK","ANCHOR_HIDDEN_HOOK","triggerOpenStateMapping","value","pressableTriggerOpenStateMapping","popupStateMapping","popupTransitionStateMapping","import_react","import_jsx_runtime","getNodeChildren","nodes","node","id","onlyOpenChildren","child","getNodeAncestors","allAncestors","currentParentId","currentNode","stopEvent","event","isReactEvent","isVirtualClick","isVirtualPointerEvent","isMouseLikePointerType","values","strict","pointerType","isClickLikeEvent","type","useValueAsRef","latest","createLatestRef","createEventEmitter","map","listener","data","FloatingTreeStore","index","n","FloatingNodeContext","FloatingTreeContext","useFloatingParentNodeId","useFloatingTree","contextTree","externalTree","useFloatingNodeId","tree","parentId","FloatingNode","props","FloatingTree","alwaysFalse","normalizeProp","normalizable","useDismiss","escapeKey$1","outsidePressProp","store","floatingElement","outsidePressFn","outsidePress$1","outsidePressEnabled","getOutsidePressEventProp","outsidePressEvent","escapeKeyBubbles","outsidePressBubbles","bubbles","pressStartedInsideRef","pressStartPreventedRef","suppressNextOutsideClickRef","sawPressWhileOpenRef","isComposingRef","currentPointerTypeRef","touchStateRef","cancelDismissOnEndTimeout","clearInsideReactTreeTimeout","compositionTimeout","clearInsideReactTree","hasBlockingChild","nodeId","dataRef","bubbleKey","isEventWithinOwnElements","closeOnReferencePress","referencePress","closeOnEscapeKeyDown","enabled","native","eventDetails","markInsideReactTree","markPressStartedInsideReactTree","target","markInsidePressStartPrevented","handleOpenChange","details","events","preventedPressSuppressionTimeout","doc","handleCompositionStart","handleCompositionEnd","suppressImmediateOutsideClickAfterPreventedStart","resetPressStartState","getOutsidePressEvent","computedType","outsidePressEventValue","resolved","shouldIgnoreEvent","computedOutsidePressEvent","isEventWithinFloatingTree","targetIsInsideChildren","closeOnPressOutside","inertSelector","targetRoot","markers","triggers","trigger","targetRootAncestor","nextParent","marker","lastTraversableNode","style","scrollRe","isScrollableX","isScrollableY","canScrollX","canScrollY","isRTL","pressedVerticalScrollbar","pressedHorizontalScrollbar","handlePointerDown","handleTouchStart","touch","addTargetEventListenerOnce","unsubscribe","handleTouchStartCapture","closeOnPressOutsideCapture","targetEvent","handlePressEndCapture","pressStartedInsideDefaultPrevented","handleTouchMove","deltaX","deltaY","distance","handleTouchMoveCapture","handleTouchEnd","handleTouchEndCapture","reference","floating","import_react_dom","useSyncedFloatingRootContext","options","popupStore","referenceElement","treatPopupAsFloatingElement","onOpenChange","floatingId","valuesToSync","nested","useUnmountAfterClose","setPreventUnmountOnCloseParam","parameters","setPreventUnmountOnClose","animateInitialOpen","preventUnmountingOnClose","preventUnmountOnClose","mountedRef","mounted","pendingUnmountRef","rerender","unmount","setMounted","onUnmount","forceUnmount","FOCUSABLE_POPUP_PROPS","createDefaultInitialFocus","interactionType","popupRef","usePopupRootStore","createStore","PopupHandleAttachment","handle","syncTriggerCount","triggerCount","useTriggerRegistration","registrationRef","registration","element","registeredStore","createPopupOpenState","state","triggerId","activeTriggerId","activeTriggerElement","attachPreventUnmountOnClose","applyPopupOpenChange","reason","isHover","isFocusOpen","nextOpen","isDismissClose","shouldPreventUnmountOnClose","changeState","popupOpenState","updatedState","useTriggerDataForwarding","isMountedByThisTrigger","baseRegisterTrigger","applyTriggerData","changes","stateUpdates","registerTrigger","triggerElementRef","useImplicitActiveTrigger","resolvedActiveTriggerIdRef","reactiveTriggerCount","reactiveActiveTriggerElement","currentActiveTriggerId","lostActiveTriggerId","triggerElement","iteratorResult","implicitTriggerId","implicitTriggerElement","closeOnActiveTriggerUnmount","useOpenStateTransitions","usePopupInteractionProps","statePart","usePopupRootSync","PopupTriggerMap","registered","predicate","selectors","FloatingRootStore","initialState","syncOnly","newOpen","createInitialPopupStoreState","activeTriggerIdSelector","openSelector","popupIdSelector","triggerOwnsOpenPopup","triggerOwnsOpenPopupOrIsOnlyTrigger","popupStoreSelectors","isActive"],"sources":["../../../../node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs","../../../../node_modules/@base-ui/react/utils/popupStateMapping.mjs","../../../../node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs","../../../../node_modules/@base-ui/react/floating-ui-react/utils/event.mjs","../../../../node_modules/@base-ui/utils/useValueAsRef.mjs","../../../../node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs","../../../../node_modules/@base-ui/react/floating-ui-react/components/FloatingTreeStore.mjs","../../../../node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs","../../../../node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs","../../../../node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs","../../../../node_modules/@base-ui/react/internals/useUnmountAfterClose.mjs","../../../../node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs","../../../../node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs","../../../../node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs","../../../../node_modules/@base-ui/react/utils/popups/store.mjs"],"sourcesContent":["import * as TransitionStatusDataAttributes from \"../internals/TransitionStatusDataAttributes.mjs\";\n\n/**\n * Present when the popup is open.\n */\nexport const open = 'data-open';\n\n/**\n * Present when the popup is closed.\n */\nexport const closed = 'data-closed';\n\n/**\n * Present when the popup begins animating in.\n */\nexport const startingStyle = TransitionStatusDataAttributes.startingStyle;\n\n/**\n * Present when the popup is animating out.\n */\nexport const endingStyle = TransitionStatusDataAttributes.endingStyle;\n\n/**\n * Present when the anchor is hidden.\n */\nexport const anchorHidden = 'data-anchor-hidden';\n\n/**\n * Indicates which side the popup is positioned relative to the trigger.\n * @type { 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}\n */\nexport const side = 'data-side';\n\n/**\n * Indicates how the popup is aligned relative to specified side.\n * @type {'start' | 'center' | 'end'}\n */\nexport const align = 'data-align';","import { transitionStatusMapping } from \"../internals/stateAttributesMapping.mjs\";\nimport * as CommonPopupDataAttributes from \"./CommonPopupDataAttributes.mjs\";\nimport * as CommonTriggerDataAttributes from \"./CommonTriggerDataAttributes.mjs\";\nexport { CommonPopupDataAttributes, CommonTriggerDataAttributes };\nconst TRIGGER_HOOK = {\n [CommonTriggerDataAttributes.popupOpen]: ''\n};\nconst PRESSABLE_TRIGGER_HOOK = {\n [CommonTriggerDataAttributes.popupOpen]: '',\n [CommonTriggerDataAttributes.pressed]: ''\n};\nconst POPUP_OPEN_HOOK = {\n [CommonPopupDataAttributes.open]: ''\n};\nconst POPUP_CLOSED_HOOK = {\n [CommonPopupDataAttributes.closed]: ''\n};\nconst ANCHOR_HIDDEN_HOOK = {\n [CommonPopupDataAttributes.anchorHidden]: ''\n};\nexport const triggerOpenStateMapping = {\n open(value) {\n if (value) {\n return TRIGGER_HOOK;\n }\n return null;\n }\n};\nexport const pressableTriggerOpenStateMapping = {\n open(value) {\n if (value) {\n return PRESSABLE_TRIGGER_HOOK;\n }\n return null;\n }\n};\nexport const popupStateMapping = {\n open(value) {\n if (value) {\n return POPUP_OPEN_HOOK;\n }\n return POPUP_CLOSED_HOOK;\n },\n anchorHidden(value) {\n if (value) {\n return ANCHOR_HIDDEN_HOOK;\n }\n return null;\n }\n};\nexport const popupTransitionStateMapping = {\n ...popupStateMapping,\n ...transitionStatusMapping\n};","/* eslint-disable @typescript-eslint/no-loop-func */\n\nexport function getNodeChildren(nodes, id, onlyOpenChildren = true) {\n const directChildren = nodes.filter(node => node.parentId === id);\n return directChildren.flatMap(child => [...(!onlyOpenChildren || child.context?.open ? [child] : []), ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);\n}\nexport function getNodeAncestors(nodes, id) {\n let allAncestors = [];\n let currentParentId = nodes.find(node => node.id === id)?.parentId;\n while (currentParentId) {\n const currentNode = nodes.find(node => node.id === currentParentId);\n currentParentId = currentNode?.parentId;\n if (currentNode) {\n allAncestors = allAncestors.concat(currentNode);\n }\n }\n return allAncestors;\n}","import { platform } from '@base-ui/utils/platform';\nexport function stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\nexport function isReactEvent(event) {\n return 'nativeEvent' in event;\n}\n\n// License: https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/utils/src/isVirtualEvent.ts\nexport function isVirtualClick(event) {\n if (event.pointerType === '' && event.isTrusted) {\n return true;\n }\n if (platform.os.android && event.pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n return event.detail === 0 && !event.pointerType;\n}\nexport function isVirtualPointerEvent(event) {\n if (platform.env.jsdom) {\n return false;\n }\n return !platform.os.android && event.width === 0 && event.height === 0 ||\n // Chrome synthesizes a screen reader press (TalkBack, VoiceOver, NVDA) as a 1x1 mouse\n // `pointerdown` with no pressure. TalkBack can report a pressed button, while desktop\n // mouse presses can report no pressure, so only require no pressed button off Android.\n event.type === 'pointerdown' && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' && (platform.os.android || event.buttons === 0) ||\n // iOS VoiceOver returns 0.333• for width/height.\n event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';\n}\nexport function isMouseLikePointerType(pointerType, strict) {\n // On some Linux machines with Chromium, mouse inputs return a `pointerType`\n // of \"pen\": https://github.com/floating-ui/floating-ui/issues/2015\n const values = ['mouse', 'pen'];\n if (!strict) {\n values.push('', undefined);\n }\n return values.includes(pointerType);\n}\nexport function isClickLikeEvent(event) {\n const type = event.type;\n return type === 'click' || type === 'mousedown' || type === 'keydown' || type === 'keyup';\n}","'use client';\n\nimport { useIsoLayoutEffect } from \"./useIsoLayoutEffect.mjs\";\nimport { useRefWithInit } from \"./useRefWithInit.mjs\";\n\n/**\n * Untracks the provided value by turning it into a ref to remove its reactivity.\n *\n * Used to access the passed value inside `React.useEffect` without causing the effect to re-run when the value changes.\n */\nexport function useValueAsRef(value) {\n const latest = useRefWithInit(createLatestRef, value).current;\n latest.next = value;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useIsoLayoutEffect(latest.effect);\n return latest;\n}\nfunction createLatestRef(value) {\n const latest = {\n current: value,\n next: value,\n effect: () => {\n latest.current = latest.next;\n }\n };\n return latest;\n}","export function createEventEmitter() {\n const map = new Map();\n return {\n emit(event, data) {\n map.get(event)?.forEach(listener => listener(data));\n },\n on(event, listener) {\n if (!map.has(event)) {\n map.set(event, new Set());\n }\n map.get(event).add(listener);\n },\n off(event, listener) {\n map.get(event)?.delete(listener);\n }\n };\n}","import { createEventEmitter } from \"../utils/createEventEmitter.mjs\";\n\n/**\n * Stores and manages floating elements in a tree structure.\n * This is a backing store for the `FloatingTree` component.\n */\nexport class FloatingTreeStore {\n nodesRef = {\n current: []\n };\n events = createEventEmitter();\n addNode(node) {\n this.nodesRef.current.push(node);\n }\n removeNode(node) {\n const index = this.nodesRef.current.findIndex(n => n === node);\n if (index !== -1) {\n this.nodesRef.current.splice(index, 1);\n }\n }\n}","'use client';\n\nimport * as React from 'react';\nimport { useId } from '@base-ui/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { FloatingTreeStore } from \"./FloatingTreeStore.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FloatingNodeContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") FloatingNodeContext.displayName = \"FloatingNodeContext\";\nconst FloatingTreeContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the parent node id for nested floating elements, if available.\n * Returns `null` for top-level floating elements.\n */\nif (process.env.NODE_ENV !== \"production\") FloatingTreeContext.displayName = \"FloatingTreeContext\";\nexport const useFloatingParentNodeId = () => React.useContext(FloatingNodeContext)?.id || null;\n\n/**\n * Returns the nearest floating tree context, if available.\n */\nexport const useFloatingTree = externalTree => {\n const contextTree = React.useContext(FloatingTreeContext);\n return externalTree ?? contextTree;\n};\n\n/**\n * Registers a node into the `FloatingTree`, returning its id.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nexport function useFloatingNodeId(externalTree) {\n const id = useId();\n const tree = useFloatingTree(externalTree);\n const parentId = useFloatingParentNodeId();\n useIsoLayoutEffect(() => {\n if (!id) {\n return undefined;\n }\n const node = {\n id,\n parentId\n };\n tree?.addNode(node);\n return () => {\n tree?.removeNode(node);\n };\n }, [tree, id, parentId]);\n return id;\n}\n/**\n * Provides parent node context for nested floating elements.\n * @see https://floating-ui.com/docs/FloatingTree\n * @internal\n */\nexport function FloatingNode(props) {\n const {\n children,\n id\n } = props;\n const parentId = useFloatingParentNodeId();\n return /*#__PURE__*/_jsx(FloatingNodeContext.Provider, {\n value: React.useMemo(() => ({\n id,\n parentId\n }), [id, parentId]),\n children: children\n });\n}\n/**\n * Provides context for nested floating elements when they are not children of\n * each other on the DOM.\n * This is not necessary in all cases, except when there must be explicit communication between parent and child floating elements. It is necessary for:\n * - The `bubbles` option in the `useDismiss()` Hook\n * - Nested virtual list navigation\n * - Nested floating elements that each open on hover\n * - Custom communication between parent and child floating elements\n * @see https://floating-ui.com/docs/FloatingTree\n * @internal\n */\nexport function FloatingTree(props) {\n const {\n children,\n externalTree\n } = props;\n const tree = useRefWithInit(() => externalTree ?? new FloatingTreeStore()).current;\n return /*#__PURE__*/_jsx(FloatingTreeContext.Provider, {\n value: tree,\n children: children\n });\n}","'use client';\n\n/* eslint-disable no-underscore-dangle */\nimport * as React from 'react';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { Timeout, useTimeout } from '@base-ui/utils/useTimeout';\nimport { getComputedStyle, getParentNode, isElement, isHTMLElement, isLastTraversableNode, isShadowRoot } from '@floating-ui/utils/dom';\nimport { platform } from '@base-ui/utils/platform';\nimport { useFloatingTree } from \"../components/FloatingTree.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { createAttribute } from \"../utils/createAttribute.mjs\";\nimport { contains, getTarget, isEventTargetWithin, isRootElement } from \"../utils/element.mjs\";\nimport { isReactEvent, isVirtualClick } from \"../utils/event.mjs\";\nimport { getNodeChildren } from \"../utils/nodes.mjs\";\nfunction alwaysFalse() {\n return false;\n}\nexport function normalizeProp(normalizable) {\n return {\n escapeKey: typeof normalizable === 'boolean' ? normalizable : normalizable?.escapeKey ?? false,\n outsidePress: typeof normalizable === 'boolean' ? normalizable : normalizable?.outsidePress ?? true\n };\n}\n/**\n * Closes the floating element when a dismissal is requested — by default, when\n * the user presses the `escape` key or outside of the floating element.\n * @see https://floating-ui.com/docs/useDismiss\n */\nexport function useDismiss(store, props = {}) {\n const {\n enabled = true,\n escapeKey = true,\n outsidePress: outsidePressProp = true,\n outsidePressEvent = 'sloppy',\n referencePress = alwaysFalse,\n bubbles,\n externalTree\n } = props;\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const {\n dataRef,\n events\n } = store.context;\n const tree = useFloatingTree(externalTree);\n const outsidePressFn = useStableCallback(typeof outsidePressProp === 'function' ? outsidePressProp : () => false);\n const outsidePress = typeof outsidePressProp === 'function' ? outsidePressFn : outsidePressProp;\n const outsidePressEnabled = outsidePress !== false;\n const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);\n const {\n escapeKey: escapeKeyBubbles,\n outsidePress: outsidePressBubbles\n } = normalizeProp(bubbles);\n const pressStartedInsideRef = React.useRef(false);\n const pressStartPreventedRef = React.useRef(false);\n // Ignore only the very next outside click after dragging from inside to outside.\n const suppressNextOutsideClickRef = React.useRef(false);\n // A click whose press began before the floating element opened is the tail of that\n // gesture (e.g. the drag-release that opened it), not a new outside press.\n const sawPressWhileOpenRef = React.useRef(false);\n const isComposingRef = React.useRef(false);\n const currentPointerTypeRef = React.useRef('');\n const touchStateRef = React.useRef(null);\n const cancelDismissOnEndTimeout = useTimeout();\n const clearInsideReactTreeTimeout = useTimeout();\n // Outlives effect re-runs so a pending reset can't leave `isComposingRef` stuck.\n const compositionTimeout = useTimeout();\n const clearInsideReactTree = useStableCallback(() => {\n clearInsideReactTreeTimeout.clear();\n dataRef.current.insideReactTree = false;\n });\n const hasBlockingChild = useStableCallback(bubbleKey => {\n const nodeId = dataRef.current.floatingContext?.nodeId;\n const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];\n return children.some(child => child.context?.open && !child.context.dataRef.current[bubbleKey]);\n });\n const isEventWithinOwnElements = useStableCallback(event => {\n return isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'));\n });\n const closeOnReferencePress = useStableCallback(event => {\n if (!referencePress()) {\n return;\n }\n store.setOpen(false, createChangeEventDetails(REASONS.triggerPress, event.nativeEvent));\n });\n const closeOnEscapeKeyDown = useStableCallback(event => {\n if (!open || !enabled || !escapeKey || event.key !== 'Escape') {\n return;\n }\n const native = isReactEvent(event) ? event.nativeEvent : event;\n\n // Wait until IME is settled. Pressing `Escape` while composing should\n // close the compose menu, but not the floating element. The ref covers Safari, which fires\n // `compositionend` before `keydown`; `isComposing` covers compositions that began while closed.\n if (isComposingRef.current || native.isComposing) {\n return;\n }\n if (!escapeKeyBubbles && hasBlockingChild('__escapeKeyBubbles')) {\n return;\n }\n const eventDetails = createChangeEventDetails(REASONS.escapeKey, native);\n store.setOpen(false, eventDetails);\n if (!eventDetails.isCanceled) {\n event.preventDefault();\n }\n if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {\n event.stopPropagation();\n }\n });\n const markInsideReactTree = useStableCallback(() => {\n dataRef.current.insideReactTree = true;\n clearInsideReactTreeTimeout.start(0, clearInsideReactTree);\n });\n const markPressStartedInsideReactTree = useStableCallback(event => {\n if (!open || !enabled || event.button !== 0) {\n return;\n }\n const target = getTarget(event.nativeEvent);\n\n // Only treat presses that start within the floating DOM subtree as inside.\n // This avoids suppressing parent dismissal when interacting with nested portals.\n if (!contains(store.select('floatingElement'), target)) {\n return;\n }\n if (!pressStartedInsideRef.current) {\n pressStartedInsideRef.current = true;\n pressStartPreventedRef.current = false;\n }\n });\n const markInsidePressStartPrevented = useStableCallback(event => {\n if (!open || !enabled) {\n return;\n }\n if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {\n return;\n }\n if (pressStartedInsideRef.current) {\n pressStartPreventedRef.current = true;\n }\n });\n\n // A same-batch close+reopen never renders `open === false`, so only `openchange` can\n // observe that session boundary. The effect below covers controlled flips.\n React.useEffect(() => {\n function handleOpenChange(details) {\n // Only the closing half ends the session: `setOpen(true)` on an already-open\n // element (hovering an inactive trigger) must not drop a press mid-gesture.\n if (!details.open) {\n sawPressWhileOpenRef.current = false;\n }\n }\n events.on('openchange', handleOpenChange);\n return () => {\n events.off('openchange', handleOpenChange);\n };\n }, [events]);\n\n // Not cleared in the listener effect's cleanup, which can run mid-press when a dependency\n // changes. In a closed shadow root, the marker is the only inside-press signal.\n React.useEffect(() => clearInsideReactTree, [clearInsideReactTree]);\n React.useEffect(() => {\n if (!open || !enabled) {\n // Reset in the effect body, not the cleanup, which also runs when a dependency\n // changes mid-gesture.\n if (!open) {\n sawPressWhileOpenRef.current = false;\n isComposingRef.current = false;\n currentPointerTypeRef.current = '';\n touchStateRef.current = null;\n }\n return clearInsideReactTree;\n }\n dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;\n dataRef.current.__outsidePressBubbles = outsidePressBubbles;\n const preventedPressSuppressionTimeout = new Timeout();\n const doc = ownerDocument(floatingElement);\n function handleCompositionStart() {\n compositionTimeout.clear();\n isComposingRef.current = true;\n }\n function handleCompositionEnd() {\n // Safari fires `compositionend` before `keydown`, so we need to wait\n // until the next tick to set `isComposing` to `false`. Set it here too, since closing\n // resets it while a composition can continue into the next open session.\n // https://bugs.webkit.org/show_bug.cgi?id=165004\n isComposingRef.current = true;\n compositionTimeout.start(\n // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.\n // Only apply to WebKit for the test to remain 0ms.\n platform.engine.webkit ? 5 : 0, () => {\n isComposingRef.current = false;\n });\n }\n function suppressImmediateOutsideClickAfterPreventedStart() {\n suppressNextOutsideClickRef.current = true;\n // Firefox can emit the synthetic outside click in a later task after\n // pointer lock exit, so microtask clearing is too early here.\n preventedPressSuppressionTimeout.start(0, () => {\n suppressNextOutsideClickRef.current = false;\n });\n }\n function resetPressStartState() {\n pressStartedInsideRef.current = false;\n pressStartPreventedRef.current = false;\n }\n function getOutsidePressEvent() {\n const type = currentPointerTypeRef.current;\n const computedType = type === 'pen' || !type ? 'mouse' : type;\n const outsidePressEventValue = getOutsidePressEventProp();\n const resolved = typeof outsidePressEventValue === 'function' ? outsidePressEventValue() : outsidePressEventValue;\n if (typeof resolved === 'string') {\n return resolved;\n }\n return resolved[computedType];\n }\n function shouldIgnoreEvent(event) {\n const computedOutsidePressEvent = getOutsidePressEvent();\n return computedOutsidePressEvent === 'intentional' && event.type !== 'click' || computedOutsidePressEvent === 'sloppy' && event.type === 'click';\n }\n function isEventWithinFloatingTree(event) {\n const nodeId = dataRef.current.floatingContext?.nodeId;\n const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some(node => isEventTargetWithin(event, node.context?.elements.floating));\n return isEventWithinOwnElements(event) || targetIsInsideChildren;\n }\n function closeOnPressOutside(event) {\n if (shouldIgnoreEvent(event)) {\n // A new press began outside the floating element and its trigger. Clear any\n // leftover drag-out suppression so this press's eventual click can dismiss.\n if (event.type !== 'click' && !isEventWithinOwnElements(event)) {\n preventedPressSuppressionTimeout.clear();\n suppressNextOutsideClickRef.current = false;\n }\n clearInsideReactTree();\n return;\n }\n if (dataRef.current.insideReactTree) {\n clearInsideReactTree();\n return;\n }\n const target = getTarget(event);\n const inertSelector = `[${createAttribute('inert')}]`;\n const targetRoot = isElement(target) ? target.getRootNode() : null;\n const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store.select('floatingElement'))).querySelectorAll(inertSelector));\n const triggers = store.context.triggerElements;\n\n // If another trigger is clicked, don't close the floating element.\n if (target && (triggers.hasElement(target) || triggers.hasMatchingElement(trigger => contains(trigger, target)))) {\n return;\n }\n let targetRootAncestor = isElement(target) ? target : null;\n while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {\n const nextParent = getParentNode(targetRootAncestor);\n if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {\n break;\n }\n targetRootAncestor = nextParent;\n }\n\n // Check if the click occurred on a third-party element injected after the\n // floating element rendered.\n if (markers.length && isElement(target) && !isRootElement(target) &&\n // Clicked on a direct ancestor (e.g. FloatingOverlay).\n !contains(target, store.select('floatingElement')) &&\n // If the target root element contains none of the markers, then the\n // element was injected after the floating element rendered.\n markers.every(marker => !contains(targetRootAncestor, marker))) {\n return;\n }\n\n // Check if the click occurred on the scrollbar\n // Skip for touch events: scrollbars don't receive touch events on most platforms\n if (isHTMLElement(target) && !('touches' in event)) {\n const lastTraversableNode = isLastTraversableNode(target);\n const style = getComputedStyle(target);\n const scrollRe = /auto|scroll/;\n const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);\n const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);\n const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;\n const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;\n const isRTL = style.direction === 'rtl';\n\n // Check click position relative to scrollbar.\n // In some browsers it is possible to change the <body> (or window)\n // scrollbar to the left side, but is very rare and is difficult to\n // check for. Plus, for modal dialogs with backdrops, it is more\n // important that the backdrop is checked but not so much the window.\n const pressedVerticalScrollbar = canScrollY && (isRTL ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);\n const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;\n if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {\n return;\n }\n }\n if (isEventWithinFloatingTree(event)) {\n return;\n }\n\n // Only `click` events reach this point in intentional mode.\n if (getOutsidePressEvent() === 'intentional') {\n // Press-less clicks (keyboard, assistive technology, `element.click()`) report no\n // click count; `isVirtualClick` also catches the ones that do.\n if (event.detail !== 0 && !isVirtualClick(event) && !sawPressWhileOpenRef.current) {\n return;\n }\n\n // A press that starts inside and ends outside gets one suppressed\n // outside click. Run this after inside-target checks so inside clicks\n // don't consume the one-shot suppression.\n if (suppressNextOutsideClickRef.current) {\n preventedPressSuppressionTimeout.clear();\n suppressNextOutsideClickRef.current = false;\n return;\n }\n }\n if (typeof outsidePress === 'function' && !outsidePress(event)) {\n return;\n }\n if (hasBlockingChild('__outsidePressBubbles')) {\n return;\n }\n store.setOpen(false, createChangeEventDetails(REASONS.outsidePress, event));\n clearInsideReactTree();\n }\n function handlePointerDown(event) {\n if (getOutsidePressEvent() !== 'sloppy' || event.pointerType === 'touch' || !store.select('open') || !enabled || isEventWithinOwnElements(event)) {\n return;\n }\n closeOnPressOutside(event);\n }\n function handleTouchStart(event) {\n if (getOutsidePressEvent() !== 'sloppy' || !store.select('open') || !enabled || isEventWithinOwnElements(event)) {\n return;\n }\n const touch = event.touches[0];\n if (touch) {\n touchStateRef.current = {\n startTime: Date.now(),\n startX: touch.clientX,\n startY: touch.clientY,\n dismissOnTouchEnd: false,\n dismissOnMouseDown: true\n };\n cancelDismissOnEndTimeout.start(1000, () => {\n if (touchStateRef.current) {\n touchStateRef.current.dismissOnTouchEnd = false;\n touchStateRef.current.dismissOnMouseDown = false;\n }\n });\n }\n }\n function addTargetEventListenerOnce(event, listener) {\n const target = getTarget(event);\n if (!target) {\n return;\n }\n const unsubscribe = addEventListener(target, event.type, () => {\n listener(event);\n unsubscribe();\n });\n }\n function handleTouchStartCapture(event) {\n currentPointerTypeRef.current = 'touch';\n addTargetEventListenerOnce(event, handleTouchStart);\n }\n function closeOnPressOutsideCapture(event) {\n cancelDismissOnEndTimeout.clear();\n\n // Only `pointerdown` marks a press; `mousedown` is its compatibility event, and\n // counting it would misattribute a gesture that started before open.\n if (event.type === 'pointerdown') {\n // Only a primary press can produce a `click`.\n if (event.button === 0) {\n sawPressWhileOpenRef.current = true;\n }\n currentPointerTypeRef.current = event.pointerType;\n }\n if (event.type === 'mousedown' && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {\n return;\n }\n addTargetEventListenerOnce(event, targetEvent => {\n if (targetEvent.type === 'pointerdown') {\n handlePointerDown(targetEvent);\n } else {\n closeOnPressOutside(targetEvent);\n }\n });\n }\n function handlePressEndCapture(event) {\n // A cancelled gesture produces no click. Not cleared on `pointerup`: the click\n // fires after it and must still find the press.\n if (event.type === 'pointercancel') {\n sawPressWhileOpenRef.current = false;\n }\n if (!pressStartedInsideRef.current) {\n return;\n }\n const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;\n resetPressStartState();\n if (getOutsidePressEvent() !== 'intentional') {\n return;\n }\n if (event.type === 'pointercancel') {\n if (pressStartedInsideDefaultPrevented) {\n suppressImmediateOutsideClickAfterPreventedStart();\n }\n return;\n }\n if (isEventWithinFloatingTree(event)) {\n return;\n }\n\n // If pointerdown was prevented, no click may be generated for that\n // interaction. However, Firefox may still emit an immediate click after\n // pointerup (e.g. NumberField scrub with pointer lock), so suppress for\n // one tick to absorb that synthetic click only.\n if (pressStartedInsideDefaultPrevented) {\n suppressImmediateOutsideClickAfterPreventedStart();\n return;\n }\n\n // Avoid suppressing when outsidePress explicitly ignores this target.\n if (typeof outsidePress === 'function' && !outsidePress(event)) {\n return;\n }\n preventedPressSuppressionTimeout.clear();\n suppressNextOutsideClickRef.current = true;\n clearInsideReactTree();\n }\n function handleTouchMove(event) {\n if (getOutsidePressEvent() !== 'sloppy' || !touchStateRef.current || isEventWithinOwnElements(event)) {\n return;\n }\n const touch = event.touches[0];\n if (!touch) {\n return;\n }\n const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);\n const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n if (distance > 5) {\n touchStateRef.current.dismissOnTouchEnd = true;\n }\n if (distance > 10) {\n closeOnPressOutside(event);\n cancelDismissOnEndTimeout.clear();\n touchStateRef.current = null;\n }\n }\n function handleTouchMoveCapture(event) {\n addTargetEventListenerOnce(event, handleTouchMove);\n }\n function handleTouchEnd(event) {\n if (getOutsidePressEvent() !== 'sloppy' || !touchStateRef.current || isEventWithinOwnElements(event)) {\n return;\n }\n if (touchStateRef.current.dismissOnTouchEnd) {\n closeOnPressOutside(event);\n }\n cancelDismissOnEndTimeout.clear();\n touchStateRef.current = null;\n }\n function handleTouchEndCapture(event) {\n addTargetEventListenerOnce(event, handleTouchEnd);\n }\n const unsubscribe = mergeCleanups(escapeKey && mergeCleanups(addEventListener(doc, 'keydown', closeOnEscapeKeyDown), addEventListener(doc, 'compositionstart', handleCompositionStart), addEventListener(doc, 'compositionend', handleCompositionEnd)), outsidePressEnabled && mergeCleanups(addEventListener(doc, 'click', closeOnPressOutsideCapture, true), addEventListener(doc, 'pointerdown', closeOnPressOutsideCapture, true), addEventListener(doc, 'pointerup', handlePressEndCapture, true), addEventListener(doc, 'pointercancel', handlePressEndCapture, true), addEventListener(doc, 'mousedown', closeOnPressOutsideCapture, true), addEventListener(doc, 'mouseup', handlePressEndCapture, true), addEventListener(doc, 'touchstart', handleTouchStartCapture, {\n capture: true,\n passive: true\n }), addEventListener(doc, 'touchmove', handleTouchMoveCapture, {\n capture: true,\n passive: true\n }), addEventListener(doc, 'touchend', handleTouchEndCapture, {\n capture: true,\n passive: true\n })));\n return () => {\n unsubscribe();\n preventedPressSuppressionTimeout.clear();\n resetPressStartState();\n suppressNextOutsideClickRef.current = false;\n };\n }, [dataRef, floatingElement, escapeKey, outsidePressEnabled, outsidePress, open, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store, cancelDismissOnEndTimeout, compositionTimeout]);\n const reference = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n onPointerDown: closeOnReferencePress,\n onClick: closeOnReferencePress\n }), [closeOnEscapeKeyDown, closeOnReferencePress]);\n const floating = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n // `onMouseDown` may be blocked if `event.preventDefault()` is called in\n // `onPointerDown`, such as with <NumberField.ScrubArea>.\n // See https://github.com/mui/base-ui/pull/3379\n onPointerDown: markInsidePressStartPrevented,\n onMouseDown: markInsidePressStartPrevented,\n onClickCapture: markInsideReactTree,\n onMouseDownCapture(event) {\n markInsideReactTree();\n markPressStartedInsideReactTree(event);\n },\n onPointerDownCapture(event) {\n markInsideReactTree();\n markPressStartedInsideReactTree(event);\n },\n onMouseUpCapture: markInsideReactTree,\n onTouchEndCapture: markInsideReactTree,\n onTouchMoveCapture: markInsideReactTree\n }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n trigger: reference\n } : {}, [enabled, reference, floating]);\n}","'use client';\n\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { isElement } from '@floating-ui/utils/dom';\n\n/**\n * Narrowed to the store members this hook uses so consumers do not need to provide\n * unrelated store capabilities.\n */\n\n/**\n * Keeps the provided FloatingRootStore in sync with the provided PopupStore.\n */\nexport function useSyncedFloatingRootContext(options) {\n const {\n popupStore,\n treatPopupAsFloatingElement = false,\n floatingRootContext: store,\n floatingId,\n nested,\n onOpenChange\n } = options;\n const open = popupStore.useState('open');\n const referenceElement = popupStore.useState('activeTriggerElement');\n const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? 'popupElement' : 'positionerElement');\n const handleOpenChange = onOpenChange;\n popupStore.useSyncedValue('floatingId', floatingId);\n useIsoLayoutEffect(() => {\n const valuesToSync = {\n open,\n floatingId,\n referenceElement,\n floatingElement\n };\n if (isElement(referenceElement)) {\n valuesToSync.domReferenceElement = referenceElement;\n }\n if (store.state.positionReference === store.state.referenceElement) {\n valuesToSync.positionReference = referenceElement;\n }\n store.update(valuesToSync);\n }, [open, floatingId, referenceElement, floatingElement, store]);\n\n // Keep non-reactive context values fresh for interactions that call `store.setOpen`.\n store.context.onOpenChange = handleOpenChange;\n store.context.nested = nested;\n return store;\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useForcedRerendering } from '@base-ui/utils/useForcedRerendering';\nimport { useTransitionStatus } from \"./useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"./useOpenChangeComplete.mjs\";\n/**\n * Keeps a popup mounted through its closing animation and unmounts it once the animation\n * finishes, unless the close cycle opted out through `preventUnmountOnClose`.\n * Store-agnostic: hosts sync `mounted` and `transitionStatus` wherever they need them.\n *\n * @returns `forceUnmount` unmounts the popup immediately. It is a no-op once the popup is already\n * unmounted, so calling it after the automatic unmount doesn't repeat the completion callback,\n * and a call while the popup is open only takes effect if a close commits in the same batch.\n */\nexport function useUnmountAfterClose(parameters) {\n const {\n open,\n ref,\n preventUnmountOnClose,\n setPreventUnmountOnClose: setPreventUnmountOnCloseParam,\n onUnmount,\n animateInitialOpen\n } = parameters;\n const setPreventUnmountOnClose = useStableCallback(setPreventUnmountOnCloseParam);\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open, false, false, animateInitialOpen);\n\n // Opening starts a new close cycle. Derive during render so the close-completion hook below\n // reads the value on the same pass, and clear the stored value so it doesn't leak into the next\n // close. The effect only runs when `open` changes, so an opt-out recorded while a controlled\n // close is still pending (for example in a transition) is not cleared by the render that still\n // sees `open`.\n const preventUnmountingOnClose = open ? false : preventUnmountOnClose;\n useIsoLayoutEffect(() => {\n if (open) {\n setPreventUnmountOnClose(false);\n }\n }, [open, setPreventUnmountOnClose]);\n\n // Mirrors `mounted` synchronously so repeated `forceUnmount()` calls in one batch complete\n // closing once. Resynced on every commit: `setMounted(false)` while open re-mounts on the next\n // render without changing the committed `mounted`, so a `[mounted]` dependency would leave the\n // mirror stale and block every later unmount.\n const mountedRef = React.useRef(mounted);\n const pendingUnmountRef = React.useRef(false);\n const rerender = useForcedRerendering();\n const unmount = () => {\n mountedRef.current = false;\n setMounted(false);\n onUnmount();\n };\n useIsoLayoutEffect(() => {\n mountedRef.current = mounted;\n if (pendingUnmountRef.current) {\n pendingUnmountRef.current = false;\n if (!open && mounted) {\n unmount();\n }\n }\n });\n const forceUnmount = useStableCallback(() => {\n if (!mountedRef.current) {\n return;\n }\n if (open) {\n // The rendered `open` can't tell a stale exit-animation callback after a quick reopen from a\n // close batched with this call (`close(); unmount()`). Decide once the batch commits: unmount\n // if the popup closed, otherwise drop the call rather than run the host's unmount cleanup and\n // the close completion against a live popup.\n pendingUnmountRef.current = true;\n rerender();\n return;\n }\n unmount();\n });\n useOpenChangeComplete({\n enabled: mounted && !open && !preventUnmountingOnClose,\n open,\n ref,\n onComplete() {\n if (!open) {\n forceUnmount();\n }\n }\n });\n return {\n mounted,\n transitionStatus,\n preventUnmountingOnClose,\n forceUnmount\n };\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useId } from '@base-ui/utils/useId';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { FOCUSABLE_ATTRIBUTE } from \"../../floating-ui-react/utils/constants.mjs\";\nimport { useFloatingParentNodeId } from \"../../floating-ui-react/components/FloatingTree.mjs\";\nimport { useSyncedFloatingRootContext } from \"../../floating-ui-react/hooks/useSyncedFloatingRootContext.mjs\";\nimport { useUnmountAfterClose } from \"../../internals/useUnmountAfterClose.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nexport const FOCUSABLE_POPUP_PROPS = {\n tabIndex: -1,\n [FOCUSABLE_ATTRIBUTE]: ''\n};\n\n/**\n * Returns the default `initialFocus` resolver for a popup. When opened by touch it focuses the\n * popup element itself to prevent the virtual keyboard from opening (required for Android\n * specifically; iOS handles this automatically). Otherwise it falls back to the default behavior.\n */\nexport function createDefaultInitialFocus(popupRef) {\n return interactionType => interactionType === 'touch' ? popupRef.current : true;\n}\n\n/**\n * The subset of a popup handle that a Root needs to bind its store to. Both the real handle classes\n * and any test double satisfy it.\n */\n\n/**\n * Creates and owns a popup store on behalf of a Root part. The store is created exactly once, with\n * controlled props and root state synced separately after creation. Sets up the synced floating\n * root context and returns the store.\n *\n * @param createStore Factory that builds the store. Called exactly once, receiving the floating id\n * and whether the popup is nested inside another floating element, both resolved on the first render.\n * @param treatPopupAsFloatingElement Whether the popup element is passed to Floating UI as the\n * floating element instead of the default positioner.\n */\nexport function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) {\n const floatingId = useId();\n const nested = useFloatingParentNodeId() != null;\n const store = useRefWithInit(() => createStore(floatingId, nested)).current;\n useSyncedFloatingRootContext({\n popupStore: store,\n treatPopupAsFloatingElement,\n floatingRootContext: store.state.floatingRootContext,\n floatingId,\n nested,\n onOpenChange: store.setOpen\n });\n return store;\n}\n\n/**\n * Attaches a Root's store to a handle for this component's committed lifetime. Popup Roots render\n * it before their interactions and user children so its layout effect runs before descendant layout\n * effects. This lets descendants call the handle during the Root's initial commit without attaching\n * during render, which would leak suspended or abandoned stores. Store subscribers are notified by\n * `attachStore` in this ordinary layout phase, where React permits synchronous updates.\n *\n * Popup Roots must render this component only when a handle is present so handle-less Roots avoid\n * mounting an extra fiber and layout effect.\n */\nexport function PopupHandleAttachment({\n handle,\n store\n}) {\n useIsoLayoutEffect(() => {\n return handle.attachStore(store);\n }, [handle, store]);\n return null;\n}\nfunction syncTriggerCount(store) {\n const triggerCount = store.context.triggerElements.size;\n if (store.select('open') && store.state.triggerCount !== triggerCount) {\n store.set('triggerCount', triggerCount);\n }\n}\n\n/**\n * Returns a stable callback ref that registers/unregisters the trigger element in the store.\n *\n * Stable so a downstream ref merger that retains the callback it was first given still reaches the\n * trigger's current store. The registration is tracked as a `(store, id, element)` triple, so\n * unregistering targets the store the element was actually registered in.\n *\n * Since the callback never changes, the caller must re-run it from a layout effect keyed on\n * `[store, id]` to migrate an already-registered element. That effect is also what registers the\n * element in the first place when `id` only resolves after the first commit (React 17's `useId`\n * fallback), because the register call made while the id is still `undefined` does nothing.\n *\n * @param id Id of the trigger.\n * @param store The Store instance where the trigger should be registered.\n */\nexport function useTriggerRegistration(id, store) {\n const registrationRef = React.useRef(null);\n return useStableCallback(element => {\n const registration = registrationRef.current;\n if (registration !== null) {\n if (registration.element === element && registration.store === store && registration.id === id) {\n // Already registered where it belongs, so the caller's migration effect is free on mount.\n return;\n }\n registrationRef.current = null;\n const registeredStore = registration.store;\n if (registeredStore.context.triggerElements.getById(registration.id) === registration.element) {\n registeredStore.context.triggerElements.delete(registration.id);\n syncTriggerCount(registeredStore);\n }\n }\n if (element !== null && id !== undefined) {\n registrationRef.current = {\n store,\n id,\n element\n };\n store.context.triggerElements.add(id, element);\n syncTriggerCount(store);\n }\n });\n}\nexport function createPopupOpenState(state, open, trigger, preventUnmountOnClose = false) {\n let preventUnmountingOnClose = state.preventUnmountingOnClose;\n if (open) {\n // Opening starts a new close cycle, so clear any previous request to keep the popup mounted.\n preventUnmountingOnClose = false;\n } else if (preventUnmountOnClose) {\n preventUnmountingOnClose = true;\n }\n const triggerId = trigger?.id ?? null;\n let activeTriggerId = state.activeTriggerId;\n let activeTriggerElement = state.activeTriggerElement;\n\n // If a popup is closing, the `trigger` may be undefined.\n // We want to keep the previous value so that exit animations are played and focus is returned correctly.\n if (triggerId || open) {\n activeTriggerId = triggerId;\n activeTriggerElement = trigger ?? null;\n }\n return {\n open,\n preventUnmountingOnClose,\n activeTriggerId,\n activeTriggerElement,\n // An open request without a trigger (a handle's `open(null)` or `openWithPayload()`) must not\n // be reassociated with a lone registered trigger later on. Controlled and default opens never\n // pass through here, so they keep claiming a lone trigger. A close request keeps the flag: a\n // controlled root may decline it and stay open, so the Root clears the flag only once the\n // popup is effectively closed.\n openedWithoutTrigger: open ? trigger == null : state.openedWithoutTrigger\n };\n}\nexport function attachPreventUnmountOnClose(eventDetails) {\n let preventUnmountOnClose = false;\n eventDetails.preventUnmountOnClose = () => {\n preventUnmountOnClose = true;\n };\n return () => preventUnmountOnClose;\n}\n\n/**\n * Runs the shared open-change sequence for a popup store: notifies `onOpenChange`,\n * honors cancellation, dispatches the floating root change, maps the reason to an\n * `instantType`, and commits the state update (synchronously for hover so\n * `getAnimations()` observes it). Stores supply their own differences via\n * `extraState` (e.g. the last change reason) and `onBeforeDispatch` (e.g. updating\n * inline-rect coordinates).\n */\nexport function applyPopupOpenChange(store, nextOpen, eventDetails, options = {}) {\n const reason = eventDetails.reason;\n const isHover = reason === REASONS.triggerHover;\n const isFocusOpen = nextOpen && reason === REASONS.triggerFocus;\n const isDismissClose = !nextOpen && (reason === REASONS.triggerPress || reason === REASONS.escapeKey);\n const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);\n store.context.onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n options.onBeforeDispatch?.();\n store.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);\n const changeState = () => {\n const popupOpenState = createPopupOpenState(store.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());\n const updatedState = {\n ...options.extraState,\n ...popupOpenState\n };\n if (isFocusOpen) {\n updatedState.instantType = 'focus';\n } else if (isDismissClose) {\n updatedState.instantType = 'dismiss';\n } else if (isHover) {\n updatedState.instantType = undefined;\n }\n store.update(updatedState);\n };\n if (isHover) {\n // Flush synchronously for hover so `node.getAnimations()` sees the new state.\n ReactDOM.flushSync(changeState);\n } else {\n changeState();\n }\n}\n\n/**\n * Sets up trigger data forwarding to the store.\n *\n * @param triggerId Id of the trigger.\n * @param triggerElementRef Ref for the trigger DOM element.\n * @param store The Store instance managing the popup state.\n * @param stateUpdates An object with state updates to apply when the trigger is active.\n */\nexport function useTriggerDataForwarding(triggerId, triggerElementRef, store, stateUpdates) {\n const isMountedByThisTrigger = store.useState('isMountedByTrigger', triggerId);\n const baseRegisterTrigger = useTriggerRegistration(triggerId, store);\n\n // Applies trigger-owned state (active-trigger ownership and payload) when the trigger registers.\n // Stable so payload/`stateUpdates` changes do not change the ref identity (which would needlessly\n // churn registration); it reads the latest closure values when invoked.\n const applyTriggerData = useStableCallback(element => {\n const open = store.select('open');\n const activeTriggerId = store.select('activeTriggerId');\n if (activeTriggerId === triggerId) {\n const changes = {\n activeTriggerElement: element,\n ...(open ? stateUpdates : null)\n };\n store.update(changes);\n return;\n }\n if (activeTriggerId == null && open && !store.state.openedWithoutTrigger) {\n // If a popup is already open, a detached trigger can mount before any active trigger\n // has been established. Claim the first registered trigger so trigger-owned focus\n // management and ARIA relationships work. A popup opened deliberately without a trigger\n // stays unassociated so the trigger's `payload` does not replace the programmatic one.\n const changes = {\n activeTriggerId: triggerId ?? null,\n activeTriggerElement: element,\n ...stateUpdates\n };\n store.update(changes);\n }\n });\n\n // Stable, so the merged ref on the rendered element keeps its identity for the trigger's whole\n // lifetime.\n const registerTrigger = useStableCallback(element => {\n baseRegisterTrigger(element);\n if (element) {\n applyTriggerData(element);\n }\n });\n\n // A stable ref does not re-fire on a store or id change, so migrate here instead: unregister from\n // the previous store, then register the element the trigger still renders into the current one.\n useIsoLayoutEffect(() => {\n registerTrigger(triggerElementRef.current);\n return () => registerTrigger(null);\n }, [registerTrigger, triggerElementRef, store, triggerId]);\n useIsoLayoutEffect(() => {\n if (isMountedByThisTrigger) {\n const changes = {\n activeTriggerElement: triggerElementRef.current,\n ...stateUpdates\n };\n store.update(changes);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isMountedByThisTrigger, store, triggerElementRef, ...Object.values(stateUpdates)]);\n return {\n registerTrigger,\n isMountedByThisTrigger\n };\n}\n/**\n * Keeps trigger registration state synchronized while the popup is open.\n *\n * When a popup opens without an explicit trigger id and exactly one trigger is registered, that\n * trigger is claimed as the active trigger, unless the open request deliberately carried no trigger\n * (`openedWithoutTrigger`). When the active trigger id is still registered but its\n * element changed, the active element is refreshed. When the active trigger id is missing from the\n * registry but the same element is still registered under a different id (e.g. the rendered trigger\n * carries its own DOM `id` that differs from Base UI's internal trigger id), the active id is\n * reassociated to the registered id instead of being treated as lost. When the active trigger\n * unregisters, the default path preserves existing ownership so non-closing popup families do not\n * silently claim a different trigger while staying open.\n *\n * If `closeOnActiveTriggerUnmount` is enabled, unregistering a previously resolved active trigger\n * requests a close after a microtask so a same-tick replacement trigger with the same id can\n * register first. An active trigger id that has not matched a registered trigger yet is treated as\n * pending and does not request a close.\n *\n * This should be called on the Root part.\n *\n * @param store The Store instance managing the popup state.\n * @param options Options for active trigger unmount behavior.\n */\nexport function useImplicitActiveTrigger(store, options = {}) {\n const {\n closeOnActiveTriggerUnmount = false\n } = options;\n // Distinguishes a trigger that unmounted from a new active trigger that has not hydrated yet.\n const resolvedActiveTriggerIdRef = React.useRef(null);\n const open = store.useState('open');\n const reactiveTriggerCount = store.useState('triggerCount');\n // Subscribe to the active trigger id so the reconciliation below reruns when ownership moves to\n // another trigger while the popup stays open (e.g. a focus/hover handoff between triggers).\n const activeTriggerId = store.useState('activeTriggerId');\n // Subscribe to the active trigger element so the reconciliation reruns when a pending active\n // trigger registers in a commit where the trigger count nets out unchanged (registration\n // forwards the element to the store when the registering trigger matches the active id).\n // Without this, the id would never be marked resolved and a later genuine unmount would be\n // misclassified as pending, disabling `closeOnActiveTriggerUnmount`.\n const reactiveActiveTriggerElement = store.useState('activeTriggerElement');\n useIsoLayoutEffect(() => {\n if (!open) {\n resolvedActiveTriggerIdRef.current = null;\n if (store.state.triggerCount !== 0) {\n store.set('triggerCount', 0);\n }\n // The flag is cleared only here, once the popup is effectively closed: a controlled root may\n // decline a close request and stay open, and a controlled close never reaches\n // `createPopupOpenState` at all.\n if (store.state.openedWithoutTrigger) {\n store.set('openedWithoutTrigger', false);\n }\n return;\n }\n const triggerCount = store.context.triggerElements.size;\n const stateUpdates = {};\n if (store.state.triggerCount !== triggerCount) {\n stateUpdates.triggerCount = triggerCount;\n }\n const currentActiveTriggerId = store.select('activeTriggerId');\n let lostActiveTriggerId = null;\n if (currentActiveTriggerId) {\n const activeTriggerElement = store.context.triggerElements.getById(currentActiveTriggerId);\n if (!activeTriggerElement) {\n for (const [triggerId, triggerElement] of store.context.triggerElements.entries()) {\n if (triggerElement === store.state.activeTriggerElement) {\n stateUpdates.activeTriggerId = triggerId;\n stateUpdates.activeTriggerElement = triggerElement;\n resolvedActiveTriggerIdRef.current = triggerId;\n break;\n }\n }\n if (stateUpdates.activeTriggerId === undefined) {\n if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) {\n lostActiveTriggerId = currentActiveTriggerId;\n } else {\n resolvedActiveTriggerIdRef.current = null;\n }\n }\n } else {\n resolvedActiveTriggerIdRef.current = currentActiveTriggerId;\n if (activeTriggerElement !== store.state.activeTriggerElement) {\n stateUpdates.activeTriggerElement = activeTriggerElement;\n }\n }\n } else {\n resolvedActiveTriggerIdRef.current = null;\n }\n if (!lostActiveTriggerId && !currentActiveTriggerId && !store.state.openedWithoutTrigger && triggerCount === 1) {\n const iteratorResult = store.context.triggerElements.entries().next();\n if (!iteratorResult.done) {\n const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;\n stateUpdates.activeTriggerId = implicitTriggerId;\n stateUpdates.activeTriggerElement = implicitTriggerElement;\n resolvedActiveTriggerIdRef.current = implicitTriggerId;\n }\n }\n if (stateUpdates.triggerCount !== undefined || stateUpdates.activeTriggerId !== undefined || stateUpdates.activeTriggerElement !== undefined) {\n store.update(stateUpdates);\n }\n if (lostActiveTriggerId) {\n if (closeOnActiveTriggerUnmount) {\n // Defer so a same-tick replacement trigger with the same id can register first.\n queueMicrotask(() => {\n if (store.select('open') && store.select('activeTriggerId') === lostActiveTriggerId && !store.context.triggerElements.getById(lostActiveTriggerId)) {\n const eventDetails = createChangeEventDetails(REASONS.none);\n store.setOpen(false, eventDetails);\n // If closing is canceled, keep the previous active trigger ownership for the\n // still-open popup instead of claiming another trigger implicitly.\n if (!eventDetails.isCanceled) {\n store.update({\n activeTriggerId: null,\n activeTriggerElement: null\n });\n }\n }\n });\n }\n }\n }, [open, store, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]);\n}\n\n/**\n * Manages the mounted state of the popup.\n * Sets up the transition status listeners and handles unmounting when needed.\n * Updates the `mounted`, `transitionStatus`, and `preventUnmountingOnClose` states in the store.\n *\n * @param open Whether the popup is open.\n * @param store The Store instance managing the popup state.\n * @param onUnmount Optional callback to be called when the popup is unmounted.\n * @param animateInitialOpen Whether a popup that mounts already open should still play its enter\n * transition. Defaults to `false`, so content that was open on the first render (a `defaultOpen`\n * popup on page load, SSR'd markup) appears without animating. Opt in for popups whose subtree\n * only mounts in response to something the user did, such as a submenu inside a menu popup.\n *\n * @returns A function to forcibly unmount the popup. It is a no-op once the popup is already\n * unmounted, so calling it after the automatic unmount doesn't repeat the completion callback.\n */\nexport function useOpenStateTransitions(open, store, onUnmount, animateInitialOpen) {\n const {\n mounted,\n transitionStatus,\n forceUnmount\n } = useUnmountAfterClose({\n open,\n ref: store.context.popupRef,\n preventUnmountOnClose: store.useState('preventUnmountingOnClose'),\n setPreventUnmountOnClose: preventUnmountOnClose => store.set('preventUnmountingOnClose', preventUnmountOnClose),\n animateInitialOpen,\n onUnmount() {\n store.update({\n activeTriggerId: null,\n activeTriggerElement: null,\n mounted: false,\n preventUnmountingOnClose: false\n });\n onUnmount?.();\n store.context.onOpenChangeComplete?.(false);\n }\n });\n\n // Seed the Root-owned store before parts subscribe, matching the hook's initial mounted state.\n // Otherwise, an initially open Root looks like a reopen until the layout effect syncs the store.\n useRefWithInit(() => {\n store.set('mounted', mounted);\n return null;\n });\n store.useSyncedValues({\n mounted,\n transitionStatus\n });\n return {\n forceUnmount,\n transitionStatus\n };\n}\nexport function usePopupInteractionProps(store, statePart) {\n store.useSyncedValues(statePart);\n useIsoLayoutEffect(() => () => {\n store.update({\n activeTriggerProps: EMPTY_OBJECT,\n inactiveTriggerProps: EMPTY_OBJECT,\n popupProps: EMPTY_OBJECT\n });\n }, [store]);\n}\nexport function usePopupRootSync(store, open) {\n useIsoLayoutEffect(() => {\n if (!open && store.state.openMethod !== null) {\n store.set('openMethod', null);\n }\n }, [open, store]);\n useIsoLayoutEffect(() => () => {\n if (store.state.openMethod !== null) {\n store.set('openMethod', null);\n }\n }, [store]);\n}","/**\n * Development-only reverse index of element to registered id, keyed by the owning map.\n *\n * Registration would otherwise have to scan every entry to detect an element claimed by two ids,\n * making the mount of many triggers sharing one handle quadratic. Kept module-scoped, lazily\n * initialized, and read only from `process.env.NODE_ENV` guards so production builds drop it along\n * with the checks.\n */\nlet devElementIdsByMap;\nfunction getDevElementIds(map) {\n devElementIdsByMap ??= new WeakMap();\n let elementIds = devElementIdsByMap.get(map);\n if (!elementIds) {\n elementIds = new WeakMap();\n devElementIdsByMap.set(map, elementIds);\n }\n return elementIds;\n}\n\n/**\n * Data structure to keep track of popup trigger elements by their IDs.\n *\n * Element lookups iterate the id map rather than maintaining a parallel Set. Registration is O(1),\n * while `hasElement` and `hasMatchingElement` are linear in the number of triggers.\n */\nexport class PopupTriggerMap {\n idMap = new Map();\n\n /**\n * Adds a trigger element with the given ID.\n *\n * Note: The provided element is assumed to not be registered under multiple IDs.\n */\n add(id, element) {\n if (process.env.NODE_ENV !== 'production') {\n const elementIds = getDevElementIds(this);\n const existingId = elementIds.get(element);\n if (existingId !== undefined && existingId !== id) {\n // TODO: fix mui/no-guarded-throw\n // eslint-disable-next-line mui/no-guarded-throw\n throw new Error('Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.');\n }\n\n // Reusing an id for a different element evicts the previous one, so it must lose its claim\n // on the id or a later registration under a different id would be reported as a duplicate.\n const previousElement = this.idMap.get(id);\n if (previousElement !== undefined && previousElement !== element) {\n elementIds.delete(previousElement);\n }\n elementIds.set(element, id);\n }\n this.idMap.set(id, element);\n }\n\n /**\n * Removes the trigger element with the given ID.\n */\n delete(id) {\n if (process.env.NODE_ENV !== 'production') {\n const element = this.idMap.get(id);\n if (element !== undefined) {\n devElementIdsByMap?.get(this)?.delete(element);\n }\n }\n this.idMap.delete(id);\n }\n\n /**\n * Whether the given element is registered as a trigger.\n */\n hasElement(element) {\n for (const registered of this.idMap.values()) {\n if (registered === element) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Whether there is a registered trigger element matching the given predicate.\n */\n hasMatchingElement(predicate) {\n for (const element of this.idMap.values()) {\n if (predicate(element)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Returns the trigger element associated with the given ID, or undefined if no such element exists.\n */\n getById(id) {\n return this.idMap.get(id);\n }\n\n /**\n * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].\n */\n entries() {\n return this.idMap.entries();\n }\n\n /**\n * Returns an iterable of all registered trigger elements.\n */\n elements() {\n return this.idMap.values();\n }\n\n /**\n * Returns the number of registered trigger elements.\n */\n get size() {\n return this.idMap.size;\n }\n}","import { ReactStore } from '@base-ui/utils/store';\nimport { createEventEmitter } from \"../utils/createEventEmitter.mjs\";\nimport { isClickLikeEvent } from \"../utils.mjs\";\nconst selectors = {\n open: state => state.open,\n transitionStatus: state => state.transitionStatus,\n domReferenceElement: state => state.domReferenceElement,\n referenceElement: state => state.positionReference ?? state.referenceElement,\n floatingElement: state => state.floatingElement,\n floatingId: state => state.floatingId\n};\nexport class FloatingRootStore extends ReactStore {\n constructor(options) {\n const {\n syncOnly,\n nested,\n onOpenChange,\n triggerElements,\n ...initialState\n } = options;\n super({\n ...initialState,\n positionReference: initialState.referenceElement,\n domReferenceElement: initialState.referenceElement\n }, {\n onOpenChange,\n dataRef: {\n current: {}\n },\n events: createEventEmitter(),\n nested,\n triggerElements\n }, selectors);\n this.syncOnly = syncOnly;\n }\n\n /**\n * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.\n */\n syncOpenEvent = (newOpen, event) => {\n if (!newOpen || !this.state.open ||\n // Prevent a pending hover-open from overwriting a click-open event, while allowing\n // click events to upgrade a hover-open.\n event != null && isClickLikeEvent(event)) {\n this.context.dataRef.current.openEvent = newOpen ? event : undefined;\n }\n };\n\n /**\n * Runs the root-owned side effects for an open state change.\n */\n dispatchOpenChange = (newOpen, eventDetails) => {\n this.syncOpenEvent(newOpen, eventDetails.event);\n const details = {\n open: newOpen,\n reason: eventDetails.reason,\n nativeEvent: eventDetails.event,\n nested: this.context.nested,\n triggerElement: eventDetails.trigger\n };\n this.context.events.emit('openchange', details);\n };\n\n /**\n * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.\n *\n * @param newOpen The new open state.\n * @param eventDetails Details about the event that triggered the open state change.\n */\n setOpen = (newOpen, eventDetails) => {\n if (this.syncOnly) {\n this.context.onOpenChange?.(newOpen, eventDetails);\n return;\n }\n this.dispatchOpenChange(newOpen, eventDetails);\n this.context.onOpenChange?.(newOpen, eventDetails);\n };\n}","import { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { FloatingRootStore } from \"../../floating-ui-react/components/FloatingRootStore.mjs\";\n\n/**\n * State common to all popup stores.\n */\n\nexport function createInitialPopupStoreState(triggerElements, floatingId, nested = false) {\n return {\n open: false,\n openProp: undefined,\n mounted: false,\n transitionStatus: undefined,\n floatingRootContext: new FloatingRootStore({\n open: false,\n transitionStatus: undefined,\n floatingElement: null,\n referenceElement: null,\n triggerElements,\n floatingId,\n syncOnly: true,\n nested,\n onOpenChange: undefined\n }),\n floatingId,\n triggerCount: 0,\n preventUnmountingOnClose: false,\n payload: undefined,\n activeTriggerId: null,\n activeTriggerElement: null,\n openedWithoutTrigger: false,\n triggerIdProp: undefined,\n popupElement: null,\n positionerElement: null,\n activeTriggerProps: EMPTY_OBJECT,\n inactiveTriggerProps: EMPTY_OBJECT,\n popupProps: EMPTY_OBJECT\n };\n}\nconst activeTriggerIdSelector = state => state.triggerIdProp ?? state.activeTriggerId;\nconst openSelector = state => state.openProp ?? state.open;\nconst popupIdSelector = state => {\n const popupId = state.popupElement?.id ?? state.floatingId;\n return popupId || undefined;\n};\nfunction triggerOwnsOpenPopup(state, triggerId) {\n return triggerId !== undefined && openSelector(state) && activeTriggerIdSelector(state) === triggerId;\n}\nfunction triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {\n if (triggerOwnsOpenPopup(state, triggerId)) {\n return true;\n }\n return triggerId !== undefined && openSelector(state) && activeTriggerIdSelector(state) == null && !state.openedWithoutTrigger && state.triggerCount === 1;\n}\nexport const popupStoreSelectors = {\n open: openSelector,\n mounted: state => state.mounted,\n // `open` is written synchronously on an open change; `mounted`/`transitionStatus` sync in a\n // layout effect. Match useTransitionStatus so a retained popup does not miss its starting phase.\n transitionStatus: state => openSelector(state) && !state.mounted ? 'starting' : state.transitionStatus,\n floatingRootContext: state => state.floatingRootContext,\n triggerCount: state => state.triggerCount,\n preventUnmountingOnClose: state => state.preventUnmountingOnClose,\n payload: state => state.payload,\n activeTriggerId: activeTriggerIdSelector,\n activeTriggerElement: state => state.mounted ? state.activeTriggerElement : null,\n popupId: popupIdSelector,\n /**\n * Whether the trigger with the given ID was used to open the popup.\n */\n isTriggerActive: (state, triggerId) => triggerId !== undefined && activeTriggerIdSelector(state) === triggerId,\n /**\n * Whether the popup is open and was activated by a trigger with the given ID.\n */\n isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),\n /**\n * Whether the popup is mounted and was activated by a trigger with the given ID.\n */\n isMountedByTrigger: (state, triggerId) => triggerId !== undefined && activeTriggerIdSelector(state) === triggerId && state.mounted,\n triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,\n /**\n * Popup id for the trigger that currently owns the open popup.\n */\n triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : undefined,\n popupProps: state => state.popupProps,\n popupElement: state => state.popupElement,\n positionerElement: state => state.positionerElement\n};\n\n/**\n * Store members a detached handle-backed trigger reads or invokes for trigger registration and data\n * forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a\n * detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to\n * be durable. Component handle-store views Pick these from their concrete store (preserving its\n * context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.\n */\n\n/**\n * The subset of a popup store that trigger registration and data forwarding rely on. Narrow enough\n * that an inert store can be passed while detached.\n */"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"mappings":"A,qoBAKA,IAAa4D,EAAO,YAKPC,EAAS,cAKTC,EAAgB9D,EAKhB+D,EAAc9D,EAKd+D,EA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EACjB,qBAAsB,GAAS/C,EAAM,QAAUA,EAAM,qBAAuB,KAC5E,QAASiD,GAIT,iBAAkB,EAAO,IAAchD,IAAc,IAAA,IAAa8C,EAAwB/C,CAAK,IAAMC,EAIrG,mBAAoB,EAAO,IAAciD,GAAqBlD,EAAOC,CAAS,EAI9E,oBAAqB,EAAO,IAAcA,IAAc,IAAA,IAAa8C,EAAwB/C,CAAK,IAAMC,GAAaD,EAAM,QAC3H,cAAe,EAAO,IAAaqD,EAAWrD,EAAM,mBAAqBA,EAAM,qBAI/E,gBAAiB,EAAO,IAAcmD,GAAoCnD,EAAOC,CAAS,EAAIgD,GAAgBjD,CAAK,EAAI,IAAA,GACvH,WAAY,GAASA,EAAM,WAC3B,aAAc,GAASA,EAAM,aAC7B,kBAAmB,GAASA,EAAM,iBACpC,E"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n,t as r}from"./utils-BFSetRo1.js";import{a as ee,i}from"./useOpenChangeComplete-DUM-_E2z.js";import{F as a,M as te,c as o,j as s,n as ne,o as c,t as re}from"./useButton-DQ6Sgg7h.js";import{_ as ie,u as ae}from"./reason-parts-B6nt3n-F.js";import{t as oe}from"./useBaseUiId-BUBV7JiZ.js";import{t as se}from"./useValueChanged-BqSvidps.js";import{a as ce,c as l,i as u,n as d,o as f,r as p,t as m}from"./useRegisterFieldControl-DuodOtnM.js";import{t as h}from"./useAriaLabelledBy-DjHYrmeF.js";import{t as le}from"./useControlled-B9BFcdfh.js";var g=e(t(),1),_=g.createContext(void 0);function v(){let e=g.useContext(_);if(e===void 0)throw Error(s(63));return e}var y=`data-checked`,b=`data-unchecked`,x={...l,checked(e){return e?{[y]:``}:{[b]:``}}},S=n(),C=g.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:s,"aria-labelledby":l,form:v,id:y,inputRef:b,name:C,nativeButton:w=!1,onCheckedChange:T,readOnly:E=!1,required:D=!1,disabled:O=!1,render:ue,uncheckedValue:k,value:A,style:de,...j}=e,{clearErrors:M}=ce(),{state:N,setTouched:P,setDirty:F,validityData:I,setFilled:L,validationMode:R,disabled:z,name:B,validation:V}=f(),{labelId:H}=u(),U=z||O,W=B??C,G=g.useRef(null),fe=o(G,b,V.inputRef),K=g.useRef(null),q=d(U,K),J=oe(),Y=p({id:y}),X=w?void 0:Y,[Z,pe]=le({controlled:n,default:!!s,name:`Switch`,state:`checked`});m(K,J,Z,void 0,!U,C),te(()=>{L(Z)},[Z,L]),se(Z,()=>{M(W),F(Z!==I.initialValue),V.change(Z)});let{getButtonProps:me,buttonRef:he}=re({disabled:U,native:w}),ge=h(l,H,G,!w,X,j[`aria-label`]),_e={id:w?Y:J,role:`switch`,"aria-checked":Z,"aria-readonly":E||void 0,"aria-required":D||void 0,"aria-labelledby":ge,onFocus(){q(!0)},onBlur(){let e=G.current;e&&!U&&(P(!0),q(!1),R===`onBlur`&&V.commit(e.checked))},onClick(e){if(E||U)return;e.preventDefault();let t=G.current;t&&ne(t,e)}},Q={...V.getValidationProps(U),checked:Z,disabled:U,form:v,id:X,name:W,required:D,style:W?ee:i,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:fe,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(E){e.preventDefault();return}let t=e.currentTarget.checked,n=ie(ae,e.nativeEvent);T?.(t,n),n.isCanceled||pe(t)},onClick(e){e.stopPropagation()},onFocus(){K.current?.focus()},...A===void 0?a:{value:A}},$=g.useMemo(()=>({...N,checked:Z,disabled:U,readOnly:E,required:D}),[N,Z,U,E,D]),ve=c(`span`,e,{state:$,ref:[t,K,he],props:[_e,j,me,e=>V.getValidationProps(U,e)],stateAttributesMapping:x});return(0,S.jsxs)(_.Provider,{value:$,children:[ve,!Z&&W&&k!==void 0&&(0,S.jsx)(`input`,{type:`hidden`,form:v,name:W,value:k,disabled:U}),(0,S.jsx)(`input`,{...Q,suppressHydrationWarning:!0})]})}),w=g.forwardRef(function(e,t){let{render:n,className:r,style:ee,...i}=e,a=v();return c(`span`,e,{state:a,ref:t,stateAttributesMapping:x,props:i})});function T({className:e,size:t=`default`,...n}){return(0,S.jsx)(C,{"data-slot":`switch`,"data-size":t,className:r(`peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...n,children:(0,S.jsx)(w,{"data-slot":`switch-thumb`,className:`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground`})})}export{T as t};
|
|
2
|
+
//# sourceMappingURL=switch-C_lbqEIt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-C_lbqEIt.js","names":["_formatErrorMessage","SwitchRootDataAttributes.checked","SwitchRootDataAttributes.unchecked","REASONS.none","SwitchPrimitive.Root","SwitchPrimitive.Thumb","__toESM","require_react","require_jsx_runtime","cn","visuallyHiddenInput","EMPTY_OBJECT","useIsoLayoutEffect","useMergedRefs","formatErrorMessage","dispatchClickWithModifiers","useRenderElement","useButton","createChangeEventDetails","none","useBaseUiId","useValueChanged","useFormContext","fieldValidityMapping","useLabelableContext","useSetFieldFocused","useFieldRootContext","useLabelableId","useRegisterFieldControl","useAriaLabelledBy","useControlled","import_react","SwitchRootContext","useSwitchRootContext","context","checked","unchecked","stateAttributesMapping","value","import_jsx_runtime","SwitchRoot","checkedProp","ariaLabelledByProp","idProp","externalInputRef","nameProp","disabledProp","elementProps","componentProps","fieldState","fieldDisabled","fieldName","disabled","name","inputRef","handleInputRef","validation","switchRef","setFocused","id","controlId","hiddenInputId","nativeButton","setCheckedState","defaultChecked","setFilled","clearErrors","setDirty","validityData","ariaLabelledBy","labelId","rootProps","readOnly","required","element","setTouched","validationMode","event","input","inputProps","visuallyHidden","nextChecked","eventDetails","onCheckedChange","state","forwardedRef","buttonRef","getButtonProps","props","uncheckedValue","SwitchThumb","Switch","size","className"],"sources":["../../../../node_modules/@base-ui/react/switch/root/SwitchRootContext.mjs","../../../../node_modules/@base-ui/react/switch/root/SwitchRootDataAttributes.mjs","../../../../node_modules/@base-ui/react/switch/stateAttributesMapping.mjs","../../../../node_modules/@base-ui/react/switch/root/SwitchRoot.mjs","../../../../node_modules/@base-ui/react/switch/thumb/SwitchThumb.mjs","../../src/components/ui/switch.tsx"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SwitchRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SwitchRootContext.displayName = \"SwitchRootContext\";\nexport function useSwitchRootContext() {\n const context = React.useContext(SwitchRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.' : _formatErrorMessage(63));\n }\n return context;\n}","/**\n * Present when the switch is checked.\n */\nexport const checked = 'data-checked';\n/**\n * Present when the switch is not checked.\n */\nexport const unchecked = 'data-unchecked';\n/**\n * Present when the switch is disabled.\n */\nexport const disabled = 'data-disabled';\n/**\n * Present when the switch is readonly.\n */\nexport const readonly = 'data-readonly';\n/**\n * Present when the switch is required.\n */\nexport const required = 'data-required';\n/**\n * Present when the switch is in a valid state (when wrapped in Field.Root).\n */\nexport const valid = 'data-valid';\n/**\n * Present when the switch is in an invalid state (when wrapped in Field.Root).\n */\nexport const invalid = 'data-invalid';\n/**\n * Present when the switch has been touched (when wrapped in Field.Root).\n */\nexport const touched = 'data-touched';\n/**\n * Present when the switch's value has changed (when wrapped in Field.Root).\n */\nexport const dirty = 'data-dirty';\n/**\n * Present when the switch is active (when wrapped in Field.Root).\n */\nexport const filled = 'data-filled';\n/**\n * Present when the switch is focused (when wrapped in Field.Root).\n */\nexport const focused = 'data-focused';","import { fieldValidityMapping } from \"../internals/field-constants/constants.mjs\";\nimport * as SwitchRootDataAttributes from \"./root/SwitchRootDataAttributes.mjs\";\nexport const stateAttributesMapping = {\n ...fieldValidityMapping,\n checked(value) {\n if (value) {\n return {\n [SwitchRootDataAttributes.checked]: ''\n };\n }\n return {\n [SwitchRootDataAttributes.unchecked]: ''\n };\n }\n};","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { SwitchRootContext } from \"./SwitchRootContext.mjs\";\nimport { stateAttributesMapping } from \"../stateAttributesMapping.mjs\";\nimport { dispatchClickWithModifiers } from \"../../utils/dispatchClickWithModifiers.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useSetFieldFocused } from \"../../internals/field-root-context/useSetFieldFocused.mjs\";\nimport { useRegisterFieldControl } from \"../../internals/field-register-control/useRegisterFieldControl.mjs\";\nimport { useFormContext } from \"../../internals/form-context/FormContext.mjs\";\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { useAriaLabelledBy } from \"../../internals/labelable-provider/useAriaLabelledBy.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useValueChanged } from \"../../internals/useValueChanged.mjs\";\n\n/**\n * Represents the switch itself.\n * Renders a `<span>` element and a hidden `<input>` beside.\n *\n * Documentation: [Base UI Switch](https://base-ui.com/react/components/switch)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const SwitchRoot = /*#__PURE__*/React.forwardRef(function SwitchRoot(componentProps, forwardedRef) {\n const {\n checked: checkedProp,\n className,\n defaultChecked,\n 'aria-labelledby': ariaLabelledByProp,\n form,\n id: idProp,\n inputRef: externalInputRef,\n name: nameProp,\n nativeButton = false,\n onCheckedChange,\n readOnly = false,\n required = false,\n disabled: disabledProp = false,\n render,\n uncheckedValue,\n value,\n style,\n ...elementProps\n } = componentProps;\n const {\n clearErrors\n } = useFormContext();\n const {\n state: fieldState,\n setTouched,\n setDirty,\n validityData,\n setFilled,\n validationMode,\n disabled: fieldDisabled,\n name: fieldName,\n validation\n } = useFieldRootContext();\n const {\n labelId\n } = useLabelableContext();\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const inputRef = React.useRef(null);\n const handleInputRef = useMergedRefs(inputRef, externalInputRef, validation.inputRef);\n const switchRef = React.useRef(null);\n const setFocused = useSetFieldFocused(disabled, switchRef);\n const id = useBaseUiId();\n const controlId = useLabelableId({\n id: idProp\n });\n const hiddenInputId = nativeButton ? undefined : controlId;\n const [checked, setCheckedState] = useControlled({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'Switch',\n state: 'checked'\n });\n useRegisterFieldControl(switchRef, id, checked, undefined, !disabled, nameProp);\n useIsoLayoutEffect(() => {\n setFilled(checked);\n }, [checked, setFilled]);\n useValueChanged(checked, () => {\n clearErrors(name);\n setDirty(checked !== validityData.initialValue);\n validation.change(checked);\n });\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const ariaLabelledBy = useAriaLabelledBy(ariaLabelledByProp, labelId, inputRef, !nativeButton, hiddenInputId, elementProps['aria-label']);\n const rootProps = {\n id: nativeButton ? controlId : id,\n role: 'switch',\n 'aria-checked': checked,\n 'aria-readonly': readOnly || undefined,\n 'aria-required': required || undefined,\n 'aria-labelledby': ariaLabelledBy,\n onFocus() {\n setFocused(true);\n },\n onBlur() {\n const element = inputRef.current;\n if (!element || disabled) {\n return;\n }\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(element.checked);\n }\n },\n onClick(event) {\n if (readOnly || disabled) {\n return;\n }\n event.preventDefault();\n const input = inputRef.current;\n if (!input) {\n return;\n }\n dispatchClickWithModifiers(input, event);\n }\n };\n const inputProps = {\n ...validation.getValidationProps(disabled),\n checked,\n disabled,\n form,\n id: hiddenInputId,\n name,\n required,\n style: name ? visuallyHiddenInput : visuallyHidden,\n tabIndex: -1,\n type: 'checkbox',\n 'aria-hidden': true,\n ref: handleInputRef,\n onChange(event) {\n // Workaround for https://github.com/react/react/issues/9023\n if (event.nativeEvent.defaultPrevented) {\n return;\n }\n if (readOnly) {\n event.preventDefault();\n return;\n }\n const nextChecked = event.currentTarget.checked;\n const eventDetails = createChangeEventDetails(REASONS.none, event.nativeEvent);\n onCheckedChange?.(nextChecked, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setCheckedState(nextChecked);\n },\n onClick(event) {\n // The click dispatched from the root's `onClick` is an implementation detail\n // and must not reach ancestors, which already receive the original click.\n event.stopPropagation();\n },\n onFocus() {\n switchRef.current?.focus();\n },\n // React <19 sets an empty value if `undefined` is passed explicitly\n // To avoid this, we only set the value if it's defined\n ...(value !== undefined ? {\n value\n } : EMPTY_OBJECT)\n };\n const state = React.useMemo(() => ({\n ...fieldState,\n checked,\n disabled,\n readOnly,\n required\n }), [fieldState, checked, disabled, readOnly, required]);\n const element = useRenderElement('span', componentProps, {\n state,\n ref: [forwardedRef, switchRef, buttonRef],\n props: [rootProps, elementProps, getButtonProps, props => validation.getValidationProps(disabled, props)],\n stateAttributesMapping\n });\n return /*#__PURE__*/_jsxs(SwitchRootContext.Provider, {\n value: state,\n children: [element, !checked && name && uncheckedValue !== undefined && /*#__PURE__*/_jsx(\"input\", {\n type: \"hidden\",\n form: form,\n name: name,\n value: uncheckedValue,\n disabled: disabled\n }), /*#__PURE__*/_jsx(\"input\", {\n ...inputProps,\n suppressHydrationWarning: true\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SwitchRoot.displayName = \"SwitchRoot\";","'use client';\n\nimport * as React from 'react';\nimport { useSwitchRootContext } from \"../root/SwitchRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { stateAttributesMapping } from \"../stateAttributesMapping.mjs\";\n\n/**\n * The movable part of the switch that indicates whether the switch is on or off.\n * Renders a `<span>`.\n *\n * Documentation: [Base UI Switch](https://base-ui.com/react/components/switch)\n */\nexport const SwitchThumb = /*#__PURE__*/React.forwardRef(function SwitchThumb(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const state = useSwitchRootContext();\n return useRenderElement('span', componentProps, {\n state,\n ref: forwardedRef,\n stateAttributesMapping,\n props: elementProps\n });\n});\nif (process.env.NODE_ENV !== \"production\") SwitchThumb.displayName = \"SwitchThumb\";","import { Switch as SwitchPrimitive } from \"@base-ui/react/switch\"\nimport { cn } from \"@/lib/utils\"\n\nfunction Switch({\n className,\n size = \"default\",\n ...props\n}: SwitchPrimitive.Root.Props & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n \"peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className=\"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground\"\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\n"],"ignoreList":[0,1,2,3,4],"mappings":"A,gnBAIagC,EAAiCD,EAAM,cAAc,IAAA,EAAS,EAE3E,SAAgBE,GAAuB,CACrC,IAAMC,EAAAH,EAAgB,WAAWC,CAAiB,EAClD,GAAIE,IAAY,IAAA,GACd,MAAU,MAA2IlC,EAAoB,EAAE,CAAC,EAE9K,OAAOkC,CACT,CCTA,IAAaC,EAAU,eAIVC,EAAY,iBCLZC,EAAyB,CACpC,GAAGd,EACH,QAAQ,EAAO,CAMb,OALIe,EACK,EACJrC,GAAmC,EACtC,EAEK,EACJC,GAAqC,EACxC,CACF,CACF,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S,EACxC,MAAO,CAACf,GAAWxB,EAAcwC,GAAgB,GAAS/B,EAAW,mBAAmBJ,EAAUoC,CAAK,CAAC,EACxG,wBACF,CAAC,EACD,OAAoB,EAAAjD,EAAA,KAAA,CAAMP,EAAkB,SAAU,CACpD,MAAOoD,EACP,SAAU,CAACV,GAAS,CAACvC,GAAWkB,GAAQoC,IAAmB,IAAA,KAA0B,EAAAlD,EAAA,IAAA,CAAK,QAAS,CACjG,KAAM,SACA,OACA,OACN,MAAOkD,EACG,UACZ,CAAC,GAAgB,EAAAlD,EAAA,IAAA,CAAK,QAAS,CAC7B,GAAGwC,EACH,yBAA0B,EAC5B,CAAC,CAAC,CACJ,CAAC,CACH,CAAC,EClMYW,EAA2B3D,EAAM,WAAW,SAAqB,EAAgB,EAAc,CAC1G,GAAM,CACJ,SACA,YACA,SACA,GAAGgB,GACDC,EACEoC,EAAQnD,EAAqB,EACnC,OAAOjB,EAAiB,OAAQgC,EAAgB,CAC9C,QACA,IAAKqC,EACL,yBACA,MAAOtC,CACT,CAAC,CACH,CAAC,ECxBD,SAAS4C,EAAO,CACd,YACA,OAAO,UACP,GAAGH,GAGF,CACD,OACE,EAAAjD,EAAA,IAAA,CAACnC,EAAD,CACE,YAAU,SACV,YAAWwF,EACX,UAAWnF,EACT,8vBACAoF,CACF,EACA,GAAIL,EAEJ,UAAA,EAAAjD,EAAA,IAAA,CAAClC,EAAD,CACE,YAAU,eACV,UAAU,+eACX,CAAA,CACmB,CAAA,CAE1B,C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n}from"./utils-BFSetRo1.js";import{t as r}from"./link-CByMaQfX.js";import{t as i}from"./useNavigate-CrwlTILa.js";import{t as a}from"./useQuery-BkgWvtTa.js";import{A as o,Et as s,P as c,b as l,it as u,m as d}from"./index-EqRZkjd6.js";import{t as f}from"./list-tree-Cq6aoA_B.js";import{t as p}from"./data-table-DL8nsehq.js";import{n as m,t as h}from"./use-cursor-stack-DIOApcfL.js";import{t as g}from"./states-Z2xH3pUB.js";import{n as _,t as v}from"./section-Bq1blJ9c.js";import{t as y}from"./segmented-RsFdV9xJ.js";import{t as b}from"./page-header-CHk7bso7.js";import{n as x}from"./server-switcher-hOm8Popx.js";import{t as S}from"./button-0-kx6BS-.js";import{t as C}from"./switch-C_lbqEIt.js";import{i as w}from"./queries-O4X2594T.js";import{n as T}from"./timeline-Cye1s7g_.js";var E=e(t()),D=n(),O={"24h":864e5,"7d":6048e5,"14d":12096e5,"30d":2592e6};function k(){let e=u.useSearch(),t=i({from:u.fullPath}),n=e.server??x(),k=e.range??`7d`,A=JSON.stringify({...e,server:n}),j=h(A),[M]=(0,E.useState)(()=>Date.now()),N=new Date(Math.floor((M-O[k])/6e4)*6e4).toISOString(),P=a(w({...n?{serverId:n}:{},...e.outcome?{outcome:[e.outcome]}:{},...e.q?{q:e.q}:{},...e.evals?{origin:`eval`}:{},from:N,...j.cursor?{cursor:j.cursor}:{}},!!e.live)),F=e.scripts?P.data?.items.filter(e=>e.scriptCount>0):P.data?.items,I=e=>void t({search:t=>({...t,...e})}),L=!!(e.outcome||e.q||e.scripts||e.evals);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(b,{title:`Tasks`,description:`What agents did, grouped as tasks: framed by begin_task / end_task, a code-mode script, or inferred from a burst of calls.`}),(0,D.jsxs)(v,{children:[(0,D.jsx)(_,{label:`Search goals or task ids`,placeholder:`Search goals, task ids`,value:e.q,onChange:e=>I({q:e}),className:`w-60`}),(0,D.jsx)(y,{label:`Outcome`,size:`sm`,value:e.outcome??`all`,onChange:e=>I({outcome:e===`all`?void 0:e}),options:[{value:`all`,label:`All`},{value:`success`,label:`Success`},{value:`partial`,label:`Partial`},{value:`failure`,label:`Failure`},{value:`inferred`,label:`Inferred`}]}),(0,D.jsx)(y,{label:`Time range`,size:`sm`,value:k,onChange:e=>I({range:e}),options:[{value:`24h`,label:`24 h`},{value:`7d`,label:`7 d`},{value:`14d`,label:`14 d`},{value:`30d`,label:`30 d`}]}),(0,D.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 text-[13px]`,children:[(0,D.jsx)(C,{size:`sm`,checked:!!e.scripts,onCheckedChange:e=>I({scripts:e||void 0})}),` Has script`]}),(0,D.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 text-[13px]`,children:[(0,D.jsx)(C,{size:`sm`,checked:!!e.evals,onCheckedChange:e=>I({evals:e||void 0})}),` Eval traffic`]}),(0,D.jsx)(`span`,{className:`flex-1`}),(0,D.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 text-[13px]`,children:[(0,D.jsx)(C,{size:`sm`,checked:!!e.live,onCheckedChange:e=>I({live:e||void 0})}),e.live?(0,D.jsx)(s,{"aria-hidden":`true`,className:`size-2 animate-pulse fill-success text-success`}):null,` Live`]})]}),(0,D.jsx)(p,{label:`Tasks`,columns:[{id:`started`,header:`Started`,priority:2,cell:e=>(0,D.jsx)(`span`,{className:`text-[13px] whitespace-nowrap text-muted-foreground`,title:o(e.startedAt),children:c(e.startedAt)})},{id:`goal`,header:`Goal`,priority:1,cell:e=>(0,D.jsx)(r,{to:`/tasks/$taskId`,params:{taskId:e.id},className:`block max-w-md truncate hover:underline`,children:e.goal??(0,D.jsxs)(`span`,{className:`text-muted-foreground italic`,children:[`Inferred: `,e.inferredLabel?.goal??`${e.callCount} calls`]})})},{id:`outcome`,header:`Outcome`,priority:1,cell:e=>(0,D.jsx)(l,{outcome:e.outcome,status:e.status,framing:e.framing})},{id:`agent`,header:`Agent`,priority:2,cell:e=>(0,D.jsxs)(`span`,{className:`text-[13px] whitespace-nowrap`,children:[(0,D.jsx)(`span`,{className:`font-mono`,children:e.principal.name}),` `,(0,D.jsxs)(`span`,{className:`text-muted-foreground`,children:[`· `,e.client.name??`unknown`]})]})},{id:`env`,header:`Environment`,cell:e=>(0,D.jsx)(d,{slug:e.environment.slug,kind:e.environment.kind})},{id:`calls`,header:`Calls`,align:`right`,cell:e=>(0,D.jsx)(`span`,{className:`tabular-nums`,children:e.callCount})},{id:`scripts`,header:`Scripts`,align:`right`,cell:e=>(0,D.jsx)(`span`,{className:`tabular-nums`,children:e.scriptCount||``})},{id:`errors`,header:`Errors`,align:`right`,cell:e=>(0,D.jsx)(`span`,{className:e.errorCount?`text-destructive tabular-nums`:`text-muted-foreground tabular-nums`,children:e.errorCount})},{id:`decisions`,header:`Decisions`,align:`right`,cell:e=>(0,D.jsx)(`span`,{className:`text-muted-foreground tabular-nums`,children:e.decisionCount||``})},{id:`duration`,header:`Duration`,align:`right`,cell:e=>(0,D.jsx)(`span`,{className:`text-muted-foreground tabular-nums`,children:e.status===`open`?`running`:T(e.durationMs)})}],rows:F,loading:P.isPending,error:P.error,onRetry:()=>void P.refetch(),getRowId:e=>e.id,onRowClick:e=>void t({to:`/tasks/$taskId`,params:{taskId:e.id}}),empty:L?(0,D.jsx)(g,{icon:f,title:`No tasks match`,action:(0,D.jsx)(S,{variant:`outline`,onClick:()=>void t({search:{}}),children:`Clear filters`})}):(0,D.jsx)(g,{icon:f,title:`No tasks yet`,description:`Connect a client to start sending traffic.`,action:(0,D.jsx)(r,{to:`/connect`,className:`font-medium text-primary hover:underline`,children:`Connect a client`})})}),(0,D.jsx)(m,{page:j.page,hasPrev:j.hasPrev,hasNext:!!P.data?.nextCursor,onPrev:j.prev,onNext:()=>P.data?.nextCursor&&j.next(P.data.nextCursor)})]})}export{k as component};
|
|
2
|
+
//# sourceMappingURL=tasks-CRKt_Suy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks-CRKt_Suy.js","names":["useState","useNavigate","useQuery","ListTreeIcon","rememberedServer","tasksQuery","compactDuration","useCursorStack","formatDateTime","formatRelative","Route","RANGE_MS","TasksPage","f","useSearch","navigate","from","fullPath","server","range","filterKey","JSON","stringify","cursors","now","Date","Math","floor","toISOString","query","serverId","outcome","q","evals","origin","cursor","live","rows","scripts","data","items","filter","t","scriptCount","set","p","search","prev","filtered","columns","id","header","priority","cell","startedAt","taskId","goal","inferredLabel","callCount","status","framing","principal","name","client","environment","slug","kind","align","errorCount","decisionCount","durationMs","v","undefined","value","label","isPending","error","refetch","to","params","page","hasPrev","nextCursor","next","_Fragment","CircleIcon","__toESM","require_react","require_jsx_runtime","Link","useNavigate","useQuery","formatDateTime","Circle","formatRelative","OutcomeBadge","Route","EnvBadge","ListTree","DataTable","CursorPager","useCursorStack","EmptyState","SearchInput","Toolbar","Segmented","PageHeader","rememberedServer","Button","Switch","tasksQuery","compactDuration","import_react","import_jsx_runtime","RANGE_MS","TasksPage","f","navigate","server","range","filterKey","cursors","now","from","query","rows","t","set","prev","p","filtered","v"],"sources":["../../src/routes/_app/tasks/index.tsx?tsr-split=component"],"sourcesContent":["import { useState } from 'react';\nimport { Link, createFileRoute, useNavigate } from '@tanstack/react-router';\nimport { useQuery } from '@tanstack/react-query';\nimport * as z from 'zod';\nimport { CircleIcon, ListTreeIcon } from 'lucide-react';\nimport type { TaskRow } from '@/contract';\nimport { guard } from '@/app/route-guards';\nimport { DataTable, type ColumnSpec } from '@/components/data-table/data-table';\nimport { CursorPager } from '@/components/data-table/cursor-pager';\nimport { EmptyState } from '@/components/feedback/states';\nimport { SearchInput } from '@/components/filters/search-input';\nimport { Segmented } from '@/components/filters/segmented';\nimport { Toolbar } from '@/components/layout/section';\nimport { PageHeader } from '@/components/layout/page-header';\nimport { rememberedServer } from '@/components/layout/server-switcher';\nimport { EnvBadge, OutcomeBadge } from '@/components/status/status';\nimport { Button } from '@/components/ui/button';\nimport { Switch } from '@/components/ui/switch';\nimport { tasksQuery } from '@/features/tasks/queries';\nimport { compactDuration } from '@/features/tasks/timeline';\nimport { useCursorStack } from '@/hooks/use-cursor-stack';\nimport { formatDateTime, formatRelative } from '@/lib/format';\n\nconst search = z.object({\n server: z.string().optional().catch(undefined),\n env: z.string().optional().catch(undefined),\n outcome: z.enum(['success', 'partial', 'failure', 'abandoned', 'inferred']).optional().catch(undefined),\n q: z.string().optional().catch(undefined),\n range: z.enum(['24h', '7d', '14d', '30d']).optional().catch(undefined),\n scripts: z.boolean().optional().catch(undefined),\n evals: z.boolean().optional().catch(undefined),\n live: z.boolean().optional().catch(undefined),\n});\n\nexport const Route = createFileRoute('/_app/tasks/')({\n validateSearch: search,\n beforeLoad: guard(['tasks:read']),\n staticData: { crumbs: ['Tasks'] },\n component: TasksPage,\n});\n\nconst RANGE_MS = { '24h': 86_400_000, '7d': 7 * 86_400_000, '14d': 14 * 86_400_000, '30d': 30 * 86_400_000 } as const;\n\n/** Tasks explorer (spec §9.11): traces grouped as tasks. */\nfunction TasksPage() {\n const f = Route.useSearch();\n const navigate = useNavigate({ from: Route.fullPath });\n const server = f.server ?? rememberedServer();\n const range = f.range ?? '7d';\n const filterKey = JSON.stringify({ ...f, server });\n const cursors = useCursorStack(filterKey);\n const [now] = useState(() => Date.now());\n const from = new Date(Math.floor((now - RANGE_MS[range]) / 60_000) * 60_000).toISOString();\n const query = useQuery(\n tasksQuery(\n { ...(server ? { serverId: server } : {}), ...(f.outcome ? { outcome: [f.outcome] } : {}), ...(f.q ? { q: f.q } : {}), ...(f.evals ? { origin: 'eval' as const } : {}), from, ...(cursors.cursor ? { cursor: cursors.cursor } : {}) },\n !!f.live,\n ),\n );\n const rows = f.scripts ? query.data?.items.filter((t) => t.scriptCount > 0) : query.data?.items;\n const set = (p: Partial<z.infer<typeof search>>) => void navigate({ search: (prev) => ({ ...prev, ...p }) });\n const filtered = !!(f.outcome || f.q || f.scripts || f.evals);\n const columns: ColumnSpec<TaskRow>[] = [\n { id: 'started', header: 'Started', priority: 2, cell: (t) => <span className=\"text-[13px] whitespace-nowrap text-muted-foreground\" title={formatDateTime(t.startedAt)}>{formatRelative(t.startedAt)}</span> },\n {\n id: 'goal',\n header: 'Goal',\n priority: 1,\n cell: (t) => (\n <Link to=\"/tasks/$taskId\" params={{ taskId: t.id }} className=\"block max-w-md truncate hover:underline\">\n {t.goal ?? <span className=\"text-muted-foreground italic\">Inferred: {t.inferredLabel?.goal ?? `${t.callCount} calls`}</span>}\n </Link>\n ),\n },\n { id: 'outcome', header: 'Outcome', priority: 1, cell: (t) => <OutcomeBadge outcome={t.outcome} status={t.status} framing={t.framing} /> },\n { id: 'agent', header: 'Agent', priority: 2, cell: (t) => <span className=\"text-[13px] whitespace-nowrap\"><span className=\"font-mono\">{t.principal.name}</span> <span className=\"text-muted-foreground\">· {t.client.name ?? 'unknown'}</span></span> },\n { id: 'env', header: 'Environment', cell: (t) => <EnvBadge slug={t.environment.slug} kind={t.environment.kind} /> },\n { id: 'calls', header: 'Calls', align: 'right', cell: (t) => <span className=\"tabular-nums\">{t.callCount}</span> },\n { id: 'scripts', header: 'Scripts', align: 'right', cell: (t) => <span className=\"tabular-nums\">{t.scriptCount || ''}</span> },\n { id: 'errors', header: 'Errors', align: 'right', cell: (t) => <span className={t.errorCount ? 'text-destructive tabular-nums' : 'text-muted-foreground tabular-nums'}>{t.errorCount}</span> },\n { id: 'decisions', header: 'Decisions', align: 'right', cell: (t) => <span className=\"text-muted-foreground tabular-nums\">{t.decisionCount || ''}</span> },\n { id: 'duration', header: 'Duration', align: 'right', cell: (t) => <span className=\"text-muted-foreground tabular-nums\">{t.status === 'open' ? 'running' : compactDuration(t.durationMs)}</span> },\n ];\n return (\n <>\n <PageHeader title=\"Tasks\" description=\"What agents did, grouped as tasks: framed by begin_task / end_task, a code-mode script, or inferred from a burst of calls.\" />\n <Toolbar>\n <SearchInput label=\"Search goals or task ids\" placeholder=\"Search goals, task ids\" value={f.q} onChange={(q) => set({ q })} className=\"w-60\" />\n <Segmented\n label=\"Outcome\"\n size=\"sm\"\n value={f.outcome ?? 'all'}\n onChange={(v) => set({ outcome: v === 'all' ? undefined : v })}\n options={[\n { value: 'all', label: 'All' },\n { value: 'success', label: 'Success' },\n { value: 'partial', label: 'Partial' },\n { value: 'failure', label: 'Failure' },\n { value: 'inferred', label: 'Inferred' },\n ]}\n />\n <Segmented label=\"Time range\" size=\"sm\" value={range} onChange={(v) => set({ range: v })} options={[{ value: '24h', label: '24 h' }, { value: '7d', label: '7 d' }, { value: '14d', label: '14 d' }, { value: '30d', label: '30 d' }]} />\n <label className=\"inline-flex items-center gap-1.5 text-[13px]\">\n <Switch size=\"sm\" checked={!!f.scripts} onCheckedChange={(v) => set({ scripts: v || undefined })} /> Has script\n </label>\n <label className=\"inline-flex items-center gap-1.5 text-[13px]\">\n <Switch size=\"sm\" checked={!!f.evals} onCheckedChange={(v) => set({ evals: v || undefined })} /> Eval traffic\n </label>\n <span className=\"flex-1\" />\n <label className=\"inline-flex items-center gap-1.5 text-[13px]\">\n <Switch size=\"sm\" checked={!!f.live} onCheckedChange={(v) => set({ live: v || undefined })} />\n {f.live ? <CircleIcon aria-hidden=\"true\" className=\"size-2 animate-pulse fill-success text-success\" /> : null} Live\n </label>\n </Toolbar>\n <DataTable\n label=\"Tasks\"\n columns={columns}\n rows={rows}\n loading={query.isPending}\n error={query.error}\n onRetry={() => void query.refetch()}\n getRowId={(t) => t.id}\n onRowClick={(t) => void navigate({ to: '/tasks/$taskId', params: { taskId: t.id } })}\n empty={\n filtered ? (\n <EmptyState icon={ListTreeIcon} title=\"No tasks match\" action={<Button variant=\"outline\" onClick={() => void navigate({ search: {} })}>Clear filters</Button>} />\n ) : (\n <EmptyState icon={ListTreeIcon} title=\"No tasks yet\" description=\"Connect a client to start sending traffic.\" action={<Link to=\"/connect\" className=\"font-medium text-primary hover:underline\">Connect a client</Link>} />\n )\n }\n />\n <CursorPager page={cursors.page} hasPrev={cursors.hasPrev} hasNext={!!query.data?.nextCursor} onPrev={cursors.prev} onNext={() => query.data?.nextCursor && cursors.next(query.data.nextCursor)} />\n </>\n );\n}\n"],"mappings":"A,k2BAyCMW,EAAW,CAAE,MAAO,MAAY,KAAM,OAAgB,MAAO,QAAiB,MAAO,MAAgB,EAG3G,SAASC,GAAY,CACnB,IAAMC,EAAIH,EAAMI,UAAU,EACpBC,EAAWd,EAAY,CAAEe,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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e,t){let n=Date.parse(t),r=[...e].sort((e,t)=>Date.parse(e.ts)-Date.parse(t.ts)),i=Math.max(1,...r.map(e=>e.durationMs??0)),a=[],o=null;for(let e of r){let t=Date.parse(e.ts);e.kind===`gap`?(a.push({type:`gap`,id:e.id,ms:e.durationMs??0}),o=t+(e.durationMs??0)):(o!==null&&t-o>6e4&&a.push({type:`gap`,id:`gap-${e.id}`,ms:t-o}),a.push({type:`item`,item:e,offsetMs:t-n,latencyPct:Math.round((e.durationMs??0)/i*100)}),o=t+(e.durationMs??0))}return a}function t(e){let n=[];for(let r of e)r.kind===`call`&&r.write&&!r.dryRun&&n.push(r),r.children&&n.push(...t(r.children));return n}function n(e){return e.filter(e=>e.kind===`decision`)}function r(e){if(e==null)return`—`;if(e<1e3)return`${Math.round(e)} ms`;if(e<6e4)return`${(e/1e3).toFixed(+(e<1e4))} s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return n?`${t} m ${n} s`:`${t} m`}export{t as i,r as n,n as r,e as t};
|
|
2
|
+
//# sourceMappingURL=timeline-Cye1s7g_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-Cye1s7g_.js","names":["buildRows","start","startedAt","sorted","items","a","b","max","i","rows","prevEnd","item","ts","writeCalls","out","decisions","compactDuration","ms","m","s"],"sources":["../../src/features/tasks/timeline.ts"],"sourcesContent":["import type { TimelineItem } from '@/contract';\n\n/** Idle gap separator threshold: a pause of more than a minute between two items. */\nexport const IDLE_GAP_MS = 60_000;\n\nexport type Row = { type: 'item'; item: TimelineItem; offsetMs: number; latencyPct: number } | { type: 'gap'; id: string; ms: number };\n\n/**\n * Timeline rows (adapted from Hub's session timeline): items sorted by time, an idle-gap\n * separator between items more than `IDLE_GAP_MS` apart, the offset from the task start and a\n * latency bar width relative to the slowest item. Backend `gap` items pass through as separators.\n */\nexport function buildRows(items: TimelineItem[], startedAt: string): Row[] {\n const start = Date.parse(startedAt);\n const sorted = [...items].sort((a, b) => Date.parse(a.ts) - Date.parse(b.ts));\n const max = Math.max(1, ...sorted.map((i) => i.durationMs ?? 0));\n const rows: Row[] = [];\n let prevEnd: number | null = null;\n for (const item of sorted) {\n const ts = Date.parse(item.ts);\n if (item.kind === 'gap') {\n rows.push({ type: 'gap', id: item.id, ms: item.durationMs ?? 0 });\n prevEnd = ts + (item.durationMs ?? 0);\n continue;\n }\n if (prevEnd !== null && ts - prevEnd > IDLE_GAP_MS) rows.push({ type: 'gap', id: `gap-${item.id}`, ms: ts - prevEnd });\n rows.push({ type: 'item', item, offsetMs: ts - start, latencyPct: Math.round(((item.durationMs ?? 0) / max) * 100) });\n prevEnd = ts + (item.durationMs ?? 0);\n }\n return rows;\n}\n\n/** Every write call in the task, including the ones inside scripts. */\nexport function writeCalls(items: TimelineItem[]): TimelineItem[] {\n const out: TimelineItem[] = [];\n for (const i of items) {\n if (i.kind === 'call' && i.write && !i.dryRun) out.push(i);\n if (i.children) out.push(...writeCalls(i.children));\n }\n return out;\n}\n\n/** Decision items in order. */\nexport function decisions(items: TimelineItem[]): TimelineItem[] {\n return items.filter((i) => i.kind === 'decision');\n}\n\n/** \"4 m 12 s\", \"1.2 s\", \"380 ms\" */\nexport function compactDuration(ms: number | null | undefined): string {\n if (ms === null || ms === undefined) return '—';\n if (ms < 1000) return `${Math.round(ms)} ms`;\n if (ms < 60_000) return `${(ms / 1000).toFixed(ms < 10_000 ? 1 : 0)} s`;\n const m = Math.floor(ms / 60_000);\n const s = Math.round((ms % 60_000) / 1000);\n return s ? `${m} m ${s} s` : `${m} m`;\n}\n"],"mappings":"AAYA,SAAgBA,EAAU,EAAuB,EAA0B,CACzE,IAAMC,EAAQ,KAAK,MAAMC,CAAS,EAC5BC,EAAS,CAAC,GAAGC,CAAK,CAAC,CAAC,MAAM,EAAG,IAAM,KAAK,MAAMC,EAAE,EAAE,EAAI,KAAK,MAAMC,EAAE,EAAE,CAAC,EACtEC,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EAAI,KAAK,MAAOF,EAAK,IAAU,GAAI,EACzC,OAAOE,EAAI,GAAGD,EAAE,KAAKC,EAAE,IAAM,GAAGD,EAAE,GACpC,C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n,t as r}from"./utils-BFSetRo1.js";import{t as i}from"./link-CByMaQfX.js";import{t as a}from"./useNavigate-CrwlTILa.js";import{t as o}from"./useQuery-BkgWvtTa.js";import{C as s,Et as c,H as l,K as u,M as d,N as f,c as p,i as m,m as h,x as g}from"./index-EqRZkjd6.js";import{n as _,t as v}from"./use-debounced-value-CSowsQHr.js";import{t as y}from"./wrench-CIdGHcvJ.js";import{r as b}from"./labels-B8sf8Hg_.js";import{t as x}from"./data-table-DL8nsehq.js";import{t as S}from"./states-Z2xH3pUB.js";import{n as C,t as w}from"./section-Bq1blJ9c.js";import{t as T}from"./segmented-RsFdV9xJ.js";import{t as E}from"./button-0-kx6BS-.js";import{t as D}from"./switch-C_lbqEIt.js";import{t as O}from"./queries-3DiENdpp.js";import{t as k}from"./draft-bar-DQo326FN.js";import{o as A}from"./queries-CaU3gifI.js";import{c as j,o as M,u as N}from"./queries-DOMFJPBg.js";import{O as P,b as F,j as I,o as L,t as ee}from"./useButton-DQ6Sgg7h.js";import{S as R,t as z}from"./useOpenChangeComplete-DUM-_E2z.js";import{G as B,U as V,W as te,d as H,o as ne,t as re,u as ie}from"./FloatingPortal-D_eDEbvZ.js";import{t as ae}from"./useTimeout-SGSgaiy1.js";import{_ as oe,h as se,o as ce}from"./reason-parts-B6nt3n-F.js";import{M as le,N as U,P as W,_ as ue,a as de,b as fe,c as pe,d as me,f as he,h as ge,i as _e,l as ve,m as ye,n as G,p as be,r as xe,s as Se,t as Ce,u as we,v as Te,y as Ee}from"./store-SrwTVjPk.js";import{a as De,i as Oe,l as ke,n as Ae,o as je,r as Me,t as Ne}from"./usePositioner-BQnDdcQL.js";import{i as Pe,n as Fe,o as Ie,r as Le,s as Re,t as ze}from"./useTriggerFocusGuards-9VjGYE1p.js";import{t as Be}from"./useBaseUiId-BUBV7JiZ.js";import{t as Ve}from"./inertValue-BEKHztUQ.js";import{n as He,r as Ue}from"./useScrollLock-BWBVawYJ.js";import{a as We}from"./composite-Bfwhy6qy.js";var K=e(t(),1),q=K.createContext(void 0);function J(e){let t=K.useContext(q);if(t===void 0&&!e)throw Error(I(47));return t}var Ge=e(R(),1),Ke={...G,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!G.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&G.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>G.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},qe=class extends V{constructor(e,t,n){let r=new xe;super(Je(e,r,t,n),Ye(r),Ke)}setOpen=(e,t)=>{let n=t.reason===se,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=Se(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=ve(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),Ge.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function Je(e,t,n,r=!1){let i={...Ce(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function Ye(e){return{popupRef:K.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:K.createRef(),beforeTriggerFocusGuardRef:K.createRef(),beforeContentFocusGuardRef:K.createRef(),stickIfOpenTimeout:new ae,stickIfOpen:!0,triggerElements:e}}var Y=n(),X=te(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=Z(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),ye(u,d),we(u);let{forceUnmount:m}=me(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),K.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),K.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,oe(ce))}),[m,u]);let h=d||f||s!=null;return(0,Y.jsxs)(q.Provider,{value:u,children:[s&&(0,Y.jsx)(de,{handle:s,store:u}),h&&(0,Y.jsx)(Ze,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function Xe(e){return J(!0)?(0,Y.jsx)(X,{props:e}):(0,Y.jsx)(Ee,{children:(0,Y.jsx)(X,{props:e})})}function Z(e,t){let n=be((e,n)=>new qe(t,e,n));return K.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function Ze({store:e,modal:t}){let n=e.useState(`floatingRootContext`),r=ue(n,{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),i=r.reference,a=r.floating;return he(e,{activeTriggerProps:i,inactiveTriggerProps:i,popupProps:a}),null}var Qe=B(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=J(!0),h=ke(s)??m;if(!h)throw Error(I(74));let g=Be(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=K.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=ge(g,x,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),w=h.useState(`isPressOpenedByTrigger`,g),T=h.useState(`isTouchPressOpen`,l),E=h.useState(`hasTriggerFocusGuards`,g),D=De(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:Oe(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=P(()=>h.context.stickIfOpen),k=Re(v,{stickIfOpen:O}),A=Ie(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),j=h.useState(`triggerProps`,C),{getButtonProps:M,buttonRef:N}=ee({disabled:a,native:o}),F={open(e){return w?U.open(e):W.open(e)}},{handlePreFocusGuardFocus:R,handleFocusTargetFocus:z}=ze(h,x),B=L(`button`,e,{state:{disabled:a,open:y},ref:[N,t,S,x],props:[k.reference,D,j,A,{[ne]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,M],stateAttributesMapping:F}),V=(0,Y.jsx)(K.Fragment,{children:B},g);return E?(0,Y.jsxs)(K.Fragment,{children:[(0,Y.jsx)(H,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:R}),V,(0,Y.jsx)(H,{ref:h.context.triggerFocusTargetRef,onFocus:z})]}):V}),Q=K.createContext(void 0);function $e(){let e=K.useContext(Q);if(e===void 0)throw Error(I(45));return e}var et=K.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return J().useState(`mounted`)||n?(0,Y.jsx)(Q.Provider,{value:n,children:(0,Y.jsx)(re,{ref:t,...r})}):null}),$=K.createContext(void 0);function tt(){let e=K.useContext($);if(!e)throw Error(I(46));return e}var nt=K.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=ie,..._}=e,v=J(),y=$e(),b=fe(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=v.useState(`adaptiveOrigin`),M=Me({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:j}),N=x.useState(`domReferenceElement`);Le({store:v,domReference:N,positionerElement:O,open:C});let P=E===!0&&w!==`trigger-hover`;Fe(C&&P,D===`touch`,O,T);let F=v.useStateSetter(`positionerElement`),I={open:C,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:k},L=Ne(e,I,{styles:M.positionerStyles,transitionStatus:A,props:_,refs:[t,F],hidden:!S,inert:!C});return(0,Y.jsxs)($.Provider,{value:M,children:[S&&P&&(0,Y.jsx)(He,{inert:Ve(!C),cutout:T}),(0,Y.jsx)(Te,{id:b,children:L})]})}),rt=K.createContext(void 0);function it(){let[e,t]=K.useState(0),n=P(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:K.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var at=K.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=J(),l=tt(),u=Pe(!0)!=null,{context:d,hasClosePart:f}=it(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);z({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),je(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?pe(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M={open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},N=L(`div`,e,{state:M,ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,..._e,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&We.has(e.key)&&e.stopPropagation()}},Ae(g),s],stateAttributesMapping:le});return(0,Y.jsx)(Ue,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:F(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,Y.jsx)(rt.Provider,{value:d,children:N})})});function ot({...e}){return(0,Y.jsx)(Xe,{"data-slot":`popover`,...e})}function st({...e}){return(0,Y.jsx)(Qe,{"data-slot":`popover-trigger`,...e})}function ct({className:e,align:t=`center`,alignOffset:n=0,side:i=`bottom`,sideOffset:a=4,...o}){return(0,Y.jsx)(et,{children:(0,Y.jsx)(nt,{align:t,alignOffset:n,side:i,sideOffset:a,className:`isolate z-50`,children:(0,Y.jsx)(at,{"data-slot":`popover-content`,className:r(`z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o})})})}function lt(){let{serverId:e}=m.useParams(),t=m.useSearch(),n=a({from:m.fullPath}),r=o(j(e,{visibility:t.visibility??`all`,...t.q?{q:t.q}:{},...t.kind?{kind:t.kind}:{},...t.pinned?{pinned:!0}:{},...t.modified?{modified:!0}:{}})),u=o(A(e)),_=o(O(e)),v=N(e),E=l(`overlays:write`,`overlays.updateDraft`),M=e=>void n({search:t=>({...t,...e})}),P=_.data?.items.filter(e=>!e.isMock)??[],F=u.data?.exposure.pinned.length??0,I=[{id:`name`,header:`Tool`,priority:1,cell:t=>(0,Y.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Y.jsx)(i,{to:`/servers/$serverId/tools/$toolId`,params:{serverId:e,toolId:t.id},className:`font-mono text-[13px] font-medium hover:underline`,children:t.name}),b(t.key)===t.name?null:(0,Y.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:b(t.key)})]})},{id:`source`,header:`Source`,cell:e=>(0,Y.jsx)(`span`,{className:`font-mono text-[12.5px] whitespace-nowrap text-muted-foreground`,children:e.method?`${e.method} ${e.path}`:b(e.key)})},{id:`kind`,header:`Kind`,priority:1,cell:e=>(0,Y.jsx)(s,{write:e.write})},{id:`visible`,header:`Visible`,priority:2,cell:e=>e.hidden?(0,Y.jsx)(g,{tone:`muted`,children:`hidden`}):(0,Y.jsx)(`span`,{className:`text-[13px]`,children:`visible`})},{id:`pinned`,header:`Pinned`,cell:e=>(0,Y.jsx)(D,{size:`sm`,checked:e.pinned,disabled:E.disabled||e.hidden,"aria-label":`Pin ${e.name}`,onCheckedChange:t=>v.mutate([{op:`set`,selector:e.key,field:`pinned`,value:t}],{onError:e=>p(e,`Could not change the pin`)})})},{id:`writes`,header:`Writes on in`,cell:e=>e.write?(0,Y.jsxs)(`div`,{className:`flex gap-1`,children:[P.filter(t=>e.writeEnabledIn.includes(t.slug)).map(e=>(0,Y.jsx)(h,{slug:e.slug,kind:e.kind},e.id)),P.some(t=>e.writeEnabledIn.includes(t.slug))?null:(0,Y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`none`})]}):(0,Y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`—`})},{id:`calls`,header:`Calls 7 d`,align:`right`,priority:2,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:d(e.calls7d)})},{id:`errors`,header:`Errors`,align:`right`,cell:e=>(0,Y.jsx)(`span`,{className:`text-muted-foreground tabular-nums`,children:e.calls7d?f(e.errorRate7d,1):`—`})},{id:`modified`,header:(0,Y.jsx)(`span`,{className:`sr-only`,children:`Overlay`}),cell:e=>e.overlayModified?(0,Y.jsxs)(`span`,{title:`Changed by the overlay`,className:`inline-flex items-center gap-1 text-xs text-primary`,children:[(0,Y.jsx)(c,{"aria-hidden":`true`,className:`size-2 fill-current`}),(0,Y.jsx)(`span`,{className:`sr-only`,children:`Changed by the overlay`})]}):null}];return(0,Y.jsxs)(`div`,{className:`flex flex-1 flex-col gap-4`,children:[(0,Y.jsxs)(w,{children:[(0,Y.jsx)(C,{label:`Search tools`,placeholder:`Search tools`,value:t.q,onChange:e=>M({q:e}),className:`w-56`}),(0,Y.jsx)(T,{label:`Visibility`,size:`sm`,value:t.visibility??`all`,onChange:e=>M({visibility:e===`all`?void 0:e}),options:[{value:`all`,label:`All`},{value:`visible`,label:`Visible`},{value:`hidden`,label:`Hidden`}]}),(0,Y.jsx)(T,{label:`Kind`,size:`sm`,value:t.kind??`any`,onChange:e=>M({kind:e===`any`?void 0:e}),options:[{value:`any`,label:`Read + write`},{value:`read`,label:`Read`},{value:`write`,label:`Write`}]}),(0,Y.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 text-[13px]`,children:[(0,Y.jsx)(D,{size:`sm`,checked:!!t.pinned,onCheckedChange:e=>M({pinned:e||void 0})}),` Pinned`]}),(0,Y.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 text-[13px]`,children:[(0,Y.jsx)(D,{size:`sm`,checked:!!t.modified,onCheckedChange:e=>M({modified:e||void 0})}),` Modified by overlay`]}),(0,Y.jsx)(`span`,{className:`flex-1`}),(0,Y.jsx)(ut,{serverId:e})]}),(0,Y.jsxs)(`p`,{className:`text-[12.5px] text-muted-foreground`,children:[`Pinned set = `,F,` operator-pinned + top 5 by usage (refreshed daily). Everything else is found through `,(0,Y.jsx)(`code`,{className:`font-mono`,children:`search_tools`}),`.`]}),(0,Y.jsx)(x,{label:`Tools`,columns:I,rows:r.data?.items,loading:r.isPending,error:r.error,onRetry:()=>void r.refetch(),getRowId:e=>e.id,rowClassName:e=>e.hidden?`text-muted-foreground`:void 0,empty:(0,Y.jsx)(S,{icon:y,title:`No tools match`,description:`Clear the filters to see every tool.`})}),(0,Y.jsx)(k,{serverId:e})]})}function ut({serverId:e}){let[t,n]=(0,K.useState)(``),r=v(t.trim(),300),i=o(M(e,r));return(0,Y.jsxs)(ot,{children:[(0,Y.jsxs)(st,{render:(0,Y.jsx)(E,{variant:`outline`,size:`sm`}),children:[(0,Y.jsx)(_,{}),` Try search_tools`]}),(0,Y.jsx)(ct,{align:`end`,className:`w-[360px]`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(`label`,{htmlFor:`st-q`,className:`text-[13px] font-medium`,children:`What an agent asks`}),(0,Y.jsx)(u,{id:`st-q`,autoFocus:!0,placeholder:`refund an order`,value:t,onChange:e=>n(e.target.value)}),(0,Y.jsxs)(`ol`,{"aria-live":`polite`,className:`flex flex-col gap-1`,children:[i.data?.tools.map((e,t)=>(0,Y.jsxs)(`li`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,Y.jsx)(`span`,{className:`w-4 text-right text-xs text-muted-foreground tabular-nums`,children:t+1}),(0,Y.jsx)(`span`,{className:`font-mono`,children:e.name}),e.write?(0,Y.jsx)(s,{write:!0}):null,(0,Y.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground tabular-nums`,children:e.score.toFixed(2)})]},e.name)),i.data&&!i.data.tools.length?(0,Y.jsx)(`li`,{className:`text-[13px] text-muted-foreground`,children:`No tool matches. Agents would report an unmet need.`}):null]}),i.data?(0,Y.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[i.data.totalVisible,` visible tools searched`]}):null]})})]})}export{lt as component};
|
|
2
|
+
//# sourceMappingURL=tools-C5I1npEn.js.map
|